• Main Page
  • Related Pages
  • Packages
  • Classes
  • Files
  • File List

libsbml.py

Go to the documentation of this file.
00001 from __future__ import generators
00002 # This file was automatically generated by SWIG (http://www.swig.org).
00003 # Version 1.3.40
00004 #
00005 # Do not make changes to this file unless you know what you are doing--modify
00006 # the SWIG interface file instead.
00007 # This file is compatible with both classic and new-style classes.
00008 
00009 from sys import version_info
00010 if version_info >= (2,6,0):
00011     def swig_import_helper():
00012         from os.path import dirname
00013         import imp
00014         fp = None
00015         try:
00016             fp, pathname, description = imp.find_module('_libsbml', [dirname(__file__)])
00017         except ImportError:
00018             import _libsbml
00019             return _libsbml
00020         if fp is not None:
00021             try:
00022                 _mod = imp.load_module('_libsbml', fp, pathname, description)
00023             finally:
00024                 fp.close()
00025             return _mod
00026     _libsbml = swig_import_helper()
00027     del swig_import_helper
00028 else:
00029     import _libsbml
00030 del version_info
00031 try:
00032     _swig_property = property
00033 except NameError:
00034     pass # Python < 2.2 doesn't have 'property'.
00035 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
00036     if (name == "thisown"): return self.this.own(value)
00037     if (name == "this"):
00038         if type(value).__name__ == 'SwigPyObject':
00039             self.__dict__[name] = value
00040             return
00041     method = class_type.__swig_setmethods__.get(name,None)
00042     if method: return method(self,value)
00043     if (not static) or hasattr(self,name):
00044         self.__dict__[name] = value
00045     else:
00046         raise AttributeError("You cannot add attributes to %s" % self)
00047 
00048 def _swig_setattr(self,class_type,name,value):
00049     return _swig_setattr_nondynamic(self,class_type,name,value,0)
00050 
00051 def _swig_getattr(self,class_type,name):
00052     if (name == "thisown"): return self.this.own()
00053     method = class_type.__swig_getmethods__.get(name,None)
00054     if method: return method(self)
00055     raise AttributeError(name)
00056 
00057 def _swig_repr(self):
00058     try: strthis = "proxy of " + self.this.__repr__()
00059     except: strthis = ""
00060     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
00061 
00062 try:
00063     _object = object
00064     _newclass = 1
00065 except AttributeError:
00066     class _object : pass
00067     _newclass = 0
00068 
00069 
00070 class ModelCreatorList(_object):
00071     __swig_setmethods__ = {}
00072     __setattr__ = lambda self, name, value: _swig_setattr(self, ModelCreatorList, name, value)
00073     __swig_getmethods__ = {}
00074     __getattr__ = lambda self, name: _swig_getattr(self, ModelCreatorList, name)
00075     __repr__ = _swig_repr
00076     def __init__(self): 
00077         this = _libsbml.new_ModelCreatorList()
00078         try: self.this.append(this)
00079         except: self.this = this
00080     __swig_destroy__ = _libsbml.delete_ModelCreatorList
00081     __del__ = lambda self : None;
00082     def add(self, *args): return _libsbml.ModelCreatorList_add(self, *args)
00083     def get(self, *args): return _libsbml.ModelCreatorList_get(self, *args)
00084     def prepend(self, *args): return _libsbml.ModelCreatorList_prepend(self, *args)
00085     def remove(self, *args): return _libsbml.ModelCreatorList_remove(self, *args)
00086     def getSize(self): return _libsbml.ModelCreatorList_getSize(self)
00087 ModelCreatorList_swigregister = _libsbml.ModelCreatorList_swigregister
00088 ModelCreatorList_swigregister(ModelCreatorList)
00089 
00090 class DateList(_object):
00091     __swig_setmethods__ = {}
00092     __setattr__ = lambda self, name, value: _swig_setattr(self, DateList, name, value)
00093     __swig_getmethods__ = {}
00094     __getattr__ = lambda self, name: _swig_getattr(self, DateList, name)
00095     __repr__ = _swig_repr
00096     def __init__(self): 
00097         this = _libsbml.new_DateList()
00098         try: self.this.append(this)
00099         except: self.this = this
00100     __swig_destroy__ = _libsbml.delete_DateList
00101     __del__ = lambda self : None;
00102     def add(self, *args): return _libsbml.DateList_add(self, *args)
00103     def get(self, *args): return _libsbml.DateList_get(self, *args)
00104     def prepend(self, *args): return _libsbml.DateList_prepend(self, *args)
00105     def remove(self, *args): return _libsbml.DateList_remove(self, *args)
00106     def getSize(self): return _libsbml.DateList_getSize(self)
00107 DateList_swigregister = _libsbml.DateList_swigregister
00108 DateList_swigregister(DateList)
00109 
00110 class CVTermList(_object):
00111     __swig_setmethods__ = {}
00112     __setattr__ = lambda self, name, value: _swig_setattr(self, CVTermList, name, value)
00113     __swig_getmethods__ = {}
00114     __getattr__ = lambda self, name: _swig_getattr(self, CVTermList, name)
00115     __repr__ = _swig_repr
00116     def __init__(self): 
00117         this = _libsbml.new_CVTermList()
00118         try: self.this.append(this)
00119         except: self.this = this
00120     __swig_destroy__ = _libsbml.delete_CVTermList
00121     __del__ = lambda self : None;
00122     def add(self, *args): return _libsbml.CVTermList_add(self, *args)
00123     def get(self, *args): return _libsbml.CVTermList_get(self, *args)
00124     def prepend(self, *args): return _libsbml.CVTermList_prepend(self, *args)
00125     def remove(self, *args): return _libsbml.CVTermList_remove(self, *args)
00126     def getSize(self): return _libsbml.CVTermList_getSize(self)
00127 CVTermList_swigregister = _libsbml.CVTermList_swigregister
00128 CVTermList_swigregister(CVTermList)
00129 
00130 class ASTNodeList(_object):
00131     __swig_setmethods__ = {}
00132     __setattr__ = lambda self, name, value: _swig_setattr(self, ASTNodeList, name, value)
00133     __swig_getmethods__ = {}
00134     __getattr__ = lambda self, name: _swig_getattr(self, ASTNodeList, name)
00135     __repr__ = _swig_repr
00136     def __init__(self): 
00137         this = _libsbml.new_ASTNodeList()
00138         try: self.this.append(this)
00139         except: self.this = this
00140     __swig_destroy__ = _libsbml.delete_ASTNodeList
00141     __del__ = lambda self : None;
00142     def add(self, *args): return _libsbml.ASTNodeList_add(self, *args)
00143     def get(self, *args): return _libsbml.ASTNodeList_get(self, *args)
00144     def prepend(self, *args): return _libsbml.ASTNodeList_prepend(self, *args)
00145     def remove(self, *args): return _libsbml.ASTNodeList_remove(self, *args)
00146     def getSize(self): return _libsbml.ASTNodeList_getSize(self)
00147 ASTNodeList_swigregister = _libsbml.ASTNodeList_swigregister
00148 ASTNodeList_swigregister(ASTNodeList)
00149 
00150 class SwigPyIterator(_object):
00151     """Proxy of C++ swig::SwigPyIterator class"""
00152     __swig_setmethods__ = {}
00153     __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
00154     __swig_getmethods__ = {}
00155     __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
00156     def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
00157     __repr__ = _swig_repr
00158     __swig_destroy__ = _libsbml.delete_SwigPyIterator
00159     __del__ = lambda self : None;
00160     def value(self):
00161         """value(self) -> PyObject"""
00162         return _libsbml.SwigPyIterator_value(self)
00163 
00164     def incr(self, n = 1):
00165         """
00166         incr(self, size_t n = 1) -> SwigPyIterator
00167         incr(self) -> SwigPyIterator
00168         """
00169         return _libsbml.SwigPyIterator_incr(self, n)
00170 
00171     def decr(self, n = 1):
00172         """
00173         decr(self, size_t n = 1) -> SwigPyIterator
00174         decr(self) -> SwigPyIterator
00175         """
00176         return _libsbml.SwigPyIterator_decr(self, n)
00177 
00178     def distance(self, *args):
00179         """distance(self, SwigPyIterator x) -> ptrdiff_t"""
00180         return _libsbml.SwigPyIterator_distance(self, *args)
00181 
00182     def equal(self, *args):
00183         """equal(self, SwigPyIterator x) -> bool"""
00184         return _libsbml.SwigPyIterator_equal(self, *args)
00185 
00186     def copy(self):
00187         """copy(self) -> SwigPyIterator"""
00188         return _libsbml.SwigPyIterator_copy(self)
00189 
00190     def next(self):
00191         """next(self) -> PyObject"""
00192         return _libsbml.SwigPyIterator_next(self)
00193 
00194     def __next__(self):
00195         """__next__(self) -> PyObject"""
00196         return _libsbml.SwigPyIterator___next__(self)
00197 
00198     def previous(self):
00199         """previous(self) -> PyObject"""
00200         return _libsbml.SwigPyIterator_previous(self)
00201 
00202     def advance(self, *args):
00203         """advance(self, ptrdiff_t n) -> SwigPyIterator"""
00204         return _libsbml.SwigPyIterator_advance(self, *args)
00205 
00206     def __eq__(self, *args):
00207         """__eq__(self, SwigPyIterator x) -> bool"""
00208         return _libsbml.SwigPyIterator___eq__(self, *args)
00209 
00210     def __ne__(self, *args):
00211         """__ne__(self, SwigPyIterator x) -> bool"""
00212         return _libsbml.SwigPyIterator___ne__(self, *args)
00213 
00214     def __iadd__(self, *args):
00215         """__iadd__(self, ptrdiff_t n) -> SwigPyIterator"""
00216         return _libsbml.SwigPyIterator___iadd__(self, *args)
00217 
00218     def __isub__(self, *args):
00219         """__isub__(self, ptrdiff_t n) -> SwigPyIterator"""
00220         return _libsbml.SwigPyIterator___isub__(self, *args)
00221 
00222     def __add__(self, *args):
00223         """__add__(self, ptrdiff_t n) -> SwigPyIterator"""
00224         return _libsbml.SwigPyIterator___add__(self, *args)
00225 
00226     def __sub__(self, *args):
00227         """
00228         __sub__(self, ptrdiff_t n) -> SwigPyIterator
00229         __sub__(self, SwigPyIterator x) -> ptrdiff_t
00230         """
00231         return _libsbml.SwigPyIterator___sub__(self, *args)
00232 
00233     def __iter__(self): return self
00234 SwigPyIterator_swigregister = _libsbml.SwigPyIterator_swigregister
00235 SwigPyIterator_swigregister(SwigPyIterator)
00236 
00237 class string(_object):
00238     """Proxy of C++ std::basic_string<(char)> class"""
00239     __swig_setmethods__ = {}
00240     __setattr__ = lambda self, name, value: _swig_setattr(self, string, name, value)
00241     __swig_getmethods__ = {}
00242     __getattr__ = lambda self, name: _swig_getattr(self, string, name)
00243     __repr__ = _swig_repr
00244     def length(self):
00245         """length(self) -> size_type"""
00246         return _libsbml.string_length(self)
00247 
00248     def max_size(self):
00249         """max_size(self) -> size_type"""
00250         return _libsbml.string_max_size(self)
00251 
00252     def copy(self, *args):
00253         """
00254         copy(self, char __s, size_type __n, size_type __pos = 0) -> size_type
00255         copy(self, char __s, size_type __n) -> size_type
00256         """
00257         return _libsbml.string_copy(self, *args)
00258 
00259     def c_str(self):
00260         """c_str(self) -> char"""
00261         return _libsbml.string_c_str(self)
00262 
00263     def find(self, *args):
00264         """
00265         find(self, char __s, size_type __pos, size_type __n) -> size_type
00266         find(self, string __str, size_type __pos = 0) -> size_type
00267         find(self, string __str) -> size_type
00268         find(self, char __c, size_type __pos = 0) -> size_type
00269         find(self, char __c) -> size_type
00270         """
00271         return _libsbml.string_find(self, *args)
00272 
00273     def rfind(self, *args):
00274         """
00275         rfind(self, string __str, size_type __pos = std::basic_string< char >::npos) -> size_type
00276         rfind(self, string __str) -> size_type
00277         rfind(self, char __s, size_type __pos, size_type __n) -> size_type
00278         rfind(self, char __c, size_type __pos = std::basic_string< char >::npos) -> size_type
00279         rfind(self, char __c) -> size_type
00280         """
00281         return _libsbml.string_rfind(self, *args)
00282 
00283     def find_first_of(self, *args):
00284         """
00285         find_first_of(self, string __str, size_type __pos = 0) -> size_type
00286         find_first_of(self, string __str) -> size_type
00287         find_first_of(self, char __s, size_type __pos, size_type __n) -> size_type
00288         find_first_of(self, char __c, size_type __pos = 0) -> size_type
00289         find_first_of(self, char __c) -> size_type
00290         """
00291         return _libsbml.string_find_first_of(self, *args)
00292 
00293     def find_last_of(self, *args):
00294         """
00295         find_last_of(self, string __str, size_type __pos = std::basic_string< char >::npos) -> size_type
00296         find_last_of(self, string __str) -> size_type
00297         find_last_of(self, char __s, size_type __pos, size_type __n) -> size_type
00298         find_last_of(self, char __c, size_type __pos = std::basic_string< char >::npos) -> size_type
00299         find_last_of(self, char __c) -> size_type
00300         """
00301         return _libsbml.string_find_last_of(self, *args)
00302 
00303     def find_first_not_of(self, *args):
00304         """
00305         find_first_not_of(self, string __str, size_type __pos = 0) -> size_type
00306         find_first_not_of(self, string __str) -> size_type
00307         find_first_not_of(self, char __s, size_type __pos, size_type __n) -> size_type
00308         find_first_not_of(self, char __c, size_type __pos = 0) -> size_type
00309         find_first_not_of(self, char __c) -> size_type
00310         """
00311         return _libsbml.string_find_first_not_of(self, *args)
00312 
00313     def find_last_not_of(self, *args):
00314         """
00315         find_last_not_of(self, string __str, size_type __pos = std::basic_string< char >::npos) -> size_type
00316         find_last_not_of(self, string __str) -> size_type
00317         find_last_not_of(self, char __s, size_type __pos, size_type __n) -> size_type
00318         find_last_not_of(self, char __c, size_type __pos = std::basic_string< char >::npos) -> size_type
00319         find_last_not_of(self, char __c) -> size_type
00320         """
00321         return _libsbml.string_find_last_not_of(self, *args)
00322 
00323     def substr(self, *args):
00324         """
00325         substr(self, size_type __pos = 0, size_type __n = std::basic_string< char >::npos) -> string
00326         substr(self, size_type __pos = 0) -> string
00327         substr(self) -> string
00328         """
00329         return _libsbml.string_substr(self, *args)
00330 
00331     def empty(self):
00332         """empty(self) -> bool"""
00333         return _libsbml.string_empty(self)
00334 
00335     def size(self):
00336         """size(self) -> size_type"""
00337         return _libsbml.string_size(self)
00338 
00339     def swap(self, *args):
00340         """swap(self, string v)"""
00341         return _libsbml.string_swap(self, *args)
00342 
00343     def erase(self, *args):
00344         """
00345         erase(self, size_type __pos = 0, size_type __n = std::basic_string< char >::npos) -> string
00346         erase(self, size_type __pos = 0) -> string
00347         erase(self) -> string
00348         erase(self, iterator pos) -> iterator
00349         erase(self, iterator first, iterator last) -> iterator
00350         """
00351         return _libsbml.string_erase(self, *args)
00352 
00353     def __init__(self, *args): 
00354         """
00355         __init__(self, char __s, size_type __n) -> string
00356         __init__(self) -> string
00357         __init__(self, string arg0) -> string
00358         __init__(self, size_type size, value_type value) -> string
00359         """
00360         this = _libsbml.new_string(*args)
00361         try: self.this.append(this)
00362         except: self.this = this
00363     def assign(self, *args):
00364         """
00365         assign(self, string __str) -> string
00366         assign(self, string __str, size_type __pos, size_type __n) -> string
00367         assign(self, char __s, size_type __n) -> string
00368         assign(self, size_type n, value_type x)
00369         """
00370         return _libsbml.string_assign(self, *args)
00371 
00372     def resize(self, *args):
00373         """
00374         resize(self, size_type new_size)
00375         resize(self, size_type new_size, value_type x)
00376         """
00377         return _libsbml.string_resize(self, *args)
00378 
00379     def iterator(self):
00380         """iterator(self) -> SwigPyIterator"""
00381         return _libsbml.string_iterator(self)
00382 
00383     def __iter__(self): return self.iterator()
00384     def __nonzero__(self):
00385         """__nonzero__(self) -> bool"""
00386         return _libsbml.string___nonzero__(self)
00387 
00388     def __bool__(self):
00389         """__bool__(self) -> bool"""
00390         return _libsbml.string___bool__(self)
00391 
00392     def __len__(self):
00393         """__len__(self) -> size_type"""
00394         return _libsbml.string___len__(self)
00395 
00396     def __getslice__(self, *args):
00397         """__getslice__(self, difference_type i, difference_type j) -> string"""
00398         return _libsbml.string___getslice__(self, *args)
00399 
00400     def __setslice__(self, *args):
00401         """__setslice__(self, difference_type i, difference_type j, string v)"""
00402         return _libsbml.string___setslice__(self, *args)
00403 
00404     def __delslice__(self, *args):
00405         """__delslice__(self, difference_type i, difference_type j)"""
00406         return _libsbml.string___delslice__(self, *args)
00407 
00408     def __delitem__(self, *args):
00409         """
00410         __delitem__(self, difference_type i)
00411         __delitem__(self, PySliceObject slice)
00412         """
00413         return _libsbml.string___delitem__(self, *args)
00414 
00415     def __getitem__(self, *args):
00416         """
00417         __getitem__(self, PySliceObject slice) -> string
00418         __getitem__(self, difference_type i) -> value_type
00419         """
00420         return _libsbml.string___getitem__(self, *args)
00421 
00422     def __setitem__(self, *args):
00423         """
00424         __setitem__(self, PySliceObject slice, string v)
00425         __setitem__(self, difference_type i, value_type x)
00426         """
00427         return _libsbml.string___setitem__(self, *args)
00428 
00429     def insert(self, *args):
00430         """
00431         insert(self, size_type __pos1, string __str) -> string
00432         insert(self, size_type __pos1, string __str, size_type __pos2, size_type __n) -> string
00433         insert(self, size_type __pos, char __s, size_type __n) -> string
00434         insert(self, size_type __pos, size_type __n, char __c) -> string
00435         insert(self, iterator pos, value_type x) -> iterator
00436         insert(self, iterator pos, size_type n, value_type x)
00437         insert(self, iterator __p, size_type __n, char __c)
00438         """
00439         return _libsbml.string_insert(self, *args)
00440 
00441     def replace(self, *args):
00442         """
00443         replace(self, size_type __pos, size_type __n, string __str) -> string
00444         replace(self, size_type __pos1, size_type __n1, string __str, size_type __pos2, 
00445             size_type __n2) -> string
00446         replace(self, size_type __pos, size_type __n1, char __s, size_type __n2) -> string
00447         replace(self, size_type __pos, size_type __n1, size_type __n2, char __c) -> string
00448         replace(self, iterator __i1, iterator __i2, string __str) -> string
00449         replace(self, iterator __i1, iterator __i2, char __s, size_type __n) -> string
00450         replace(self, iterator __i1, iterator __i2, size_type __n, char __c) -> string
00451         replace(self, iterator __i1, iterator __i2, char __k1, char __k2) -> string
00452         replace(self, iterator __i1, iterator __i2, const_iterator __k1, 
00453             const_iterator __k2) -> string
00454         """
00455         return _libsbml.string_replace(self, *args)
00456 
00457     def __iadd__(self, *args):
00458         """__iadd__(self, string v) -> string"""
00459         return _libsbml.string___iadd__(self, *args)
00460 
00461     def __add__(self, *args):
00462         """__add__(self, string v) -> string"""
00463         return _libsbml.string___add__(self, *args)
00464 
00465     def __radd__(self, *args):
00466         """__radd__(self, string v) -> string"""
00467         return _libsbml.string___radd__(self, *args)
00468 
00469     def __str__(self):
00470         """__str__(self) -> string"""
00471         return _libsbml.string___str__(self)
00472 
00473     def __rlshift__(self, *args):
00474         """__rlshift__(self, ostream out) -> ostream"""
00475         return _libsbml.string___rlshift__(self, *args)
00476 
00477     def __eq__(self, *args):
00478         """__eq__(self, string v) -> bool"""
00479         return _libsbml.string___eq__(self, *args)
00480 
00481     def __ne__(self, *args):
00482         """__ne__(self, string v) -> bool"""
00483         return _libsbml.string___ne__(self, *args)
00484 
00485     def __gt__(self, *args):
00486         """__gt__(self, string v) -> bool"""
00487         return _libsbml.string___gt__(self, *args)
00488 
00489     def __lt__(self, *args):
00490         """__lt__(self, string v) -> bool"""
00491         return _libsbml.string___lt__(self, *args)
00492 
00493     def __ge__(self, *args):
00494         """__ge__(self, string v) -> bool"""
00495         return _libsbml.string___ge__(self, *args)
00496 
00497     def __le__(self, *args):
00498         """__le__(self, string v) -> bool"""
00499         return _libsbml.string___le__(self, *args)
00500 
00501     __swig_destroy__ = _libsbml.delete_string
00502     __del__ = lambda self : None;
00503 string_swigregister = _libsbml.string_swigregister
00504 string_swigregister(string)
00505 cvar = _libsbml.cvar
00506 string.npos = _libsbml.cvar.string_npos
00507 
00508 class ostream(_object):
00509     """Proxy of C++ std::basic_ostream<(char)> class"""
00510     __swig_setmethods__ = {}
00511     __setattr__ = lambda self, name, value: _swig_setattr(self, ostream, name, value)
00512     __swig_getmethods__ = {}
00513     __getattr__ = lambda self, name: _swig_getattr(self, ostream, name)
00514     __repr__ = _swig_repr
00515     def __init__(self, *args): 
00516         """__init__(self, std::basic_streambuf<(char,std::char_traits<(char)>)> __sb) -> ostream"""
00517         this = _libsbml.new_ostream(*args)
00518         try: self.this.append(this)
00519         except: self.this = this
00520     __swig_destroy__ = _libsbml.delete_ostream
00521     __del__ = lambda self : None;
00522 ostream_swigregister = _libsbml.ostream_swigregister
00523 ostream_swigregister(ostream)
00524 
00525 class ostringstream(ostream):
00526     """Proxy of C++ std::basic_ostringstream<(char)> class"""
00527     __swig_setmethods__ = {}
00528     for _s in [ostream]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
00529     __setattr__ = lambda self, name, value: _swig_setattr(self, ostringstream, name, value)
00530     __swig_getmethods__ = {}
00531     for _s in [ostream]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
00532     __getattr__ = lambda self, name: _swig_getattr(self, ostringstream, name)
00533     __repr__ = _swig_repr
00534     def __init__(self, *args): 
00535         """
00536         __init__(self, std::ios_base::openmode __mode = std::ios_base::out) -> ostringstream
00537         __init__(self) -> ostringstream
00538         """
00539         this = _libsbml.new_ostringstream(*args)
00540         try: self.this.append(this)
00541         except: self.this = this
00542     __swig_destroy__ = _libsbml.delete_ostringstream
00543     __del__ = lambda self : None;
00544     def str(self, *args):
00545         """
00546         str(self) -> string
00547         str(self, string __s)
00548         """
00549         return _libsbml.ostringstream_str(self, *args)
00550 
00551 ostringstream_swigregister = _libsbml.ostringstream_swigregister
00552 ostringstream_swigregister(ostringstream)
00553 
00554 
00555 def endl(*args):
00556   """endl(ostream arg0) -> ostream"""
00557   return _libsbml.endl(*args)
00558 
00559 def flush(*args):
00560   """flush(ostream arg0) -> ostream"""
00561   return _libsbml.flush(*args)
00562 import sys
00563 import os.path
00564 
00565 
00566 def conditional_abspath (filename):
00567   """conditional_abspath (filename) -> filename
00568 
00569   Returns filename with an absolute path prepended, if necessary.
00570   Some combinations of platforms and underlying XML parsers *require*
00571   an absolute path to a filename while others do not.  This function
00572   encapsulates the appropriate logic.  It is used by readSBML() and
00573   SBMLReader.readSBML().
00574   """
00575   if sys.platform.find('cygwin') != -1:
00576     return filename
00577   else:
00578     return os.path.abspath(filename)
00579 
00580 def readSBML(*args):
00581   """readSBML(filename) -> SBMLDocument
00582 
00583   Reads an SBML document from the given file.  If filename does not exist
00584   or is not an SBML file, a fatal error will be logged.  Errors can be
00585   identified by their unique ids, e.g.:
00586 
00587     d = readSBML(filename)
00588 
00589     if d.getNumErrors() > 0:
00590       pm = d.getError(0)
00591       if pm.getErrorId() == libsbml.XMLFileUnreadable
00592       if pm.getErrorId() == libsbml.XMLTagMismatch: 
00593 
00594   """
00595   reader = SBMLReader()
00596   return reader.readSBML(args[0])
00597 
00598 
00599 def ASTNode_true(*args):
00600   """ASTNode_true(ASTNode node) -> int"""
00601   return _libsbml.ASTNode_true(*args)
00602 LIBSBML_DOTTED_VERSION = _libsbml.LIBSBML_DOTTED_VERSION
00603 LIBSBML_VERSION = _libsbml.LIBSBML_VERSION
00604 LIBSBML_VERSION_STRING = _libsbml.LIBSBML_VERSION_STRING
00605 
00606 def getLibSBMLVersion():
00607   """
00608     getLibSBMLVersion() -> int
00609 
00610     Returns the libSBML version as an integer: version 1.2.3 becomes 10203.
00611 
00612     @return the libSBML version as an integer: version 1.2.3 becomes 10203.
00613 
00614 
00615     """
00616   return _libsbml.getLibSBMLVersion()
00617 
00618 def getLibSBMLDottedVersion():
00619   """
00620     getLibSBMLDottedVersion() -> char
00621 
00622     Returns the libSBML version as a string of the form '1.2.3'.
00623 
00624     @return the libSBML version as a string of the form '1.2.3'.
00625 
00626 
00627     """
00628   return _libsbml.getLibSBMLDottedVersion()
00629 
00630 def getLibSBMLVersionString():
00631   """
00632     getLibSBMLVersionString() -> char
00633 
00634     Returns the libSBML version as a string: version 1.2.3 becomes '10203'.
00635 
00636     @return the libSBML version as a string: version 1.2.3 becomes '10203'.
00637 
00638 
00639     """
00640   return _libsbml.getLibSBMLVersionString()
00641 LIBSBML_OPERATION_RETURN_VALUES_H = _libsbml.LIBSBML_OPERATION_RETURN_VALUES_H
00642 LIBSBML_OPERATION_SUCCESS = _libsbml.LIBSBML_OPERATION_SUCCESS
00643 LIBSBML_INDEX_EXCEEDS_SIZE = _libsbml.LIBSBML_INDEX_EXCEEDS_SIZE
00644 LIBSBML_UNEXPECTED_ATTRIBUTE = _libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE
00645 LIBSBML_OPERATION_FAILED = _libsbml.LIBSBML_OPERATION_FAILED
00646 LIBSBML_INVALID_ATTRIBUTE_VALUE = _libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE
00647 LIBSBML_INVALID_OBJECT = _libsbml.LIBSBML_INVALID_OBJECT
00648 LIBSBML_DUPLICATE_OBJECT_ID = _libsbml.LIBSBML_DUPLICATE_OBJECT_ID
00649 LIBSBML_LEVEL_MISMATCH = _libsbml.LIBSBML_LEVEL_MISMATCH
00650 LIBSBML_VERSION_MISMATCH = _libsbml.LIBSBML_VERSION_MISMATCH
00651 LIBSBML_INVALID_XML_OPERATION = _libsbml.LIBSBML_INVALID_XML_OPERATION
00652 class SBMLReader(_object):
00653     """
00654     Methods for reading SBML from files and text strings.
00655 
00656     @htmlinclude libsbml-not-sbml-warning.html
00657 
00658     The SBMLReader class provides the main interface for reading SBML
00659     content from files and strings.  The methods for reading SBML all return
00660     an SBMLDocument object representing the results.
00661 
00662     In the case of failures (such as if the SBML contains errors or a file
00663     cannot be read), the errors will be recorded with the SBMLErrorLog object
00664     kept in the SBMLDocument returned by SBMLReader.  Callers should check
00665     for errors and warnings using the methods for this purpose provided on
00666     SBMLDocument.
00667 
00668     For convenience as well as easy access from other languages besides C++,
00669     this file also defines two global functions, readSBML() and
00670     readSBMLFromString().  They are equivalent to creating an SBMLReader
00671     object and then calling
00672     the @if clike SBMLReader::readSBML() @endif@if java SBMLReader::readSBML(String filename) @endif or
00673     @if clike SBMLReader::readSBMLFromString() @endif@if java SBMLReader::readSBMLFromString(String xml)  @endif methods, respectively.
00674 
00675     """
00676     __swig_setmethods__ = {}
00677     __setattr__ = lambda self, name, value: _swig_setattr(self, SBMLReader, name, value)
00678     __swig_getmethods__ = {}
00679     __getattr__ = lambda self, name: _swig_getattr(self, SBMLReader, name)
00680     __repr__ = _swig_repr
00681     def __init__(self): 
00682         """
00683         __init__(self) -> SBMLReader
00684 
00685         Creates a new SBMLReader and returns it. 
00686           
00687 
00688         """
00689         this = _libsbml.new_SBMLReader()
00690         try: self.this.append(this)
00691         except: self.this = this
00692     __swig_destroy__ = _libsbml.delete_SBMLReader
00693     __del__ = lambda self : None;
00694     def readSBML(*args):
00695       """readSBML(filename) -> SBMLDocument
00696 
00697       Reads an SBML document from the given file.  If filename does not exist
00698       or is not an SBML file, a fatal error will be logged.  Errors can be
00699       identified by their unique ids, e.g.:
00700 
00701         reader = libsbml.SBMLReader()
00702         d      = reader.readSBML(filename)
00703 
00704         if d.getNumErrors() > 0:
00705           pm = d.getError(0)
00706           if pm.getErrorId() == libsbml.XMLFileUnreadable
00707           if pm.getErrorId() == libsbml.XMLTagMismatch: 
00708       """
00709       args_copy    = list(args)
00710       args_copy[1] = conditional_abspath(args[1])
00711       return _libsbml.SBMLReader_readSBML(*args_copy)
00712 
00713 
00714     def readSBMLFromFile(self, *args):
00715         """
00716         readSBMLFromFile(self, string filename) -> SBMLDocument
00717 
00718         Reads an SBML document from a file.
00719 
00720         If the file named @p filename does not exist or its content is not
00721         valid SBML, one or more errors will be logged with the SBMLDocument
00722         object returned by this method.  Callers can use the methods on
00723         SBMLDocument such as SBMLDocument::getNumErrors() and
00724         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif to get the errors.  The object returned by
00725         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif is an SBMLError object, and it has methods to
00726         get the error code, category, and severity level of the problem, as
00727         well as a textual description of the problem.  The possible severity
00728         levels range from informational messages to fatal errors; see the
00729         documentation for SBMLError for more information.
00730 
00731         If the file @p filename could not be read, the file-reading error will
00732         appear first.  The error code can provide a clue about what happened.
00733         For example, a file might be unreadable (either because it does not
00734         actually exist or because the user does not have the necessary access
00735         priviledges to read it) or some sort of file operation error may have
00736         bee reported by the underlying operating system.  Callers can check
00737         for these situations using code such as the following:
00738         @code
00739         SBMLReader* reader = new SBMLReader();
00740         SBMLDocument* doc  = reader.readSBML(filename);
00741 
00742         if (doc->getNumErrors() > 0)
00743         {
00744           if (doc->getError(0)->getId() == XMLError::FileUnreadable)
00745           {
00746             // Handle case of unreadable file here.
00747           } 
00748           else if (doc->getError(0)->getId() == XMLError::FileOperationError)
00749           {
00750             // Handle case of other file error here.
00751           }
00752           else
00753           {
00754             // Handle other cases -- see error codes defined in XMLErrorCode_t
00755             // for other possible cases to check.
00756           }
00757         }
00758         @endcode
00759 
00760         If the given filename ends with the suffix @c '.gz' (for example, @c
00761         'myfile.xml.gz'), the file is assumed to be compressed in @em gzip
00762         format and will be automatically decompressed upon reading.
00763         Similarly, if the given filename ends with @c '.zip' or @c '.bz2', the
00764         file is assumed to be compressed in @em zip or @em bzip2 format
00765         (respectively).  Files whose names lack these suffixes will be read
00766         uncompressed.  Note that if the file is in @em zip format but the
00767         archive contains more than one file, only the first file in the
00768         archive will be read and the rest ignored.
00769 
00770         @param filename the name or full pathname of the file to be read.
00771 
00772         @return a pointer to the SBMLDocument created from the SBML content.
00773 
00774         @see SBMLError
00775 
00776         @note LibSBML versions 2.x and 3.x behave differently in error
00777         handling in several respects.  One difference is how early some errors
00778         are caught and whether libSBML continues processing a file in the face
00779         of some early errors.  In general, libSBML 3.x stops parsing SBML
00780         inputs sooner than libSBML 2.x in the face of XML errors because the
00781         errors may invalidate any further SBML content.  For example, a
00782         missing XML declaration at the beginning of the file was ignored by
00783         libSBML 2.x but in version 3.x, it will cause libSBML to stop parsing
00784         the rest of the input altogether.  While this behavior may seem more
00785         severe and intolerant, it was necessary in order to provide uniform
00786         behavior regardless of which underlying XML parser (Expat, Xerces,
00787         libxml2) is being used by libSBML.  The XML parsers themselves behave
00788         differently in their error reporting, and sometimes libSBML has to
00789         resort to the lowest common denominator.
00790 
00791         @note To read a gzip/zip file, libSBML needs to be configured and
00792         linked with the <a href='http://www.zlib.net/'>zlib</a> library at
00793         compile time.  It also needs to be linked with the <a
00794         href=''>bzip2</a> library to read files in @em bzip2 format.  (Both of
00795         these are the default configurations for libSBML.)  Errors about
00796         unreadable files will be logged if a compressed filename is given and
00797         libSBML was @em not linked with the corresponding required library.
00798 
00799         @note SBMLReader::hasZlib() and SBMLReader::hasBzip2() can be used to
00800         check whether libSBML has been linked with each library.
00801           
00802 
00803         """
00804         return _libsbml.SBMLReader_readSBMLFromFile(self, *args)
00805 
00806     def readSBMLFromString(self, *args):
00807         """
00808         readSBMLFromString(self, string xml) -> SBMLDocument
00809 
00810         Reads an SBML document from the given XML string.
00811 
00812         This method is flexible with respect to the presence of an XML
00813         declaration at the beginning of the string.  In particular, if the
00814         string in @p xml does not begin with the XML declaration
00815         <code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;</code>, then this
00816         method will automatically prepend the declaration to @p xml.
00817 
00818         This method will log a fatal error if the content given in the
00819         parameter @p xml is not SBML.  See the method documentation for
00820         @if clike SBMLReader::readSBML() @endif@if java SBMLReader::readSBML(String filename) @endif for an example of code for testing the returned
00821         error code.
00822 
00823         @param xml a string containing a full SBML model
00824 
00825         @return a pointer to the SBMLDocument created from the SBML content.
00826 
00827         @if clike @see SBMLReader::readSBML() @endif@if java @see SBMLReader::readSBML(String filename) @endif
00828           
00829 
00830         """
00831         return _libsbml.SBMLReader_readSBMLFromString(self, *args)
00832 
00833     def hasZlib():
00834         """
00835         hasZlib() -> bool
00836 
00837         Predicate returning @c true or @c false depending on whether
00838         libSBML is linked with zlib at compile time.
00839 
00840         @return @c true if zlib is linked, @c false otherwise.
00841           
00842 
00843         """
00844         return _libsbml.SBMLReader_hasZlib()
00845 
00846     if _newclass:hasZlib = staticmethod(hasZlib)
00847     __swig_getmethods__["hasZlib"] = lambda x: hasZlib
00848     def hasBzip2():
00849         """
00850         hasBzip2() -> bool
00851 
00852         Predicate returning @c true or @c false depending on whether
00853         libSBML is linked with bzip2 at compile time.
00854 
00855         @return @c true if bzip2 is linked, @c false otherwise.
00856           
00857 
00858         """
00859         return _libsbml.SBMLReader_hasBzip2()
00860 
00861     if _newclass:hasBzip2 = staticmethod(hasBzip2)
00862     __swig_getmethods__["hasBzip2"] = lambda x: hasBzip2
00863     def __eq__(self, rhs):
00864       if ((self is None) and (rhs is None)): return True
00865       if ((self is None) or  (rhs is None)): return False
00866       if (hasattr(self, 'this') and hasattr(rhs, 'this')):
00867         if (self.this == rhs.this): return True
00868       return False
00869 
00870     def __ne__(self, rhs):
00871       if ((self is None) and (rhs is None)): return False
00872       if ((self is None) or  (rhs is None)): return True
00873       if (hasattr(self, 'this') and hasattr(rhs, 'this')):
00874         if (self.this == rhs.this): return False
00875       return True
00876 
00877 SBMLReader_swigregister = _libsbml.SBMLReader_swigregister
00878 SBMLReader_swigregister(SBMLReader)
00879 cout = cvar.cout
00880 cerr = cvar.cerr
00881 clog = cvar.clog
00882 
00883 def SBMLReader_hasZlib():
00884   """
00885     SBMLReader_hasZlib() -> bool
00886 
00887     Predicate returning @c true or @c false depending on whether
00888     libSBML is linked with zlib at compile time.
00889 
00890     @return @c true if zlib is linked, @c false otherwise.
00891       
00892 
00893     """
00894   return _libsbml.SBMLReader_hasZlib()
00895 
00896 def SBMLReader_hasBzip2():
00897   """
00898     SBMLReader_hasBzip2() -> bool
00899 
00900     Predicate returning @c true or @c false depending on whether
00901     libSBML is linked with bzip2 at compile time.
00902 
00903     @return @c true if bzip2 is linked, @c false otherwise.
00904       
00905 
00906     """
00907   return _libsbml.SBMLReader_hasBzip2()
00908 
00909 
00910 def readSBMLFromFile(*args):
00911   """
00912     readSBMLFromFile(char filename) -> SBMLDocument_t
00913 
00914     Reads an SBML document from the given file @p filename.
00915 
00916     If @p filename does not exist, or it is not an SBML file, an error will
00917     be logged in the error log of the SBMLDocument object returned by this
00918     method.  Calling programs can inspect this error log to determine
00919     the nature of the problem.  Please refer to the definition of
00920     SBMLDocument for more information about the error reporting mechanism.
00921 
00922     @return a pointer to the SBMLDocument read.
00923 
00924 
00925     """
00926   return _libsbml.readSBMLFromFile(*args)
00927 
00928 def readSBMLFromString(*args):
00929   """
00930     readSBMLFromString(char xml) -> SBMLDocument_t
00931 
00932     Reads an SBML document from a string assumed to be in XML format.
00933 
00934     If the string does not begin with XML declaration,
00935      @verbatim
00936      <?xml version='1.0' encoding='UTF-8'?>
00937      @endverbatim
00938 
00939     an XML declaration string will be prepended.
00940 
00941     This method will report an error if the given string @p xml is not SBML.
00942     The error will be logged in the error log of the SBMLDocument object
00943     returned by this method.  Calling programs can inspect this error log to
00944     determine the nature of the problem.  Please refer to the definition of
00945     SBMLDocument for more information about the error reporting mechanism.
00946 
00947     @return a pointer to the SBMLDocument read.
00948 
00949 
00950     """
00951   return _libsbml.readSBMLFromString(*args)
00952 class SBMLWriter(_object):
00953     """
00954     Methods for writing SBML to files and text strings.
00955 
00956     @htmlinclude libsbml-not-sbml-warning.html
00957 
00958     The SBMLWriter class is the converse of SBMLReader, and provides the
00959     main interface for serializing SBML models into XML and writing the
00960     result to files and text strings.  The methods for writing SBML all take
00961     an SBMLDocument object and a destination.  They return a boolean value
00962     to indicate success or failure.
00963 
00964     """
00965     __swig_setmethods__ = {}
00966     __setattr__ = lambda self, name, value: _swig_setattr(self, SBMLWriter, name, value)
00967     __swig_getmethods__ = {}
00968     __getattr__ = lambda self, name: _swig_getattr(self, SBMLWriter, name)
00969     __repr__ = _swig_repr
00970     def __init__(self): 
00971         """
00972         __init__(self) -> SBMLWriter
00973 
00974         Creates a new SBMLWriter.
00975           
00976 
00977         """
00978         this = _libsbml.new_SBMLWriter()
00979         try: self.this.append(this)
00980         except: self.this = this
00981     __swig_destroy__ = _libsbml.delete_SBMLWriter
00982     __del__ = lambda self : None;
00983     def setProgramName(self, *args):
00984         """
00985         setProgramName(self, string name) -> int
00986 
00987         Sets the name of this program, i.e., the program that is about to
00988         write out the SBMLDocument.
00989 
00990         If the program name and version are set (setProgramVersion()), the
00991         following XML comment, intended for human consumption, will be written
00992         at the beginning of the document:
00993           @verbatim
00994             <!-- Created by <program name> version <program version>
00995             on yyyy-MM-dd HH:mm with libsbml version <libsbml version>. -->
00996          @endverbatim
00997 
00998         @param name the name of this program (where 'this program' refers to
00999         program in which libSBML is embedded, not libSBML itself!)
01000 
01001         @return integer value indicating success/failure of the
01002         function.  @if clike The value is drawn from the
01003         enumeration #OperationReturnValues_t. @endif The possible values
01004         returned by this function are:
01005         @li LIBSBML_OPERATION_SUCCESS
01006 
01007         @see setProgramVersion(const std::string& version)
01008           
01009 
01010         """
01011         return _libsbml.SBMLWriter_setProgramName(self, *args)
01012 
01013     def setProgramVersion(self, *args):
01014         """
01015         setProgramVersion(self, string version) -> int
01016 
01017         Sets the version of this program, i.e., the program that is about to
01018         write out the SBMLDocument.
01019 
01020         If the program version and name are set (setProgramName()), the
01021         following XML comment, intended for human consumption, will be written
01022         at the beginning of the document:
01023           @verbatim
01024             <!-- Created by <program name> version <program version>
01025             on yyyy-MM-dd HH:mm with libsbml version <libsbml version>. -->
01026          @endverbatim
01027 
01028         @param version the version of this program (where 'this program'
01029         refers to program in which libSBML is embedded, not libSBML itself!)
01030 
01031         @return integer value indicating success/failure of the
01032         function.  @if clike The value is drawn from the
01033         enumeration #OperationReturnValues_t. @endif The possible values
01034         returned by this function are:
01035         @li LIBSBML_OPERATION_SUCCESS
01036 
01037         @see setProgramName(const std::string& name)
01038           
01039 
01040         """
01041         return _libsbml.SBMLWriter_setProgramVersion(self, *args)
01042 
01043     def writeSBML(self, *args):
01044         """
01045         writeSBML(self, SBMLDocument d, string filename) -> bool
01046         writeSBML(self, SBMLDocument d, ostream stream) -> bool
01047 
01048         Writes the given SBML document to the output stream.
01049 
01050         @param d the SBML document to be written
01051 
01052         @param stream the stream object where the SBML is to be written.
01053 
01054         @return @c true on success and @c false if one of the underlying
01055         parser components fail (rare).
01056           
01057 
01058         """
01059         return _libsbml.SBMLWriter_writeSBML(self, *args)
01060 
01061     def writeToString(self, *args):
01062         """
01063         writeToString(self, SBMLDocument d) -> char
01064 
01065         Writes the given SBML document to an in-memory string and returns a
01066         pointer to it.
01067 
01068         The string is owned by the caller and should be freed (with @c free())
01069         when no longer needed.
01070 
01071         @param d the SBML document to be written
01072 
01073         @return the string on success and @c 0 if one of the underlying parser
01074         components fail.
01075           
01076 
01077         """
01078         return _libsbml.SBMLWriter_writeToString(self, *args)
01079 
01080     def hasZlib():
01081         """
01082         hasZlib() -> bool
01083 
01084         Predicate returning @c true or @c false depending on whether
01085         underlying libSBML is linked with zlib.
01086 
01087         LibSBML supports reading and writing files compressed with either
01088         bzip2 or zip/gzip compression.  The facility depends on libSBML having
01089         been compiled with the necessary support libraries.  This method
01090         allows a calling program to inquire whether that is the case for the
01091         copy of libSBML it is running.
01092 
01093         @return @c true if libSBML is linked with zlib, @c false otherwise.
01094           
01095 
01096         """
01097         return _libsbml.SBMLWriter_hasZlib()
01098 
01099     if _newclass:hasZlib = staticmethod(hasZlib)
01100     __swig_getmethods__["hasZlib"] = lambda x: hasZlib
01101     def hasBzip2():
01102         """
01103         hasBzip2() -> bool
01104 
01105         Predicate returning @c true or @c false depending on whether
01106         underlying libSBML is linked with bzip2.
01107 
01108         LibSBML supports reading and writing files compressed with either
01109         bzip2 or zip/gzip compression.  The facility depends on libSBML having
01110         been compiled with the necessary support libraries.  This method
01111         allows a calling program to inquire whether that is the case for the
01112         copy of libSBML it is running.
01113 
01114         @return @c true if libSBML is linked with bzip2, @c false otherwise.
01115         @deprecated libSBML internal
01116 
01117 
01118         """
01119         return _libsbml.SBMLWriter_hasBzip2()
01120 
01121     if _newclass:hasBzip2 = staticmethod(hasBzip2)
01122     __swig_getmethods__["hasBzip2"] = lambda x: hasBzip2
01123     def __eq__(self, rhs):
01124       if ((self is None) and (rhs is None)): return True
01125       if ((self is None) or  (rhs is None)): return False
01126       if (hasattr(self, 'this') and hasattr(rhs, 'this')):
01127         if (self.this == rhs.this): return True
01128       return False
01129 
01130     def __ne__(self, rhs):
01131       if ((self is None) and (rhs is None)): return False
01132       if ((self is None) or  (rhs is None)): return True
01133       if (hasattr(self, 'this') and hasattr(rhs, 'this')):
01134         if (self.this == rhs.this): return False
01135       return True
01136 
01137 SBMLWriter_swigregister = _libsbml.SBMLWriter_swigregister
01138 SBMLWriter_swigregister(SBMLWriter)
01139 
01140 def SBMLWriter_hasZlib():
01141   """
01142     SBMLWriter_hasZlib() -> bool
01143 
01144     Predicate returning @c true or @c false depending on whether
01145     underlying libSBML is linked with zlib.
01146 
01147     LibSBML supports reading and writing files compressed with either
01148     bzip2 or zip/gzip compression.  The facility depends on libSBML having
01149     been compiled with the necessary support libraries.  This method
01150     allows a calling program to inquire whether that is the case for the
01151     copy of libSBML it is running.
01152 
01153     @return @c true if libSBML is linked with zlib, @c false otherwise.
01154       
01155 
01156     """
01157   return _libsbml.SBMLWriter_hasZlib()
01158 
01159 def SBMLWriter_hasBzip2():
01160   """
01161     SBMLWriter_hasBzip2() -> bool
01162 
01163     Predicate returning @c true or @c false depending on whether
01164     underlying libSBML is linked with bzip2.
01165 
01166     LibSBML supports reading and writing files compressed with either
01167     bzip2 or zip/gzip compression.  The facility depends on libSBML having
01168     been compiled with the necessary support libraries.  This method
01169     allows a calling program to inquire whether that is the case for the
01170     copy of libSBML it is running.
01171 
01172     @return @c true if libSBML is linked with bzip2, @c false otherwise.
01173     @deprecated libSBML internal
01174 
01175 
01176     """
01177   return _libsbml.SBMLWriter_hasBzip2()
01178 
01179 
01180 def writeSBML(*args):
01181   """
01182     writeSBML(SBMLDocument_t d, char filename) -> int
01183 
01184     Writes the given SBML document to filename.  This convenience function
01185     is functionally equivalent to:
01186 
01187       SBMLWriter_writeSBML(SBMLWriter_create(), d, filename);
01188 
01189     @return non-zero on success and zero if the filename could not be opened
01190     for writing.
01191 
01192 
01193     """
01194   return _libsbml.writeSBML(*args)
01195 
01196 def writeSBMLToString(*args):
01197   """
01198     writeSBMLToString(SBMLDocument_t d) -> char
01199 
01200     Writes the given SBML document to an in-memory string and returns a
01201     pointer to it.  The string is owned by the caller and should be freed
01202     (with free()) when no longer needed.  This convenience function is
01203     functionally equivalent to:
01204 
01205       SBMLWriter_writeSBMLToString(SBMLWriter_create(), d);
01206 
01207     @return the string on success and NULL if one of the underlying parser
01208     components fail (rare).
01209 
01210 
01211     """
01212   return _libsbml.writeSBMLToString(*args)
01213 SBML_UNKNOWN = _libsbml.SBML_UNKNOWN
01214 SBML_COMPARTMENT = _libsbml.SBML_COMPARTMENT
01215 SBML_COMPARTMENT_TYPE = _libsbml.SBML_COMPARTMENT_TYPE
01216 SBML_CONSTRAINT = _libsbml.SBML_CONSTRAINT
01217 SBML_DOCUMENT = _libsbml.SBML_DOCUMENT
01218 SBML_EVENT = _libsbml.SBML_EVENT
01219 SBML_EVENT_ASSIGNMENT = _libsbml.SBML_EVENT_ASSIGNMENT
01220 SBML_FUNCTION_DEFINITION = _libsbml.SBML_FUNCTION_DEFINITION
01221 SBML_INITIAL_ASSIGNMENT = _libsbml.SBML_INITIAL_ASSIGNMENT
01222 SBML_KINETIC_LAW = _libsbml.SBML_KINETIC_LAW
01223 SBML_LIST_OF = _libsbml.SBML_LIST_OF
01224 SBML_MODEL = _libsbml.SBML_MODEL
01225 SBML_PARAMETER = _libsbml.SBML_PARAMETER
01226 SBML_REACTION = _libsbml.SBML_REACTION
01227 SBML_RULE = _libsbml.SBML_RULE
01228 SBML_SPECIES = _libsbml.SBML_SPECIES
01229 SBML_SPECIES_REFERENCE = _libsbml.SBML_SPECIES_REFERENCE
01230 SBML_SPECIES_TYPE = _libsbml.SBML_SPECIES_TYPE
01231 SBML_MODIFIER_SPECIES_REFERENCE = _libsbml.SBML_MODIFIER_SPECIES_REFERENCE
01232 SBML_UNIT_DEFINITION = _libsbml.SBML_UNIT_DEFINITION
01233 SBML_UNIT = _libsbml.SBML_UNIT
01234 SBML_ALGEBRAIC_RULE = _libsbml.SBML_ALGEBRAIC_RULE
01235 SBML_ASSIGNMENT_RULE = _libsbml.SBML_ASSIGNMENT_RULE
01236 SBML_RATE_RULE = _libsbml.SBML_RATE_RULE
01237 SBML_SPECIES_CONCENTRATION_RULE = _libsbml.SBML_SPECIES_CONCENTRATION_RULE
01238 SBML_COMPARTMENT_VOLUME_RULE = _libsbml.SBML_COMPARTMENT_VOLUME_RULE
01239 SBML_PARAMETER_RULE = _libsbml.SBML_PARAMETER_RULE
01240 SBML_TRIGGER = _libsbml.SBML_TRIGGER
01241 SBML_DELAY = _libsbml.SBML_DELAY
01242 SBML_STOICHIOMETRY_MATH = _libsbml.SBML_STOICHIOMETRY_MATH
01243 SBML_FORMULA_UNITS_DATA = _libsbml.SBML_FORMULA_UNITS_DATA
01244 SBML_LIST_FORMULA_UNITS_DATA = _libsbml.SBML_LIST_FORMULA_UNITS_DATA
01245 SBML_LISTOF_COMPARTMENTS = _libsbml.SBML_LISTOF_COMPARTMENTS
01246 SBML_LISTOF_COMPARTMENT_TYPES = _libsbml.SBML_LISTOF_COMPARTMENT_TYPES
01247 SBML_LISTOF_CONSTRAINTS = _libsbml.SBML_LISTOF_CONSTRAINTS
01248 SBML_LISTOF_EVENTS = _libsbml.SBML_LISTOF_EVENTS
01249 SBML_LISTOF_EVENT_ASSIGNMENTS = _libsbml.SBML_LISTOF_EVENT_ASSIGNMENTS
01250 SBML_LISTOF_FUNCTION_DEFINITIONS = _libsbml.SBML_LISTOF_FUNCTION_DEFINITIONS
01251 SBML_LISTOF_INITIAL_ASSIGNMENTS = _libsbml.SBML_LISTOF_INITIAL_ASSIGNMENTS
01252 SBML_LISTOF_PARAMETERS = _libsbml.SBML_LISTOF_PARAMETERS
01253 SBML_LISTOF_REACTIONS = _libsbml.SBML_LISTOF_REACTIONS
01254 SBML_LISTOF_RULES = _libsbml.SBML_LISTOF_RULES
01255 SBML_LISTOF_SPECIES = _libsbml.SBML_LISTOF_SPECIES
01256 SBML_LISTOF_SPECIES_REFERENCES = _libsbml.SBML_LISTOF_SPECIES_REFERENCES
01257 SBML_LISTOF_SPECIES_TYPES = _libsbml.SBML_LISTOF_SPECIES_TYPES
01258 SBML_LISTOF_UNIT_DEFINITIONS = _libsbml.SBML_LISTOF_UNIT_DEFINITIONS
01259 SBML_LISTOF_UNITS = _libsbml.SBML_LISTOF_UNITS
01260 
01261 def SBMLTypeCode_toString(*args):
01262   """
01263     SBMLTypeCode_toString(SBMLTypeCode_t tc) -> char
01264 
01265     This method takes an SBML type code and returns a string representing
01266     the code.
01267 
01268     @if clike LibSBML attaches an identifying code to every
01269     kind of SBML object.  These are known as <em>SBML type codes</em>.
01270     The set of possible type codes is defined in the enumeration
01271     #SBMLTypeCode_t.  The names of the type codes all begin with the
01272     characters @c SBML_. @endif@if java LibSBML attaches an
01273     identifying code to every kind of SBML object.  These are known as
01274     <em>SBML type codes</em>.  In other languages, the set of type codes
01275     is stored in an enumeration; in the Java language interface for
01276     libSBML, the type codes are defined as static integer constants in
01277     interface class {@link libsbmlConstants}.  The names of the type codes
01278     all begin with the characters @c SBML_. @endif
01279     This method takes a type code as argument, and returns a string name
01280     corresponding to that code.  For example, passing it the type code
01281     <code>SBML_COMPARTMENT</code> will return the string
01282     '<code>Compartment</code>'. 
01283 
01284     @return a human readable name for the given SBMLTypeCode_t.
01285 
01286     @note The caller does not own the returned string and is therefore not
01287     allowed to modify it.
01288 
01289 
01290     """
01291   return _libsbml.SBMLTypeCode_toString(*args)
01292 class SBase(_object):
01293     """
01294     LibSBML implementation of %SBase, the base class of all SBML objects.
01295 
01296     Most components in SBML are derived from a single abstract base type,
01297     SBase.  In addition to serving as the parent class for most other
01298     classes of objects in SBML, this base type is designed to allow a
01299     modeler or a software package to attach arbitrary information to each
01300     major element or list in an SBML model.
01301 
01302     SBase has an optional subelement called 'notes'.  It is intended to
01303     serve as a place for storing optional information intended to be seen by
01304     humans.  An example use of the 'notes' element would be to contain
01305     formatted user comments about the model element in which the 'notes'
01306     element is enclosed.  There are certain conditions on the XHTML content
01307     permitted inside the 'notes' element; these are described separately
01308     below.
01309 
01310     SBase has another optional subelement called 'annotation'.  Whereas the
01311     'notes' element described above is a container for content to be shown
01312     directly to humans, the 'annotation' element is a container for optional
01313     software-generated content @em not meant to be shown to humans.  The
01314     element's content type is XML type @c any, allowing essentially
01315     arbitrary data content.  SBML places only a few restrictions on the
01316     organization of the content; these are intended to help software tools
01317     read and write the data as well as help reduce conflicts between
01318     annotations added by different tools.  They are described separately
01319     below.
01320 
01321     It is worth pointing out that the 'annotation' element in the definition
01322     of SBase exists in order that software developers may attach optional
01323     application-specific data to the elements in an SBML model.  However, it
01324     is important that this facility not be misused.  In particular, it is
01325     <em>critical</em> that data essential to a model definition or that can
01326     be encoded in existing SBML elements is <em>not</em> stored in
01327     'annotation'. Parameter values, functional dependencies between model
01328     elements, etc., should not be recorded as annotations.  It is crucial to
01329     keep in mind the fact that data placed in annotations can be freely
01330     ignored by software applications.  If such data affects the
01331     interpretation of a model, then software interoperability is greatly
01332     impeded.
01333 
01334     Beginning with SBML Level 2, SBase also has an optional attribute named
01335     'metaid' for supporting metadata annotations using RDF (Resource
01336     Description Format). The attribute value has the data type 
01337     <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the
01338     XML identifier type, which means each 'metaid' value must be globally
01339     unique within an SBML file.  (Importantly, this uniqueness criterion
01340     applies across any attribute with type 
01341     <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the 'metaid'
01342     attribute used by SBML&mdash;something to be aware of if your
01343     application-specific XML content inside the 'annotation' subelement
01344     happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
01345     The 'metaid' value serves to identify a model
01346     component for purposes such as referencing that component from metadata
01347     placed within 'annotation' subelements.
01348 
01349     Beginning with SBML Level 2 Version 3, SBase also has an optional
01350     attribute named 'sboTerm' for supporting the use of the Systems Biology
01351     Ontology.  In SBML proper, the data type of the attribute is a string of
01352     the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer number;
01353     libSBML simplifies the representation by only storing the NNNNNNN
01354     integer portion.  Thus, in libSBML, the 'sboTerm' attribute on SBase has
01355     data type @c int, and SBO identifiers are stored simply as integers.
01356     SBO terms are a type of optional annotation, and each different class of
01357     SBML object derived from SBase imposes its own requirements about the
01358     values permitted for 'sboTerm'.  Please consult the SBML Level 2 Version
01359     4 specification for more information about the use of SBO and the
01360     'sboTerm' attribute.
01361 
01362     Finally, note that, in the list of methods on SBase, there is no public
01363     constructor because SBase is an abstract class.  The constructors reside
01364     in the subclasses derived from SBase.
01365 
01366 
01367     @section sbase-notes Requirements for the content of the 'notes' subelement
01368 
01369     The content of 'notes' elements must be in XHTML 1.0 format.  (Plain
01370     HTML would not be usable because whatever appears inside the 'notes'
01371     element must be compatible with XML, which HTML is not, and in any case,
01372     the requirement for using XHTML does not prevent users from entering
01373     plain-text content ,which they can do using the standard <code>&lt;pre&gt;
01374     ... &lt;/pre&gt;</code> elements of [X]HTML.)
01375 
01376     The XML content of a 'notes' subelement must declare the use of the
01377     XHTML XML namespace.  This can be done in multiple ways.  One way is to
01378     place a namespace declaration for the appropriate namespace URI (which
01379     for XHTML is <tt>'http://www.w3.org/1999/xhtml'</tt>) on the top-level
01380     <code>sbml</code> element and then reference the namespace in the
01381     'notes' element content using a prefix.  The following example
01382     illustrates this approach:
01383       @verbatim
01384      <sbml xmlns='http://www.sbml.org/sbml/level2/version4' level='2' version='4'
01385            xmlns:xhtml='http://www.w3.org/1999/xhtml'>
01386        ...
01387        <notes>
01388          <xhtml:body>
01389            <xhtml:center><xhtml:h2>A Simple Mitotic Oscillator</xhtml:h2></xhtml:center>
01390            <xhtml:p>A minimal cascade model for the mitotic oscillator
01391            involving cyclin and cdc2 kinase</xhtml:p>
01392          </xhtml:body>
01393        </notes>
01394        ...
01395      @endverbatim
01396 
01397     Another approach is to declare the XHTML namespace within the 'notes'
01398     element content itself, as in the following example:
01399       @verbatim
01400      ...
01401      <notes>
01402        <body xmlns='http://www.w3.org/1999/xhtml'>
01403 
01404          <center><h2>A Simple Mitotic Oscillator</h2></center>
01405 
01406          <p>A minimal cascade model for the mitotic oscillator
01407          involving cyclin and cdc2 kinase</p>
01408 
01409        </body>
01410      </notes>
01411      ...
01412      @endverbatim
01413 
01414     The <code>xmlns='http://www.w3.org/1999/xhtml'</code> declaration on @c
01415     body as shown above changes the default XML namespace within it, such
01416     that all of its content is by default in the XHTML namespace.  This is a
01417     particularly convenient approach because it obviates the need to prefix
01418     every element with a namespace prefix (i.e., <code>xhtml:</code>
01419     in the previous case).  Other approaches are also possible.
01420 
01421     SBML does not require the content of the 'notes' subelement to be any
01422     particular XHTML element; the content can be almost any well-formed
01423     XHTML content.  SBML Level 2 Versions 2, 3 and 4 added some small
01424     restrictions and clarifications for the allowable content in order to
01425     promote greater interoperability between software tools.  The first
01426     restriction comes from the requirements of XML: the 'notes'
01427     element must not contain an XML declaration nor a DOCTYPE declaration.
01428     That is, 'notes' must @em not contain
01429       @verbatim
01430      <?xml version='1.0' encoding='UTF-8'?>  
01431      @endverbatim
01432     nor (where the following is only one specific example of a DOCTYPE
01433     declaration)
01434       @verbatim
01435      <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
01436            'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
01437      @endverbatim
01438 
01439     The second restriction is intended to balance freedom of content with
01440     the complexity of implementing software that can interpret the content.
01441     The content of the 'notes' subelement in SBML can consist only of the
01442     following possibilities:
01443     <ul>
01444     <li> A complete XHTML document (minus the XML and DOCTYPE declarations,
01445     of course), that is, XHTML content beginning with the @c html tag.
01446       @verbatim
01447      <notes>
01448        <html xmlns='http://www.w3.org/1999/xhtml'>
01449           ...
01450        </html>
01451      </notes>
01452      @endverbatim
01453 
01454     <li> The @c body element from an XHTML document.  The following is an
01455     example skeleton:
01456       @verbatim
01457      <notes>
01458          <body xmlns='http://www.w3.org/1999/xhtml'>
01459            ...
01460          </body>
01461      </notes>
01462      @endverbatim
01463 
01464     <li> Any XHTML content that would be permitted within a @c body element.
01465     If this consists of multiple elements, each one must declare the XML
01466     namespace separately.  The following is an example fragment:
01467       @verbatim
01468      <notes>
01469          <p xmlns='http://www.w3.org/1999/xhtml'>
01470            ...
01471          </p>
01472          <p xmlns='http://www.w3.org/1999/xhtml'>
01473            ...
01474          </p>
01475      </notes>
01476      @endverbatim
01477     </ul>
01478 
01479     Another way to summarize the restrictions above is simply to say that
01480     the content of an SBML 'notes' element can be only be a complete @c html
01481     element, a @c body element, or whatever is permitted inside a @c body
01482     element.  In practice, this does not limit in any meaningful way what
01483     can be placed inside a 'notes' element; for example, if an application
01484     or modeler wants to put a complete XHTML page, including a @c head
01485     element, it can be done by putting in everything starting with the @c
01486     html container.  However, the restrictions above do make it somewhat
01487     simpler to write software that can read and write the 'notes' content.
01488 
01489 
01490     @section sbase-annotation Requirements for the content of the 'annotation' subelement
01491 
01492     At the outset, software developers should keep in mind that multiple
01493     software tools may attempt to read and write annotation content.  To
01494     reduce the potential for collisions between annotations written by
01495     different applications, SBML Level 2 stipulates that tools must use XML
01496     namespaces to specify the intended vocabulary of every annotation.  The
01497     application's developers must choose a URI (Universal Resource
01498     Identifier) reference that uniquely identifies the vocabulary the
01499     application will use, and a prefix string for the annotations.
01500 
01501     A important requirement is that application-specific annotation data is
01502     entirely contained inside a single <em>top-level element</em> within the
01503     SBML 'annotation' subelement.  SBML Level 2 Versions 2, 3 and 4 place the
01504     following restrictions on annotations:
01505     <ul>
01506     <li> Within a given SBML 'annotation' element, there can only be one
01507     top-level element using a given namespace.  An annotation element can
01508     contain multiple top-level elements but each must be in a different
01509     namespace.
01510 
01511     <li> No top-level element in an 'annotation' may use an SBML XML
01512     namespace, either explicitly by referencing one of the SBML XML
01513     namespace URIs or implicitly by failing to specify any namespace on the
01514     annotation.
01515 
01516     <li> The ordering of top-level elements within a given 'annotation'
01517     element is <em>not</em> significant.  An application should not expect
01518     that its annotation content appears first in the 'annotation' element,
01519     nor in any other particular location.  Moreover, the ordering of
01520     top-level annotation elements may be changed by different applications
01521     as they read and write the same SBML file.
01522     </ul>
01523 
01524     The use of XML namespaces in this manner is intended to improve the
01525     ability of multiple applications to place annotations on SBML model
01526     elements with reduced risks of interference or name collisions.
01527     Annotations stored by different simulation packages can therefore
01528     coexist in the same model definition.  The rules governing the content
01529     of 'annotation' elements are designed to enable applications to easily
01530     add, change, and remove their annotations from SBML elements while
01531     simultaneously preserving annotations inserted by other applications
01532     when mapping SBML from input to output.
01533 
01534     As a further simplification for developers of software and to improve
01535     software interoperability, applications are only required to preserve
01536     other annotations (i.e., annotations they do not recognize) when those
01537     annotations are self-contained entirely within 'annotation', complete
01538     with namespace declarations.  The following is an example:
01539       @verbatim
01540      <annotation>
01541          <topLevelElement xmlns:'URI'>
01542             ... content in the namespace identified by 'URI' ...
01543          </topLevelElement>
01544      </annotation>
01545      @endverbatim
01546 
01547     Some more examples hopefully will make these points more clear.  The
01548     next example is invalid because it contains a top-level element in the
01549     SBML XML namespace&mdash;this happens because no namespace is declared
01550     for the <code>&lt;cytoplasm&gt;</code> element, which means by default it
01551     falls into the enclosing SBML namespace:
01552       @verbatim
01553      <annotation>
01554          <cytoplasm/>
01555      </annotation>
01556      @endverbatim
01557 
01558     The following example is also invalid, this time because it contains two
01559     top-level elements using the same XML namespace.  Note that it does not
01560     matter that these are two different top-level elements
01561     (<code>&lt;nodecolors&gt;</code> and <code>&lt;textcolors&gt;</code>); 
01562     what matters is that these separate elements are both in the same 
01563     namespace rather than having been collected and placed inside one 
01564     overall container element for that namespace.
01565       @verbatim
01566      <annotation>
01567          <mysim:nodecolors xmlns:mysim='http://www.mysim.org/ns'
01568              mysim:bgcolor='green' mysim:fgcolor='white'/>
01569          <mysim:textcolors xmlns:mysim='http://www.mysim.org/ns'
01570              mysim:bgcolor='green' mysim:fgcolor='white'/>
01571      </annotation>
01572      @endverbatim
01573 
01574     On the other hand, the following example is valid:
01575       @verbatim
01576      <annotation>
01577          <mysim:geometry xmlns:mysim='http://www.mysim.org/ns'
01578                   mysim:bgcolor='green' mysim:fgcolor='white'>
01579              <graph:node xmlns:graph='http://www.graph.org/ns' 
01580                   graph:x='4' graph:y='5' />
01581          </mysim:geometry>
01582          <othersim:icon xmlns:othersim='http://www.othersim.com/'>
01583              WS2002
01584          </othersim:icon>
01585      </annotation>
01586      @endverbatim
01587 
01588     It is worth keeping in mind that although XML namespace names must be
01589     URIs, they are (like all XML namespace names) <em>not required</em> to
01590     be directly usable in the sense of identifying an actual, retrieval
01591     document or resource on the Internet.  URIs such as
01592     <code>'http://www.mysim.org/'</code> may appear as though they are
01593     (e.g.) Internet addresses, but there are not the same thing.  This
01594     style of URI strings, using a domain name and other parts, is only a
01595     simple and commonly-used way of creating a unique name string.
01596 
01597 
01598     @section sbase-miriam Standard format for annotations linking data resources
01599 
01600     SBML Level 2 Versions 2, 3 and 4 define a proposed regular format for
01601     encoding two particular categories of annotations: (a) references to
01602     controlled vocabulary terms and database identifiers which define and
01603     describe biological and biochemical entities in a model; and (b)
01604     descriptions of the provenance of a model, including its author(s) and
01605     modification history.
01606 
01607     """
01608     __swig_setmethods__ = {}
01609     __setattr__ = lambda self, name, value: _swig_setattr(self, SBase, name, value)
01610     __swig_getmethods__ = {}
01611     __getattr__ = lambda self, name: _swig_getattr(self, SBase, name)
01612     def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
01613     __repr__ = _swig_repr
01614     __swig_destroy__ = _libsbml.delete_SBase
01615     __del__ = lambda self : None;
01616     def clone(self):
01617         """
01618         clone(self) -> SBase
01619 
01620         Creates and returns a deep copy of this SBase object.
01621 
01622         @return a (deep) copy of this SBase object
01623           
01624 
01625         """
01626         return _libsbml.SBase_clone(self)
01627 
01628     def getMetaId(self):
01629         """
01630         getMetaId(self) -> string
01631 
01632         Returns the value of the 'metaid' attribute of this object.
01633 
01634         The optional attribute named 'metaid', present on every major SBML
01635         component type, is for supporting metadata annotations using RDF
01636         (Resource Description Format). The attribute value has the data type
01637         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
01638         identifier type, which means each 'metaid' value must be globally
01639         unique within an SBML file.  (Importantly, this uniqueness criterion
01640         applies across any attribute with type <a
01641         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
01642         'metaid' attribute used by SBML&mdash;something to be aware of if your
01643         application-specific XML content inside the 'annotation' subelement
01644         happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
01645         The 'metaid' value serves to identify a model
01646         component for purposes such as referencing that component from
01647         metadata placed within 'annotation' subelements.
01648          
01649         @return the metaid of this SBML object.
01650 
01651         @see isSetMetaId()
01652         @see setMetaId(const std::string& metaid)
01653           
01654 
01655         """
01656         return _libsbml.SBase_getMetaId(self)
01657 
01658     def getId(self):
01659         """
01660         getId(self) -> string
01661 
01662         Returns the value of the 'metaid' attribute of this object.
01663 
01664         The optional attribute named 'metaid', present on every major SBML
01665         component type, is for supporting metadata annotations using RDF
01666         (Resource Description Format). The attribute value has the data type
01667         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
01668         identifier type, which means each 'metaid' value must be globally
01669         unique within an SBML file.  (Importantly, this uniqueness criterion
01670         applies across any attribute with type <a
01671         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
01672         'metaid' attribute used by SBML&mdash;something to be aware of if your
01673         application-specific XML content inside the 'annotation' subelement
01674         happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
01675         The 'metaid' value serves to identify a model
01676         component for purposes such as referencing that component from
01677         metadata placed within 'annotation' subelements.
01678          
01679         @return the metaid of this SBML object.
01680 
01681         @see isSetMetaId()
01682         @see setMetaId(const std::string& metaid)
01683         @deprecated libSBML internal
01684 
01685 
01686         """
01687         return _libsbml.SBase_getId(self)
01688 
01689     def getName(self):
01690         """
01691         getName(self) -> string
01692 
01693         Returns the value of the 'metaid' attribute of this object.
01694 
01695         The optional attribute named 'metaid', present on every major SBML
01696         component type, is for supporting metadata annotations using RDF
01697         (Resource Description Format). The attribute value has the data type
01698         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
01699         identifier type, which means each 'metaid' value must be globally
01700         unique within an SBML file.  (Importantly, this uniqueness criterion
01701         applies across any attribute with type <a
01702         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
01703         'metaid' attribute used by SBML&mdash;something to be aware of if your
01704         application-specific XML content inside the 'annotation' subelement
01705         happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
01706         The 'metaid' value serves to identify a model
01707         component for purposes such as referencing that component from
01708         metadata placed within 'annotation' subelements.
01709          
01710         @return the metaid of this SBML object.
01711 
01712         @see isSetMetaId()
01713         @see setMetaId(const std::string& metaid)
01714         @deprecated libSBML internal
01715 
01716 
01717         """
01718         return _libsbml.SBase_getName(self)
01719 
01720     def getNotes(self):
01721         """
01722         getNotes(self) -> XMLNode
01723 
01724         Returns the content of the 'notes' subelement of this object as
01725         a tree of XML nodes.
01726 
01727         The optional element named 'notes', present on every major SBML
01728         component type, is intended as a place for storing optional
01729         information intended to be seen by humans.  An example use of the
01730         'notes' element would be to contain formatted user comments
01731         about the model element in which the 'notes' element is
01732         enclosed.  Every object derived directly or indirectly from type
01733         SBase can have a separate value for 'notes', allowing users
01734         considerable freedom when adding comments to their models.
01735         The format of 'notes' elements must be XHTML 1.0.  The SBML
01736         Level&nbsp;2 specification has considerable detail about how
01737         'notes' element content must be handled; please refer to the
01738         specifications.
01739 
01740         The 'notes' element content returned by this method will be in XML
01741         form, but libSBML does not provide an object model specifically for
01742         the content of notes.  Callers will need to traverse the XML tree
01743         structure using the facilities available on XMLNode and related
01744         objects.
01745 
01746         @return the content of the 'notes' subelement of this SBML object.
01747 
01748         @see getNotesString()
01749         @see isSetNotes()
01750         @see setNotes(const XMLNode* notes)
01751         @see setNotes(const std::string& notes)
01752         @see appendNotes(const XMLNode* notes)
01753         @see appendNotes(const std::string& notes)
01754         @see unsetNotes()
01755           
01756 
01757         """
01758         return _libsbml.SBase_getNotes(self)
01759 
01760     def getNotesString(self):
01761         """
01762         getNotesString(self) -> string
01763 
01764         Returns the content of the 'notes' subelement of this object as a
01765         string.
01766 
01767         The optional element named 'notes', present on every major SBML
01768         component type, is intended as a place for storing optional
01769         information intended to be seen by humans.  An example use of the
01770         'notes' element would be to contain formatted user comments
01771         about the model element in which the 'notes' element is
01772         enclosed.  Every object derived directly or indirectly from type
01773         SBase can have a separate value for 'notes', allowing users
01774         considerable freedom when adding comments to their models.
01775         The format of 'notes' elements must be XHTML 1.0.  The SBML
01776         Level&nbsp;2 specification has considerable detail about how
01777         'notes' element content must be handled; please refer to the
01778         specifications.
01779 
01780         @return the content of the 'notes' subelement of this SBML object.
01781 
01782         @see getNotes()
01783         @see isSetNotes()
01784         @see setNotes(const XMLNode* notes)
01785         @see setNotes(const std::string& notes)
01786         @see appendNotes(const XMLNode* notes)
01787         @see appendNotes(const std::string& notes)
01788         @see unsetNotes()
01789           
01790 
01791         """
01792         return _libsbml.SBase_getNotesString(self)
01793 
01794     def getAnnotation(self):
01795         """
01796         getAnnotation(self) -> XMLNode
01797 
01798         Returns the content of the 'annotation' subelement of this object as
01799         an XML node tree.
01800 
01801         Whereas the SBase 'notes' subelement is a container for content to be
01802         shown directly to humans, the 'annotation' element is a container for
01803         optional software-generated content @em not meant to be shown to
01804         humans.  Every object derived from SBase can have its own value for
01805         'annotation'.  The element's content type is XML type
01806         <code>any</code>, allowing essentially arbitrary well-formed XML data
01807         content.
01808 
01809         SBML places a few restrictions on the organization of the content of
01810         annotations; these are intended to help software tools read and write
01811         the data as well as help reduce conflicts between annotations added by
01812         different tools.  Please see the SBML specifications for more details.
01813 
01814         The annotations returned by this method will be in XML form.  LibSBML
01815         provides an object model and related interfaces for certain specific
01816         kinds of annotations, namely model history information and RDF
01817         content.  See the ModelHistory, CVTerm and RDFAnnotationParser classes
01818         for more information about the facilities available.
01819 
01820         @return the annotation of this SBML object as an XMLNode
01821 
01822         @see getAnnotationString()
01823         @see isSetAnnotation()
01824         @see setAnnotation(const XMLNode* annotation)
01825         @see setAnnotation(const std::string& annotation)
01826         @see appendAnnotation(const XMLNode* annotation)
01827         @see appendAnnotation(const std::string& annotation)
01828         @see unsetAnnotation()
01829           
01830 
01831         """
01832         return _libsbml.SBase_getAnnotation(self)
01833 
01834     def getAnnotationString(self):
01835         """
01836         getAnnotationString(self) -> string
01837 
01838         Returns the content of the 'annotation' subelement of this object as a
01839         character string.
01840 
01841         Whereas the SBase 'notes' subelement is a container for content to be
01842         shown directly to humans, the 'annotation' element is a container for
01843         optional software-generated content @em not meant to be shown to
01844         humans.  Every object derived from SBase can have its own value for
01845         'annotation'.  The element's content type is XML type
01846         <code>any</code>, allowing essentially arbitrary well-formed XML data
01847         content.
01848 
01849         SBML places a few restrictions on the organization of the content of
01850         annotations; these are intended to help software tools read and write
01851         the data as well as help reduce conflicts between annotations added by
01852         different tools.  Please see the SBML specifications for more details.
01853 
01854         The annotations returned by this method will be in string form.
01855 
01856         @return the annotation string of this SBML object.
01857 
01858         @see getAnnotation()
01859         @see isSetAnnotation()
01860         @see setAnnotation(const XMLNode* annotation)
01861         @see setAnnotation(const std::string& annotation)
01862         @see appendAnnotation(const XMLNode* annotation)
01863         @see appendAnnotation(const std::string& annotation)
01864         @see unsetAnnotation()
01865           
01866 
01867         """
01868         return _libsbml.SBase_getAnnotationString(self)
01869 
01870     def getNamespaces(self):
01871         """
01872         getNamespaces(self) -> XMLNamespaces
01873 
01874         Returns a list of the XML Namespaces declared on this SBML document.
01875 
01876         @return the XML Namespaces associated with this SBML object
01877           
01878 
01879         """
01880         return _libsbml.SBase_getNamespaces(self)
01881 
01882     def getSBMLDocument(self, *args):
01883         """
01884         getSBMLDocument(self) -> SBMLDocument
01885         getSBMLDocument(self) -> SBMLDocument
01886 
01887         Returns the parent SBMLDocument object.
01888 
01889         LibSBML uses the class SBMLDocument as a top-level container for
01890         storing SBML content and data associated with it (such as warnings and
01891         error messages).  An SBML model in libSBML is contained inside an
01892         SBMLDocument object.  SBMLDocument corresponds roughly to the class
01893         <i>Sbml</i> defined in the SBML Level&nbsp;2 specification, but it
01894         does not have a direct correspondence in SBML Level&nbsp;1.  (But, it
01895         is created by libSBML no matter whether the model is Level&nbsp;1 or
01896         Level&nbsp;2.)
01897 
01898         This method allows the SBMLDocument for the current object to be
01899         retrieved.
01900 
01901         @return the parent SBMLDocument object of this SBML object.
01902           
01903 
01904         """
01905         return _libsbml.SBase_getSBMLDocument(self, *args)
01906 
01907     def getParentSBMLObject(self):
01908         """
01909         getParentSBMLObject(self) -> SBase
01910 
01911         Returns the parent SBML object.
01912 
01913         This method is convenient when holding an object nested inside
01914         other objects in an SBML model.  It allows direct access to the
01915         <code>&lt;model&gt;</code> element containing it.
01916 
01917         @return the parent SBML object of this SBML object.
01918           
01919 
01920         """
01921         return _libsbml.SBase_getParentSBMLObject(self)
01922 
01923     def getAncestorOfType(self, *args):
01924         """
01925         getAncestorOfType(self, SBMLTypeCode_t type) -> SBase
01926 
01927         Returns the ancestor SBML object that corresponds to the 
01928         given SBMLTypeCode_t.
01929 
01930         This function allows any object to determine its exact
01931         location/function within a model. For example a StoichiometryMath
01932         object has ancestors of type SpeciesReference,
01933         ListOfProducts/ListOfReactants/ListOfModifiers, Reaction,
01934         ListOfReactions and Model; any of which can be accessed via this
01935         function.
01936 
01937         @param type the SBMLTypeCode_t of the ancestor to be returned.
01938 
01939         @return the ancestor SBML object of this SBML object, that 
01940         corresponds to the given SBMLTypeCode_t, NULL if none exists.
01941           
01942 
01943         """
01944         return _libsbml.SBase_getAncestorOfType(self, *args)
01945 
01946     def getSBOTerm(self):
01947         """
01948         getSBOTerm(self) -> int
01949 
01950         Returns the integer portion of the value of the 'sboTerm' attribute of
01951         this object.
01952 
01953         In SBML Level 2 Versions 2, 3 and 4, the data type of the attribute is a
01954         string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer
01955         number; libSBML simplifies the representation by only storing the
01956         NNNNNNN integer portion.  Thus, in libSBML, the 'sboTerm' attribute on
01957         SBase has data type @c int, and SBO identifiers are stored simply as
01958         integers.  SBO terms are a type of optional annotation, and each
01959         different class of SBML object derived from SBase imposes its own
01960         requirements about the values permitted for 'sboTerm'.  Please consult
01961         the SBML Level 2 Version 4 specification for more information about
01962         the use of SBO and the 'sboTerm' attribute.
01963 
01964         @return the value of the 'sboTerm' attribute as an integer, or @c -1
01965         if the value is not set.
01966           
01967 
01968         """
01969         return _libsbml.SBase_getSBOTerm(self)
01970 
01971     def getSBOTermID(self):
01972         """
01973         getSBOTermID(self) -> string
01974 
01975         Returns the string representation of the 'sboTerm' attribute of
01976         this object.
01977 
01978         In SBML Level 2 Versions 2, 3 and 4, the data type of the attribute is a
01979         string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer
01980         number; libSBML simplifies the representation by only storing the
01981         NNNNNNN integer portion.  Thus, in libSBML, the 'sboTerm' attribute on
01982         SBase has data type @c int, and SBO identifiers are stored simply as
01983         integers.  This function recreates the string representation from the
01984         stored value.  SBO terms are a type of optional annotation, and each
01985         different class of SBML object derived from SBase imposes its own
01986         requirements about the values permitted for 'sboTerm'.  Please consult
01987         the SBML Level 2 Version 4 specification for more information about
01988         the use of SBO and the 'sboTerm' attribute.
01989 
01990         @return the value of the 'sboTerm' attribute as a string of the form
01991         SBO:NNNNNNN, or  an empty string
01992         if the value is not set.
01993           
01994 
01995         """
01996         return _libsbml.SBase_getSBOTermID(self)
01997 
01998     def getLine(self):
01999         """
02000         getLine(self) -> unsigned int
02001 
02002         Returns the line number on which this object first appears in the XML
02003         representation of the SBML document.
02004 
02005         @return the line number of this SBML object.
02006 
02007         @see getColumn()
02008           
02009 
02010         """
02011         return _libsbml.SBase_getLine(self)
02012 
02013     def getColumn(self):
02014         """
02015         getColumn(self) -> unsigned int
02016 
02017         Returns the column number on which this object first appears in the XML
02018         representation of the SBML document.
02019 
02020         @return the column number of this SBML object.
02021 
02022         @see getLine()
02023           
02024 
02025         """
02026         return _libsbml.SBase_getColumn(self)
02027 
02028     def isSetMetaId(self):
02029         """
02030         isSetMetaId(self) -> bool
02031 
02032         Predicate returning @c true or @c false depending on whether this
02033         object's 'metaid' attribute has been set.
02034 
02035         The optional attribute named 'metaid', present on every major SBML
02036         component type, is for supporting metadata annotations using RDF
02037         (Resource Description Format). The attribute value has the data type
02038         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
02039         identifier type, which means each 'metaid' value must be globally
02040         unique within an SBML file.  (Importantly, this uniqueness criterion
02041         applies across any attribute with type <a
02042         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
02043         'metaid' attribute used by SBML&mdash;something to be aware of if your
02044         application-specific XML content inside the 'annotation' subelement
02045         happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
02046         The 'metaid' value serves to identify a model
02047         component for purposes such as referencing that component from
02048         metadata placed within 'annotation' subelements.
02049          
02050         @htmlinclude libsbml-comment-set-methods.html
02051 
02052         @return @c true if the 'metaid' attribute of this SBML object has been
02053         set, @c false otherwise.
02054 
02055         @see getMetaId()
02056         @see setMetaId(const std::string& metaid)
02057           
02058 
02059         """
02060         return _libsbml.SBase_isSetMetaId(self)
02061 
02062     def isSetId(self):
02063         """
02064         isSetId(self) -> bool
02065 
02066         Predicate returning @c true or @c false depending on whether this
02067         object's 'metaid' attribute has been set.
02068 
02069         The optional attribute named 'metaid', present on every major SBML
02070         component type, is for supporting metadata annotations using RDF
02071         (Resource Description Format). The attribute value has the data type
02072         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
02073         identifier type, which means each 'metaid' value must be globally
02074         unique within an SBML file.  (Importantly, this uniqueness criterion
02075         applies across any attribute with type <a
02076         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
02077         'metaid' attribute used by SBML&mdash;something to be aware of if your
02078         application-specific XML content inside the 'annotation' subelement
02079         happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
02080         The 'metaid' value serves to identify a model
02081         component for purposes such as referencing that component from
02082         metadata placed within 'annotation' subelements.
02083          
02084         @htmlinclude libsbml-comment-set-methods.html
02085 
02086         @return @c true if the 'metaid' attribute of this SBML object has been
02087         set, @c false otherwise.
02088 
02089         @see getMetaId()
02090         @see setMetaId(const std::string& metaid)
02091         @deprecated libSBML internal
02092 
02093 
02094         """
02095         return _libsbml.SBase_isSetId(self)
02096 
02097     def isSetName(self):
02098         """
02099         isSetName(self) -> bool
02100 
02101         Predicate returning @c true or @c false depending on whether this
02102         object's 'metaid' attribute has been set.
02103 
02104         The optional attribute named 'metaid', present on every major SBML
02105         component type, is for supporting metadata annotations using RDF
02106         (Resource Description Format). The attribute value has the data type
02107         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
02108         identifier type, which means each 'metaid' value must be globally
02109         unique within an SBML file.  (Importantly, this uniqueness criterion
02110         applies across any attribute with type <a
02111         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
02112         'metaid' attribute used by SBML&mdash;something to be aware of if your
02113         application-specific XML content inside the 'annotation' subelement
02114         happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
02115         The 'metaid' value serves to identify a model
02116         component for purposes such as referencing that component from
02117         metadata placed within 'annotation' subelements.
02118          
02119         @htmlinclude libsbml-comment-set-methods.html
02120 
02121         @return @c true if the 'metaid' attribute of this SBML object has been
02122         set, @c false otherwise.
02123 
02124         @see getMetaId()
02125         @see setMetaId(const std::string& metaid)
02126         @deprecated libSBML internal
02127 
02128 
02129         """
02130         return _libsbml.SBase_isSetName(self)
02131 
02132     def isSetNotes(self):
02133         """
02134         isSetNotes(self) -> bool
02135 
02136         Predicate returning @c true or @c false depending on whether this
02137         object's 'notes' subelement exists and has content.
02138 
02139         The optional element named 'notes', present on every major SBML
02140         component type, is intended as a place for storing optional
02141         information intended to be seen by humans.  An example use of the
02142         'notes' element would be to contain formatted user comments
02143         about the model element in which the 'notes' element is
02144         enclosed.  Every object derived directly or indirectly from type
02145         SBase can have a separate value for 'notes', allowing users
02146         considerable freedom when adding comments to their models.
02147         The format of 'notes' elements must be XHTML 1.0.  The SBML
02148         Level&nbsp;2 specification has considerable detail about how
02149         'notes' element content must be handled; please refer to the
02150         specifications.
02151 
02152         @htmlinclude libsbml-comment-set-methods.html
02153 
02154         @return @c true if a 'notes' subelement exists, @c false otherwise.
02155 
02156         @see getNotes()
02157         @see getNotesString()
02158         @see setNotes(const XMLNode* notes)
02159         @see setNotes(const std::string& notes)
02160         @see appendNotes(const XMLNode* notes)
02161         @see appendNotes(const std::string& notes)
02162         @see unsetNotes()
02163           
02164 
02165         """
02166         return _libsbml.SBase_isSetNotes(self)
02167 
02168     def isSetAnnotation(self):
02169         """
02170         isSetAnnotation(self) -> bool
02171 
02172         Predicate returning @c true or @c false depending on whether this
02173         object's 'annotation' subelement exists and has content.
02174 
02175         Whereas the SBase 'notes' subelement is a container for content to be
02176         shown directly to humans, the 'annotation' element is a container for
02177         optional software-generated content @em not meant to be shown to
02178         humans.  Every object derived from SBase can have its own value for
02179         'annotation'.  The element's content type is XML type
02180         <code>any</code>, allowing essentially arbitrary well-formed XML data
02181         content.
02182 
02183         SBML places a few restrictions on the organization of the content of
02184         annotations; these are intended to help software tools read and write
02185         the data as well as help reduce conflicts between annotations added by
02186         different tools.  Please see the SBML specifications for more details.
02187 
02188         @htmlinclude libsbml-comment-set-methods.html
02189 
02190         @return @c true if a 'annotation' subelement exists, @c false
02191         otherwise.
02192 
02193         @see getAnnotation()
02194         @see getAnnotationString()
02195         @see setAnnotation(const XMLNode* annotation)
02196         @see setAnnotation(const std::string& annotation)
02197         @see appendAnnotation(const XMLNode* annotation)
02198         @see appendAnnotation(const std::string& annotation)
02199         @see unsetAnnotation()
02200           
02201 
02202         """
02203         return _libsbml.SBase_isSetAnnotation(self)
02204 
02205     def isSetSBOTerm(self):
02206         """
02207         isSetSBOTerm(self) -> bool
02208 
02209         Predicate returning @c true or @c false depending on whether this
02210         object's 'sboTerm' attribute has been set.
02211 
02212         @htmlinclude libsbml-comment-set-methods.html
02213 
02214         @return @c true if the 'sboTerm' attribute of this SBML object has been
02215         set, @c false otherwise.
02216           
02217 
02218         """
02219         return _libsbml.SBase_isSetSBOTerm(self)
02220 
02221     def setMetaId(self, *args):
02222         """
02223         setMetaId(self, string metaid) -> int
02224 
02225         Sets the value of the 'metaid' attribute of this object.
02226 
02227         The string @p metaid is copied.  The value of @p metaid must be an
02228         identifier conforming to the syntax defined by the XML 1.0 data type
02229         <a href='http://www.w3.org/TR/REC-xml/#id'>ID</a>.  Among other
02230         things, this type requires that a value is unique among all the values
02231         of type XML ID in an SBMLDocument.  Although SBML only uses <a
02232         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a> for the 'metaid'
02233         attribute, callers should be careful if they use
02234         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>'s in XML
02235         portions of a model that are not defined by SBML, such as in the
02236         application-specific content of the 'annotation' subelement.
02237 
02238         @htmlinclude libsbml-comment-set-methods.html
02239 
02240         @param metaid the identifier string to use as the value of the
02241         'metaid' attribute
02242 
02243         @return integer value indicating success/failure of the
02244         function.  @if clike The value is drawn from the
02245         enumeration #OperationReturnValues_t. @endif The possible values
02246         returned by this function are:
02247         @li LIBSBML_OPERATION_SUCCESS
02248         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
02249         @li LIBSBML_UNEXPECTED_ATTRIBUTE
02250 
02251         @see getMetaId()
02252         @see isSetMetaId()
02253           
02254 
02255         """
02256         return _libsbml.SBase_setMetaId(self, *args)
02257 
02258     def setId(self, *args):
02259         """
02260         setId(self, string sid) -> int
02261 
02262         Sets the value of the 'metaid' attribute of this object.
02263 
02264         The string @p metaid is copied.  The value of @p metaid must be an
02265         identifier conforming to the syntax defined by the XML 1.0 data type
02266         <a href='http://www.w3.org/TR/REC-xml/#id'>ID</a>.  Among other
02267         things, this type requires that a value is unique among all the values
02268         of type XML ID in an SBMLDocument.  Although SBML only uses <a
02269         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a> for the 'metaid'
02270         attribute, callers should be careful if they use
02271         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>'s in XML
02272         portions of a model that are not defined by SBML, such as in the
02273         application-specific content of the 'annotation' subelement.
02274 
02275         @htmlinclude libsbml-comment-set-methods.html
02276 
02277         @param metaid the identifier string to use as the value of the
02278         'metaid' attribute
02279 
02280         @return integer value indicating success/failure of the
02281         function.  @if clike The value is drawn from the
02282         enumeration #OperationReturnValues_t. @endif The possible values
02283         returned by this function are:
02284         @li LIBSBML_OPERATION_SUCCESS
02285         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
02286         @li LIBSBML_UNEXPECTED_ATTRIBUTE
02287 
02288         @see getMetaId()
02289         @see isSetMetaId()
02290         @deprecated libSBML internal
02291 
02292 
02293         """
02294         return _libsbml.SBase_setId(self, *args)
02295 
02296     def setName(self, *args):
02297         """
02298         setName(self, string name) -> int
02299 
02300         Sets the value of the 'metaid' attribute of this object.
02301 
02302         The string @p metaid is copied.  The value of @p metaid must be an
02303         identifier conforming to the syntax defined by the XML 1.0 data type
02304         <a href='http://www.w3.org/TR/REC-xml/#id'>ID</a>.  Among other
02305         things, this type requires that a value is unique among all the values
02306         of type XML ID in an SBMLDocument.  Although SBML only uses <a
02307         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a> for the 'metaid'
02308         attribute, callers should be careful if they use
02309         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>'s in XML
02310         portions of a model that are not defined by SBML, such as in the
02311         application-specific content of the 'annotation' subelement.
02312 
02313         @htmlinclude libsbml-comment-set-methods.html
02314 
02315         @param metaid the identifier string to use as the value of the
02316         'metaid' attribute
02317 
02318         @return integer value indicating success/failure of the
02319         function.  @if clike The value is drawn from the
02320         enumeration #OperationReturnValues_t. @endif The possible values
02321         returned by this function are:
02322         @li LIBSBML_OPERATION_SUCCESS
02323         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
02324         @li LIBSBML_UNEXPECTED_ATTRIBUTE
02325 
02326         @see getMetaId()
02327         @see isSetMetaId()
02328         @deprecated libSBML internal
02329 
02330 
02331         """
02332         return _libsbml.SBase_setName(self, *args)
02333 
02334     def setAnnotation(self, *args):
02335         """
02336         setAnnotation(self, XMLNode annotation) -> int
02337         setAnnotation(self, string annotation) -> int
02338 
02339         Sets the value of the 'annotation' subelement of this SBML object to a
02340         copy of @p annotation given as a character string.
02341 
02342         Whereas the SBase 'notes' subelement is a container for content to be
02343         shown directly to humans, the 'annotation' element is a container for
02344         optional software-generated content @em not meant to be shown to
02345         humans.  Every object derived from SBase can have its own value for
02346         'annotation'.  The element's content type is XML type
02347         <code>any</code>, allowing essentially arbitrary well-formed XML data
02348         content.
02349 
02350         SBML places a few restrictions on the organization of the content of
02351         annotations; these are intended to help software tools read and write
02352         the data as well as help reduce conflicts between annotations added by
02353         different tools.  Please see the SBML specifications for more details.
02354 
02355         Call this method will result in any existing content of the
02356         'annotation' subelement to be discarded.  Unless you have taken steps
02357         to first copy and reconstitute any existing annotations into the @p
02358         annotation that is about to be assigned, it is likely that performing
02359         such wholesale replacement is unfriendly towards other software
02360         applications whose annotations are discarded.  An alternative may be
02361         to use SBase::appendAnnotation(const XMLNode* annotation) or
02362         SBase::appendAnnotation(const std::string& annotation).
02363 
02364         @htmlinclude libsbml-comment-set-methods.html
02365 
02366         @param annotation an XML string that is to be used as the content
02367         of the 'annotation' subelement of this object
02368 
02369         @return integer value indicating success/failure of the
02370         function.  @if clike The value is drawn from the
02371         enumeration #OperationReturnValues_t. @endif The possible values
02372         returned by this function are:
02373         @li LIBSBML_OPERATION_SUCCESS
02374         @li LIBSBML_OPERATION_FAILED
02375 
02376         @see getAnnotationString()
02377         @see isSetAnnotation()
02378         @see setAnnotation(const XMLNode* annotation)
02379         @see appendAnnotation(const XMLNode* annotation)
02380         @see appendAnnotation(const std::string& annotation)
02381         @see unsetAnnotation()
02382           
02383 
02384         """
02385         return _libsbml.SBase_setAnnotation(self, *args)
02386 
02387     def appendAnnotation(self, *args):
02388         """
02389         appendAnnotation(self, XMLNode annotation) -> int
02390         appendAnnotation(self, string annotation) -> int
02391 
02392         Appends the annotation content given by @p annotation to any existing
02393         content in the 'annotation' subelement of this object.
02394 
02395         Whereas the SBase 'notes' subelement is a container for content to be
02396         shown directly to humans, the 'annotation' element is a container for
02397         optional software-generated content @em not meant to be shown to
02398         humans.  Every object derived from SBase can have its own value for
02399         'annotation'.  The element's content type is XML type
02400         <code>any</code>, allowing essentially arbitrary well-formed XML data
02401         content.
02402 
02403         SBML places a few restrictions on the organization of the content of
02404         annotations; these are intended to help software tools read and write
02405         the data as well as help reduce conflicts between annotations added by
02406         different tools.  Please see the SBML specifications for more details.
02407 
02408         Unlike SBase::setAnnotation(const XMLNode* annotation) or
02409         SBase::setAnnotation(const std::string& annotation), this method
02410         allows other annotations to be preserved when an application adds its
02411         own data.
02412 
02413         @htmlinclude libsbml-comment-set-methods.html
02414 
02415         @param annotation an XML string that is to be copied and appended
02416         to the content of the 'annotation' subelement of this object
02417 
02418         @return integer value indicating success/failure of the
02419         function.  @if clike The value is drawn from the
02420         enumeration #OperationReturnValues_t. @endif The possible values
02421         returned by this function are:
02422         @li LIBSBML_OPERATION_SUCCESS
02423         @li LIBSBML_OPERATION_FAILED
02424 
02425         @see getAnnotationString()
02426         @see isSetAnnotation()
02427         @see setAnnotation(const XMLNode* annotation)
02428         @see setAnnotation(const std::string& annotation)
02429         @see appendAnnotation(const XMLNode* annotation)
02430         @see unsetAnnotation()
02431           
02432 
02433         """
02434         return _libsbml.SBase_appendAnnotation(self, *args)
02435 
02436     def setNotes(self, *args):
02437         """
02438         setNotes(self, XMLNode notes) -> int
02439         setNotes(self, string notes) -> int
02440 
02441         Sets the value of the 'notes' subelement of this SBML object to a copy
02442         of the string @p notes.
02443 
02444         Any existing content of the 'notes' subelement is discarded.
02445 
02446         The optional element named 'notes', present on every major SBML
02447         component type, is intended as a place for storing optional
02448         information intended to be seen by humans.  An example use of the
02449         'notes' element would be to contain formatted user comments
02450         about the model element in which the 'notes' element is
02451         enclosed.  Every object derived directly or indirectly from type
02452         SBase can have a separate value for 'notes', allowing users
02453         considerable freedom when adding comments to their models.
02454         The format of 'notes' elements must be XHTML 1.0.  The SBML
02455         Level&nbsp;2 specification has considerable detail about how
02456         'notes' element content must be handled; please refer to the
02457         specifications.
02458 
02459         @htmlinclude libsbml-comment-set-methods.html
02460 
02461         @param notes an XML string that is to be used as the content of the
02462         'notes' subelement of this object
02463 
02464         @return integer value indicating success/failure of the
02465         function.  @if clike The value is drawn from the
02466         enumeration #OperationReturnValues_t. @endif The possible values
02467         returned by this function are:
02468         @li LIBSBML_OPERATION_SUCCESS
02469         @li LIBSBML_INVALID_OBJECT
02470         @li LIBSBML_OPERATION_FAILED
02471 
02472         @see getNotesString()
02473         @see isSetNotes()
02474         @see setNotes(const XMLNode* notes)
02475         @see appendNotes(const XMLNode* notes)
02476         @see appendNotes(const std::string& notes)
02477         @see unsetNotes()
02478           
02479 
02480         """
02481         return _libsbml.SBase_setNotes(self, *args)
02482 
02483     def appendNotes(self, *args):
02484         """
02485         appendNotes(self, XMLNode notes) -> int
02486         appendNotes(self, string notes) -> int
02487 
02488         Appends notes content to the 'notes' element attached to this
02489         object.
02490 
02491         The content in @p notes is copied.
02492 
02493         The optional element named 'notes', present on every major SBML
02494         component type, is intended as a place for storing optional
02495         information intended to be seen by humans.  An example use of the
02496         'notes' element would be to contain formatted user comments
02497         about the model element in which the 'notes' element is
02498         enclosed.  Every object derived directly or indirectly from type
02499         SBase can have a separate value for 'notes', allowing users
02500         considerable freedom when adding comments to their models.
02501         The format of 'notes' elements must be XHTML 1.0.  The SBML
02502         Level&nbsp;2 specification has considerable detail about how
02503         'notes' element content must be handled; please refer to the
02504         specifications.
02505 
02506         @param notes an XML string that is to appended to the content of
02507         the 'notes' subelement of this object
02508 
02509         @return integer value indicating success/failure of the
02510         function.  @if clike The value is drawn from the
02511         enumeration #OperationReturnValues_t. @endif The possible values
02512         returned by this function are:
02513         @li LIBSBML_OPERATION_SUCCESS
02514         @li LIBSBML_INVALID_OBJECT
02515         @li LIBSBML_OPERATION_FAILED
02516 
02517         @see getNotesString()
02518         @see isSetNotes()
02519         @see setNotes(const XMLNode* notes)
02520         @see setNotes(const std::string& notes)
02521         @see appendNotes(const XMLNode* notes)
02522         @see unsetNotes()
02523           
02524 
02525         """
02526         return _libsbml.SBase_appendNotes(self, *args)
02527 
02528     def setSBOTerm(self, *args):
02529         """
02530         setSBOTerm(self, int value) -> int
02531         setSBOTerm(self, string sboid) -> int
02532 
02533         Sets the value of the 'sboTerm' attribute.
02534 
02535         In SBML Level 2 Versions 2, 3 and 4, the data type of the SBML 'sboTerm'
02536         attribute is a string of the form SBO:NNNNNNN, where NNNNNNN is a
02537         seven digit integer number; libSBML simplifies the representation by
02538         only storing the NNNNNNN integer portion.  Thus, in libSBML, the
02539         'sboTerm' attribute on SBase has data type @c int, and SBO identifiers
02540         are stored simply as integers.  SBO terms are a type of optional
02541         annotation, and each different class of SBML object derived from SBase
02542         imposes its own requirements about the values permitted for 'sboTerm'.
02543         Please consult the SBML Level 2 Version 4 specification for more
02544         information about the use of SBO and the 'sboTerm' attribute.
02545 
02546         @htmlinclude libsbml-comment-set-methods.html
02547 
02548         @param value the NNNNNNN integer portion of the SBO identifier
02549 
02550         @return integer value indicating success/failure of the
02551         function.  @if clike The value is drawn from the
02552         enumeration #OperationReturnValues_t. @endif The possible values
02553         returned by this function are:
02554         @li LIBSBML_OPERATION_SUCCESS
02555         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
02556         @li LIBSBML_UNEXPECTED_ATTRIBUTE
02557           
02558 
02559         """
02560         return _libsbml.SBase_setSBOTerm(self, *args)
02561 
02562     def setNamespaces(self, *args):
02563         """
02564         setNamespaces(self, XMLNamespaces xmlns) -> int
02565 
02566         Sets the namespaces relevant of this SBML object.
02567 
02568         @param xmlns the namespaces to set
02569 
02570         @return integer value indicating success/failure of the
02571         function.  @if clike The value is drawn from the
02572         enumeration #OperationReturnValues_t. @endif The possible values
02573         returned by this function are:
02574         @li LIBSBML_OPERATION_SUCCESS
02575           
02576 
02577         """
02578         return _libsbml.SBase_setNamespaces(self, *args)
02579 
02580     def unsetMetaId(self):
02581         """
02582         unsetMetaId(self) -> int
02583 
02584         Unsets the value of the 'metaid' attribute of this SBML object.
02585 
02586         The optional attribute named 'metaid', present on every major SBML
02587         component type, is for supporting metadata annotations using RDF
02588         (Resource Description Format). The attribute value has the data type
02589         <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML
02590         identifier type, which means each 'metaid' value must be globally
02591         unique within an SBML file.  (Importantly, this uniqueness criterion
02592         applies across any attribute with type <a
02593         href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the
02594         'metaid' attribute used by SBML&mdash;something to be aware of if your
02595         application-specific XML content inside the 'annotation' subelement
02596         happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)
02597         The 'metaid' value serves to identify a model
02598         component for purposes such as referencing that component from
02599         metadata placed within 'annotation' subelements.
02600          
02601         @htmlinclude libsbml-comment-set-methods.html
02602 
02603         @return integer value indicating success/failure of the
02604         function.  @if clike The value is drawn from the
02605         enumeration #OperationReturnValues_t. @endif The possible values
02606         returned by this function are:
02607         @li LIBSBML_OPERATION_SUCCESS
02608         @li LIBSBML_OPERATION_FAILED
02609           
02610 
02611         """
02612         return _libsbml.SBase_unsetMetaId(self)
02613 
02614     def unsetNotes(self):
02615         """
02616         unsetNotes(self) -> int
02617 
02618         Unsets the value of the 'notes' subelement of this SBML object.
02619 
02620         The optional element named 'notes', present on every major SBML
02621         component type, is intended as a place for storing optional
02622         information intended to be seen by humans.  An example use of the
02623         'notes' element would be to contain formatted user comments
02624         about the model element in which the 'notes' element is
02625         enclosed.  Every object derived directly or indirectly from type
02626         SBase can have a separate value for 'notes', allowing users
02627         considerable freedom when adding comments to their models.
02628         The format of 'notes' elements must be XHTML 1.0.  The SBML
02629         Level&nbsp;2 specification has considerable detail about how
02630         'notes' element content must be handled; please refer to the
02631         specifications.
02632 
02633         @htmlinclude libsbml-comment-set-methods.html
02634 
02635         @return integer value indicating success/failure of the
02636         function.  @if clike The value is drawn from the
02637         enumeration #OperationReturnValues_t. @endif The possible values
02638         returned by this function are:
02639         @li LIBSBML_OPERATION_SUCCESS
02640 
02641         @see getNotesString()
02642         @see isSetNotes()
02643         @see setNotes(const XMLNode* notes)
02644         @see setNotes(const std::string& notes)
02645         @see appendNotes(const XMLNode* notes)
02646         @see appendNotes(const std::string& notes)
02647           
02648 
02649         """
02650         return _libsbml.SBase_unsetNotes(self)
02651 
02652     def unsetAnnotation(self):
02653         """
02654         unsetAnnotation(self) -> int
02655 
02656         Unsets the value of the 'annotation' subelement of this SBML object.
02657 
02658         Whereas the SBase 'notes' subelement is a container for content to be
02659         shown directly to humans, the 'annotation' element is a container for
02660         optional software-generated content @em not meant to be shown to
02661         humans.  Every object derived from SBase can have its own value for
02662         'annotation'.  The element's content type is XML type
02663         <code>any</code>, allowing essentially arbitrary well-formed XML data
02664         content.
02665 
02666         SBML places a few restrictions on the organization of the content of
02667         annotations; these are intended to help software tools read and write
02668         the data as well as help reduce conflicts between annotations added by
02669         different tools.  Please see the SBML specifications for more details.
02670 
02671         @htmlinclude libsbml-comment-set-methods.html
02672 
02673         @return integer value indicating success/failure of the
02674         function.  @if clike The value is drawn from the
02675         enumeration #OperationReturnValues_t. @endif The possible values
02676         returned by this function are:
02677         @li LIBSBML_OPERATION_SUCCESS
02678 
02679         @see getAnnotation()
02680         @see getAnnotationString()
02681         @see isSetAnnotation()
02682         @see setAnnotation(const XMLNode* annotation)
02683         @see setAnnotation(const std::string& annotation)
02684         @see appendAnnotation(const XMLNode* annotation)
02685         @see appendAnnotation(const std::string& annotation)
02686           
02687 
02688         """
02689         return _libsbml.SBase_unsetAnnotation(self)
02690 
02691     def unsetSBOTerm(self):
02692         """
02693         unsetSBOTerm(self) -> int
02694 
02695         Unsets the value of the 'sboTerm' attribute of this SBML object.
02696 
02697         @htmlinclude libsbml-comment-set-methods.html
02698 
02699         @return integer value indicating success/failure of the
02700         function.  @if clike The value is drawn from the
02701         enumeration #OperationReturnValues_t. @endif The possible values
02702         returned by this function are:
02703         @li LIBSBML_OPERATION_SUCCESS
02704         @li LIBSBML_UNEXPECTED_ATTRIBUTE
02705           
02706 
02707         """
02708         return _libsbml.SBase_unsetSBOTerm(self)
02709 
02710     def addCVTerm(self, *args):
02711         """
02712         addCVTerm(self, CVTerm term) -> int
02713 
02714         Adds a copy of the given CVTerm to this SBML object.
02715 
02716         @param term the CVTerm to assign
02717 
02718         @return integer value indicating success/failure of the
02719         function.  @if clike The value is drawn from the
02720         enumeration #OperationReturnValues_t. @endif The possible values
02721         returned by this function are:
02722         @li LIBSBML_OPERATION_SUCCESS
02723         @li LIBSBML_OPERATION_FAILED
02724         @li LIBSBML_UNEXPECTED_ATTRIBUTE
02725         @li LIBSBML_INVALID_OBJECT
02726 
02727         @note Since the CV Term uses the metaid of the object as a 
02728         reference, if the object has no metaid set the CVTerm will
02729         not be added.
02730 
02731         @warning The fact that this method @em copies the object passed to it
02732         means that the caller will be left holding a physically different
02733         object instance than the one contained in @em this object.  Changes
02734         made to the original object instance (such as resetting attribute
02735         values) will <em>not affect the instance added here</em>.  In
02736         addition, the caller should make sure to free the original object if
02737         it is no longer being used, or else a memory leak will result.
02738           
02739 
02740         """
02741         return _libsbml.SBase_addCVTerm(self, *args)
02742 
02743     def getCVTerms(self):
02744       """
02745       getCVTerms(self) -> CVTermList
02746 
02747       Get the CVTermList of CVTerm objects in this SBase.
02748 
02749       @return the CVTermList for this SBase.
02750 
02751 
02752       """
02753       return _libsbml.SBase_getCVTerms(self)
02754 
02755 
02756     def getNumCVTerms(self):
02757         """
02758         getNumCVTerms(self) -> unsigned int
02759 
02760         Returns the number of CVTerm objects in the annotations of this SBML
02761         object.
02762 
02763         @return the number of CVTerms for this SBML object.
02764           
02765 
02766         """
02767         return _libsbml.SBase_getNumCVTerms(self)
02768 
02769     def getCVTerm(self, *args):
02770         """
02771         getCVTerm(self, unsigned int n) -> CVTerm
02772 
02773         Returns the nth CVTerm in the list of CVTerms of this SBML
02774         object.
02775 
02776         @param n unsigned int the index of the CVTerm to retrieve
02777 
02778         @return the nth CVTerm in the list of CVTerms for this SBML object.
02779           
02780 
02781         """
02782         return _libsbml.SBase_getCVTerm(self, *args)
02783 
02784     def unsetCVTerms(self):
02785         """
02786         unsetCVTerms(self) -> int
02787 
02788         Clears the list of CVTerms of this SBML
02789         object.
02790 
02791         @return integer value indicating success/failure of the
02792         function.  @if clike The value is drawn from the
02793         enumeration #OperationReturnValues_t. @endif The possible values
02794         returned by this function are:
02795         @li LIBSBML_OPERATION_SUCCESS
02796         @li LIBSBML_OPERATION_FAILED
02797           
02798 
02799         """
02800         return _libsbml.SBase_unsetCVTerms(self)
02801 
02802     def getResourceBiologicalQualifier(self, *args):
02803         """
02804         getResourceBiologicalQualifier(self, string resource) -> BiolQualifierType_t
02805 
02806         Returns the BiologicalQualifier associated with this resource,
02807         or BQB_UNKNOWN if the resource does not exist.
02808 
02809         @param resource string representing the resource; e.g.,
02810         'http://www.geneontology.org/#GO:0005892'
02811 
02812         @return the #BiolQualifierType_t value associated with the resource
02813           
02814 
02815         """
02816         return _libsbml.SBase_getResourceBiologicalQualifier(self, *args)
02817 
02818     def getResourceModelQualifier(self, *args):
02819         """
02820         getResourceModelQualifier(self, string resource) -> ModelQualifierType_t
02821 
02822         Returns the ModelQualifier associated with this resource,
02823         or BQM_UNKNOWN if the resource does not exist.
02824 
02825         @param resource string representing the resource; e.g.,
02826         'http://www.geneontology.org/#GO:0005892'
02827 
02828         @return the #ModelQualifierType_t value associated with the resource
02829           
02830 
02831         """
02832         return _libsbml.SBase_getResourceModelQualifier(self, *args)
02833 
02834     def getModel(self):
02835         """
02836         getModel(self) -> Model
02837 
02838         Returns the Model object in which the current object is located.
02839 
02840         @return the parent Model of this SBML object.
02841           
02842 
02843         """
02844         return _libsbml.SBase_getModel(self)
02845 
02846     def getLevel(self):
02847         """
02848         getLevel(self) -> unsigned int
02849 
02850         Returns the SBML Level of the overall SBML document.
02851 
02852         @return the SBML level of this SBML object.
02853 
02854         @see getVersion()
02855           
02856 
02857         """
02858         return _libsbml.SBase_getLevel(self)
02859 
02860     def getVersion(self):
02861         """
02862         getVersion(self) -> unsigned int
02863 
02864         Returns the Version within the SBML Level of the overall SBML document.
02865 
02866         @return the SBML version of this SBML object.
02867 
02868         @see getLevel()
02869           
02870 
02871         """
02872         return _libsbml.SBase_getVersion(self)
02873 
02874     def getTypeCode(self):
02875         """
02876         getTypeCode(self) -> SBMLTypeCode_t
02877 
02878         Returns the libSBML type code for this object.
02879 
02880         This method MAY return the typecode of this SBML object or it MAY
02881         return SBML_UNKNOWN.  That is, subclasses of SBase are not required to
02882         implement this method to return a typecode.  This method is meant
02883         primarily for the LibSBML C interface where class and subclass
02884         information is not readily available.
02885 
02886         @return the #SBMLTypeCode_t value of this SBML object or SBML_UNKNOWN
02887         (default).
02888 
02889         @see getElementName()
02890           
02891 
02892         """
02893         return _libsbml.SBase_getTypeCode(self)
02894 
02895     def hasValidLevelVersionNamespaceCombination(self):
02896         """
02897         hasValidLevelVersionNamespaceCombination(self) -> bool
02898 
02899         Predicate returning @c true or @c false depending on whether this
02900         object's level/version and namespace values correspond to a valid
02901         SBML specification.
02902 
02903         The valid combinations of SBML Level, Version and Namespace as of this release
02904         of libSBML are the following: 
02905         <ul>
02906         <li> Level&nbsp;1 Version&nbsp;2 'http://www.sbml.org/sbml/level1'
02907         <li> Level&nbsp;2 Version&nbsp;1 'http://www.sbml.org/sbml/level2'
02908         <li> Level&nbsp;2 Version&nbsp;2 'http://www.sbml.org/sbml/level2/version2'
02909         <li> Level&nbsp;2 Version&nbsp;3 'http://www.sbml.org/sbml/level2/version3'
02910         <li> Level&nbsp;2 Version&nbsp;4 'http://www.sbml.org/sbml/level2/version4'
02911         </ul>
02912 
02913         @return @c true if the level, version and namespace values of this 
02914         SBML object correspond to a valid set of values, @c false otherwise.
02915           
02916 
02917         """
02918         return _libsbml.SBase_hasValidLevelVersionNamespaceCombination(self)
02919 
02920     def getElementName(self):
02921         """
02922         getElementName(self) -> string
02923 
02924         Returns the XML element name of this object.
02925 
02926         This is overridden by subclasses to return a string appropriate to the
02927         SBML component.  For example, Model defines it as returning 'model',
02928         CompartmentType defines it as returning 'compartmentType', etc.
02929           
02930 
02931         """
02932         return _libsbml.SBase_getElementName(self)
02933 
02934     def toSBML(self):
02935         """
02936         toSBML(self) -> char
02937 
02938         Returns a string that consists of the partial SBML describing this
02939         object.  This is primarily provided for testing and debugging
02940         purposes.  It may be removed in a future version of libSBML.
02941 
02942         @return the partial SBML that describes this SBML object.
02943           
02944 
02945         """
02946         return _libsbml.SBase_toSBML(self)
02947 
02948     def hasRequiredAttributes(self):
02949         """
02950         hasRequiredAttributes(self) -> bool
02951 
02952         Subclasses should override this method to write out their contained
02953         SBML objects as XML elements.  Be sure to call your parents
02954         implementation of this method as well.  For example:
02955 
02956           SBase::writeElements(stream);
02957           mReactans.write(stream);
02958           mProducts.write(stream);
02959           ...
02960         @deprecated libSBML internal
02961 
02962 
02963         """
02964         return _libsbml.SBase_hasRequiredAttributes(self)
02965 
02966     def hasRequiredElements(self):
02967         """
02968         hasRequiredElements(self) -> bool
02969 
02970         Subclasses should override this method to write out their contained
02971         SBML objects as XML elements.  Be sure to call your parents
02972         implementation of this method as well.  For example:
02973 
02974           SBase::writeElements(stream);
02975           mReactans.write(stream);
02976           mProducts.write(stream);
02977           ...
02978         @deprecated libSBML internal
02979 
02980 
02981         """
02982         return _libsbml.SBase_hasRequiredElements(self)
02983 
02984     def __eq__(self, rhs):
02985       if ((self is None) and (rhs is None)): return True
02986       if ((self is None) or  (rhs is None)): return False
02987       if (hasattr(self, 'this') and hasattr(rhs, 'this')):
02988         if (self.this == rhs.this): return True
02989       return False
02990 
02991     def __ne__(self, rhs):
02992       if ((self is None) and (rhs is None)): return False
02993       if ((self is None) or  (rhs is None)): return True
02994       if (hasattr(self, 'this') and hasattr(rhs, 'this')):
02995         if (self.this == rhs.this): return False
02996       return True
02997 
02998 SBase_swigregister = _libsbml.SBase_swigregister
02999 SBase_swigregister(SBase)
03000 
03001 class ListOf(SBase):
03002     """
03003     Parent class for the various SBML 'ListOfXYZ' classes.
03004 
03005     @htmlinclude libsbml-not-sbml-warning.html
03006 
03007 
03008     """
03009     __swig_setmethods__ = {}
03010     for _s in [SBase]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
03011     __setattr__ = lambda self, name, value: _swig_setattr(self, ListOf, name, value)
03012     __swig_getmethods__ = {}
03013     for _s in [SBase]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
03014     __getattr__ = lambda self, name: _swig_getattr(self, ListOf, name)
03015     __repr__ = _swig_repr
03016     __swig_destroy__ = _libsbml.delete_ListOf
03017     __del__ = lambda self : None;
03018     def __init__(self, *args): 
03019         """
03020         __init__(self) -> ListOf
03021         __init__(self, ListOf orig) -> ListOf
03022 
03023         Copy constructor.  Creates a copy of this ListOf.
03024           
03025 
03026         """
03027         this = _libsbml.new_ListOf(*args)
03028         try: self.this.append(this)
03029         except: self.this = this
03030     def clone(self):
03031         """
03032         clone(self) -> SBase
03033 
03034         Creates and returns a deep copy of this ListOf.
03035 
03036         @return a (deep) copy of this ListOf.
03037           
03038 
03039         """
03040         return _libsbml.ListOf_clone(self)
03041 
03042     def append(self, *args):
03043         """
03044         append(self, SBase item)
03045 
03046         Adds item to the end of this ListOf.
03047 
03048         This variant of the method makes a clone of the @p item handed to it.
03049         This means that when the ListOf is destroyed, the original items will
03050         not be destroyed.
03051 
03052         @param item the item to be added to the list.
03053 
03054         @see appendAndOwn(SBase* item)
03055           
03056 
03057         """
03058         return _libsbml.ListOf_append(self, *args)
03059 
03060     def appendAndOwn(self, *args):
03061         """
03062         appendAndOwn(self, SBase item)
03063 
03064         Adds item to the end of this ListOf.
03065 
03066         This variant of the method does not clone the @p item handed to it;
03067         instead, it assumes ownership of it.  This means that when the ListOf
03068         is destroyed, the item will be destroyed along with it.
03069 
03070         @param item the item to be added to the list.
03071 
03072         @see append(const SBase* item)
03073           
03074 
03075         """
03076         if args[0] is not None: args[0].thisown = 0
03077 
03078 
03079         return _libsbml.ListOf_appendAndOwn(self, *args)
03080 
03081     def get(self, *args):
03082         """
03083         get(self, unsigned int n) -> SBase
03084         get(self, unsigned int n) -> SBase
03085 
03086         Get an item from the list based on its identifier.
03087 
03088         @param sid a string representing the the identifier of the item to get.
03089 
03090         @return item in this ListOf items with the given id or NULL if no such
03091         item exists.
03092 
03093         @see get(unsigned int n)
03094         @see size()
03095           
03096 
03097         """
03098         return _libsbml.ListOf_get(self, *args)
03099 
03100     def clear(self, doDelete = True):
03101         """
03102         clear(self, bool doDelete = True)
03103         clear(self)
03104 
03105         Removes all items in this ListOf object.
03106 
03107         If doDelete is true (default), all items in this ListOf object are deleted
03108         and cleared, and thus the caller doesn't have to delete those items.
03109         Otherwise, all items are just cleared from this ListOf object and the caller 
03110         is responsible for deleting all items (In this case, pointers to all items 
03111         should be stored elsewhere before calling this function by the caller).
03112 
03113         @param doDelete if true (default), all items are deleted and cleared.
03114         Otherwise, all items are just cleared and not deleted. 
03115            
03116 
03117         """
03118         return _libsbml.ListOf_clear(self, doDelete)
03119 
03120     def remove(self, *args):
03121         """
03122         remove(self, unsigned int n) -> SBase
03123 
03124         Removes item in this ListOf items with the given identifier.
03125 
03126         The caller owns the returned item and is responsible for deleting it.
03127         If none of the items in this list have the identifier @p sid, then @c
03128         NULL is returned.
03129 
03130         @param sid the identifier of the item to remove
03131 
03132         @return the item removed.  As mentioned above, the caller owns the
03133         returned item.
03134           
03135 
03136         """
03137         return _libsbml.ListOf_remove(self, *args)
03138 
03139     def size(self):
03140         """
03141         size(self) -> unsigned int
03142 
03143         Get the size of this ListOf.
03144 
03145         @return the number of items in this ListOf items.
03146           
03147 
03148         """
03149         return _libsbml.ListOf_size(self)
03150 
03151     def getTypeCode(self):
03152         """
03153         getTypeCode(self) -> SBMLTypeCode_t
03154 
03155         Returns the libSBML type code for this object, namely, @c
03156         SBML_LIST_OF.
03157 
03158         @if clike LibSBML attaches an identifying code to every
03159         kind of SBML object.  These are known as <em>SBML type codes</em>.
03160         The set of possible type codes is defined in the enumeration
03161         #SBMLTypeCode_t.  The names of the type codes all begin with the
03162         characters @c SBML_. @endif@if java LibSBML attaches an
03163         identifying code to every kind of SBML object.  These are known as
03164         <em>SBML type codes</em>.  In other languages, the set of type codes
03165         is stored in an enumeration; in the Java language interface for
03166         libSBML, the type codes are defined as static integer constants in
03167         interface class {@link libsbmlConstants}.  The names of the type codes
03168         all begin with the characters @c SBML_. @endif
03169 
03170         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
03171 
03172         @see getElementName()
03173           
03174 
03175         """
03176         return _libsbml.ListOf_getTypeCode(self)
03177 
03178     def getItemTypeCode(self):
03179         """
03180         getItemTypeCode(self) -> SBMLTypeCode_t
03181 
03182         Get the type code of the objects contained in this ListOf.
03183 
03184         @if clike LibSBML attaches an identifying code to every
03185         kind of SBML object.  These are known as <em>SBML type codes</em>.
03186         The set of possible type codes is defined in the enumeration
03187         #SBMLTypeCode_t.  The names of the type codes all begin with the
03188         characters @c SBML_. @endif@if java LibSBML attaches an
03189         identifying code to every kind of SBML object.  These are known as
03190         <em>SBML type codes</em>.  In other languages, the set of type codes
03191         is stored in an enumeration; in the Java language interface for
03192         libSBML, the type codes are defined as static integer constants in
03193         interface class {@link libsbmlConstants}.  The names of the type codes
03194         all begin with the characters @c SBML_. @endif
03195 
03196         @return the SBML type code for the objects contained in this ListOf
03197         instance, or @c SBML_UNKNOWN (default).
03198           
03199 
03200         """
03201         return _libsbml.ListOf_getItemTypeCode(self)
03202 
03203     def getElementName(self):
03204         """
03205         getElementName(self) -> string
03206 
03207         Returns the XML element name of this object, which for ListOf, is
03208         always @c 'listOf'.
03209 
03210         @return the XML name of this element.
03211           
03212 
03213         """
03214         return _libsbml.ListOf_getElementName(self)
03215 
03216     def __len__(self):
03217         """__len__(self) -> int"""
03218         return _libsbml.ListOf___len__(self)
03219 
03220     def __getitem__(self, key):
03221 
03222       try:
03223          keyIsSlice = isinstance(key, slice)
03224       except:
03225          keyIsSlice = 0
03226 
03227       if keyIsSlice:
03228         start = key.start
03229         if start is None:
03230           start = 0
03231         stop = key.stop
03232         if stop is None:
03233           stop = self.size()
03234         return [self[i] for i in range(
03235           self._fixNegativeIndex(start), self._fixNegativeIndex(stop)
03236         )]
03237 
03238       key = self._fixNegativeIndex(key)
03239       if key < 0 or key >= self.size():
03240         raise IndexError(key)
03241       return self.get(key)
03242 
03243 
03244     def _fixNegativeIndex(self, index):
03245       if index < 0:
03246         return index + self.size()
03247       else:
03248         return index
03249 
03250 
03251     def __iter__(self):
03252       for i in range(self.size()):
03253         yield self[i]
03254 
03255 
03256     def __repr__(self):
03257       return "[" + ", ".join([repr(self[i]) for i in range(len(self))]) + "]"
03258 
03259 
03260     def __str__(self):
03261       return repr(self)
03262 
03263 ListOf_swigregister = _libsbml.ListOf_swigregister
03264 ListOf_swigregister(ListOf)
03265 
03266 class Model(SBase):
03267     """
03268     LibSBML implementation of %SBML's %Model construct.
03269 
03270     In an SBML model definition, a single object of class Model serves as
03271     the overall container for the lists of the various model components.
03272     All of the lists are optional, but if a given list container is present
03273     within the model, the list must not be empty; that is, it must have
03274     length one or more.  The following are the components and lists
03275     permitted in different Levels and Versions of SBML as of this version
03276     of libSBML (3.3):
03277     <ul>
03278     <li> In SBML Level 1, the components are: UnitDefinition, Compartment,
03279     Species, Parameter, Rule, and Reaction.  Instances of the classes are
03280     placed inside instances of classes ListOfUnitDefinitions,
03281     ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, and
03282     ListOfReactions.
03283 
03284     <li> In SBML Level 2 Version 1, the components are: FunctionDefinition,
03285     UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and
03286     Event.  Instances of the classes are placed inside instances of classes
03287     ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments,
03288     ListOfSpecies, ListOfParameters, ListOfRules, ListOfReactions, and
03289     ListOfEvents.
03290 
03291     <li> In SBML Level 2 Versions 2, 3 and 4, the components are:
03292     FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType,
03293     Compartment, Species, Parameter, InitialAssignment, Rule, Constraint,
03294     Reaction and Event.  Instances of the classes are placed inside
03295     instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions,
03296     ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments,
03297     ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules,
03298     ListOfConstraints, ListOfReactions, and ListOfEvents.
03299     </ul>
03300 
03301     Although all the lists are optional, there are dependencies between SBML
03302     components such that defining some components requires defining others.
03303     An example is that defining a species requires defining a compartment,
03304     and defining a reaction requires defining a species.  The dependencies
03305     are explained in more detail in the SBML specifications.
03306 
03307     @section approaches Approaches to creating objects using the libSBML API
03308 
03309     LibSBML provides two main mechanisms for creating objects: class
03310     constructors (e.g., @if clike @link Species::Species() Species()
03311     @endlink @endif@if java <a href='org/sbml/libsbml/Species.html'>Species()</a> @endif),
03312     and <code>create<i>Object</i>()</code> methods (such as
03313     Model::createSpecies()) provided by certain object classes such as
03314     Model.  These multiple mechanisms are provided by libSBML for
03315     flexibility and to support different use-cases, but they also have
03316     different implications for the overall model structure.
03317 
03318     In general, the recommended approach is to use the
03319     <code>create<i>Object</i>()</code> methods.  These methods both create
03320     an object @em and link it to the parent in one step.  Here is an
03321     example:
03322       @verbatim
03323      // Create an SBMLDocument object in Level 2 Version 4 format:
03324 
03325      SBMLDocument* sbmlDoc = new SBMLDocument(2, 4);
03326 
03327      // Create a Model object inside the SBMLDocument object and set
03328      // its identifier.  The call returns a pointer to the Model object
03329      // created, and methods called on that object affect the attributes
03330      // of the object attached to the model (as expected).
03331 
03332      Model* model = sbmlDoc->createModel();
03333      model->setId('MyModel');
03334 
03335      // Create a Species object inside the Model and set its identifier.
03336      // Similar to the lines above, this call returns a pointer to the Species
03337      // object created, and methods called on that object affect the attributes
03338      // of the object attached to the model (as expected).
03339 
03340      Species *sp = model->createSpecies();
03341      sp->setId('MySpecies');
03342      @endverbatim
03343 
03344     The <code>create<i>Object</i>()</code> methods return a pointer to the
03345     object created, but they also add the object to the relevant list of
03346     object instances contained in the parent.  (These lists become the
03347     <code>&lt;listOf<i>Object</i>s&gt;</code> elements in the finished XML
03348     rendition of SBML.)  In the example above, Model::createSpecies() adds
03349     the created species directly to the <code>&lt;listOfSpecies&gt;</code>
03350     list in the model.  Subsequently, methods called on the species change
03351     the species in the model (which is what is expected in most situations).
03352 
03353     By contrast, the other main way of creating an object and adding it to a
03354     parent makes a @em copy of the object, and requires more care on the
03355     part of the caller.  Here is an example of this alternative approach:
03356       @verbatim
03357      // Create a Species object and add it to the model.
03358      // This uses the Species class constructor:
03359 
03360      Species *newsp = Species('MySpecies');
03361      model->addSpecies(newsp); // Warning! This makes a COPY inside 'model'.
03362 
03363      // addSpecies(...) copies the object, with the result that
03364      // 'newsp' still refers to the original.  The following may not
03365      // do what is expected:
03366 
03367      newsp.setId('NewId');    // Warning -- doesn't change the species in 'model'!
03368 
03369      // If 'newsp' object isn't going to be used further, it needs
03370      // to be deleted to avoid a memory leak.
03371 
03372      delete newsp;
03373      @endverbatim
03374 
03375     The key point of the example above is that, because the @if clike
03376     Model::addSpecies() @endif@if java Model::addSpecies(Species s) @endif
03377     call makes a copy of the object handed to it, care is needed both when
03378     attempting to make changes to the object, and when the original object
03379     is no longer needed.
03380 
03381     @section checking Consistency and adherence to SBML specifications
03382 
03383     To make it easier for applications to do whatever they need,
03384     libSBML&nbsp;3.x is relatively lax when it comes to enforcing
03385     correctness and completeness of models during model construction and
03386     editing.  Essentially, libSBML @em will @em not in most cases check
03387     automatically that a model's components have valid attribute values, or
03388     that the overall model is consistent and free of errors&mdash;even
03389     obvious errors such as duplication of identifiers.  This allows
03390     applications great leeway in how they build their models, but it means
03391     that software authors must take deliberate steps to ensure that the
03392     model will be, in the end, valid SBML.  These steps include such things
03393     as keeping track of the identifiers used in a model, manually performing
03394     updates in certain situations where an entity is referenced in more than
03395     one place (e.g., a species that is referenced by multiple
03396     SpeciesReference objects), and so on.
03397 
03398     That said, libSBML does provide powerful features for deliberately
03399     performing validation of SBML when an application decides it is time to
03400     do so.  The interfaces to these facilities are on the SBMLDocument
03401     class, in the form of SBMLDocument::checkInternalConsistency() and
03402     SBMLDocument::checkConsistency().  Please refer to the documentation for
03403     SBMLDocument for more information about this.
03404 
03405     While applications may play fast and loose and live like free spirits
03406     during the construction and editing of SBML models, they should always
03407     make sure to call SBMLDocument::checkInternalConsistency() and/or
03408     SBMLDocument::checkConsistency() before writing out the final version of
03409     an SBML model.
03410 
03411     """
03412     __swig_setmethods__ = {}
03413     for _s in [SBase]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
03414     __setattr__ = lambda self, name, value: _swig_setattr(self, Model, name, value)
03415     __swig_getmethods__ = {}
03416     for _s in [SBase]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
03417     __getattr__ = lambda self, name: _swig_getattr(self, Model, name)
03418     __repr__ = _swig_repr
03419     __swig_destroy__ = _libsbml.delete_Model
03420     __del__ = lambda self : None;
03421     def __init__(self, *args): 
03422         """
03423         __init__(self, unsigned int level, unsigned int version) -> Model
03424         __init__(self, SBMLNamespaces sbmlns) -> Model
03425         __init__(self, Model orig) -> Model
03426 
03427         Removes the Event object with the given identifier from this Model
03428         object and returns a pointer to it.
03429 
03430         The caller owns the returned object and is responsible for deleting it.
03431         If none of the Event objects in this Model object have the identifier 
03432         @p sid, then @c NULL is returned.
03433 
03434         @param sid the identifier of the Event object to remove
03435 
03436         @return the Event object removed.  As mentioned above, the 
03437         caller owns the returned object. NULL is returned if no Event
03438         object with the identifier exists in this Model object.
03439 
03440         @deprecated libSBML internal
03441 
03442 
03443         """
03444         this = _libsbml.new_Model(*args)
03445         try: self.this.append(this)
03446         except: self.this = this
03447     def clone(self):
03448         """
03449         clone(self) -> Model
03450 
03451         Creates and returns a deep copy of this Model object.
03452 
03453         @return a (deep) copy of this Model.
03454           
03455 
03456         """
03457         return _libsbml.Model_clone(self)
03458 
03459     def getId(self):
03460         """
03461         getId(self) -> string
03462 
03463         Returns the value of the 'id' attribute of this Model.
03464 
03465         @return the id of this Model.
03466           
03467 
03468         """
03469         return _libsbml.Model_getId(self)
03470 
03471     def getName(self):
03472         """
03473         getName(self) -> string
03474 
03475         Returns the value of the 'name' attribute of this Model.
03476 
03477         @return the name of this Model.
03478           
03479 
03480         """
03481         return _libsbml.Model_getName(self)
03482 
03483     def getModelHistory(self, *args):
03484         """
03485         getModelHistory(self) -> ModelHistory
03486         getModelHistory(self) -> ModelHistory
03487 
03488         Returns the ModelHistory of this Model.
03489 
03490         @return ModelHistory of this Model.
03491           
03492 
03493         """
03494         return _libsbml.Model_getModelHistory(self, *args)
03495 
03496     def isSetId(self):
03497         """
03498         isSetId(self) -> bool
03499 
03500         Predicate returning @c true or @c false depending on whether this
03501         Model's 'id' attribute has been set.
03502 
03503         @htmlinclude libsbml-comment-set-methods.html
03504 
03505         @return @c true if the 'id' attribute of this Model has been
03506         set, @c false otherwise.
03507           
03508 
03509         """
03510         return _libsbml.Model_isSetId(self)
03511 
03512     def isSetName(self):
03513         """
03514         isSetName(self) -> bool
03515 
03516         Predicate returning @c true or @c false depending on whether this
03517         Model's 'name' attribute has been set.
03518 
03519         @htmlinclude libsbml-comment-set-methods.html
03520 
03521         @return @c true if the 'name' attribute of this Model has been
03522         set, @c false otherwise.
03523           
03524 
03525         """
03526         return _libsbml.Model_isSetName(self)
03527 
03528     def isSetModelHistory(self):
03529         """
03530         isSetModelHistory(self) -> bool
03531 
03532         Predicate returning @c true or @c false depending on whether this
03533         Model's ModelHistory has been set.
03534 
03535         @htmlinclude libsbml-comment-set-methods.html
03536 
03537         @return @c true if the ModelHistory of this Model
03538         has been set, @c false otherwise.
03539           
03540 
03541         """
03542         return _libsbml.Model_isSetModelHistory(self)
03543 
03544     def setId(self, *args):
03545         """
03546         setId(self, string sid) -> int
03547 
03548         Sets the value of the 'id' attribute of this Model.
03549 
03550         The string @p sid is copied.  Note that SBML has strict requirements
03551         for the syntax of identifiers.  The following is summary of the
03552         definition of the SBML identifier type @c SId (here expressed in an
03553         extended form of BNF notation):
03554         @code
03555           letter ::= 'a'..'z','A'..'Z'
03556           digit  ::= '0'..'9'
03557           idChar ::= letter | digit | '_'
03558           SId    ::= ( letter | '_' ) idChar*
03559         @endcode
03560         The equality of SBML identifiers is determined by an exact character
03561         sequence match; i.e., comparisons must be performed in a
03562         case-sensitive manner.  In addition, there are a few conditions for
03563         the uniqueness of identifiers in an SBML model.  Please consult the
03564         SBML specifications for the exact formulations.
03565 
03566         @htmlinclude libsbml-comment-set-methods.html
03567 
03568         @param sid the string to use as the identifier of this Model
03569 
03570         @return integer value indicating success/failure of the
03571         function.  @if clike The value is drawn from the
03572         enumeration #OperationReturnValues_t. @endif The possible values
03573         returned by this function are:
03574         @li LIBSBML_OPERATION_SUCCESS
03575         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
03576           
03577 
03578         """
03579         return _libsbml.Model_setId(self, *args)
03580 
03581     def setName(self, *args):
03582         """
03583         setName(self, string name) -> int
03584 
03585         Sets the value of the 'name' attribute of this Model.
03586 
03587         The string in @p name is copied.
03588 
03589         @htmlinclude libsbml-comment-set-methods.html
03590 
03591         @param name the new name for the Model
03592 
03593         @return integer value indicating success/failure of the
03594         function.  @if clike The value is drawn from the
03595         enumeration #OperationReturnValues_t. @endif The possible values
03596         returned by this function are:
03597         @li LIBSBML_OPERATION_SUCCESS
03598         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
03599           
03600 
03601         """
03602         return _libsbml.Model_setName(self, *args)
03603 
03604     def setModelHistory(self, *args):
03605         """
03606         setModelHistory(self, ModelHistory history) -> int
03607 
03608         Sets the ModelHistory of this Model.
03609 
03610         @htmlinclude libsbml-comment-set-methods.html
03611 
03612         @param history ModelHistory of this Model.
03613 
03614         @return integer value indicating success/failure of the
03615         function.  @if clike The value is drawn from the
03616         enumeration #OperationReturnValues_t. @endif The possible values
03617         returned by this function are:
03618         @li LIBSBML_OPERATION_SUCCESS
03619         @li LIBSBML_INVALID_OBJECT
03620           
03621 
03622         """
03623         return _libsbml.Model_setModelHistory(self, *args)
03624 
03625     def unsetId(self):
03626         """
03627         unsetId(self) -> int
03628 
03629         Unsets the value of the 'id' attribute of this Model.
03630 
03631         @htmlinclude libsbml-comment-set-methods.html
03632 
03633         @return integer value indicating success/failure of the
03634         function.  @if clike The value is drawn from the
03635         enumeration #OperationReturnValues_t. @endif The possible values
03636         returned by this function are:
03637         @li LIBSBML_OPERATION_SUCCESS
03638         @li LIBSBML_OPERATION_FAILED
03639           
03640 
03641         """
03642         return _libsbml.Model_unsetId(self)
03643 
03644     def unsetName(self):
03645         """
03646         unsetName(self) -> int
03647 
03648         Unsets the value of the 'name' attribute of this Model.
03649 
03650         @htmlinclude libsbml-comment-set-methods.html
03651 
03652         @return integer value indicating success/failure of the
03653         function.  @if clike The value is drawn from the
03654         enumeration #OperationReturnValues_t. @endif The possible values
03655         returned by this function are:
03656         @li LIBSBML_OPERATION_SUCCESS
03657         @li LIBSBML_OPERATION_FAILED
03658           
03659 
03660         """
03661         return _libsbml.Model_unsetName(self)
03662 
03663     def unsetModelHistory(self):
03664         """
03665         unsetModelHistory(self) -> int
03666 
03667         Unsets the ModelHistory of this Model.
03668 
03669         @htmlinclude libsbml-comment-set-methods.html
03670 
03671         @return integer value indicating success/failure of the
03672         function.  @if clike The value is drawn from the
03673         enumeration #OperationReturnValues_t. @endif The possible values
03674         returned by this function are:
03675         @li LIBSBML_OPERATION_SUCCESS
03676         @li LIBSBML_OPERATION_FAILED
03677           
03678 
03679         """
03680         return _libsbml.Model_unsetModelHistory(self)
03681 
03682     def addFunctionDefinition(self, *args):
03683         """
03684         addFunctionDefinition(self, FunctionDefinition fd) -> int
03685 
03686         Adds a copy of the given FunctionDefinition object to this Model.
03687 
03688         @param fd the FunctionDefinition to add
03689 
03690         @return integer value indicating success/failure of the
03691         function.  @if clike The value is drawn from the
03692         enumeration #OperationReturnValues_t. @endif The possible values
03693         returned by this function are:
03694         @li LIBSBML_OPERATION_SUCCESS
03695         @li LIBSBML_LEVEL_MISMATCH
03696         @li LIBSBML_VERSION_MISMATCH
03697         @li LIBSBML_DUPLICATE_OBJECT_ID
03698         @li LIBSBML_OPERATION_FAILED
03699 
03700         @note This method should be used with some caution.  The fact that
03701         this method @em copies the object passed to it means that the caller
03702         will be left holding a physically different object instance than the
03703         one contained in this Model.  Changes made to the original object
03704         instance (such as resetting attribute values) will <em>not affect the
03705         instance in the Model</em>.  In addition, the caller should make sure
03706         to free the original object if it is no longer being used, or else a
03707         memory leak will result.  Please see Model::createFunctionDefinition()
03708         for a method that does not lead to these issues.
03709 
03710         @see createFunctionDefinition()
03711           
03712 
03713         """
03714         return _libsbml.Model_addFunctionDefinition(self, *args)
03715 
03716     def addUnitDefinition(self, *args):
03717         """
03718         addUnitDefinition(self, UnitDefinition ud) -> int
03719 
03720         Adds a copy of the given UnitDefinition object to this Model.
03721 
03722         @param ud the UnitDefinition object to add
03723 
03724         @return integer value indicating success/failure of the
03725         function.  @if clike The value is drawn from the
03726         enumeration #OperationReturnValues_t. @endif The possible values
03727         returned by this function are:
03728         @li LIBSBML_OPERATION_SUCCESS
03729         @li LIBSBML_LEVEL_MISMATCH
03730         @li LIBSBML_VERSION_MISMATCH
03731         @li LIBSBML_DUPLICATE_OBJECT_ID
03732         @li LIBSBML_OPERATION_FAILED
03733 
03734         @note This method should be used with some caution.  The fact that
03735         this method @em copies the object passed to it means that the caller
03736         will be left holding a physically different object instance than the
03737         one contained in this Model.  Changes made to the original object
03738         instance (such as resetting attribute values) will <em>not affect the
03739         instance in the Model</em>.  In addition, the caller should make sure
03740         to free the original object if it is no longer being used, or else a
03741         memory leak will result.  Please see Model::createUnitDefinition() for
03742         a method that does not lead to these issues.
03743 
03744         @see createUnitDefinition()
03745           
03746 
03747         """
03748         return _libsbml.Model_addUnitDefinition(self, *args)
03749 
03750     def addCompartmentType(self, *args):
03751         """
03752         addCompartmentType(self, CompartmentType ct) -> int
03753 
03754         Adds a copy of the given CompartmentType object to this Model.
03755 
03756         @param ct the CompartmentType object to add
03757 
03758         @return integer value indicating success/failure of the
03759         function.  @if clike The value is drawn from the
03760         enumeration #OperationReturnValues_t. @endif The possible values
03761         returned by this function are:
03762         @li LIBSBML_OPERATION_SUCCESS
03763         @li LIBSBML_LEVEL_MISMATCH
03764         @li LIBSBML_VERSION_MISMATCH
03765         @li LIBSBML_DUPLICATE_OBJECT_ID
03766         @li LIBSBML_OPERATION_FAILED
03767 
03768         @note This method should be used with some caution.  The fact that
03769         this method @em copies the object passed to it means that the caller
03770         will be left holding a physically different object instance than the
03771         one contained in this Model.  Changes made to the original object
03772         instance (such as resetting attribute values) will <em>not affect the
03773         instance in the Model</em>.  In addition, the caller should make sure
03774         to free the original object if it is no longer being used, or else a
03775         memory leak will result.  Please see Model::createCompartmentType()
03776         for a method that does not lead to these issues.
03777 
03778         @see createCompartmentType()
03779           
03780 
03781         """
03782         return _libsbml.Model_addCompartmentType(self, *args)
03783 
03784     def addSpeciesType(self, *args):
03785         """
03786         addSpeciesType(self, SpeciesType st) -> int
03787 
03788         Adds a copy of the given SpeciesType object to this Model.
03789 
03790         @param st the SpeciesType object to add
03791 
03792         @return integer value indicating success/failure of the
03793         function.  @if clike The value is drawn from the
03794         enumeration #OperationReturnValues_t. @endif The possible values
03795         returned by this function are:
03796         @li LIBSBML_OPERATION_SUCCESS
03797         @li LIBSBML_LEVEL_MISMATCH
03798         @li LIBSBML_VERSION_MISMATCH
03799         @li LIBSBML_DUPLICATE_OBJECT_ID
03800         @li LIBSBML_OPERATION_FAILED
03801 
03802         @note This method should be used with some caution.  The fact that
03803         this method @em copies the object passed to it means that the caller
03804         will be left holding a physically different object instance than the
03805         one contained in this Model.  Changes made to the original object
03806         instance (such as resetting attribute values) will <em>not affect the
03807         instance in the Model</em>.  In addition, the caller should make sure
03808         to free the original object if it is no longer being used, or else a
03809         memory leak will result.  Please see Model::createSpeciesType() for a
03810         method that does not lead to these issues.
03811 
03812         @see createSpeciesType()
03813           
03814 
03815         """
03816         return _libsbml.Model_addSpeciesType(self, *args)
03817 
03818     def addCompartment(self, *args):
03819         """
03820         addCompartment(self, Compartment c) -> int
03821 
03822         Adds a copy of the given Compartment object to this Model.
03823 
03824         @param c the Compartment object to add
03825 
03826         @return integer value indicating success/failure of the
03827         function.  @if clike The value is drawn from the
03828         enumeration #OperationReturnValues_t. @endif The possible values
03829         returned by this function are:
03830         @li LIBSBML_OPERATION_SUCCESS
03831         @li LIBSBML_LEVEL_MISMATCH
03832         @li LIBSBML_VERSION_MISMATCH
03833         @li LIBSBML_DUPLICATE_OBJECT_ID
03834         @li LIBSBML_OPERATION_FAILED
03835 
03836         @note This method should be used with some caution.  The fact that
03837         this method @em copies the object passed to it means that the caller
03838         will be left holding a physically different object instance than the
03839         one contained in this Model.  Changes made to the original object
03840         instance (such as resetting attribute values) will <em>not affect the
03841         instance in the Model</em>.  In addition, the caller should make sure
03842         to free the original object if it is no longer being used, or else a
03843         memory leak will result.  Please see Model::createCompartment() for a
03844         method that does not lead to these issues.
03845 
03846         @see createCompartment()
03847           
03848 
03849         """
03850         return _libsbml.Model_addCompartment(self, *args)
03851 
03852     def addSpecies(self, *args):
03853         """
03854         addSpecies(self, Species s) -> int
03855 
03856         Adds a copy of the given Species object to this Model.
03857 
03858         @param s the Species object to add
03859 
03860         @return integer value indicating success/failure of the
03861         function.  @if clike The value is drawn from the
03862         enumeration #OperationReturnValues_t. @endif The possible values
03863         returned by this function are:
03864         @li LIBSBML_OPERATION_SUCCESS
03865         @li LIBSBML_LEVEL_MISMATCH
03866         @li LIBSBML_VERSION_MISMATCH
03867         @li LIBSBML_DUPLICATE_OBJECT_ID
03868         @li LIBSBML_OPERATION_FAILED
03869 
03870         @note This method should be used with some caution.  The fact that
03871         this method @em copies the object passed to it means that the caller
03872         will be left holding a physically different object instance than the
03873         one contained in this Model.  Changes made to the original object
03874         instance (such as resetting attribute values) will <em>not affect the
03875         instance in the Model</em>.  In addition, the caller should make sure
03876         to free the original object if it is no longer being used, or else a
03877         memory leak will result.  Please see Model::createSpecies() for a
03878         method that does not lead to these issues.
03879 
03880         @see createSpecies()
03881           
03882 
03883         """
03884         return _libsbml.Model_addSpecies(self, *args)
03885 
03886     def addParameter(self, *args):
03887         """
03888         addParameter(self, Parameter p) -> int
03889 
03890         Adds a copy of the given Parameter object to this Model.
03891 
03892         @param p the Parameter object to add
03893 
03894         @return integer value indicating success/failure of the
03895         function.  @if clike The value is drawn from the
03896         enumeration #OperationReturnValues_t. @endif The possible values
03897         returned by this function are:
03898         @li LIBSBML_OPERATION_SUCCESS
03899         @li LIBSBML_LEVEL_MISMATCH
03900         @li LIBSBML_VERSION_MISMATCH
03901         @li LIBSBML_DUPLICATE_OBJECT_ID
03902         @li LIBSBML_OPERATION_FAILED
03903 
03904         @note This method should be used with some caution.  The fact that
03905         this method @em copies the object passed to it means that the caller
03906         will be left holding a physically different object instance than the
03907         one contained in this Model.  Changes made to the original object
03908         instance (such as resetting attribute values) will <em>not affect the
03909         instance in the Model</em>.  In addition, the caller should make sure
03910         to free the original object if it is no longer being used, or else a
03911         memory leak will result.  Please see Model::createParameter() for a
03912         method that does not lead to these issues.
03913 
03914         @see createParameter()
03915           
03916 
03917         """
03918         return _libsbml.Model_addParameter(self, *args)
03919 
03920     def addInitialAssignment(self, *args):
03921         """
03922         addInitialAssignment(self, InitialAssignment ia) -> int
03923 
03924         Adds a copy of the given InitialAssignment object to this Model.
03925 
03926         @param ia the InitialAssignment object to add
03927 
03928         @return integer value indicating success/failure of the
03929         function.  @if clike The value is drawn from the
03930         enumeration #OperationReturnValues_t. @endif The possible values
03931         returned by this function are:
03932         @li LIBSBML_OPERATION_SUCCESS
03933         @li LIBSBML_LEVEL_MISMATCH
03934         @li LIBSBML_VERSION_MISMATCH
03935         @li LIBSBML_DUPLICATE_OBJECT_ID
03936         @li LIBSBML_OPERATION_FAILED
03937 
03938         @note This method should be used with some caution.  The fact that
03939         this method @em copies the object passed to it means that the caller
03940         will be left holding a physically different object instance than the
03941         one contained in this Model.  Changes made to the original object
03942         instance (such as resetting attribute values) will <em>not affect the
03943         instance in the Model</em>.  In addition, the caller should make sure
03944         to free the original object if it is no longer being used, or else a
03945         memory leak will result.  Please see Model::createInitialAssignment()
03946         for a method that does not lead to these issues.
03947 
03948         @see createInitialAssignment()
03949           
03950 
03951         """
03952         return _libsbml.Model_addInitialAssignment(self, *args)
03953 
03954     def addRule(self, *args):
03955         """
03956         addRule(self, Rule r) -> int
03957 
03958         Adds a copy of the given Rule object to this Model.
03959 
03960         @param r the Rule object to add
03961 
03962         @return integer value indicating success/failure of the
03963         function.  @if clike The value is drawn from the
03964         enumeration #OperationReturnValues_t. @endif The possible values
03965         returned by this function are:
03966         @li LIBSBML_OPERATION_SUCCESS
03967         @li LIBSBML_LEVEL_MISMATCH
03968         @li LIBSBML_VERSION_MISMATCH
03969         @li LIBSBML_DUPLICATE_OBJECT_ID
03970         @li LIBSBML_OPERATION_FAILED
03971 
03972         @note This method should be used with some caution.  The fact that
03973         this method @em copies the object passed to it means that the caller
03974         will be left holding a physically different object instance than the
03975         one contained in this Model.  Changes made to the original object
03976         instance (such as resetting attribute values) will <em>not affect the
03977         instance in the Model</em>.  In addition, the caller should make sure
03978         to free the original object if it is no longer being used, or else a
03979         memory leak will result.  Please see the methods
03980         Model::createAlgebraicRule(), Model::createAssignmentRule() and
03981         Model::createRateRule() for methods that do not lead to these issues.
03982 
03983         @see createAlgebraicRule()
03984         @see createAssignmentRule()
03985         @see createRateRule()
03986           
03987 
03988         """
03989         return _libsbml.Model_addRule(self, *args)
03990 
03991     def addConstraint(self, *args):
03992         """
03993         addConstraint(self, Constraint c) -> int
03994 
03995         Adds a copy of the given Constraint object to this Model.
03996 
03997         @param c the Constraint object to add
03998 
03999         @return integer value indicating success/failure of the
04000         function.  @if clike The value is drawn from the
04001         enumeration #OperationReturnValues_t. @endif The possible values
04002         returned by this function are:
04003         @li LIBSBML_OPERATION_SUCCESS
04004         @li LIBSBML_LEVEL_MISMATCH
04005         @li LIBSBML_VERSION_MISMATCH
04006         @li LIBSBML_OPERATION_FAILED
04007 
04008         @note This method should be used with some caution.  The fact that
04009         this method @em copies the object passed to it means that the caller
04010         will be left holding a physically different object instance than the
04011         one contained in this Model.  Changes made to the original object
04012         instance (such as resetting attribute values) will <em>not affect the
04013         instance in the Model</em>.  In addition, the caller should make sure
04014         to free the original object if it is no longer being used, or else a
04015         memory leak will result.  Please see Model::createConstraint() for a
04016         method that does not lead to these issues.
04017 
04018         @see createConstraint()
04019           
04020 
04021         """
04022         return _libsbml.Model_addConstraint(self, *args)
04023 
04024     def addReaction(self, *args):
04025         """
04026         addReaction(self, Reaction r) -> int
04027 
04028         Adds a copy of the given Reaction object to this Model.
04029 
04030         @param r the Reaction object to add
04031 
04032         @return integer value indicating success/failure of the
04033         function.  @if clike The value is drawn from the
04034         enumeration #OperationReturnValues_t. @endif The possible values
04035         returned by this function are:
04036         @li LIBSBML_OPERATION_SUCCESS
04037         @li LIBSBML_LEVEL_MISMATCH
04038         @li LIBSBML_VERSION_MISMATCH
04039         @li LIBSBML_DUPLICATE_OBJECT_ID
04040         @li LIBSBML_OPERATION_FAILED
04041 
04042         @note This method should be used with some caution.  The fact that
04043         this method @em copies the object passed to it means that the caller
04044         will be left holding a physically different object instance than the
04045         one contained in this Model.  Changes made to the original object
04046         instance (such as resetting attribute values) will <em>not affect the
04047         instance in the Model</em>.  In addition, the caller should make sure
04048         to free the original object if it is no longer being used, or else a
04049         memory leak will result.  Please see Model::createReaction() for a
04050         method that does not lead to these issues.
04051 
04052         @see createReaction()
04053           
04054 
04055         """
04056         return _libsbml.Model_addReaction(self, *args)
04057 
04058     def addEvent(self, *args):
04059         """
04060         addEvent(self, Event e) -> int
04061 
04062         Adds a copy of the given Event object to this Model.
04063 
04064         @param e the Event object to add
04065 
04066         @return integer value indicating success/failure of the
04067         function.  @if clike The value is drawn from the
04068         enumeration #OperationReturnValues_t. @endif The possible values
04069         returned by this function are:
04070         @li LIBSBML_OPERATION_SUCCESS
04071         @li LIBSBML_LEVEL_MISMATCH
04072         @li LIBSBML_VERSION_MISMATCH
04073         @li LIBSBML_DUPLICATE_OBJECT_ID
04074         @li LIBSBML_OPERATION_FAILED
04075 
04076         @note This method should be used with some caution.  The fact that
04077         this method @em copies the object passed to it means that the caller
04078         will be left holding a physically different object instance than the
04079         one contained in this Model.  Changes made to the original object
04080         instance (such as resetting attribute values) will <em>not affect the
04081         instance in the Model</em>.  In addition, the caller should make sure
04082         to free the original object if it is no longer being used, or else a
04083         memory leak will result.  Please see Model::createEvent() for a method
04084         that does not lead to these issues.
04085 
04086         @see createEvent()
04087           
04088 
04089         """
04090         return _libsbml.Model_addEvent(self, *args)
04091 
04092     def createFunctionDefinition(self):
04093         """
04094         createFunctionDefinition(self) -> FunctionDefinition
04095 
04096         Creates a new FunctionDefinition inside this Model and returns it.
04097 
04098         @return the FunctionDefinition object created
04099 
04100         @see addFunctionDefinition(const FunctionDefinition* fd)
04101           
04102 
04103         """
04104         return _libsbml.Model_createFunctionDefinition(self)
04105 
04106     def createUnitDefinition(self):
04107         """
04108         createUnitDefinition(self) -> UnitDefinition
04109 
04110         Creates a new UnitDefinition inside this Model and returns it.
04111 
04112         @return the UnitDefinition object created
04113 
04114         @see addUnitDefinition(const UnitDefinition* ud)
04115           
04116 
04117         """
04118         return _libsbml.Model_createUnitDefinition(self)
04119 
04120     def createUnit(self):
04121         """
04122         createUnit(self) -> Unit
04123 
04124         Creates a new Unit object within the last UnitDefinition object
04125         created in this model and returns a pointer to it.
04126 
04127         The mechanism by which the UnitDefinition was created is not
04128         significant.  If a UnitDefinition object does not exist in this model,
04129         a new Unit is @em not created and NULL is returned instead.
04130 
04131         @return the Unit object created
04132 
04133         @see addUnitDefinition(const UnitDefinition* ud)
04134           
04135 
04136         """
04137         return _libsbml.Model_createUnit(self)
04138 
04139     def createCompartmentType(self):
04140         """
04141         createCompartmentType(self) -> CompartmentType
04142 
04143         Creates a new CompartmentType inside this Model and returns it.
04144 
04145         @return the CompartmentType object created
04146 
04147         @see addCompartmentType(const CompartmentType* ct)
04148           
04149 
04150         """
04151         return _libsbml.Model_createCompartmentType(self)
04152 
04153     def createSpeciesType(self):
04154         """
04155         createSpeciesType(self) -> SpeciesType
04156 
04157         Creates a new SpeciesType inside this Model and returns it.
04158 
04159         @return the SpeciesType object created
04160 
04161         @see addSpeciesType(const SpeciesType* st)
04162           
04163 
04164         """
04165         return _libsbml.Model_createSpeciesType(self)
04166 
04167     def createCompartment(self):
04168         """
04169         createCompartment(self) -> Compartment
04170 
04171         Creates a new Compartment inside this Model and returns it.
04172 
04173         @return the Compartment object created
04174 
04175         @see addCompartment(const Compartment *c)
04176           
04177 
04178         """
04179         return _libsbml.Model_createCompartment(self)
04180 
04181     def createSpecies(self):
04182         """
04183         createSpecies(self) -> Species
04184 
04185         Creates a new Species inside this Model and returns it.
04186 
04187         @return the Species object created
04188 
04189         @see addSpecies(const Species *s)
04190           
04191 
04192         """
04193         return _libsbml.Model_createSpecies(self)
04194 
04195     def createParameter(self):
04196         """
04197         createParameter(self) -> Parameter
04198 
04199         Creates a new Parameter inside this Model and returns it.
04200 
04201         @return the Parameter object created
04202 
04203         @see addParameter(const Parameter *p)
04204           
04205 
04206         """
04207         return _libsbml.Model_createParameter(self)
04208 
04209     def createInitialAssignment(self):
04210         """
04211         createInitialAssignment(self) -> InitialAssignment
04212 
04213         Creates a new InitialAssignment inside this Model and returns it.
04214 
04215         @return the InitialAssignment object created
04216 
04217         @see addInitialAssignment(const InitialAssignment* ia)
04218           
04219 
04220         """
04221         return _libsbml.Model_createInitialAssignment(self)
04222 
04223     def createAlgebraicRule(self):
04224         """
04225         createAlgebraicRule(self) -> AlgebraicRule
04226 
04227         Creates a new AlgebraicRule inside this Model and returns it.
04228 
04229         @return the AlgebraicRule object created
04230 
04231         @see addRule(const Rule* r)
04232           
04233 
04234         """
04235         return _libsbml.Model_createAlgebraicRule(self)
04236 
04237     def createAssignmentRule(self):
04238         """
04239         createAssignmentRule(self) -> AssignmentRule
04240 
04241         Creates a new AssignmentRule inside this Model and returns it.
04242 
04243         @return the AssignmentRule object created
04244 
04245         @see addRule(const Rule* r)
04246           
04247 
04248         """
04249         return _libsbml.Model_createAssignmentRule(self)
04250 
04251     def createRateRule(self):
04252         """
04253         createRateRule(self) -> RateRule
04254 
04255         Creates a new RateRule inside this Model and returns it.
04256 
04257         @return the RateRule object created
04258 
04259         @see addRule(const Rule* r)
04260           
04261 
04262         """
04263         return _libsbml.Model_createRateRule(self)
04264 
04265     def createConstraint(self):
04266         """
04267         createConstraint(self) -> Constraint
04268 
04269         Creates a new Constraint inside this Model and returns it.
04270 
04271         @return the Constraint object created
04272 
04273         @see addConstraint(const Constraint *c)
04274           
04275 
04276         """
04277         return _libsbml.Model_createConstraint(self)
04278 
04279     def createReaction(self):
04280         """
04281         createReaction(self) -> Reaction
04282 
04283         Creates a new Reaction inside this Model and returns it.
04284 
04285         @return the Reaction object created
04286 
04287         @see addReaction(const Reaction *r)
04288           
04289 
04290         """
04291         return _libsbml.Model_createReaction(self)
04292 
04293     def createReactant(self):
04294         """
04295         createReactant(self) -> SpeciesReference
04296 
04297         Creates a new SpeciesReference object for a reactant inside the last
04298         Reaction object in this Model, and returns a pointer to it.
04299 
04300         The mechanism by which the last Reaction object was created and added
04301         to this Model is not significant.  It could have been created in a
04302         variety of ways, for example using createReaction().  If a Reaction
04303         does not exist for this model, a new SpeciesReference is @em not
04304         created and NULL is returned instead.
04305 
04306         @return the SpeciesReference object created
04307           
04308 
04309         """
04310         return _libsbml.Model_createReactant(self)
04311 
04312     def createProduct(self):
04313         """
04314         createProduct(self) -> SpeciesReference
04315 
04316         Creates a new SpeciesReference object for a product inside the last
04317         Reaction object in this Model, and returns a pointer to it.
04318 
04319         The mechanism by which the last Reaction object was created and added
04320         to this Model is not significant.  It could have been created in a
04321         variety of ways, for example using createReaction().  If a Reaction
04322         does not exist for this model, a new SpeciesReference is @em not
04323         created and NULL is returned instead.
04324 
04325         @return the SpeciesReference object created
04326           
04327 
04328         """
04329         return _libsbml.Model_createProduct(self)
04330 
04331     def createModifier(self):
04332         """
04333         createModifier(self) -> ModifierSpeciesReference
04334 
04335         Creates a new ModifierSpeciesReference object for a modifier species
04336         inside the last Reaction object in this Model, and returns a pointer
04337         to it.
04338 
04339         The mechanism by which the last Reaction object was created and added
04340         to this Model is not significant.  It could have been created in a
04341         variety of ways, for example using createReaction().  If a Reaction
04342         does not exist for this model, a new ModifierSpeciesReference is @em
04343         not created and NULL is returned instead.
04344 
04345         @return the SpeciesReference object created
04346           
04347 
04348         """
04349         return _libsbml.Model_createModifier(self)
04350 
04351     def createKineticLaw(self):
04352         """
04353         createKineticLaw(self) -> KineticLaw
04354 
04355         Creates a new KineticLaw inside the last Reaction object created in
04356         this Model, and returns a pointer to it.
04357 
04358         The mechanism by which the last Reaction object was created and added
04359         to this Model is not significant.  It could have been created in a
04360         variety of ways, for example using createReaction().  If a Reaction
04361         does not exist for this model, or a Reaction exists but already has a
04362         KineticLaw, a new KineticLaw is @em not created and NULL is returned
04363         instead.
04364 
04365         @return the KineticLaw object created
04366           
04367 
04368         """
04369         return _libsbml.Model_createKineticLaw(self)
04370 
04371     def createKineticLawParameter(self):
04372         """
04373         createKineticLawParameter(self) -> Parameter
04374 
04375         Creates a new local Parameter inside the KineticLaw object of the last
04376         Reaction created inside this Model, and returns a pointer to it.
04377 
04378         The last KineticLaw object in this Model could have been created in a
04379         variety of ways.  For example, it could have been added using
04380         createKineticLaw(), or it could be the result of using
04381         Reaction::createKineticLaw() on the Reaction object created by a
04382         createReaction().  If a Reaction does not exist for this model, or the
04383         last Reaction does not contain a KineticLaw object, a new Parameter is
04384         @em not created and NULL is returned instead.
04385 
04386         @return the Parameter object created
04387           
04388 
04389         """
04390         return _libsbml.Model_createKineticLawParameter(self)
04391 
04392     def createEvent(self):
04393         """
04394         createEvent(self) -> Event
04395 
04396         Creates a new Event inside this Model and returns it.
04397 
04398         @return the Event object created
04399           
04400 
04401         """
04402         return _libsbml.Model_createEvent(self)
04403 
04404     def createEventAssignment(self):
04405         """
04406         createEventAssignment(self) -> EventAssignment
04407 
04408         Creates a new EventAssignment inside the last Event object created in
04409         this Model, and returns a pointer to it.
04410 
04411         The mechanism by which the last Event object in this model was created
04412         is not significant.  It could have been created in a variety of ways,
04413         for example by using createEvent().  If no Event object exists in this
04414         Model object, a new EventAssignment is @em not created and NULL is
04415         returned instead.
04416 
04417         @return the EventAssignment object created
04418           
04419 
04420         """
04421         return _libsbml.Model_createEventAssignment(self)
04422 
04423     def createTrigger(self):
04424         """
04425         createTrigger(self) -> Trigger
04426 
04427         Creates a new Trigger inside the last Event object created in
04428         this Model, and returns a pointer to it.
04429 
04430         The mechanism by which the last Event object in this model was created
04431         is not significant.  It could have been created in a variety of ways,
04432         for example by using createEvent().  If no Event object exists in this
04433         Model object, a new Trigger is @em not created and NULL is
04434         returned instead.
04435 
04436         @return the Trigger object created
04437           
04438 
04439         """
04440         return _libsbml.Model_createTrigger(self)
04441 
04442     def createDelay(self):
04443         """
04444         createDelay(self) -> Delay
04445 
04446         Creates a new Delay inside the last Event object created in
04447         this Model, and returns a pointer to it.
04448 
04449         The mechanism by which the last Event object in this model was created
04450         is not significant.  It could have been created in a variety of ways,
04451         for example by using createEvent().  If no Event object exists in this
04452         Model object, a new Delay is @em not created and NULL is
04453         returned instead.
04454 
04455         @return the Delay object created
04456           
04457 
04458         """
04459         return _libsbml.Model_createDelay(self)
04460 
04461     def setAnnotation(self, *args):
04462         """
04463         setAnnotation(self, XMLNode annotation) -> int
04464         setAnnotation(self, string annotation) -> int
04465 
04466         Sets the value of the 'annotation' subelement of this SBML object to a
04467         copy of @p annotation.
04468 
04469         Any existing content of the 'annotation' subelement is discarded.
04470         Unless you have taken steps to first copy and reconstitute any
04471         existing annotations into the @p annotation that is about to be
04472         assigned, it is likely that performing such wholesale replacement is
04473         unfriendly towards other software applications whose annotations are
04474         discarded.  An alternative may be to use appendAnnotation().
04475 
04476         @param annotation an XML string that is to be used as the content
04477         of the 'annotation' subelement of this object
04478 
04479         @return integer value indicating success/failure of the
04480         function.  @if clike The value is drawn from the
04481         enumeration #OperationReturnValues_t. @endif The possible values
04482         returned by this function are:
04483         @li LIBSBML_OPERATION_SUCCESS
04484         @li LIBSBML_OPERATION_FAILED
04485 
04486         @see appendAnnotation(const std::string& annotation)
04487           
04488 
04489         """
04490         return _libsbml.Model_setAnnotation(self, *args)
04491 
04492     def appendAnnotation(self, *args):
04493         """
04494         appendAnnotation(self, XMLNode annotation) -> int
04495         appendAnnotation(self, string annotation) -> int
04496 
04497         Appends annotation content to any existing content in the 'annotation'
04498         subelement of this object.
04499 
04500         The content in @p annotation is copied.  Unlike setAnnotation(), this 
04501         method allows other annotations to be preserved when an application
04502         adds its own data.
04503 
04504         @param annotation an XML string that is to be copied and appended
04505         to the content of the 'annotation' subelement of this object
04506 
04507         @return integer value indicating success/failure of the
04508         function.  @if clike The value is drawn from the
04509         enumeration #OperationReturnValues_t. @endif The possible values
04510         returned by this function are:
04511         @li LIBSBML_OPERATION_SUCCESS
04512         @li LIBSBML_OPERATION_FAILED
04513 
04514         @see setAnnotation(const std::string& annotation)
04515           
04516 
04517         """
04518         return _libsbml.Model_appendAnnotation(self, *args)
04519 
04520     def getListOfFunctionDefinitions(self, *args):
04521         """
04522         getListOfFunctionDefinitions(self) -> ListOfFunctionDefinitions
04523         getListOfFunctionDefinitions(self) -> ListOfFunctionDefinitions
04524 
04525         Get the ListOfFunctionDefinitions object in this Model.
04526 
04527         @return the list of FunctionDefinitions for this Model.
04528           
04529 
04530         """
04531         return _libsbml.Model_getListOfFunctionDefinitions(self, *args)
04532 
04533     def getListOfUnitDefinitions(self, *args):
04534         """
04535         getListOfUnitDefinitions(self) -> ListOfUnitDefinitions
04536         getListOfUnitDefinitions(self) -> ListOfUnitDefinitions
04537 
04538         Get the ListOfUnitDefinitions object in this Model.
04539 
04540         @return the list of UnitDefinitions for this Model.
04541           
04542 
04543         """
04544         return _libsbml.Model_getListOfUnitDefinitions(self, *args)
04545 
04546     def getListOfCompartmentTypes(self, *args):
04547         """
04548         getListOfCompartmentTypes(self) -> ListOfCompartmentTypes
04549         getListOfCompartmentTypes(self) -> ListOfCompartmentTypes
04550 
04551         Get the ListOfCompartmentTypes object in this Model.
04552 
04553         @return the list of CompartmentTypes for this Model.
04554           
04555 
04556         """
04557         return _libsbml.Model_getListOfCompartmentTypes(self, *args)
04558 
04559     def getListOfSpeciesTypes(self, *args):
04560         """
04561         getListOfSpeciesTypes(self) -> ListOfSpeciesTypes
04562         getListOfSpeciesTypes(self) -> ListOfSpeciesTypes
04563 
04564         Get the ListOfSpeciesTypes object in this Model.
04565 
04566         @return the list of SpeciesTypes for this Model.
04567           
04568 
04569         """
04570         return _libsbml.Model_getListOfSpeciesTypes(self, *args)
04571 
04572     def getListOfCompartments(self, *args):
04573         """
04574         getListOfCompartments(self) -> ListOfCompartments
04575         getListOfCompartments(self) -> ListOfCompartments
04576 
04577         Get the ListOfCompartments object in this Model.
04578 
04579         @return the list of Compartments for this Model.
04580           
04581 
04582         """
04583         return _libsbml.Model_getListOfCompartments(self, *args)
04584 
04585     def getListOfSpecies(self, *args):
04586         """
04587         getListOfSpecies(self) -> ListOfSpecies
04588         getListOfSpecies(self) -> ListOfSpecies
04589 
04590         Get the ListOfSpecies object in this Model.
04591 
04592         @return the list of Species for this Model.
04593           
04594 
04595         """
04596         return _libsbml.Model_getListOfSpecies(self, *args)
04597 
04598     def getListOfParameters(self, *args):
04599         """
04600         getListOfParameters(self) -> ListOfParameters
04601         getListOfParameters(self) -> ListOfParameters
04602 
04603         Get the ListOfParameters object in this Model.
04604 
04605         @return the list of Parameters for this Model.
04606           
04607 
04608         """
04609         return _libsbml.Model_getListOfParameters(self, *args)
04610 
04611     def getListOfInitialAssignments(self, *args):
04612         """
04613         getListOfInitialAssignments(self) -> ListOfInitialAssignments
04614         getListOfInitialAssignments(self) -> ListOfInitialAssignments
04615 
04616         Get the ListOfInitialAssignments object in this Model.
04617 
04618         @return the list of InitialAssignment for this Model.
04619           
04620 
04621         """
04622         return _libsbml.Model_getListOfInitialAssignments(self, *args)
04623 
04624     def getListOfRules(self, *args):
04625         """
04626         getListOfRules(self) -> ListOfRules
04627         getListOfRules(self) -> ListOfRules
04628 
04629         Get the ListOfRules object in this Model.
04630 
04631         @return the list of Rules for this Model.
04632           
04633 
04634         """
04635         return _libsbml.Model_getListOfRules(self, *args)
04636 
04637     def getListOfConstraints(self, *args):
04638         """
04639         getListOfConstraints(self) -> ListOfConstraints
04640         getListOfConstraints(self) -> ListOfConstraints
04641 
04642         Get the ListOfConstraints object in this Model.
04643 
04644         @return the list of Constraints for this Model.
04645           
04646 
04647         """
04648         return _libsbml.Model_getListOfConstraints(self, *args)
04649 
04650     def getListOfReactions(self, *args):
04651         """
04652         getListOfReactions(self) -> ListOfReactions
04653         getListOfReactions(self) -> ListOfReactions
04654 
04655         Get the ListOfReactions object in this Model.
04656 
04657         @return the list of Reactions for this Model.
04658           
04659 
04660         """
04661         return _libsbml.Model_getListOfReactions(self, *args)
04662 
04663     def getListOfEvents(self, *args):
04664         """
04665         getListOfEvents(self) -> ListOfEvents
04666         getListOfEvents(self) -> ListOfEvents
04667 
04668         Get the ListOfEvents object in this Model.
04669 
04670         @return the list of Events for this Model.
04671           
04672 
04673         """
04674         return _libsbml.Model_getListOfEvents(self, *args)
04675 
04676     def getFunctionDefinition(self, *args):
04677         """
04678         getFunctionDefinition(self, unsigned int n) -> FunctionDefinition
04679         getFunctionDefinition(self, unsigned int n) -> FunctionDefinition
04680         getFunctionDefinition(self, string sid) -> FunctionDefinition
04681         getFunctionDefinition(self, string sid) -> FunctionDefinition
04682 
04683         Get a FunctionDefinition object based on its identifier.
04684 
04685         @return the FunctionDefinition in this Model with the identifier
04686         @p sid or NULL if no such FunctionDefinition exists.
04687           
04688 
04689         """
04690         return _libsbml.Model_getFunctionDefinition(self, *args)
04691 
04692     def getUnitDefinition(self, *args):
04693         """
04694         getUnitDefinition(self, unsigned int n) -> UnitDefinition
04695         getUnitDefinition(self, unsigned int n) -> UnitDefinition
04696         getUnitDefinition(self, string sid) -> UnitDefinition
04697         getUnitDefinition(self, string sid) -> UnitDefinition
04698 
04699         Get a UnitDefinition based on its identifier.
04700 
04701         @return the UnitDefinition in this Model with the identifier @p sid or
04702         NULL if no such UnitDefinition exists.
04703           
04704 
04705         """
04706         return _libsbml.Model_getUnitDefinition(self, *args)
04707 
04708     def getCompartmentType(self, *args):
04709         """
04710         getCompartmentType(self, unsigned int n) -> CompartmentType
04711         getCompartmentType(self, unsigned int n) -> CompartmentType
04712         getCompartmentType(self, string sid) -> CompartmentType
04713         getCompartmentType(self, string sid) -> CompartmentType
04714 
04715         Get a CompartmentType object based on its identifier.
04716 
04717         @return the CompartmentType in this Model with the identifier @p sid
04718         or NULL if no such CompartmentType exists.
04719           
04720 
04721         """
04722         return _libsbml.Model_getCompartmentType(self, *args)
04723 
04724     def getSpeciesType(self, *args):
04725         """
04726         getSpeciesType(self, unsigned int n) -> SpeciesType
04727         getSpeciesType(self, unsigned int n) -> SpeciesType
04728         getSpeciesType(self, string sid) -> SpeciesType
04729         getSpeciesType(self, string sid) -> SpeciesType
04730 
04731         Get a SpeciesType object based on its identifier.
04732 
04733         @return the SpeciesType in this Model with the identifier @p sid or
04734         NULL if no such SpeciesType exists.
04735           
04736 
04737         """
04738         return _libsbml.Model_getSpeciesType(self, *args)
04739 
04740     def getCompartment(self, *args):
04741         """
04742         getCompartment(self, unsigned int n) -> Compartment
04743         getCompartment(self, unsigned int n) -> Compartment
04744         getCompartment(self, string sid) -> Compartment
04745         getCompartment(self, string sid) -> Compartment
04746 
04747         Get a Compartment object based on its identifier.
04748 
04749         @return the Compartment in this Model with the identifier @p sid or
04750         NULL if no such Compartment exists.
04751           
04752 
04753         """
04754         return _libsbml.Model_getCompartment(self, *args)
04755 
04756     def getSpecies(self, *args):
04757         """
04758         getSpecies(self, unsigned int n) -> Species
04759         getSpecies(self, unsigned int n) -> Species
04760         getSpecies(self, string sid) -> Species
04761         getSpecies(self, string sid) -> Species
04762 
04763         Get a Species object based on its identifier.
04764 
04765         @return the Species in this Model with the identifier @p sid or NULL
04766         if no such Species exists.
04767           
04768 
04769         """
04770         return _libsbml.Model_getSpecies(self, *args)
04771 
04772     def getParameter(self, *args):
04773         """
04774         getParameter(self, unsigned int n) -> Parameter
04775         getParameter(self, unsigned int n) -> Parameter
04776         getParameter(self, string sid) -> Parameter
04777         getParameter(self, string sid) -> Parameter
04778 
04779         Get a Parameter object based on its identifier.
04780 
04781         @return the Parameter in this Model with the identifier @p sid or NULL
04782         if no such Parameter exists.
04783           
04784 
04785         """
04786         return _libsbml.Model_getParameter(self, *args)
04787 
04788     def getInitialAssignment(self, *args):
04789         """
04790         getInitialAssignment(self, unsigned int n) -> InitialAssignment
04791         getInitialAssignment(self, unsigned int n) -> InitialAssignment
04792         getInitialAssignment(self, string symbol) -> InitialAssignment
04793         getInitialAssignment(self, string symbol) -> InitialAssignment
04794 
04795         Get an InitialAssignment object based on the symbol to which it
04796         assigns a value.
04797 
04798         @return the InitialAssignment in this Model with the given 'symbol'
04799         attribute value or NULL if no such InitialAssignment exists.
04800           
04801 
04802         """
04803         return _libsbml.Model_getInitialAssignment(self, *args)
04804 
04805     def getRule(self, *args):
04806         """
04807         getRule(self, unsigned int n) -> Rule
04808         getRule(self, unsigned int n) -> Rule
04809         getRule(self, string variable) -> Rule
04810         getRule(self, string variable) -> Rule
04811 
04812         Get a Rule object based on the variable to which it assigns a value.
04813 
04814         @return the Rule in this Model with the given 'variable' attribute
04815         value or NULL if no such Rule exists.
04816           
04817 
04818         """
04819         return _libsbml.Model_getRule(self, *args)
04820 
04821     def getConstraint(self, *args):
04822         """
04823         getConstraint(self, unsigned int n) -> Constraint
04824         getConstraint(self, unsigned int n) -> Constraint
04825 
04826         Get the nth Constraint object in this Model.
04827 
04828         @return the nth Constraint of this Model.
04829           
04830 
04831         """
04832         return _libsbml.Model_getConstraint(self, *args)
04833 
04834     def getReaction(self, *args):
04835         """
04836         getReaction(self, unsigned int n) -> Reaction
04837         getReaction(self, unsigned int n) -> Reaction
04838         getReaction(self, string sid) -> Reaction
04839         getReaction(self, string sid) -> Reaction
04840 
04841         Get a Reaction object based on its identifier.
04842 
04843         @return the Reaction in this Model with the identifier @p sid or NULL
04844         if no such Reaction exists.
04845           
04846 
04847         """
04848         return _libsbml.Model_getReaction(self, *args)
04849 
04850     def getEvent(self, *args):
04851         """
04852         getEvent(self, unsigned int n) -> Event
04853         getEvent(self, unsigned int n) -> Event
04854         getEvent(self, string sid) -> Event
04855         getEvent(self, string sid) -> Event
04856 
04857         Get an Event object based on its identifier.
04858 
04859         @return the Event in this Model with the identifier @p sid or NULL if
04860         no such Event exists.
04861           
04862 
04863         """
04864         return _libsbml.Model_getEvent(self, *args)
04865 
04866     def getNumFunctionDefinitions(self):
04867         """
04868         getNumFunctionDefinitions(self) -> unsigned int
04869 
04870         Get the number of FunctionDefinition objects in this Model.
04871 
04872         @return the number of FunctionDefinitions in this Model.
04873           
04874 
04875         """
04876         return _libsbml.Model_getNumFunctionDefinitions(self)
04877 
04878     def getNumUnitDefinitions(self):
04879         """
04880         getNumUnitDefinitions(self) -> unsigned int
04881 
04882         Get the number of UnitDefinition objects in this Model.
04883 
04884         @return the number of UnitDefinitions in this Model.
04885           
04886 
04887         """
04888         return _libsbml.Model_getNumUnitDefinitions(self)
04889 
04890     def getNumCompartmentTypes(self):
04891         """
04892         getNumCompartmentTypes(self) -> unsigned int
04893 
04894         Get the number of CompartmentType objects in this Model.
04895 
04896         @return the number of CompartmentTypes in this Model.
04897           
04898 
04899         """
04900         return _libsbml.Model_getNumCompartmentTypes(self)
04901 
04902     def getNumSpeciesTypes(self):
04903         """
04904         getNumSpeciesTypes(self) -> unsigned int
04905 
04906         Get the number of SpeciesType objects in this Model.
04907 
04908         @return the number of SpeciesTypes in this Model.
04909           
04910 
04911         """
04912         return _libsbml.Model_getNumSpeciesTypes(self)
04913 
04914     def getNumCompartments(self):
04915         """
04916         getNumCompartments(self) -> unsigned int
04917 
04918         Get the number of Compartment objects in this Model.
04919 
04920         @return the number of Compartments in this Model.
04921           
04922 
04923         """
04924         return _libsbml.Model_getNumCompartments(self)
04925 
04926     def getNumSpecies(self):
04927         """
04928         getNumSpecies(self) -> unsigned int
04929 
04930         Get the number of Specie objects in this Model.
04931 
04932         @return the number of Species in this Model.
04933           
04934 
04935         """
04936         return _libsbml.Model_getNumSpecies(self)
04937 
04938     def getNumSpeciesWithBoundaryCondition(self):
04939         """
04940         getNumSpeciesWithBoundaryCondition(self) -> unsigned int
04941 
04942         Get the number of Species in this Model having their
04943         'boundaryCondition' attribute value set to @c true.
04944 
04945         @return the number of Species in this Model with boundaryCondition set
04946         to true.
04947           
04948 
04949         """
04950         return _libsbml.Model_getNumSpeciesWithBoundaryCondition(self)
04951 
04952     def getNumParameters(self):
04953         """
04954         getNumParameters(self) -> unsigned int
04955 
04956         Get the number of Parameter objects in this Model.
04957 
04958         @return the number of Parameters in this Model.  Parameters defined in
04959         KineticLaws are not included.
04960           
04961 
04962         """
04963         return _libsbml.Model_getNumParameters(self)
04964 
04965     def getNumInitialAssignments(self):
04966         """
04967         getNumInitialAssignments(self) -> unsigned int
04968 
04969         Get the number of InitialAssignment objects in this Model.
04970 
04971         @return the number of InitialAssignments in this Model.
04972           
04973 
04974         """
04975         return _libsbml.Model_getNumInitialAssignments(self)
04976 
04977     def getNumRules(self):
04978         """
04979         getNumRules(self) -> unsigned int
04980 
04981         Get the number of Rule objects in this Model.
04982 
04983         @return the number of Rules in this Model.
04984           
04985 
04986         """
04987         return _libsbml.Model_getNumRules(self)
04988 
04989     def getNumConstraints(self):
04990         """
04991         getNumConstraints(self) -> unsigned int
04992 
04993         Get the number of Constraint objects in this Model.
04994 
04995         @return the number of Constraints in this Model.
04996           
04997 
04998         """
04999         return _libsbml.Model_getNumConstraints(self)
05000 
05001     def getNumReactions(self):
05002         """
05003         getNumReactions(self) -> unsigned int
05004 
05005         Get the number of Reaction objects in this Model.
05006 
05007         @return the number of Reactions in this Model.
05008           
05009 
05010         """
05011         return _libsbml.Model_getNumReactions(self)
05012 
05013     def getNumEvents(self):
05014         """
05015         getNumEvents(self) -> unsigned int
05016 
05017         Get the number of Event objects in this Model.
05018 
05019         @return the number of Events in this Model.
05020           
05021 
05022         """
05023         return _libsbml.Model_getNumEvents(self)
05024 
05025     def getTypeCode(self):
05026         """
05027         getTypeCode(self) -> SBMLTypeCode_t
05028 
05029         Returns the libSBML type code for this %SBML object.
05030 
05031         @if clike LibSBML attaches an identifying code to every
05032         kind of SBML object.  These are known as <em>SBML type codes</em>.
05033         The set of possible type codes is defined in the enumeration
05034         #SBMLTypeCode_t.  The names of the type codes all begin with the
05035         characters @c SBML_. @endif@if java LibSBML attaches an
05036         identifying code to every kind of SBML object.  These are known as
05037         <em>SBML type codes</em>.  In other languages, the set of type codes
05038         is stored in an enumeration; in the Java language interface for
05039         libSBML, the type codes are defined as static integer constants in
05040         interface class {@link libsbmlConstants}.  The names of the type codes
05041         all begin with the characters @c SBML_. @endif
05042 
05043         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
05044 
05045         @see getElementName()
05046           
05047 
05048         """
05049         return _libsbml.Model_getTypeCode(self)
05050 
05051     def getElementName(self):
05052         """
05053         getElementName(self) -> string
05054 
05055         Returns the XML element name of this object, which for Model, is
05056         always @c 'model'.
05057 
05058         @return the name of this element, i.e., @c 'model'.
05059           
05060 
05061         """
05062         return _libsbml.Model_getElementName(self)
05063 
05064     def populateListFormulaUnitsData(self):
05065         """
05066         populateListFormulaUnitsData(self)
05067 
05068         Populates the list of FormulaDataUnits with the units derived 
05069         for the model. The list contains elements of class
05070         FormulaUnitsData. 
05071 
05072         The first element of the list refers to the default units
05073         of 'substance per time' derived from the model and has the
05074         unitReferenceId 'subs_per_time'. This facilitates the comparison of units
05075         derived from mathematical formula with the expected units.
05076 
05077         The next elements of the list record the units of the 
05078         compartments and species established from either explicitly
05079         declared or default units.
05080 
05081         The next elements record the units of any parameters.
05082 
05083         Subsequent elements of the list record the units derived for
05084         each mathematical expression encountered within the model.
05085 
05086         @note This function is utilised by the Unit Consistency Validator.
05087         The list is populated prior to running the validation and thus
05088         the consistency of units can be checked by accessing the members
05089         of the list and comparing the appropriate data.
05090           
05091 
05092         """
05093         return _libsbml.Model_populateListFormulaUnitsData(self)
05094 
05095     def isPopulatedListFormulaUnitsData(self):
05096         """
05097         isPopulatedListFormulaUnitsData(self) -> bool
05098 
05099         Predicate returning @c true or @c false depending on whether 
05100         the list of FormulaUnitsData has been populated.
05101 
05102         @return @c true if the list of FormulaUnitsData has been populated, 
05103         @c false otherwise.
05104           
05105 
05106         """
05107         return _libsbml.Model_isPopulatedListFormulaUnitsData(self)
05108 
05109     def hasRequiredElements(self):
05110         """
05111         hasRequiredElements(self) -> bool
05112 
05113         Predicate returning @c true or @c false depending on whether
05114         all the required elements for this Model object
05115         have been set.
05116 
05117         @note The required elements for a Model object are:
05118         listOfCompartments (L1 only); listOfSpecies (L1V1 only);
05119         listOfReactions(L1V1 only)
05120 
05121         @return a boolean value indicating whether all the required
05122         elements for this object have been defined.
05123           
05124 
05125         """
05126         return _libsbml.Model_hasRequiredElements(self)
05127 
05128     def removeFunctionDefinition(self, *args):
05129         """
05130         removeFunctionDefinition(self, unsigned int n) -> FunctionDefinition
05131         removeFunctionDefinition(self, string sid) -> FunctionDefinition
05132 
05133         Removes the FunctionDefinition object with the given identifier from this Model 
05134         object and returns a pointer to it.
05135 
05136         The caller owns the returned object and is responsible for deleting it.
05137         If none of the FunctionDefinition objects in this Model object have the identifier 
05138         @p sid, then @c NULL is returned.
05139 
05140         @param sid the identifier of the FunctionDefinition object to remove
05141 
05142         @return the FunctionDefinition object removed.  As mentioned above, the 
05143         caller owns the returned object. NULL is returned if no FunctionDefinition
05144         object with the identifier exists in this Model object.
05145           
05146 
05147         """
05148         return _libsbml.Model_removeFunctionDefinition(self, *args)
05149 
05150     def removeUnitDefinition(self, *args):
05151         """
05152         removeUnitDefinition(self, unsigned int n) -> UnitDefinition
05153         removeUnitDefinition(self, string sid) -> UnitDefinition
05154 
05155         Removes the UnitDefinition object with the given identifier from this Model
05156         object and returns a pointer to it.
05157 
05158         The caller owns the returned object and is responsible for deleting it.
05159         If none of the UnitDefinition objects in this Model object have the identifier 
05160         @p sid, then @c NULL is returned.
05161 
05162         @param sid the identifier of the UnitDefinition object to remove
05163 
05164         @return the UnitDefinition object removed.  As mentioned above, the 
05165         caller owns the returned object. NULL is returned if no UnitDefinition
05166         object with the identifier exists in this Model object.
05167           
05168 
05169         """
05170         return _libsbml.Model_removeUnitDefinition(self, *args)
05171 
05172     def removeCompartmentType(self, *args):
05173         """
05174         removeCompartmentType(self, unsigned int n) -> CompartmentType
05175         removeCompartmentType(self, string sid) -> CompartmentType
05176 
05177         Removes the CompartmentType object with the given identifier from this Model
05178         object and returns a pointer to it.
05179 
05180         The caller owns the returned object and is responsible for deleting it.
05181         If none of the CompartmentType objects in this Model object have the identifier 
05182         @p sid, then @c NULL is returned.
05183 
05184         @param sid the identifier of the object to remove
05185 
05186         @return the CompartmentType object removed.  As mentioned above, the 
05187         caller owns the returned object. NULL is returned if no CompartmentType
05188         object with the identifier exists in this Model object.
05189           
05190 
05191         """
05192         return _libsbml.Model_removeCompartmentType(self, *args)
05193 
05194     def removeSpeciesType(self, *args):
05195         """
05196         removeSpeciesType(self, unsigned int n) -> SpeciesType
05197         removeSpeciesType(self, string sid) -> SpeciesType
05198 
05199         Removes the SpeciesType object with the given identifier from this Model
05200         object and returns a pointer to it.
05201 
05202         The caller owns the returned object and is responsible for deleting it.
05203         If none of the SpeciesType objects in this Model object have the identifier 
05204         @p sid, then @c NULL is returned.
05205 
05206         @param sid the identifier of the SpeciesType object to remove
05207 
05208         @return the SpeciesType object removed.  As mentioned above, the 
05209         caller owns the returned object. NULL is returned if no SpeciesType
05210         object with the identifier exists in this Model object.
05211 
05212           
05213 
05214         """
05215         return _libsbml.Model_removeSpeciesType(self, *args)
05216 
05217     def removeCompartment(self, *args):
05218         """
05219         removeCompartment(self, unsigned int n) -> Compartment
05220         removeCompartment(self, string sid) -> Compartment
05221 
05222         Removes the Compartment object with the given identifier from this Model
05223         object and returns a pointer to it.
05224 
05225         The caller owns the returned object and is responsible for deleting it.
05226         If none of the Compartment objects in this Model object have the identifier 
05227         @p sid, then @c NULL is returned.
05228 
05229         @param sid the identifier of the Compartment object to remove
05230 
05231         @return the Compartment object removed.  As mentioned above, the 
05232         caller owns the returned object. NULL is returned if no Compartment
05233         object with the identifier exists in this Model object.
05234           
05235 
05236         """
05237         return _libsbml.Model_removeCompartment(self, *args)
05238 
05239     def removeSpecies(self, *args):
05240         """
05241         removeSpecies(self, unsigned int n) -> Species
05242         removeSpecies(self, string sid) -> Species
05243 
05244         Removes the Species object with the given identifier from this Model
05245         object and returns a pointer to it.
05246 
05247         The caller owns the returned object and is responsible for deleting it.
05248         If none of the Species objects in this Model object have the identifier 
05249         @p sid, then @c NULL is returned.
05250 
05251         @param sid the identifier of the Species object to remove
05252 
05253         @return the Species object removed.  As mentioned above, the 
05254         caller owns the returned object. NULL is returned if no Species
05255         object with the identifier exists in this Model object.
05256 
05257           
05258 
05259         """
05260         return _libsbml.Model_removeSpecies(self, *args)
05261 
05262     def removeParameter(self, *args):
05263         """
05264         removeParameter(self, unsigned int n) -> Parameter
05265         removeParameter(self, string sid) -> Parameter
05266 
05267         Removes the Parameter object with the given identifier from this Model
05268         object and returns a pointer to it.
05269 
05270         The caller owns the returned object and is responsible for deleting it.
05271         If none of the Parameter objects in this Model object have the identifier 
05272         @p sid, then @c NULL is returned.
05273 
05274         @param sid the identifier of the Parameter object to remove
05275 
05276         @return the Parameter object removed.  As mentioned above, the 
05277         caller owns the returned object. NULL is returned if no Parameter
05278         object with the identifier exists in this Model object.
05279           
05280 
05281         """
05282         return _libsbml.Model_removeParameter(self, *args)
05283 
05284     def removeInitialAssignment(self, *args):
05285         """
05286         removeInitialAssignment(self, unsigned int n) -> InitialAssignment
05287         removeInitialAssignment(self, string symbol) -> InitialAssignment
05288 
05289         Removes the InitialAssignment object with the given 'symbol' attribute 
05290         from this Model object and returns a pointer to it.
05291 
05292         The caller owns the returned object and is responsible for deleting it.
05293         If none of the InitialAssignment objects in this Model object have the
05294         'symbol' attribute @p symbol, then @c NULL is returned.
05295 
05296         @param symbol the 'symbol' attribute of the InitialAssignment object to remove
05297 
05298         @return the InitialAssignment object removed.  As mentioned above, the 
05299         caller owns the returned object. NULL is returned if no InitialAssignment
05300         object with the 'symbol' attribute exists in this Model object.
05301           
05302 
05303         """
05304         return _libsbml.Model_removeInitialAssignment(self, *args)
05305 
05306     def removeRule(self, *args):
05307         """
05308         removeRule(self, unsigned int n) -> Rule
05309         removeRule(self, string variable) -> Rule
05310 
05311         Removes the Rule object with the given 'variable' attribute from this Model 
05312         object and returns a pointer to it.
05313 
05314         The caller owns the returned object and is responsible for deleting it.
05315         If none of the Rule objects in this Model object have the 'variable' attribute
05316         @p variable, then @c NULL is returned.
05317 
05318         @param variable the 'variable' attribute of the Rule object to remove
05319 
05320         @return the Rule object removed.  As mentioned above, the 
05321         caller owns the returned object. NULL is returned if no Rule
05322         object with the 'variable' attribute exists in this Model object.
05323           
05324 
05325         """
05326         return _libsbml.Model_removeRule(self, *args)
05327 
05328     def removeConstraint(self, *args):
05329         """
05330         removeConstraint(self, unsigned int n) -> Constraint
05331 
05332         Removes the nth Constraint object from this Model object and
05333         returns a pointer to it.
05334 
05335         The caller owns the returned object and is responsible for deleting it.
05336 
05337         @param n the index of the Constraint object to remove
05338 
05339         @return the Constraint object removed.  As mentioned above, 
05340         the caller owns the returned item. NULL is returned if the given index 
05341         is out of range.
05342 
05343           
05344 
05345         """
05346         return _libsbml.Model_removeConstraint(self, *args)
05347 
05348     def removeReaction(self, *args):
05349         """
05350         removeReaction(self, unsigned int n) -> Reaction
05351         removeReaction(self, string sid) -> Reaction
05352 
05353         Removes the Reaction object with the given identifier from this Model
05354         object and returns a pointer to it.
05355 
05356         The caller owns the returned object and is responsible for deleting it.
05357         If none of the Reaction objects in this Model object have the identifier 
05358         @p sid, then @c NULL is returned.
05359 
05360         @param sid the identifier of the Reaction object to remove
05361 
05362         @return the Reaction object removed.  As mentioned above, the 
05363         caller owns the returned object. NULL is returned if no Reaction
05364         object with the identifier exists in this Model object.
05365 
05366           
05367 
05368         """
05369         return _libsbml.Model_removeReaction(self, *args)
05370 
05371     def removeEvent(self, *args):
05372         """
05373         removeEvent(self, unsigned int n) -> Event
05374         removeEvent(self, string sid) -> Event
05375 
05376         Removes the Event object with the given identifier from this Model
05377         object and returns a pointer to it.
05378 
05379         The caller owns the returned object and is responsible for deleting it.
05380         If none of the Event objects in this Model object have the identifier 
05381         @p sid, then @c NULL is returned.
05382 
05383         @param sid the identifier of the Event object to remove
05384 
05385         @return the Event object removed.  As mentioned above, the 
05386         caller owns the returned object. NULL is returned if no Event
05387         object with the identifier exists in this Model object.
05388 
05389           
05390 
05391         """
05392         return _libsbml.Model_removeEvent(self, *args)
05393 
05394 Model_swigregister = _libsbml.Model_swigregister
05395 Model_swigregister(Model)
05396 
05397 IdCheckON = _libsbml.IdCheckON
05398 IdCheckOFF = _libsbml.IdCheckOFF
05399 SBMLCheckON = _libsbml.SBMLCheckON
05400 SBMLCheckOFF = _libsbml.SBMLCheckOFF
05401 SBOCheckON = _libsbml.SBOCheckON
05402 SBOCheckOFF = _libsbml.SBOCheckOFF
05403 MathCheckON = _libsbml.MathCheckON
05404 MathCheckOFF = _libsbml.MathCheckOFF
05405 UnitsCheckON = _libsbml.UnitsCheckON
05406 UnitsCheckOFF = _libsbml.UnitsCheckOFF
05407 OverdeterCheckON = _libsbml.OverdeterCheckON
05408 OverdeterCheckOFF = _libsbml.OverdeterCheckOFF
05409 PracticeCheckON = _libsbml.PracticeCheckON
05410 PracticeCheckOFF = _libsbml.PracticeCheckOFF
05411 AllChecksON = _libsbml.AllChecksON
05412 class SBMLDocument(SBase):
05413     """
05414     Container for an SBML document and interface for global operations
05415     on SBML documents.
05416 
05417     @if clike LibSBML uses the class SBMLDocument as a
05418     top-level container for storing SBML content and data associated with it
05419     (such as warnings and error messages).  The two primary means of reading
05420     an SBML model, SBMLReader::readSBML() and
05421     SBMLReader::readSBMLFromString(), both return a pointer to an
05422     SBMLDocument object.  From there, callers can inquire about any errors
05423     encountered (e.g., using SBMLDocument::getNumErrors()), access the Model
05424     object, and perform other actions such as consistency-checking and model
05425     translation. @endif@if java LibSBML uses the class
05426     SBMLDocument as a top-level container for storing SBML content and data
05427     associated with it (such as warnings and error messages).  The two
05428     primary means of reading an SBML model, SBMLReader::readSBML(String
05429     filename) and SBMLReader::readSBMLFromString(String xml), both return a
05430     pointer to an SBMLDocument object.  From there, callers can inquire
05431     about any errors encountered (e.g., using SBMLDocument::getNumErrors()),
05432     access the Model object, and perform other actions such as
05433     consistency-checking and model translation. @endif
05434 
05435     When creating fresh models programmatically, the starting point is
05436     typically the creation of an SBMLDocument object instance.  The
05437     SBMLDocument constructor accepts arguments for the SBML Level and
05438     Version of the model to be created.  After creating the SBMLDocument
05439     object, calling programs then typically call SBMLDocument::createModel()
05440     almost immediately, and then proceed to call the methods on the Model
05441     object to fill out the model's contents.
05442 
05443     SBMLDocument corresponds roughly to the class <i>Sbml</i> defined in the
05444     SBML Level&nbsp;2 specification.  It does not have a direct
05445     correspondence in SBML Level&nbsp;1.  (However, to make matters simpler
05446     for applications, libSBML creates an SBMLDocument no matter whether the model
05447     is Level&nbsp;1 or Level&nbsp;2.)  In its barest form, when written out
05448     in XML format for SBML Level&nbsp;2 Version&nbsp;4, the corresponding
05449     structure is the following:
05450       @verbatim
05451      <sbml xmlns='http://www.sbml.org/sbml/level2/version4' level='2' version='4'
05452        ...
05453      </sbml>
05454      @endverbatim
05455 
05456     SBMLDocument is derived from SBase, and therefore contains the usual SBase
05457     attributes (in SBML Level&nbsp;2 Version&nbsp;4) of 'metaid' and 'sboTerm', as
05458     well as the subelements 'notes' and 'annotation'.  It also contains the
05459     attributes 'level' and 'version' indicating the Level and Version of the
05460     SBML data structure.  These can be accessed using the methods defined by
05461     the SBase class for that purpose.
05462 
05463     @section checking Checking consistency and adherence to SBML specifications
05464 
05465     One of the most important features of libSBML is its ability to perform
05466     SBML validation to ensure that a model adheres to the SBML specification
05467     for whatever Level+Version combination the model uses.  SBMLDocument
05468     provides the methods for running consistency-checking and validation
05469     rules on the SBML content.
05470 
05471     First, a brief explanation of the rationale is in order.  In libSBML
05472     versions up to and including the version 3.3.x series, the individual
05473     methods for creating and setting attributes and other components are
05474     quite lenient, and allow a caller to compose SBML entities that may not,
05475     in the end, represent valid SBML.  This allows applications the freedom
05476     to do things such as save incomplete models (which is useful when models
05477     are being developed over long periods of time), but at the same time, it
05478     means that a separate validation step is necessary when a calling
05479     program finally wants to finish a complete SBML document.
05480 
05481     The primary interface to this facility is SBMLDocument's
05482     SBMLDocument::checkInternalConsistency() and
05483     SBMLDocument::checkConsistency().  The former verifies the basic
05484     internal consistency and syntax of an SBML document, and the latter
05485     implements more elaborate validation rules (both those defined by the
05486     SBML specifications, as well as additional rules offered by libSBML).
05487 
05488     @if clike The checks performed by
05489     SBMLDocument::checkInternalConsistency() are hardwired and cannot be
05490     changed by calling programs, but the validation performed by
05491     SBMLDocument::checkConsistency() is under program control using the
05492     method SBMLDocument::setConsistencyChecks().  Applications can
05493     selectively disable specific kinds of checks that they may not be
05494     interested in, by calling SBMLDocument::setConsistencyChecks() with
05495     appropriate parameters.  @endif@if java The checks
05496     performed by SBMLDocument::checkInternalConsistency() are hardwired and
05497     cannot be changed by calling programs, but the validation performed by
05498     SBMLDocument::checkConsistency() is under program control using the
05499     method SBMLDocument::setConsistencyChecks(int categ, boolean onoff).
05500     Applications can selectively disable specific kinds of checks that they
05501     may not be interested by calling SBMLDocument::setConsistencyChecks(int
05502     categ, boolean onoff) with appropriate parameters. @endif
05503 
05504     These methods have slightly different relevance depending on whether a
05505     model is created programmaticaly from scratch, or whether it is read in
05506     from a file or data stream.  The following table summarizes the possible
05507     scenarios.
05508 
05509     <center>
05510     <table border='0' class='text-table width80 normal-font alt-row-colors'>
05511      <tr style='background: lightgray; font-size: 14px;'>
05512          <th align='left' width='200'>Scenario</th>
05513          <th align='left'>Relevant methods</th>
05514      </tr>
05515     <tr><td>Creating a model from scratch</td>
05516     <td>Before writing out the model:<ol>
05517 
05518     <li style='margin-bottom: 0.5em'>Call
05519     SBMLDocument::checkInternalConsistency(), then inquire about the results by
05520     calling SBMLDocument::getNumErrors()</li>
05521 
05522     <li style='margin-bottom: 0.5em'>
05523     Call @if clike SBMLDocument::setConsistencyChecks() @endif@if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @endif to configure which checks
05524     will be performed by SBMLDocument::checkConsistency()</li>
05525 
05526     <li>Call SBMLDocument::checkConsistency(), then inquire about the results by
05527     calling SBMLDocument::getNumErrors()</li>
05528     </ol>
05529     </td>
05530     <tr><td>Reading a model from a file or data stream</td>
05531     <td>After reading the model:<ol>
05532 
05533     <li style='margin-bottom: 0.5em'>Basic consistency checks will have been
05534     performed automatically by libSBML upon reading the content&mdash;only need
05535     to inquire about the results by using SBMLDocument::getNumErrors()</li>
05536 
05537     <li style='margin-bottom: 0.5em'>
05538     Call @if clike SBMLDocument::setConsistencyChecks() @endif@if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @endif to configure which
05539     checks are performed by SBMLDocument::checkConsistency()</li>
05540 
05541     <li>Call SBMLDocument::checkConsistency(), then inquire about the results
05542     by calling SBMLDocument::getNumErrors()</li>
05543     </ol>
05544     </td>
05545     </table>
05546     </center>
05547 
05548     @if clike An example of using the consistency-checking
05549     and validation facilities is provided in this manual in the
05550     section @ref libsbml-example. @endif
05551 
05552     @section converting Converting documents between Levels and Versions of SBML
05553 
05554     LibSBML provides facilities for limited translation of SBML between
05555     Levels and Versions of the SBML specifications.  The method for doing is
05556     is @if clike SBMLDocument::setLevelAndVersion() @endif@if java SBMLDocument::setLevelAndVersion(long lev, long ver) @endif.  In 
05557     general, models can be converted upward without difficulty (e.g., from
05558     SBML Level&nbsp;1 to Level&nbsp;2, or from an earlier Version of
05559     Level&nbsp;2 to the latest Version of Level&nbsp;2).  Sometimes models
05560     can be translated downward as well, if they do not use constructs
05561     specific to more advanced Levels of SBML.
05562 
05563     Calling @if clike SBMLDocument::setLevelAndVersion() @endif@if java SBMLDocument::setLevelAndVersion(long lev, long ver) @endif will not @em necessarily lead
05564     to a successful conversion.  The method will return a boolean value
05565     to indicate success or failure.  Callers must check the error log (see 
05566     next section) attached to the SBMLDocument object after calling
05567     @if clike SBMLDocument::setLevelAndVersion() @endif@if java SBMLDocument::setLevelAndVersion(long lev, long ver) @endif in order to assess whether any
05568     problems arose.
05569 
05570     If an application is interested in translating to a lower Level and/or
05571     Version of SBML within a Level, the following methods allow for prior
05572     assessment of whether there is sufficient compatibility to make a
05573     translation possible:
05574 
05575     @li SBMLDocument::checkL1Compatibility(),
05576     @li SBMLDocument::checkL2v1Compatibility(),
05577     @li SBMLDocument::checkL2v2Compatibility(),
05578     @li SBMLDocument::checkL2v3Compatibility(), and
05579     @li SBMLDocument::checkL2v4Compatibility().
05580 
05581     Some changes between Versions of SBML Level&nbsp;2 may lead to
05582     unexpected behaviors when attempting conversions in either direction.
05583     For example, SBML Level&nbsp;2 Version&nbsp;4 relaxed the requirement
05584     for consistency in units of measurement between expressions annd
05585     quantities in a model.  As a result, a model written in Version&nbsp;4,
05586     if converted to Version&nbsp;3 with no other changes, may fail
05587     validation as a Version&nbsp;3 model because Version&nbsp;3 imposed
05588     stricter requirements on unit consistency.
05589 
05590     @section errors Error handling
05591 
05592     Upon reading a model, SBMLDocument logs any problems encountered while
05593     reading the model from the file or data stream.  The log contains
05594     objects that record diagnostic information about any notable issues that
05595     arose.  Whether the problems are warnings or errors, they are both
05596     reported through a single common interface involving the object class
05597     SBMLError.
05598 
05599     The methods SBMLDocument::getNumErrors(), @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif and
05600     SBMLDocument::printErrors() allow callers to interact with the warnings
05601     or errors logged.  Alternatively, callers may retrieve the entire log as
05602     an SBMLErrorLog object using the method SBMLDocument::getErrorLog().
05603     The SBMLErrorLog object provides some alternative methods for
05604     interacting with the set of errors and warnings.  In either case,
05605     applications typically should first call SBMLDocument::getNumErrors() to
05606     find out if any issues have been logged after specific libSBML
05607     operations such as the ones discussed in the sections above.  If they
05608     have, then an application will should proceed to inspect the individual
05609     reports using either the direct interfaces on SBMLDocument or using the
05610     methods on the SBMLErrorLog object.
05611 
05612     @if clike An example of using the error facility is
05613     provided in this manual in the
05614     section @ref libsbml-example. @endif
05615 
05616 
05617     <hr style='margin: 1em auto'>
05618 
05619     """
05620     __swig_setmethods__ = {}
05621     for _s in [SBase]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
05622     __setattr__ = lambda self, name, value: _swig_setattr(self, SBMLDocument, name, value)
05623     __swig_getmethods__ = {}
05624     for _s in [SBase]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
05625     __getattr__ = lambda self, name: _swig_getattr(self, SBMLDocument, name)
05626     __repr__ = _swig_repr
05627     def getDefaultLevel():
05628         """
05629         getDefaultLevel() -> unsigned int
05630 
05631         The default SBML Level of new SBMLDocument objects.
05632 
05633         This 'default level' corresponds to the most recent SBML specification
05634         Level available at the time this version of libSBML was released.  For
05635         this copy of libSBML, the value is <code>2</code>.  The default Level
05636         is used by SBMLDocument if no Level is explicitly specified at the
05637         time of the construction of an SBMLDocument instance. 
05638 
05639         @return an integer indicating the most recent SBML specification Level
05640 
05641         @see getDefaultVersion()
05642           
05643 
05644         """
05645         return _libsbml.SBMLDocument_getDefaultLevel()
05646 
05647     if _newclass:getDefaultLevel = staticmethod(getDefaultLevel)
05648     __swig_getmethods__["getDefaultLevel"] = lambda x: getDefaultLevel
05649     def getDefaultVersion():
05650         """
05651         getDefaultVersion() -> unsigned int
05652 
05653         The default Version of new SBMLDocument objects.
05654 
05655         This 'default version' corresponds to the most recent SBML Version
05656         within the most recent Level of SBML available at the time this
05657         version of libSBML was released.  For this copy of libSBML, the value
05658         is <code>4</code>.  The default Version is used by SBMLDocument if no
05659         Version is explicitly specified at the time of the construction of an
05660         SBMLDocument instance.
05661 
05662         @return an integer indicating the most recent SBML specification
05663         Version
05664 
05665         @see getDefaultLevel()
05666           
05667 
05668         """
05669         return _libsbml.SBMLDocument_getDefaultVersion()
05670 
05671     if _newclass:getDefaultVersion = staticmethod(getDefaultVersion)
05672     __swig_getmethods__["getDefaultVersion"] = lambda x: getDefaultVersion
05673     __swig_destroy__ = _libsbml.delete_SBMLDocument
05674     __del__ = lambda self : None;
05675     def __init__(self, *args): 
05676         """
05677         __init__(self, unsigned int level = 0, unsigned int version = 0) -> SBMLDocument
05678         __init__(self, unsigned int level = 0) -> SBMLDocument
05679         __init__(self) -> SBMLDocument
05680         __init__(self, SBMLDocument rhs) -> SBMLDocument
05681 
05682         Copy constructor; creates a copy of this SBMLDocument.
05683           
05684 
05685         """
05686         this = _libsbml.new_SBMLDocument(*args)
05687         try: self.this.append(this)
05688         except: self.this = this
05689     def clone(self):
05690         """
05691         clone(self) -> SBMLDocument
05692 
05693         Creates and returns a deep copy of this SBMLDocument.
05694 
05695         @return a (deep) copy of this SBMLDocument.
05696           
05697 
05698         """
05699         return _libsbml.SBMLDocument_clone(self)
05700 
05701     def getModel(self, *args):
05702         """
05703         getModel(self) -> Model
05704         getModel(self) -> Model
05705 
05706         Returns the Model object stored in this SBMLDocument.
05707 
05708         It is important to note that this method <em>does not create</em> a
05709         Model instance.  The model in the SBMLDocument must have been created
05710         at some prior time, for example using SBMLDocument::createModel() 
05711         or @if clike SBMLDocument::setModel() @endif@if java SBMLDocument::setModel(Model m) @endif.
05712         This method returns NULL if a model does not yet exist.
05713 
05714         @return the Model contained in this SBMLDocument.
05715 
05716         @see createModel()
05717           
05718 
05719         """
05720         return _libsbml.SBMLDocument_getModel(self, *args)
05721 
05722     def setLevelAndVersion(self, *args):
05723         """
05724         setLevelAndVersion(self, unsigned int level, unsigned int version, bool strict = True) -> bool
05725         setLevelAndVersion(self, unsigned int level, unsigned int version) -> bool
05726 
05727         Sets the SBML Level and Version of this SBMLDocument instance,
05728         attempting to convert the model as needed.
05729 
05730         This method is the principal way in libSBML to convert models between
05731         Levels and Versions of SBML.  Generally, models can be converted
05732         upward without difficulty (e.g., from SBML Level&nbsp;1 to
05733         Level&nbsp;2, or from an earlier Version of Level&nbsp;2 to the latest
05734         Version of Level&nbsp;2).  Sometimes models can be translated downward
05735         as well, if they do not use constructs specific to more advanced
05736         Levels of SBML.
05737 
05738         Before calling this method, callers may check compatibility directly
05739         using the methods SBMLDocument::checkL1Compatibility(),
05740         SBMLDocument::checkL2v1Compatibility(),
05741         SBMLDocument::checkL2v2Compatibility(),
05742         SBMLDocument::checkL2v3Compatibility() and
05743         SBMLDocument::checkL2v4Compatibility().
05744 
05745         The valid combinations of SBML Level and Version as of this release
05746         of libSBML are the following: 
05747         <ul>
05748         <li> Level&nbsp;1 Version&nbsp;2
05749         <li> Level&nbsp;2 Version&nbsp;1
05750         <li> Level&nbsp;2 Version&nbsp;2
05751         <li> Level&nbsp;2 Version&nbsp;3
05752         <li> Level&nbsp;2 Version&nbsp;4
05753         </ul>
05754 
05755         @param level the desired SBML Level
05756          
05757         @param version the desired Version within the SBML Level
05758 
05759         @param strict boolean indicating whether to check consistency
05760         of both the source and target model when performing
05761         conversion (defaults to <code> true </code>)
05762 
05763         @note Calling this method will not @em necessarily lead to a successful
05764         conversion.  If the conversion fails, it will be logged in the error
05765         list associated with this SBMLDocument.  Callers should consult
05766         getNumErrors() to find out if the conversion succeeded without
05767         problems.  For conversions from Level&nbsp;2 to Level&nbsp;1, callers
05768         can also check the Level of the model after calling this method to
05769         find out whether it is Level&nbsp;1.  (If the conversion to
05770         Level&nbsp;1 failed, the Level of this model will be left unchanged.)
05771 
05772         @see checkL1Compatibility()
05773         @see checkL2v1Compatibility()
05774         @see checkL2v2Compatibility()
05775         @see checkL2v3Compatibility()
05776         @see checkL2v4Compatibility()
05777 
05778         Strict conversion applies the additional criteria that both the source
05779         and the target model must be consistent SBML.  Users can control the
05780         consistency checks that are applied using the 
05781         SBMLDocument::setConsistencyChecksForConversion function.  If either 
05782         the source
05783         or the potential target model have validation errors, the conversion
05784         is not performed.  When a strict conversion is successful, the
05785         underlying SBML object model is altered to reflect the new level
05786         and version.  Thus information that cannot be converted (e.g. sboTerms)
05787         will be lost.   
05788           
05789 
05790         """
05791         return _libsbml.SBMLDocument_setLevelAndVersion(self, *args)
05792 
05793     def setModel(self, *args):
05794         """
05795         setModel(self, Model m) -> int
05796 
05797         Sets the Model for this SBMLDocument to a copy of the given Model.
05798 
05799         @param m the new Model to use.
05800 
05801         @return integer value indicating success/failure of the
05802         function.  @if clike The value is drawn from the
05803         enumeration #OperationReturnValues_t. @endif The possible values
05804         returned by this function are:
05805         @li LIBSBML_OPERATION_SUCCESS
05806         @li LIBSBML_LEVEL_MISMATCH
05807         @li LIBSBML_VERSION_MISMATCH
05808 
05809         @see createModel()
05810         @see getModel()
05811           
05812 
05813         """
05814         return _libsbml.SBMLDocument_setModel(self, *args)
05815 
05816     def createModel(self, sid = ""):
05817         """
05818         createModel(self, string sid = "") -> Model
05819         createModel(self) -> Model
05820 
05821         Creates a new Model inside this SBMLDocument, and returns a pointer to
05822         it.
05823 
05824         In SBML Level&nbsp;2, the use of an identifier on a Model object is
05825         optional.  This method takes an optional argument, @p sid, for setting
05826         the identifier.  If not supplied, the identifier attribute on the
05827         Model instance is not set.
05828 
05829         @param sid the identifier of the new Model to create.
05830 
05831         @docnote The native C++ implementation of this method defines a
05832         default argument value.  In the documentation generated for different
05833         libSBML language bindings, you may or may not see corresponding
05834         arguments in the method declarations.  For example, in Java, a default
05835         argument is handled by declaring two separate methods, with one of
05836         them having the argument and the other one lacking the argument.
05837         However, the libSBML documentation will be @em identical for both
05838         methods.  Consequently, if you are reading this and do not see an
05839         argument even though one is described, please look for descriptions of
05840         other variants of this method near where this one appears in the
05841         documentation.
05842 
05843         @see getModel()
05844         @see @if clike SBMLDocument::setModel() @endif@if java SBMLDocument::setModel(Model m) @endif
05845           
05846 
05847         """
05848         return _libsbml.SBMLDocument_createModel(self, sid)
05849 
05850     def setConsistencyChecks(self, *args):
05851         """
05852         setConsistencyChecks(self, SBMLErrorCategory_t category, bool apply)
05853 
05854         Controls the consistency checks that are performed when
05855         SBMLDocument::checkConsistency() is called.
05856 
05857         This method works by adding or subtracting consistency checks from the
05858         set of all possible checks that SBMLDocument::checkConsistency() knows
05859         how to perform.  This method may need to be called multiple times in
05860         order to achieve the desired combination of checks.  The first
05861         argument (@p category) in a call to this method indicates the category
05862         of consistency/error checks that are to be turned on or off, and the
05863         second argument (@p apply, a boolean) indicates whether to turn it on
05864         (value of @c true) or off (value of @c false).
05865 
05866         The possible categories (values to the argument @p category) are the
05867         set of values from the enumeration #SBMLErrorCategory_t.  The
05868         following are the possible choices in libSBML version&nbsp;3.3.x:
05869 
05870         @li @c LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and consistency of
05871         specific SBML language constructs.  Performing this set of checks is
05872         highly recommended.  With respect to the SBML specification, these
05873         concern failures in applying the validation rules numbered 2xxxx in
05874         the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4 specifications.
05875 
05876         @li @c LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and consistency
05877         of identifiers used for model entities.  An example of inconsistency
05878         would be using a species identifier in a reaction rate formula without
05879         first having declared the species.  With respect to the SBML
05880         specification, these concern failures in applying the validation rules
05881         numbered 103xx in the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4
05882         specifications.
05883 
05884         @li @c LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement units
05885         associated with quantities in a model.  With respect to the SBML
05886         specification, these concern failures in applying the validation rules
05887         numbered 105xx in the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4
05888         specifications.
05889 
05890         @li @c LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML constructs.
05891         With respect to the SBML specification, these concern failures in
05892         applying the validation rules numbered 102xx in the Level&nbsp;2
05893         Versions&nbsp;2, 3 and&nbsp;4 specifications.
05894 
05895         @li @c LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of SBO
05896         identifiers (if any) used in the model.  With respect to the SBML
05897         specification, these concern failures in applying the validation rules
05898         numbered 107xx in the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4
05899         specifications.
05900 
05901         @li @c LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of
05902         whether the system of equations implied by a model is mathematically
05903         overdetermined.  With respect to the SBML specification, this is
05904         validation rule #10601 in the SBML Level&nbsp;2 Versions&nbsp;2, 3
05905         and&nbsp;4 specifications.
05906 
05907         @li @c LIBSBML_CAT_MODELING_PRACTICE: Additional checks for
05908         recommended good modeling practice. (These are tests performed by
05909         libSBML and do not have equivalent SBML validation rules.)
05910 
05911         <em>By default, all validation checks are applied</em> to the model in
05912         an SBMLDocument object @em unless @if clike SBMLDocument::setConsistencyChecks() @endif@if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @endif is called to
05913         indicate that only a subset should be applied.  Further, this default
05914         (i.e., performing all checks) applies separately to <em>each new
05915         SBMLDocument object</em> created.  In other words, each time a model
05916         is read using @if clike SBMLReader::readSBML() @endif@if java SBMLReader::readSBML(String filename) @endif, @if clike SBMLReader::readSBMLFromString() @endif@if java SBMLReader::readSBMLFromString(String xml) @endif,
05917         or the global functions readSBML() and readSBMLFromString(), a new
05918         SBMLDocument is created and for that document, a call to
05919         SBMLDocument::checkConsistency() will default to applying all possible checks.
05920         Calling programs must invoke @if clike SBMLDocument::setConsistencyChecks() @endif@if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @endif for each such new
05921         model if they wish to change the consistency checks applied.
05922 
05923         @param category a value drawn from #SBMLErrorCategory_t indicating the
05924         consistency checking/validation to be turned on or off
05925 
05926         @param apply a boolean indicating whether the checks indicated by
05927         @p category should be applied or not.
05928 
05929         @see SBMLDocument::checkConsistency()
05930           
05931 
05932         """
05933         return _libsbml.SBMLDocument_setConsistencyChecks(self, *args)
05934 
05935     def setConsistencyChecksForConversion(self, *args):
05936         """
05937         setConsistencyChecksForConversion(self, SBMLErrorCategory_t category, bool apply)
05938 
05939         Controls the consistency checks that are performed when
05940         SBMLDocument::setLevelAndVersion(level, version) is called.
05941 
05942         This method works by adding or subtracting consistency checks from the
05943         set of all possible checks that may be performed to avoid conversion
05944         to or from an invalid document.  This method may need to be called 
05945         multiple times in
05946         order to achieve the desired combination of checks.  The first
05947         argument (@p category) in a call to this method indicates the category
05948         of consistency/error checks that are to be turned on or off, and the
05949         second argument (@p apply, a boolean) indicates whether to turn it on
05950         (value of @c true) or off (value of @c false).
05951 
05952         The possible categories (values to the argument @p category) are the
05953         set of values from the enumeration #SBMLErrorCategory_t.  The
05954         following are the possible choices in libSBML version&nbsp;4.x.x:
05955 
05956         @li @c LIBSBML_CAT_GENERAL_CONSISTENCY: Correctness and consistency of
05957         specific SBML language constructs.  Performing this set of checks is
05958         highly recommended.  With respect to the SBML specification, these
05959         concern failures in applying the validation rules numbered 2xxxx in
05960         the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4 specifications.
05961 
05962         @li @c LIBSBML_CAT_IDENTIFIER_CONSISTENCY: Correctness and consistency
05963         of identifiers used for model entities.  An example of inconsistency
05964         would be using a species identifier in a reaction rate formula without
05965         first having declared the species.  With respect to the SBML
05966         specification, these concern failures in applying the validation rules
05967         numbered 103xx in the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4
05968         specifications.
05969 
05970         @li @c LIBSBML_CAT_UNITS_CONSISTENCY: Consistency of measurement units
05971         associated with quantities in a model.  With respect to the SBML
05972         specification, these concern failures in applying the validation rules
05973         numbered 105xx in the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4
05974         specifications.
05975 
05976         @li @c LIBSBML_CAT_MATHML_CONSISTENCY: Syntax of MathML constructs.
05977         With respect to the SBML specification, these concern failures in
05978         applying the validation rules numbered 102xx in the Level&nbsp;2
05979         Versions&nbsp;2, 3 and&nbsp;4 specifications.
05980 
05981         @li @c LIBSBML_CAT_SBO_CONSISTENCY: Consistency and validity of SBO
05982         identifiers (if any) used in the model.  With respect to the SBML
05983         specification, these concern failures in applying the validation rules
05984         numbered 107xx in the Level&nbsp;2 Versions&nbsp;2, 3 and&nbsp;4
05985         specifications.
05986 
05987         @li @c LIBSBML_CAT_OVERDETERMINED_MODEL: Static analysis of
05988         whether the system of equations implied by a model is mathematically
05989         overdetermined.  With respect to the SBML specification, this is
05990         validation rule #10601 in the SBML Level&nbsp;2 Versions&nbsp;2, 3
05991         and&nbsp;4 specifications.
05992 
05993         @li @c LIBSBML_CAT_MODELING_PRACTICE: Additional checks for
05994         recommended good modeling practice. (These are tests performed by
05995         libSBML and do not have equivalent SBML validation rules.)
05996 
05997         <em>By default, all validation checks are applied</em> to the model in
05998         an SBMLDocument object @em unless @if clike SBMLDocument::setConsistencyChecks() @endif@if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @endif is called to
05999         indicate that only a subset should be applied.  Further, this default
06000         (i.e., performing all checks) applies separately to <em>each new
06001         SBMLDocument object</em> created.  In other words, each time a model
06002         is read using @if clike SBMLReader::readSBML() @endif@if java SBMLReader::readSBML(String filename) @endif, @if clike SBMLReader::readSBMLFromString() @endif@if java SBMLReader::readSBMLFromString(String xml) @endif,
06003         or the global functions readSBML() and readSBMLFromString(), a new
06004         SBMLDocument is created and for that document, a call to
06005         SBMLDocument::checkConsistency() will default to applying all possible checks.
06006         Calling programs must invoke @if clike SBMLDocument::setConsistencyChecks() @endif@if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @endif for each such new
06007         model if they wish to change the consistency checks applied.
06008 
06009         @param category a value drawn from #SBMLErrorCategory_t indicating the
06010         consistency checking/validation to be turned on or off
06011 
06012         @param apply a boolean indicating whether the checks indicated by
06013         @p category should be applied or not.
06014 
06015         @see SBMLDocument::setLevelAndVersion()
06016           
06017 
06018         """
06019         return _libsbml.SBMLDocument_setConsistencyChecksForConversion(self, *args)
06020 
06021     def checkConsistency(self):
06022         """
06023         checkConsistency(self) -> unsigned int
06024 
06025         Performs consistency checking and validation on this SBML document.
06026 
06027         If this method returns a nonzero value (meaning, one or more
06028         consistency checks have failed for SBML document), the failures may be
06029         due to warnings @em or errors.  Callers should inspect the severity
06030         flag in the individual SBMLError objects returned by
06031         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif to determine the nature of the failures.
06032 
06033         @return the number of failed checks (errors) encountered.
06034 
06035         @see SBMLDocument::checkInternalConsistency()
06036           
06037 
06038         """
06039         return _libsbml.SBMLDocument_checkConsistency(self)
06040 
06041     def checkInternalConsistency(self):
06042         """
06043         checkInternalConsistency(self) -> unsigned int
06044 
06045         Performs consistency checking on libSBML's internal representation of 
06046         an SBML Model.
06047 
06048         Callers should query the results of the consistency check by calling
06049         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif.
06050 
06051         @return the number of failed checks (errors) encountered.
06052 
06053         The distinction between this method and
06054         SBMLDocument::checkConsistency() is that this method reports on
06055         fundamental syntactic and structural errors that violate the XML
06056         Schema for SBML; by contrast, SBMLDocument::checkConsistency()
06057         performs more elaborate model verifications and also validation
06058         according to the validation rules written in the appendices of the
06059         SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 specification documents.
06060 
06061         @see SBMLDocument::checkConsistency()
06062           
06063 
06064         """
06065         return _libsbml.SBMLDocument_checkInternalConsistency(self)
06066 
06067     def checkL1Compatibility(self):
06068         """
06069         checkL1Compatibility(self) -> unsigned int
06070 
06071         Performs a set of consistency checks on the document to establish
06072         whether it is compatible with SBML Level&nbsp;1 and can be converted
06073         to Level&nbsp;1.
06074 
06075         Callers should query the results of the consistency check by calling
06076         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif.
06077 
06078         @return the number of failed checks (errors) encountered.
06079           
06080 
06081         """
06082         return _libsbml.SBMLDocument_checkL1Compatibility(self)
06083 
06084     def checkL2v1Compatibility(self):
06085         """
06086         checkL2v1Compatibility(self) -> unsigned int
06087 
06088         Performs a set of consistency checks on the document to establish
06089         whether it is compatible with SBML Level&nbsp;2 Version&nbsp;1 and can
06090         be converted to Level&nbsp;2 Version&nbsp;1.
06091 
06092         Callers should query the results of the consistency check by calling
06093         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif.
06094 
06095         @return the number of failed checks (errors) encountered.
06096           
06097 
06098         """
06099         return _libsbml.SBMLDocument_checkL2v1Compatibility(self)
06100 
06101     def checkL2v2Compatibility(self):
06102         """
06103         checkL2v2Compatibility(self) -> unsigned int
06104 
06105         Performs a set of consistency checks on the document to establish
06106         whether it is compatible with SBML Level&nbsp;2 Version&nbsp;2 and can
06107         be converted to Level&nbsp;2 Version&nbsp;2.
06108 
06109         Callers should query the results of the consistency check by calling
06110         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif.
06111 
06112         @return the number of failed checks (errors) encountered.
06113           
06114 
06115         """
06116         return _libsbml.SBMLDocument_checkL2v2Compatibility(self)
06117 
06118     def checkL2v3Compatibility(self):
06119         """
06120         checkL2v3Compatibility(self) -> unsigned int
06121 
06122         Performs a set of consistency checks on the document to establish
06123         whether it is compatible with SBML Level&nbsp;2 Version&nbsp;3 and can
06124         be converted to Level&nbsp;2 Version&nbsp;3.
06125 
06126         Callers should query the results of the consistency check by calling
06127         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif.
06128 
06129         @return the number of failed checks (errors) encountered.
06130           
06131 
06132         """
06133         return _libsbml.SBMLDocument_checkL2v3Compatibility(self)
06134 
06135     def checkL2v4Compatibility(self):
06136         """
06137         checkL2v4Compatibility(self) -> unsigned int
06138 
06139         Performs a set of consistency checks on the document to establish
06140         whether it is compatible with SBML Level&nbsp;2 Version&nbsp;4 and can
06141         be converted to Level&nbsp;2 Version&nbsp;4.
06142 
06143         Callers should query the results of the consistency check by calling
06144         @if clike SBMLDocument::getError() @endif@if java SBMLDocument::getError(long n) @endif.
06145 
06146         @return the number of failed checks (errors) encountered.
06147           
06148 
06149         """
06150         return _libsbml.SBMLDocument_checkL2v4Compatibility(self)
06151 
06152     def getError(self, *args):
06153         """
06154         getError(self, unsigned int n) -> SBMLError
06155 
06156         Returns the nth error or warning encountered during parsing,
06157         consistency checking, or attempted translation of this model.
06158 
06159         Callers can use method XMLError::getSeverity() on the result to assess
06160         the severity of the problem.  The possible severity levels range from
06161         informational messages to fatal errors.
06162 
06163         @return the error or warning indexed by integer @p n, or return @c
06164         NULL if <code>n &gt; (getNumErrors() - 1)</code>.
06165 
06166         @param n the integer index of the error sought.
06167 
06168         @see SBMLDocument::getNumErrors()
06169           
06170 
06171         """
06172         return _libsbml.SBMLDocument_getError(self, *args)
06173 
06174     def getNumErrors(self):
06175         """
06176         getNumErrors(self) -> unsigned int
06177 
06178         Returns the number of errors or warnings encountered during parsing,
06179         consistency checking, or attempted translation of this model.
06180 
06181         @return the number of errors or warnings encountered
06182           
06183 
06184         """
06185         return _libsbml.SBMLDocument_getNumErrors(self)
06186 
06187     def printErrors(self, *args):
06188         """
06189         printErrors(self, ostream stream = cerr)
06190         printErrors(self)
06191 
06192         Prints to the given output stream all the errors or warnings
06193         encountered during parsing, consistency checking, or attempted
06194         translation of this model.
06195 
06196         If no errors have occurred, i.e., <code>getNumErrors() == 0</code>, no
06197         output will be sent to the stream.
06198 
06199         The format of the output is:
06200           @verbatim
06201             N error(s):
06202               line NNN: (id) message
06203          @endverbatim
06204 
06205         @docnote The native C++ implementation of this method defines a
06206         default argument value.  In the documentation generated for different
06207         libSBML language bindings, you may or may not see corresponding
06208         arguments in the method declarations.  For example, in Java, a default
06209         argument is handled by declaring two separate methods, with one of
06210         them having the argument and the other one lacking the argument.
06211         However, the libSBML documentation will be @em identical for both
06212         methods.  Consequently, if you are reading this and do not see an
06213         argument even though one is described, please look for descriptions of
06214         other variants of this method near where this one appears in the
06215         documentation.
06216           
06217 
06218         """
06219         return _libsbml.SBMLDocument_printErrors(self, *args)
06220 
06221     def getTypeCode(self):
06222         """
06223         getTypeCode(self) -> SBMLTypeCode_t
06224 
06225         Returns the libSBML type code for this %SBML object.
06226 
06227         @if clike LibSBML attaches an identifying code to every
06228         kind of SBML object.  These are known as <em>SBML type codes</em>.
06229         The set of possible type codes is defined in the enumeration
06230         #SBMLTypeCode_t.  The names of the type codes all begin with the
06231         characters @c SBML_. @endif@if java LibSBML attaches an
06232         identifying code to every kind of SBML object.  These are known as
06233         <em>SBML type codes</em>.  In other languages, the set of type codes
06234         is stored in an enumeration; in the Java language interface for
06235         libSBML, the type codes are defined as static integer constants in
06236         interface class {@link libsbmlConstants}.  The names of the type codes
06237         all begin with the characters @c SBML_. @endif
06238 
06239         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
06240 
06241         @see SBMLDocument::getElementName()
06242           
06243 
06244         """
06245         return _libsbml.SBMLDocument_getTypeCode(self)
06246 
06247     def getElementName(self):
06248         """
06249         getElementName(self) -> string
06250 
06251         Returns the XML element name of this object, which for SBMLDocument,
06252         is always @c 'sbml'.
06253 
06254         @return the name of this element, i.e., @c 'sbml'.
06255           
06256 
06257         """
06258         return _libsbml.SBMLDocument_getElementName(self)
06259 
06260     def getErrorLog(self):
06261         """
06262         getErrorLog(self) -> SBMLErrorLog
06263 
06264         Returns the list of errors or warnings logged during parsing, 
06265         consistency checking, or attempted translation of this model.
06266 
06267         @return the SBMLErrorLog used for this SBMLDocument
06268 
06269         @see SBMLDocument::getNumErrors()
06270           
06271 
06272         """
06273         return _libsbml.SBMLDocument_getErrorLog(self)
06274 
06275     def getNamespaces(self):
06276         """
06277         getNamespaces(self) -> XMLNamespaces
06278 
06279         Returns a list of XML Namespaces associated with the XML content
06280         of this SBML document.
06281 
06282         @return the XML Namespaces associated with this SBML object
06283           
06284 
06285         """
06286         return _libsbml.SBMLDocument_getNamespaces(self)
06287 
06288 SBMLDocument_swigregister = _libsbml.SBMLDocument_swigregister
06289 SBMLDocument_swigregister(SBMLDocument)
06290 
06291 def SBMLDocument_getDefaultLevel():
06292   """
06293     SBMLDocument_getDefaultLevel() -> unsigned int
06294 
06295     The default SBML Level of new SBMLDocument objects.
06296 
06297     This 'default level' corresponds to the most recent SBML specification
06298     Level available at the time this version of libSBML was released.  For
06299     this copy of libSBML, the value is <code>2</code>.  The default Level
06300     is used by SBMLDocument if no Level is explicitly specified at the
06301     time of the construction of an SBMLDocument instance. 
06302 
06303     @return an integer indicating the most recent SBML specification Level
06304 
06305     @see getDefaultVersion()
06306       
06307 
06308     """
06309   return _libsbml.SBMLDocument_getDefaultLevel()
06310 
06311 def SBMLDocument_getDefaultVersion():
06312   """
06313     SBMLDocument_getDefaultVersion() -> unsigned int
06314 
06315     The default Version of new SBMLDocument objects.
06316 
06317     This 'default version' corresponds to the most recent SBML Version
06318     within the most recent Level of SBML available at the time this
06319     version of libSBML was released.  For this copy of libSBML, the value
06320     is <code>4</code>.  The default Version is used by SBMLDocument if no
06321     Version is explicitly specified at the time of the construction of an
06322     SBMLDocument instance.
06323 
06324     @return an integer indicating the most recent SBML specification
06325     Version
06326 
06327     @see getDefaultLevel()
06328       
06329 
06330     """
06331   return _libsbml.SBMLDocument_getDefaultVersion()
06332 
06333 class FunctionDefinition(SBase):
06334     """
06335     LibSBML implementation of %SBML's %FunctionDefinition construct.
06336 
06337     The FunctionDefinition structure associates an identifier with a
06338     function definition.  This identifier can then be used as the function
06339     called in subsequent MathML content elsewhere in an SBML model.
06340 
06341     FunctionDefinition has one required attribute, 'id', to give the
06342     function a unique identifier by which other parts of an SBML model
06343     definition can refer to it.  A FunctionDefinition instance can also have
06344     an optional 'name' attribute of type @c string.  Identifiers and names
06345     must be used according to the guidelines described in the %SBML
06346     specification (e.g., Section 3.3 in the Level 2 Version 4
06347     specification).
06348 
06349     FunctionDefinition has a required 'math' subelement containing a MathML
06350     expression defining the function body.  The content of this element can
06351     only be a MathML 'lambda' element.  The 'lambda' element must begin with
06352     zero or more 'bvar' elements, followed by any other of the elements in
06353     the MathML subset allowed in SBML Level 2 @em except 'lambda' (i.e., a
06354     'lambda' element cannot contain another 'lambda' element).  This is the
06355     only place in SBML where a 'lambda' element can be used.  The function
06356     defined by a FunctionDefinition is only available for use in other
06357     MathML elements that @em follow the FunctionDefinition definition in the
06358     model.  (These restrictions prevent recursive and mutually-recursive
06359     functions from being expressed.)
06360 
06361     A further restriction on the content of 'math' is that it cannot contain
06362     references to variables other than the variables declared to the
06363     'lambda' itself.  That is, the contents of MathML 'ci' elements inside
06364     the body of the 'lambda' can only be the variables declared by its
06365     'bvar' elements, or the identifiers of other FunctionDefinition
06366     instances earlier in the model.  This means must be written so that all
06367     variables or parameters used in the MathML content are passed to them
06368     via their function parameters.
06369 
06370     @note Function definitions (also informally known as user-defined
06371     functions) were introduced in SBML Level 2.  They have purposefully
06372     limited capabilities.  A function cannot reference parameters or other
06373     model quantities outside of itself; values must be passed as parameters
06374     to the function.  Moreover, recursive and mutually-recursive functions
06375     are not permitted.  The purpose of these limitations is to balance power
06376     against complexity of implementation.  With the restrictions as they
06377     are, function definitions could be implemented as textual
06378     substitutions&mdash;they are simply macros.  Software implementations
06379     therefore do not need the full function-definition machinery typically
06380     associated with programming languages.
06381 
06382     @note Another important point to note is FunctionDefinition does not
06383     have a separate attribute for defining the units of the value returned
06384     by the function.  The units associated with the function's return value,
06385     when the function is called from within MathML expressions elsewhere in
06386     SBML, are simply the overall units of the expression in
06387     FunctionDefinition's 'math' subelement when applied to the arguments
06388     supplied in the call to the function.  Ascertaining these units requires
06389     performing dimensional analysis on the expression.  (Readers may wonder
06390     why there is no attribute.  The reason is that having a separate
06391     attribute for declaring the units would not only be redundant, but also
06392     lead to the potential for having conflicting information.  In the case
06393     of a conflict between the declared units and those of the value actually
06394     returned by the function, the only logical resolution rule would be to
06395     assume that the correct units are those of the expression anyway.)
06396 
06397     <!---------------------------------------------------------------------- -->
06398 
06399 
06400     """
06401     __swig_setmethods__ = {}
06402     for _s in [SBase]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
06403     __setattr__ = lambda self, name, value: _swig_setattr(self, FunctionDefinition, name, value)
06404     __swig_getmethods__ = {}
06405     for _s in [SBase]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
06406     __getattr__ = lambda self, name: _swig_getattr(self, FunctionDefinition, name)
06407     __repr__ = _swig_repr
06408     __swig_destroy__ = _libsbml.delete_FunctionDefinition
06409     __del__ = lambda self : None;
06410     def __init__(self, *args): 
06411         """
06412         __init__(self, unsigned int level, unsigned int version) -> FunctionDefinition
06413         __init__(self, SBMLNamespaces sbmlns) -> FunctionDefinition
06414         __init__(self, FunctionDefinition orig) -> FunctionDefinition
06415 
06416         Predicate returning @c true or @c false depending on whether
06417         all the required elements for this FunctionDefinition object
06418         have been set.
06419 
06420         @note The required elements for a FunctionDefinition object are:
06421         math
06422 
06423         @return a boolean value indicating whether all the required
06424         elements for this object have been defined.
06425         @deprecated libSBML internal
06426 
06427 
06428         """
06429         this = _libsbml.new_FunctionDefinition(*args)
06430         try: self.this.append(this)
06431         except: self.this = this
06432     def clone(self):
06433         """
06434         clone(self) -> FunctionDefinition
06435 
06436         Creates and returns a deep copy of this FunctionDefinition.
06437 
06438         @return a (deep) copy of this FunctionDefinition.
06439           
06440 
06441         """
06442         return _libsbml.FunctionDefinition_clone(self)
06443 
06444     def getId(self):
06445         """
06446         getId(self) -> string
06447 
06448         Returns the value of the 'id' attribute of this FunctionDefinition.
06449 
06450         @return the id of this FunctionDefinition.
06451           
06452 
06453         """
06454         return _libsbml.FunctionDefinition_getId(self)
06455 
06456     def getName(self):
06457         """
06458         getName(self) -> string
06459 
06460         Returns the value of the 'name' attribute of this FunctionDefinition.
06461 
06462         @return the name of this FunctionDefinition.
06463           
06464 
06465         """
06466         return _libsbml.FunctionDefinition_getName(self)
06467 
06468     def getMath(self):
06469         """
06470         getMath(self) -> ASTNode
06471 
06472         Get the mathematical formula of this FunctionDefinition.
06473 
06474         @return an ASTNode, the value of the 'math' subelement of this
06475         FunctionDefinition
06476           
06477 
06478         """
06479         return _libsbml.FunctionDefinition_getMath(self)
06480 
06481     def isSetId(self):
06482         """
06483         isSetId(self) -> bool
06484 
06485         Predicate returning @c true or @c false depending on whether this
06486         FunctionDefinition's 'id' attribute has been set.
06487 
06488         @htmlinclude libsbml-comment-set-methods.html
06489 
06490         @return @c true if the 'id' attribute of this FunctionDefinition has been
06491         set, @c false otherwise.
06492           
06493 
06494         """
06495         return _libsbml.FunctionDefinition_isSetId(self)
06496 
06497     def isSetName(self):
06498         """
06499         isSetName(self) -> bool
06500 
06501         Predicate returning @c true or @c false depending on whether this
06502         FunctionDefinition's 'name' attribute has been set.
06503 
06504         @htmlinclude libsbml-comment-set-methods.html
06505 
06506         @return @c true if the 'name' attribute of this FunctionDefinition has been
06507         set, @c false otherwise.
06508           
06509 
06510         """
06511         return _libsbml.FunctionDefinition_isSetName(self)
06512 
06513     def isSetMath(self):
06514         """
06515         isSetMath(self) -> bool
06516 
06517         Predicate returning @c true or @c false depending on whether this
06518         FunctionDefinition's 'math' subelement contains a value.
06519 
06520         @return @c true if the 'math' for this FunctionDefinition has been set,
06521         @c false otherwise.
06522           
06523 
06524         """
06525         return _libsbml.FunctionDefinition_isSetMath(self)
06526 
06527     def setId(self, *args):
06528         """
06529         setId(self, string sid) -> int
06530 
06531         Sets the value of the 'id' attribute of this FunctionDefinition.
06532 
06533         The string @p sid is copied.  Note that SBML has strict requirements
06534         for the syntax of identifiers.  The following is summary of the
06535         definition of the SBML identifier type @c SId (here expressed in an
06536         extended form of BNF notation):
06537         @code
06538           letter ::= 'a'..'z','A'..'Z'
06539           digit  ::= '0'..'9'
06540           idChar ::= letter | digit | '_'
06541           SId    ::= ( letter | '_' ) idChar*
06542         @endcode
06543         The equality of SBML identifiers is determined by an exact character
06544         sequence match; i.e., comparisons must be performed in a
06545         case-sensitive manner.  In addition, there are a few conditions for
06546         the uniqueness of identifiers in an SBML model.  Please consult the
06547         SBML specifications for the exact formulations.
06548 
06549         @htmlinclude libsbml-comment-set-methods.html
06550 
06551         @param sid the string to use as the identifier of this FunctionDefinition
06552 
06553         @return integer value indicating success/failure of the
06554         function.  @if clike The value is drawn from the
06555         enumeration #OperationReturnValues_t. @endif The possible values
06556         returned by this function are:
06557         @li LIBSBML_OPERATION_SUCCESS
06558         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
06559           
06560 
06561         """
06562         return _libsbml.FunctionDefinition_setId(self, *args)
06563 
06564     def setName(self, *args):
06565         """
06566         setName(self, string name) -> int
06567 
06568         Sets the value of the 'name' attribute of this FunctionDefinition.
06569 
06570         The string in @p name is copied.
06571 
06572         @htmlinclude libsbml-comment-set-methods.html
06573 
06574         @param name the new name for the FunctionDefinition
06575 
06576         @return integer value indicating success/failure of the
06577         function.  @if clike The value is drawn from the
06578         enumeration #OperationReturnValues_t. @endif The possible values
06579         returned by this function are:
06580         @li LIBSBML_OPERATION_SUCCESS
06581         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
06582           
06583 
06584         """
06585         return _libsbml.FunctionDefinition_setName(self, *args)
06586 
06587     def setMath(self, *args):
06588         """
06589         setMath(self, ASTNode math) -> int
06590 
06591         Sets the 'math' subelement of this FunctionDefinition to the Abstract
06592         Syntax Tree given in @p math.
06593 
06594         @param math an AST containing the mathematical expression to
06595         be used as the formula for this FunctionDefinition.
06596 
06597         @return integer value indicating success/failure of the
06598         function.  @if clike The value is drawn from the
06599         enumeration #OperationReturnValues_t. @endif The possible values
06600         returned by this function are:
06601         @li LIBSBML_OPERATION_SUCCESS
06602         @li LIBSBML_INVALID_OBJECT
06603           
06604 
06605         """
06606         return _libsbml.FunctionDefinition_setMath(self, *args)
06607 
06608     def unsetName(self):
06609         """
06610         unsetName(self) -> int
06611 
06612         Unsets the value of the 'name' attribute of this FunctionDefinition.
06613 
06614         @htmlinclude libsbml-comment-set-methods.html
06615 
06616         @return integer value indicating success/failure of the
06617         function.  @if clike The value is drawn from the
06618         enumeration #OperationReturnValues_t. @endif The possible values
06619         returned by this function are:
06620         @li LIBSBML_OPERATION_SUCCESS
06621         @li LIBSBML_OPERATION_FAILED
06622           
06623 
06624         """
06625         return _libsbml.FunctionDefinition_unsetName(self)
06626 
06627     def getArgument(self, *args):
06628         """
06629         getArgument(self, unsigned int n) -> ASTNode
06630         getArgument(self, string name) -> ASTNode
06631 
06632         Get the argument named @p name to this FunctionDefinition.
06633 
06634         @param name the exact name (case-sensitive) of the sought-after
06635         argument
06636 
06637         @return the argument (bound variable) having the given name, or NULL if
06638         no such argument exists.
06639           
06640 
06641         """
06642         return _libsbml.FunctionDefinition_getArgument(self, *args)
06643 
06644     def getBody(self, *args):
06645         """
06646         getBody(self) -> ASTNode
06647         getBody(self) -> ASTNode
06648 
06649         Get the mathematical expression that is the body of this
06650         FunctionDefinition object.
06651 
06652         @return the body of this FunctionDefinition as an Abstract Syntax
06653         Tree, or NULL if no body is defined.
06654           
06655 
06656         """
06657         return _libsbml.FunctionDefinition_getBody(self, *args)
06658 
06659     def getNumArguments(self):
06660         """
06661         getNumArguments(self) -> unsigned int
06662 
06663         Get the number of arguments (bound variables) taken by this
06664         FunctionDefinition.
06665 
06666         @return the number of arguments (bound variables) that must be passed
06667         to this FunctionDefinition.
06668           
06669 
06670         """
06671         return _libsbml.FunctionDefinition_getNumArguments(self)
06672 
06673     def getTypeCode(self):
06674         """
06675         getTypeCode(self) -> SBMLTypeCode_t
06676 
06677         Returns the libSBML type code for this %SBML object.
06678 
06679         @if clike LibSBML attaches an identifying code to every
06680         kind of SBML object.  These are known as <em>SBML type codes</em>.
06681         The set of possible type codes is defined in the enumeration
06682         #SBMLTypeCode_t.  The names of the type codes all begin with the
06683         characters @c SBML_. @endif@if java LibSBML attaches an
06684         identifying code to every kind of SBML object.  These are known as
06685         <em>SBML type codes</em>.  In other languages, the set of type codes
06686         is stored in an enumeration; in the Java language interface for
06687         libSBML, the type codes are defined as static integer constants in
06688         interface class {@link libsbmlConstants}.  The names of the type codes
06689         all begin with the characters @c SBML_. @endif
06690 
06691         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
06692 
06693         @see getElementName()
06694           
06695 
06696         """
06697         return _libsbml.FunctionDefinition_getTypeCode(self)
06698 
06699     def getElementName(self):
06700         """
06701         getElementName(self) -> string
06702 
06703         Returns the XML element name of this object, which for
06704         FunctionDefinition, is always @c 'functionDefinition'.
06705 
06706         @return the name of this element, i.e., @c 'functionDefinition'.
06707           
06708 
06709         """
06710         return _libsbml.FunctionDefinition_getElementName(self)
06711 
06712     def hasRequiredAttributes(self):
06713         """
06714         hasRequiredAttributes(self) -> bool
06715 
06716         Predicate returning @c true or @c false depending on whether
06717         all the required attributes for this FunctionDefinition object
06718         have been set.
06719 
06720         @note The required attributes for a FunctionDefinition object are:
06721         id
06722 
06723         @return a boolean value indicating whether all the required
06724         attributes for this object have been defined.
06725           
06726 
06727         """
06728         return _libsbml.FunctionDefinition_hasRequiredAttributes(self)
06729 
06730     def hasRequiredElements(self):
06731         """
06732         hasRequiredElements(self) -> bool
06733 
06734         Predicate returning @c true or @c false depending on whether
06735         all the required elements for this FunctionDefinition object
06736         have been set.
06737 
06738         @note The required elements for a FunctionDefinition object are:
06739         math
06740 
06741         @return a boolean value indicating whether all the required
06742         elements for this object have been defined.
06743           
06744 
06745         """
06746         return _libsbml.FunctionDefinition_hasRequiredElements(self)
06747 
06748 FunctionDefinition_swigregister = _libsbml.FunctionDefinition_swigregister
06749 FunctionDefinition_swigregister(FunctionDefinition)
06750 
06751 class ListOfFunctionDefinitions(ListOf):
06752     """
06753     LibSBML implementation of SBML's %ListOfFunctionDefinitions construct.
06754 
06755     The various ListOf___ classes in %SBML are merely containers used for
06756     organizing the main components of an %SBML model.  All are derived from
06757     the abstract class SBase, and inherit the various attributes and
06758     subelements of SBase, such as 'metaid' as and 'annotation'.  The
06759     ListOf___ classes do not add any attributes of their own.
06760 
06761     The relationship between the lists and the rest of an %SBML model is
06762     illustrated by the following (for %SBML Level&nbsp;2 Version&nbsp;4):
06763 
06764     @image html listof-illustration.jpg 'ListOf___ elements in an SBML Model'
06765     @image latex listof-illustration.jpg 'ListOf___ elements in an SBML Model'
06766 
06767     Readers may wonder about the motivations for using the ListOf___
06768     containers.  A simpler approach in XML might be to place the components
06769     all directly at the top level of the model definition.  We chose instead
06770     to group them within XML elements named after ListOf<em>Classname</em>,
06771     in part because we believe this helps organize the components and makes
06772     visual reading of models in XML easier.  More importantly, the fact that
06773     the container classes are derived from SBase means that software tools
06774     can add information about the lists themselves into each list
06775     container's 'annotation'.
06776 
06777     @see ListOfFunctionDefinitions
06778     @see ListOfUnitDefinitions
06779     @see ListOfCompartmentTypes
06780     @see ListOfSpeciesTypes
06781     @see ListOfCompartments
06782     @see ListOfSpecies
06783     @see ListOfParameters
06784     @see ListOfInitialAssignments
06785     @see ListOfRules
06786     @see ListOfConstraints
06787     @see ListOfReactions
06788     @see ListOfEvents
06789 
06790     """
06791     __swig_setmethods__ = {}
06792     for _s in [ListOf]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
06793     __setattr__ = lambda self, name, value: _swig_setattr(self, ListOfFunctionDefinitions, name, value)
06794     __swig_getmethods__ = {}
06795     for _s in [ListOf]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
06796     __getattr__ = lambda self, name: _swig_getattr(self, ListOfFunctionDefinitions, name)
06797     __repr__ = _swig_repr
06798     def clone(self):
06799         """
06800         clone(self) -> ListOfFunctionDefinitions
06801 
06802         Creates and returns a deep copy of this ListOfFunctionDefinitions instance.
06803 
06804         @return a (deep) copy of this ListOfFunctionDefinitions.
06805           
06806 
06807         """
06808         return _libsbml.ListOfFunctionDefinitions_clone(self)
06809 
06810     def getTypeCode(self):
06811         """
06812         getTypeCode(self) -> SBMLTypeCode_t
06813 
06814         Returns the libSBML type code for this %SBML object.
06815 
06816         @if clike LibSBML attaches an identifying code to every
06817         kind of SBML object.  These are known as <em>SBML type codes</em>.
06818         The set of possible type codes is defined in the enumeration
06819         #SBMLTypeCode_t.  The names of the type codes all begin with the
06820         characters @c SBML_. @endif@if java LibSBML attaches an
06821         identifying code to every kind of SBML object.  These are known as
06822         <em>SBML type codes</em>.  In other languages, the set of type codes
06823         is stored in an enumeration; in the Java language interface for
06824         libSBML, the type codes are defined as static integer constants in
06825         interface class {@link libsbmlConstants}.  The names of the type codes
06826         all begin with the characters @c SBML_. @endif
06827 
06828         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
06829 
06830         @see getElementName()
06831           
06832 
06833         """
06834         return _libsbml.ListOfFunctionDefinitions_getTypeCode(self)
06835 
06836     def getItemTypeCode(self):
06837         """
06838         getItemTypeCode(self) -> SBMLTypeCode_t
06839 
06840         Returns the libSBML type code for the objects contained in this ListOf
06841         (i.e., FunctionDefinition objects, if the list is non-empty).
06842 
06843         @if clike LibSBML attaches an identifying code to every
06844         kind of SBML object.  These are known as <em>SBML type codes</em>.
06845         The set of possible type codes is defined in the enumeration
06846         #SBMLTypeCode_t.  The names of the type codes all begin with the
06847         characters @c SBML_. @endif@if java LibSBML attaches an
06848         identifying code to every kind of SBML object.  These are known as
06849         <em>SBML type codes</em>.  In other languages, the set of type codes
06850         is stored in an enumeration; in the Java language interface for
06851         libSBML, the type codes are defined as static integer constants in
06852         interface class {@link libsbmlConstants}.  The names of the type codes
06853         all begin with the characters @c SBML_. @endif
06854 
06855         @return the SBML type code for the objects contained in this ListOf
06856         instance, or @c SBML_UNKNOWN (default).
06857 
06858         @see getElementName()
06859           
06860 
06861         """
06862         return _libsbml.ListOfFunctionDefinitions_getItemTypeCode(self)
06863 
06864     def getElementName(self):
06865         """
06866         getElementName(self) -> string
06867 
06868         Returns the XML element name of this object.
06869 
06870         For ListOfFunctionDefinitions, the XML element name is @c
06871         'listOfFunctionDefinitions'.
06872 
06873         @return the name of this element, i.e., @c 'listOfFunctionDefinitions'.
06874           
06875 
06876         """
06877         return _libsbml.ListOfFunctionDefinitions_getElementName(self)
06878 
06879     def get(self, *args):
06880         """
06881         get(self, unsigned int n) -> FunctionDefinition
06882         get(self, unsigned int n) -> FunctionDefinition
06883         get(self, string sid) -> FunctionDefinition
06884         get(self, string sid) -> FunctionDefinition
06885 
06886         Get a FunctionDefinition from the ListOfFunctionDefinitions
06887         based on its identifier.
06888 
06889         @param sid a string representing the identifier 
06890         of the FunctionDefinition to get.
06891 
06892         @return FunctionDefinition in this ListOfFunctionDefinitions
06893         with the given id or NULL if no such
06894         FunctionDefinition exists.
06895 
06896         @see get(unsigned int n)
06897         @see size()
06898           
06899 
06900         """
06901         return _libsbml.ListOfFunctionDefinitions_get(self, *args)
06902 
06903     def remove(self, *args):
06904         """
06905         remove(self, unsigned int n) -> FunctionDefinition
06906         remove(self, string sid) -> FunctionDefinition
06907 
06908         Removes item in this ListOfFunctionDefinitions items with the given identifier.
06909 
06910         The caller owns the returned item and is responsible for deleting it.
06911         If none of the items in this list have the identifier @p sid, then @c
06912         NULL is returned.
06913 
06914         @param sid the identifier of the item to remove
06915 
06916         @return the item removed.  As mentioned above, the caller owns the
06917         returned item.
06918           
06919 
06920         """
06921         return _libsbml.ListOfFunctionDefinitions_remove(self, *args)
06922 
06923     def __init__(self): 
06924         """__init__(self) -> ListOfFunctionDefinitions"""
06925         this = _libsbml.new_ListOfFunctionDefinitions()
06926         try: self.this.append(this)
06927         except: self.this = this
06928     __swig_destroy__ = _libsbml.delete_ListOfFunctionDefinitions
06929     __del__ = lambda self : None;
06930 ListOfFunctionDefinitions_swigregister = _libsbml.ListOfFunctionDefinitions_swigregister
06931 ListOfFunctionDefinitions_swigregister(ListOfFunctionDefinitions)
06932 
06933 UNIT_KIND_AMPERE = _libsbml.UNIT_KIND_AMPERE
06934 UNIT_KIND_BECQUEREL = _libsbml.UNIT_KIND_BECQUEREL
06935 UNIT_KIND_CANDELA = _libsbml.UNIT_KIND_CANDELA
06936 UNIT_KIND_CELSIUS = _libsbml.UNIT_KIND_CELSIUS
06937 UNIT_KIND_COULOMB = _libsbml.UNIT_KIND_COULOMB
06938 UNIT_KIND_DIMENSIONLESS = _libsbml.UNIT_KIND_DIMENSIONLESS
06939 UNIT_KIND_FARAD = _libsbml.UNIT_KIND_FARAD
06940 UNIT_KIND_GRAM = _libsbml.UNIT_KIND_GRAM
06941 UNIT_KIND_GRAY = _libsbml.UNIT_KIND_GRAY
06942 UNIT_KIND_HENRY = _libsbml.UNIT_KIND_HENRY
06943 UNIT_KIND_HERTZ = _libsbml.UNIT_KIND_HERTZ
06944 UNIT_KIND_ITEM = _libsbml.UNIT_KIND_ITEM
06945 UNIT_KIND_JOULE = _libsbml.UNIT_KIND_JOULE
06946 UNIT_KIND_KATAL = _libsbml.UNIT_KIND_KATAL
06947 UNIT_KIND_KELVIN = _libsbml.UNIT_KIND_KELVIN
06948 UNIT_KIND_KILOGRAM = _libsbml.UNIT_KIND_KILOGRAM
06949 UNIT_KIND_LITER = _libsbml.UNIT_KIND_LITER
06950 UNIT_KIND_LITRE = _libsbml.UNIT_KIND_LITRE
06951 UNIT_KIND_LUMEN = _libsbml.UNIT_KIND_LUMEN
06952 UNIT_KIND_LUX = _libsbml.UNIT_KIND_LUX
06953 UNIT_KIND_METER = _libsbml.UNIT_KIND_METER
06954 UNIT_KIND_METRE = _libsbml.UNIT_KIND_METRE
06955 UNIT_KIND_MOLE = _libsbml.UNIT_KIND_MOLE
06956 UNIT_KIND_NEWTON = _libsbml.UNIT_KIND_NEWTON
06957 UNIT_KIND_OHM = _libsbml.UNIT_KIND_OHM
06958 UNIT_KIND_PASCAL = _libsbml.UNIT_KIND_PASCAL
06959 UNIT_KIND_RADIAN = _libsbml.UNIT_KIND_RADIAN
06960 UNIT_KIND_SECOND = _libsbml.UNIT_KIND_SECOND
06961 UNIT_KIND_SIEMENS = _libsbml.UNIT_KIND_SIEMENS
06962 UNIT_KIND_SIEVERT = _libsbml.UNIT_KIND_SIEVERT
06963 UNIT_KIND_STERADIAN = _libsbml.UNIT_KIND_STERADIAN
06964 UNIT_KIND_TESLA = _libsbml.UNIT_KIND_TESLA
06965 UNIT_KIND_VOLT = _libsbml.UNIT_KIND_VOLT
06966 UNIT_KIND_WATT = _libsbml.UNIT_KIND_WATT
06967 UNIT_KIND_WEBER = _libsbml.UNIT_KIND_WEBER
06968 UNIT_KIND_INVALID = _libsbml.UNIT_KIND_INVALID
06969 
06970 def UnitKind_equals(*args):
06971   """
06972     UnitKind_equals(UnitKind_t uk1, UnitKind_t uk2) -> int
06973 
06974     Tests for logical equality between two given UnitKind_t values.
06975 
06976     This function behaves exactly like C's <tt>==</tt> operator, except for
06977     the following two cases:
06978 
06979     @li UNIT_KIND_LITER <code>==</code> UNIT_KIND_LITRE
06980     @li UNIT_KIND_METER <code>==</code> UNIT_KIND_METRE
06981 
06982     C equality comparison would yield false (because each of the above is a
06983     distinct enumeration value), but UnitKind_equals() returns true.
06984 
06985     @param uk1 a UnitKind_t enumeration value 
06986     @param uk2 the UnitKind_t enumeration value to compare to @p uk1
06987 
06988     @return nonzero (for true) if uk1 is logically equivalent to uk2,
06989     zero (0) otherwise.
06990 
06991     @note For more information about the UnitKind_t enumeration, please
06992     refer to the class documentation for Unit.
06993 
06994 
06995     """
06996   return _libsbml.UnitKind_equals(*args)
06997 
06998 def UnitKind_forName(*args):
06999   """
07000     UnitKind_forName(char name) -> UnitKind_t
07001 
07002     Converts a string to its corresponding UnitKind_t enumeration value.
07003 
07004     @param name a string, the name of a predefined base unit in SBML
07005 
07006     @return a value from UnitKind_t corresponding to the given name
07007     (determined in a case-insensitive manner).
07008 
07009     @note For more information about the UnitKind_t enumeration, please
07010     refer to the class documentation for Unit.
07011 
07012 
07013     """
07014   return _libsbml.UnitKind_forName(*args)
07015 
07016 def UnitKind_toString(*args):
07017   """
07018     UnitKind_toString(UnitKind_t uk) -> char
07019 
07020     Converts a UnitKind_t enumeration value to a text string equivalent.
07021 
07022     @param uk the UnitKind_t value to convert
07023 
07024     @return the name of the given UnitKind.
07025 
07026     @note The string returned is a static data value.  The caller does not
07027     own the returned string and is therefore not allowed to modify it.
07028 
07029     @note For more information about the UnitKind_t enumeration, please
07030     refer to the class documentation for Unit.
07031 
07032 
07033     """
07034   return _libsbml.UnitKind_toString(*args)
07035 
07036 def UnitKind_isValidUnitKindString(*args):
07037   """
07038     UnitKind_isValidUnitKindString(char string, unsigned int level, unsigned int version) -> int
07039 
07040     Predicate for testing whether a given string corresponds to a
07041     predefined UnitKind_t enumeration value.
07042 
07043     @return nonzero (for true) if string is the name of a valid
07044     UnitKind_t enumeration value, zero (0) otherwise.
07045 
07046     @note For more information about the UnitKind_t enumeration, please
07047     refer to the class documentation for Unit.
07048 
07049 
07050     """
07051   return _libsbml.UnitKind_isValidUnitKindString(*args)
07052 class Unit(SBase):
07053     """
07054     LibSBML implementation of SBML's %Unit construct.
07055 
07056     The SBML unit definition facility uses two classes of objects,
07057     UnitDefinition and Unit.  The approach to defining units in %SBML is
07058     compositional; for example, <em>meter second<sup> &ndash;2</sup></em> is
07059     constructed by combining a Unit object representing <em>meter</em> with
07060     another Unit object representing <em>second<sup> &ndash;2</sup></em>.
07061     The combination is wrapped inside a UnitDefinition, which provides for
07062     assigning an identifier and optional name to the combination.  The
07063     identifier can then be referenced from elsewhere in a model.  Thus, the
07064     UnitDefinition class is the container, and Unit instances are placed
07065     inside UnitDefinition instances.
07066 
07067     A Unit structure has four attributes named 'kind', 'exponent', 'scale'
07068     and 'multiplier'.  It represents a (possibly transformed) reference to a
07069     base unit.  The attribute 'kind' on Unit indicates the chosen base unit.
07070     Its value in SBML Level&nbsp;2 Version&nbsp;4 must be one of the following
07071     predefined strings:
07072 
07073     @htmlinclude libsbml-base-units.html
07074 
07075     (See also the definition of the <code>UNIT_KIND_</code> constants in <a
07076     class='el' href='#UnitKind_t'>the section below</a>.)  For SBML
07077     Level&nbsp;2 Version&nbsp;1 models, the string @c Celsius is also
07078     permitted.  Note also that the table above contains two names not
07079     strictly defined in SBML Level&nbsp;2: @c liter and @c meter.  For
07080     convenience, libSBML defines the American English spellings of these
07081     units, although the SBML specification limits the valid unit names to
07082     those defined by SI.
07083 
07084     The optional attribute named 'exponent' on Unit represents an exponent
07085     on the unit.  Its default value is @c 1 (one).  A Unit structure also
07086     has an optional attribute called 'scale'; its value must be an integer
07087     exponent for a power-of-ten multiplier used to set the scale of the
07088     unit.  For example, a unit having a 'kind' value of @c gram and a
07089     'scale' value of @c -3 signifies 10<sup>&nbsp;&ndash;3</sup>
07090     * gram, or milligrams.  The default value of 'scale' is @c 0
07091     (zero), because 10<sup> 0</sup> = 1.  Lastly, the optional attribute
07092     named 'multiplier' can be used to multiply the kind unit by a
07093     real-numbered factor; this enables the definition of units that are not
07094     power-of-ten multiples of SI units.  For instance, a multiplier of
07095     0.3048 could be used to define @c foot as a measure of length in terms
07096     of a @c metre.  The 'multiplier' attribute has a default value of @c 1
07097     (one).
07098 
07099     <h3><a class='anchor' name='UnitKind_t'>UnitKind_t</a></h3>
07100 
07101     SBML defines a set of base units which serves as the starting point for
07102     new unit definitions.  This set of base units consists of the SI units
07103     and a small number of additional convenience units.
07104 
07105     @if clike Until SBML Level&nbsp;2 Version&nbsp;3, there
07106     existed a data type in the SBML specifications called @c UnitKind,
07107     enumerating the possible SBML base units.  Although SBML Level&nbsp;2
07108     Version&nbsp;3 removed this type from the language specification,
07109     libSBML maintains the corresponding enumeration type @c UnitKind_t as a
07110     convenience and as a way to provide backward compatibility to previous
07111     SBML Level/Version specifications.  (The removal in SBML Level&nbsp;2
07112     Version&nbsp;3 of the enumeration @c UnitKind was also accompanied by
07113     the redefinition of the data type @c UnitSId to include the previous @c
07114     UnitKind values as reserved symbols in the @c UnitSId space.  This
07115     change has no net effect on permissible models, their representation or
07116     their syntax.  The purpose of the change in the SBML specification was
07117     simply to clean up an inconsistency about the contexts in which these
07118     values were usable.)  The @c UnitKind_t enumeration in libSBML has a 
07119     small number of differences compared to the SBML specifications:
07120     @endif@if java In SBML Level&nbsp;2 Versions before
07121     Version&nbsp;3, there existed an enumeration of units called @c
07122     UnitKind.  In Version&nbsp;3, this enumeration was removed and the
07123     identifier class @c UnitSId redefined to include the previous @c
07124     UnitKind values as reserved symbols.  This change has no net effect on
07125     permissible models, their representation or their syntax.  The purpose
07126     of the change in the SBML specification was simply to clean up an
07127     inconsistency about the contexts in which these values were usable.
07128     However, LibSBML maintains UnitKind in the form of of a set of static
07129     integer constants whose names begin with the characters
07130     <code>UNIT_KIND_</code>.  These constants are defined in the class
07131     <code><a href='libsbmlConstants.html'>libsbmlConstants</a></code> This
07132     enumeration in libSBML has a small number of differences compared to the
07133     SBML specifications: @endif
07134 
07135     <ul>
07136     <li> The alternate spelling @c 'meter' is included in addition to the
07137     official SI spelling @c 'metre'.
07138 
07139     <li> The alternate spelling @c 'liter' is included in addition to the
07140     official SI spelling @c 'litre'.
07141 
07142     <li> The unit @c 'Celsius' is included because of its presence in
07143     specifications of SBML prior to SBML Level&nbsp;2 Version&nbsp;3.
07144     </ul>
07145 
07146     @if clike The table below lists the symbols defined in the
07147     @c UnitKind_t enumeration, and their
07148     meanings. @endif@if java The table below lists the unit
07149     constants defined in libSBML, and their meanings. @endif
07150 
07151     @htmlinclude libsbml-unitkind-table.html
07152 
07153     <!-- leave this next break as-is to work around some doxygen bug -->
07154 
07155     """
07156     __swig_setmethods__ = {}
07157     for _s in [SBase]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
07158     __setattr__ = lambda self, name, value: _swig_setattr(self, Unit, name, value)
07159     __swig_getmethods__ = {}
07160     for _s in [SBase]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
07161     __getattr__ = lambda self, name: _swig_getattr(self, Unit, name)
07162     __repr__ = _swig_repr
07163     __swig_destroy__ = _libsbml.delete_Unit
07164     __del__ = lambda self : None;
07165     def __init__(self, *args): 
07166         """
07167         __init__(self, unsigned int level, unsigned int version) -> Unit
07168         __init__(self, SBMLNamespaces sbmlns) -> Unit
07169         __init__(self, Unit orig) -> Unit
07170 
07171         Predicate returning @c true or @c false depending on whether
07172         all the required attributes for this Unit object
07173         have been set.
07174 
07175         @note The required attributes for a Unit object are:
07176         kind
07177 
07178         @return a boolean value indicating whether all the required
07179         elements for this object have been defined.
07180         @deprecated libSBML internal
07181 
07182 
07183         """
07184         this = _libsbml.new_Unit(*args)
07185         try: self.this.append(this)
07186         except: self.this = this
07187     def clone(self):
07188         """
07189         clone(self) -> Unit
07190 
07191         Creates and returns a deep copy of this Unit.
07192 
07193         @return a (deep) copy of this Unit.
07194           
07195 
07196         """
07197         return _libsbml.Unit_clone(self)
07198 
07199     def initDefaults(self):
07200         """
07201         initDefaults(self)
07202 
07203         Initializes the attributes of this Unit (except for 'kind') to their
07204         defaults values.
07205 
07206         The default values are as follows:
07207 
07208         @li exponent   = 1
07209         @li scale      = 0
07210         @li multiplier = 1.0
07211 
07212         The 'kind' attribute is left unchanged.
07213           
07214 
07215         """
07216         return _libsbml.Unit_initDefaults(self)
07217 
07218     def getKind(self):
07219         """
07220         getKind(self) -> UnitKind_t
07221 
07222         Returns the 'kind' of Unit this is.
07223 
07224         @return the value of the 'kind' attribute of this Unit as a value from
07225         the <a class='el' href='#UnitKind_t'>UnitKind_t</a> enumeration
07226           
07227 
07228         """
07229         return _libsbml.Unit_getKind(self)
07230 
07231     def getExponent(self):
07232         """
07233         getExponent(self) -> int
07234 
07235         Returns the value of the 'exponent' attribute of this unit.
07236 
07237         @return the 'exponent' value of this Unit, as an integer
07238           
07239 
07240         """
07241         return _libsbml.Unit_getExponent(self)
07242 
07243     def getScale(self):
07244         """
07245         getScale(self) -> int
07246 
07247         Returns the value of the 'scale' attribute of this unit.
07248 
07249         @return the 'scale' value of this Unit, as an integer.
07250           
07251 
07252         """
07253         return _libsbml.Unit_getScale(self)
07254 
07255     def getMultiplier(self):
07256         """
07257         getMultiplier(self) -> double
07258 
07259         Returns the value of the 'multiplier' attribute of this Unit.
07260 
07261         @return the 'multiplier' value of this Unit, as a double
07262           
07263 
07264         """
07265         return _libsbml.Unit_getMultiplier(self)
07266 
07267     def getOffset(self):
07268         """
07269         getOffset(self) -> double
07270 
07271         Returns the value of the 'offset' attribute of this Unit.
07272 
07273         @warning The 'offset' attribute is only available in SBML Level&nbsp;2
07274         Version&nbsp;1.  This attribute is not present in SBML Level&nbsp;2
07275         Version&nbsp;2 or above.  When producing SBML models using these later
07276         specifications, modelers and software tools need to account for units
07277         with offsets explicitly.  The %SBML specification document offers a
07278         number of suggestions for how to achieve this.  LibSBML methods such
07279         as this one related to 'offset' are retained for compatibility with
07280         earlier versions of SBML Level&nbsp;2, but their use is strongly
07281         discouraged.
07282 
07283         @return the 'offset' value of this Unit, as a double
07284           
07285 
07286         """
07287         return _libsbml.Unit_getOffset(self)
07288 
07289     def isAmpere(self):
07290         """
07291         isAmpere(self) -> bool
07292 
07293         Predicate for testing whether this Unit is of the kind @c ampere.
07294 
07295         @return @c true if the kind of this Unit is @c ampere, @c false
07296         otherwise. 
07297           
07298 
07299         """
07300         return _libsbml.Unit_isAmpere(self)
07301 
07302     def isBecquerel(self):
07303         """
07304         isBecquerel(self) -> bool
07305 
07306         Predicate for testing whether this Unit is of the kind @c becquerel
07307 
07308         @return @c true if the kind of this Unit is @c becquerel, @c false
07309         otherwise. 
07310           
07311 
07312         """
07313         return _libsbml.Unit_isBecquerel(self)
07314 
07315     def isCandela(self):
07316         """
07317         isCandela(self) -> bool
07318 
07319         Predicate for testing whether this Unit is of the kind @c candela
07320 
07321         @return @c true if the kind of this Unit is @c candela, @c false
07322         otherwise. 
07323           
07324 
07325         """
07326         return _libsbml.Unit_isCandela(self)
07327 
07328     def isCelsius(self):
07329         """
07330         isCelsius(self) -> bool
07331 
07332         Predicate for testing whether this Unit is of the kind @c Celsius
07333 
07334         @return @c true if the kind of this Unit is @c Celsius, @c false
07335         otherwise. 
07336 
07337         @warning The predefined unit @c Celsius was removed from the list of
07338         predefined units in SBML Level&nbsp;2 Version&nbsp;2 at the same time
07339         that the 'offset' attribute was removed from Unit definitions.
07340         LibSBML methods such as this one related to @c Celsius are retained in
07341         order to support SBML Level&nbsp;2 Version&nbsp;1, but their use is
07342         strongly discouraged.
07343           
07344 
07345         """
07346         return _libsbml.Unit_isCelsius(self)
07347 
07348     def isCoulomb(self):
07349         """
07350         isCoulomb(self) -> bool
07351 
07352         Predicate for testing whether this Unit is of the kind @c coulomb
07353 
07354         @return @c true if the kind of this Unit is @c coulomb, @c false
07355         otherwise. 
07356           
07357 
07358         """
07359         return _libsbml.Unit_isCoulomb(self)
07360 
07361     def isDimensionless(self):
07362         """
07363         isDimensionless(self) -> bool
07364 
07365         Predicate for testing whether this Unit is of the kind @c
07366         dimensionless
07367 
07368         @return @c true if the kind of this Unit is @c dimensionless, @c false
07369 
07370         otherwise.
07371           
07372 
07373         """
07374         return _libsbml.Unit_isDimensionless(self)
07375 
07376     def isFarad(self):
07377         """
07378         isFarad(self) -> bool
07379 
07380         Predicate for testing whether this Unit is of the kind @c farad
07381 
07382         @return @c true if the kind of this Unit is @c farad, @c false
07383         otherwise. 
07384           
07385 
07386         """
07387         return _libsbml.Unit_isFarad(self)
07388 
07389     def isGram(self):
07390         """
07391         isGram(self) -> bool
07392 
07393         Predicate for testing whether this Unit is of the kind @c gram
07394 
07395         @return @c true if the kind of this Unit is @c gram, @c false
07396         otherwise. 
07397           
07398 
07399         """
07400         return _libsbml.Unit_isGram(self)
07401 
07402     def isGray(self):
07403         """
07404         isGray(self) -> bool
07405 
07406         Predicate for testing whether this Unit is of the kind @c gray
07407 
07408         @return @c true if the kind of this Unit is @c gray, @c false
07409         otherwise. 
07410           
07411 
07412         """
07413         return _libsbml.Unit_isGray(self)
07414 
07415     def isHenry(self):
07416         """
07417         isHenry(self) -> bool
07418 
07419         Predicate for testing whether this Unit is of the kind @c henry
07420 
07421         @return @c true if the kind of this Unit is @c henry, @c false
07422         otherwise. 
07423           
07424 
07425         """
07426         return _libsbml.Unit_isHenry(self)
07427 
07428     def isHertz(self):
07429         """
07430         isHertz(self) -> bool
07431 
07432         Predicate for testing whether this Unit is of the kind @c hertz
07433 
07434         @return @c true if the kind of this Unit is @c hertz, @c false
07435         otherwise. 
07436           
07437 
07438         """
07439         return _libsbml.Unit_isHertz(self)
07440 
07441     def isItem(self):
07442         """
07443         isItem(self) -> bool
07444 
07445         Predicate for testing whether this Unit is of the kind @c item
07446 
07447         @return @c true if the kind of this Unit is @c item, @c false
07448         otherwise. 
07449           
07450 
07451         """
07452         return _libsbml.Unit_isItem(self)
07453 
07454     def isJoule(self):
07455         """
07456         isJoule(self) -> bool
07457 
07458         Predicate for testing whether this Unit is of the kind @c joule
07459 
07460         @return @c true if the kind of this Unit is @c joule, @c false
07461         otherwise. 
07462           
07463 
07464         """
07465         return _libsbml.Unit_isJoule(self)
07466 
07467     def isKatal(self):
07468         """
07469         isKatal(self) -> bool
07470 
07471         Predicate for testing whether this Unit is of the kind @c katal
07472 
07473         @return @c true if the kind of this Unit is @c katal, @c false
07474         otherwise. 
07475           
07476 
07477         """
07478         return _libsbml.Unit_isKatal(self)
07479 
07480     def isKelvin(self):
07481         """
07482         isKelvin(self) -> bool
07483 
07484         Predicate for testing whether this Unit is of the kind @c kelvin
07485 
07486         @return @c true if the kind of this Unit is @c kelvin, @c false
07487         otherwise. 
07488           
07489 
07490         """
07491         return _libsbml.Unit_isKelvin(self)
07492 
07493     def isKilogram(self):
07494         """
07495         isKilogram(self) -> bool
07496 
07497         Predicate for testing whether this Unit is of the kind @c kilogram
07498 
07499         @return @c true if the kind of this Unit is @c kilogram, @c false
07500         otherwise. 
07501           
07502 
07503         """
07504         return _libsbml.Unit_isKilogram(self)
07505 
07506     def isLitre(self):
07507         """
07508         isLitre(self) -> bool
07509 
07510         Predicate for testing whether this Unit is of the kind @c litre
07511 
07512         @return @c true if the kind of this Unit is @c litre or 'liter', @c
07513         false 
07514         otherwise.
07515           
07516 
07517         """
07518         return _libsbml.Unit_isLitre(self)
07519 
07520     def isLumen(self):
07521         """
07522         isLumen(self) -> bool
07523 
07524         Predicate for testing whether this Unit is of the kind @c lumen
07525 
07526         @return @c true if the kind of this Unit is @c lumen, @c false
07527         otherwise. 
07528           
07529 
07530         """
07531         return _libsbml.Unit_isLumen(self)
07532 
07533     def isLux(self):
07534         """
07535         isLux(self) -> bool
07536 
07537         Predicate for testing whether this Unit is of the kind @c lux
07538 
07539         @return @c true if the kind of this Unit is @c lux, @c false
07540         otherwise. 
07541           
07542 
07543         """
07544         return _libsbml.Unit_isLux(self)
07545 
07546     def isMetre(self):
07547         """
07548         isMetre(self) -> bool
07549 
07550         Predicate for testing whether this Unit is of the kind @c metre
07551 
07552         @return @c true if the kind of this Unit is @c metre or 'meter', @c
07553         false 
07554         otherwise.
07555           
07556 
07557         """
07558         return _libsbml.Unit_isMetre(self)
07559 
07560     def isMole(self):
07561         """
07562         isMole(self) -> bool
07563 
07564         Predicate for testing whether this Unit is of the kind @c mole
07565 
07566         @return @c true if the kind of this Unit is @c mole, @c false
07567         otherwise. 
07568           
07569 
07570         """
07571         return _libsbml.Unit_isMole(self)
07572 
07573     def isNewton(self):
07574         """
07575         isNewton(self) -> bool
07576 
07577         Predicate for testing whether this Unit is of the kind @c newton
07578 
07579         @return @c true if the kind of this Unit is @c newton, @c false
07580         otherwise. 
07581           
07582 
07583         """
07584         return _libsbml.Unit_isNewton(self)
07585 
07586     def isOhm(self):
07587         """
07588         isOhm(self) -> bool
07589 
07590         Predicate for testing whether this Unit is of the kind @c ohm
07591 
07592         @return @c true if the kind of this Unit is @c ohm, @c false
07593         otherwise. 
07594           
07595 
07596         """
07597         return _libsbml.Unit_isOhm(self)
07598 
07599     def isPascal(self):
07600         """
07601         isPascal(self) -> bool
07602 
07603         Predicate for testing whether this Unit is of the kind @c pascal
07604 
07605         @return @c true if the kind of this Unit is @c pascal, @c false
07606         otherwise. 
07607           
07608 
07609         """
07610         return _libsbml.Unit_isPascal(self)
07611 
07612     def isRadian(self):
07613         """
07614         isRadian(self) -> bool
07615 
07616         Predicate for testing whether this Unit is of the kind @c radian
07617 
07618         @return @c true if the kind of this Unit is @c radian, @c false
07619         otherwise. 
07620           
07621 
07622         """
07623         return _libsbml.Unit_isRadian(self)
07624 
07625     def isSecond(self):
07626         """
07627         isSecond(self) -> bool
07628 
07629         Predicate for testing whether this Unit is of the kind @c second
07630 
07631         @return @c true if the kind of this Unit is @c second, @c false
07632         otherwise. 
07633           
07634 
07635         """
07636         return _libsbml.Unit_isSecond(self)
07637 
07638     def isSiemens(self):
07639         """
07640         isSiemens(self) -> bool
07641 
07642         Predicate for testing whether this Unit is of the kind @c siemens
07643 
07644         @return @c true if the kind of this Unit is @c siemens, @c false
07645         otherwise. 
07646           
07647 
07648         """
07649         return _libsbml.Unit_isSiemens(self)
07650 
07651     def isSievert(self):
07652         """
07653         isSievert(self) -> bool
07654 
07655         Predicate for testing whether this Unit is of the kind @c sievert
07656 
07657         @return @c true if the kind of this Unit is @c sievert, @c false
07658         otherwise. 
07659           
07660 
07661         """
07662         return _libsbml.Unit_isSievert(self)
07663 
07664     def isSteradian(self):
07665         """
07666         isSteradian(self) -> bool
07667 
07668         Predicate for testing whether this Unit is of the kind @c steradian
07669 
07670         @return @c true if the kind of this Unit is @c steradian, @c false
07671         otherwise. 
07672           
07673 
07674         """
07675         return _libsbml.Unit_isSteradian(self)
07676 
07677     def isTesla(self):
07678         """
07679         isTesla(self) -> bool
07680 
07681         Predicate for testing whether this Unit is of the kind @c tesla
07682 
07683         @return @c true if the kind of this Unit is @c tesla, @c false
07684         otherwise. 
07685           
07686 
07687         """
07688         return _libsbml.Unit_isTesla(self)
07689 
07690     def isVolt(self):
07691         """
07692         isVolt(self) -> bool
07693 
07694         Predicate for testing whether this Unit is of the kind @c volt
07695 
07696         @return @c true if the kind of this Unit is @c volt, @c false
07697         otherwise. 
07698           
07699 
07700         """
07701         return _libsbml.Unit_isVolt(self)
07702 
07703     def isWatt(self):
07704         """
07705         isWatt(self) -> bool
07706 
07707         Predicate for testing whether this Unit is of the kind @c watt
07708 
07709         @return @c true if the kind of this Unit is @c watt, @c false
07710         otherwise. 
07711           
07712 
07713         """
07714         return _libsbml.Unit_isWatt(self)
07715 
07716     def isWeber(self):
07717         """
07718         isWeber(self) -> bool
07719 
07720         Predicate for testing whether this Unit is of the kind @c weber
07721 
07722         @return @c true if the kind of this Unit is @c weber, @c false
07723         otherwise. 
07724           
07725 
07726         """
07727         return _libsbml.Unit_isWeber(self)
07728 
07729     def isSetKind(self):
07730         """
07731         isSetKind(self) -> bool
07732 
07733         Predicate to test whether the 'kind' attribute of this Unit has been set.
07734 
07735         @return @c true if the 'kind' attribute of this Unit has been set, @c
07736         false otherwise.
07737           
07738 
07739         """
07740         return _libsbml.Unit_isSetKind(self)
07741 
07742     def setKind(self, *args):
07743         """
07744         setKind(self, UnitKind_t kind) -> int
07745 
07746         Sets the 'kind' attribute value of this Unit.
07747 
07748         @param kind a value from the <a class='el'
07749         href='#UnitKind_t'>UnitKind_t</a> enumeration
07750 
07751         @return integer value indicating success/failure of the
07752         function.  @if clike The value is drawn from the
07753         enumeration #OperationReturnValues_t. @endif The possible values
07754         returned by this function are:
07755         @li LIBSBML_OPERATION_SUCCESS
07756         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
07757           
07758 
07759         """
07760         return _libsbml.Unit_setKind(self, *args)
07761 
07762     def setExponent(self, *args):
07763         """
07764         setExponent(self, int value) -> int
07765 
07766         Sets the 'exponent' attribute value of this Unit.
07767 
07768         @param value the integer to which the attribute 'exponent' should be set
07769 
07770         @return integer value indicating success/failure of the
07771         function.  @if clike The value is drawn from the
07772         enumeration #OperationReturnValues_t. @endif The possible values
07773         returned by this function are:
07774         @li LIBSBML_OPERATION_SUCCESS
07775           
07776 
07777         """
07778         return _libsbml.Unit_setExponent(self, *args)
07779 
07780     def setScale(self, *args):
07781         """
07782         setScale(self, int value) -> int
07783 
07784         Sets the 'scale' attribute value of this Unit.
07785 
07786         @param value the integer to which the attribute 'scale' should be set
07787 
07788         @return integer value indicating success/failure of the
07789         function.  @if clike The value is drawn from the
07790         enumeration #OperationReturnValues_t. @endif The possible values
07791         returned by this function are:
07792         @li LIBSBML_OPERATION_SUCCESS
07793           
07794 
07795         """
07796         return _libsbml.Unit_setScale(self, *args)
07797 
07798     def setMultiplier(self, *args):
07799         """
07800         setMultiplier(self, double value) -> int
07801 
07802         Sets the 'multipler' attribute value of this Unit.
07803 
07804         @param value the floating-point value to which the attribute
07805         'multiplier' should be set
07806 
07807         @return integer value indicating success/failure of the
07808         function.  @if clike The value is drawn from the
07809         enumeration #OperationReturnValues_t. @endif The possible values
07810         returned by this function are:
07811         @li LIBSBML_OPERATION_SUCCESS
07812         @li LIBSBML_UNEXPECTED_ATTRIBUTE
07813           
07814 
07815         """
07816         return _libsbml.Unit_setMultiplier(self, *args)
07817 
07818     def setOffset(self, *args):
07819         """
07820         setOffset(self, double value) -> int
07821 
07822         Sets the 'offset' attribute value of this Unit.
07823 
07824         @param value the float-point value to which the attribute 'offset'
07825         should set
07826 
07827         @return integer value indicating success/failure of the
07828         function.  @if clike The value is drawn from the
07829         enumeration #OperationReturnValues_t. @endif The possible values
07830         returned by this function are:
07831         @li LIBSBML_OPERATION_SUCCESS
07832         @li LIBSBML_UNEXPECTED_ATTRIBUTE
07833 
07834         @warning The 'offset' attribute is only available in SBML Level&nbsp;2
07835         Version&nbsp;1.  This attribute is not present in SBML Level&nbsp;2
07836         Version&nbsp;2 or above.  When producing SBML models using these later
07837         specifications, modelers and software tools need to account for units
07838         with offsets explicitly.  The %SBML specification document offers a
07839         number of suggestions for how to achieve this.  LibSBML methods such
07840         as this one related to 'offset' are retained for compatibility with
07841         earlier versions of SBML Level&nbsp;2, but their use is strongly
07842         discouraged.
07843           
07844 
07845         """
07846         return _libsbml.Unit_setOffset(self, *args)
07847 
07848     def getTypeCode(self):
07849         """
07850         getTypeCode(self) -> SBMLTypeCode_t
07851 
07852         Returns the libSBML type code of this object instance.
07853 
07854         @if clike LibSBML attaches an identifying code to every
07855         kind of SBML object.  These are known as <em>SBML type codes</em>.
07856         The set of possible type codes is defined in the enumeration
07857         #SBMLTypeCode_t.  The names of the type codes all begin with the
07858         characters @c SBML_. @endif@if java LibSBML attaches an
07859         identifying code to every kind of SBML object.  These are known as
07860         <em>SBML type codes</em>.  In other languages, the set of type codes
07861         is stored in an enumeration; in the Java language interface for
07862         libSBML, the type codes are defined as static integer constants in
07863         interface class {@link libsbmlConstants}.  The names of the type codes
07864         all begin with the characters @c SBML_. @endif
07865 
07866         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
07867 
07868         @see getElementName()
07869           
07870 
07871         """
07872         return _libsbml.Unit_getTypeCode(self)
07873 
07874     def getElementName(self):
07875         """
07876         getElementName(self) -> string
07877 
07878         Returns the XML element name of this object, which for Unit, is
07879         always @c 'unit'.
07880 
07881         @return the name of this element, i.e., @c 'unit'. 
07882           
07883 
07884         """
07885         return _libsbml.Unit_getElementName(self)
07886 
07887     def isBuiltIn(*args):
07888         """
07889         isBuiltIn(string name, unsigned int level) -> bool
07890 
07891         Predicate to test whether a given string is the name of a
07892         predefined SBML unit.
07893 
07894         @param name a string to be tested against the predefined unit names
07895 
07896         @param level the Level of SBML for which the determination should be
07897         made.  This is necessary because there are a few small differences
07898         in allowed units between SBML Level&nbsp;1 and Level&nbsp;2.
07899 
07900         @return @c true if @p name is one of the five SBML predefined unit
07901         identifiers (@c 'substance', @c 'volume', @c 'area', @c 'length' or @c
07902         'time'), @c false otherwise.
07903 
07904         @note The predefined unit identifiers @c 'length' and @c 'area' were
07905         added in Level&nbsp;2 Version&nbsp;1
07906           
07907 
07908         """
07909         return _libsbml.Unit_isBuiltIn(*args)
07910 
07911     if _newclass:isBuiltIn = staticmethod(isBuiltIn)
07912     __swig_getmethods__["isBuiltIn"] = lambda x: isBuiltIn
07913     def isUnitKind(*args):
07914         """
07915         isUnitKind(string name, unsigned int level, unsigned int version) -> bool
07916 
07917         Predicate to test whether a given string is the name of a valid
07918         base unit in SBML (such as @c 'gram' or @c 'mole').
07919 
07920         This method exists because prior to SBML Level&nbsp;2 Version&nbsp;3,
07921         an enumeration called @c UnitKind was defined by SBML.  This enumeration
07922         was removed in SBML Level&nbsp;2 Version&nbsp;3 and its values were
07923         folded into the space of values of a type called @c UnitSId.  This method
07924         therefore has less significance in SBML Level&nbsp;2 Version&nbsp;3
07925         and Level&nbsp;2 Version&nbsp;4, but remains for backward
07926         compatibility and support for reading models in older Versions of
07927         Level&nbsp;2.
07928 
07929         @param name a string to be tested
07930 
07931         @param level an unsigned int representing the SBML specification
07932         Level 
07933 
07934         @param version an unsigned int representing the SBML specification
07935         Version
07936 
07937         @return @c true if name is a valid UnitKind, @c false otherwise
07938 
07939         @note The allowed unit names differ between SBML Levels&nbsp;1
07940         and&nbsp;2 and again slightly between Level&nbsp;2 Versions&nbsp;1
07941         and&nbsp;2.
07942           
07943 
07944         """
07945         return _libsbml.Unit_isUnitKind(*args)
07946 
07947     if _newclass:isUnitKind = staticmethod(isUnitKind)
07948     __swig_getmethods__["isUnitKind"] = lambda x: isUnitKind
07949     def areIdentical(*args):
07950         """
07951         areIdentical(Unit unit1, Unit unit2) -> bool
07952 
07953         Predicate returning @c true or @c false depending on whether two
07954         Unit objects are identical.
07955 
07956         Two Unit objects are considered to be @em identical if they match in
07957         all attributes.  (Contrast this to the method
07958         Unit::areEquivalent(Unit * unit1, %Unit * unit2), which compares
07959         Unit objects only with respect to certain attributes.)
07960 
07961         @param unit1 the first Unit object to compare
07962         @param unit2 the second Unit object to compare
07963 
07964         @return @c true if all the attributes of unit1 are identical
07965         to the attributes of unit2, @c false otherwise.
07966 
07967         @see areEquivalent(Unit * unit1, %Unit * unit2)
07968          
07969 
07970         """
07971         return _libsbml.Unit_areIdentical(*args)
07972 
07973     if _newclass:areIdentical = staticmethod(areIdentical)
07974     __swig_getmethods__["areIdentical"] = lambda x: areIdentical
07975     def areEquivalent(*args):
07976         """
07977         areEquivalent(Unit unit1, Unit unit2) -> bool
07978 
07979         Predicate returning @c true or @c false depending on whether 
07980         Unit objects are equivalent.
07981 
07982         Two Unit objects are considered to be @em equivalent if their 'kind'
07983         and 'exponent' attributes are equal.  (Contrast this to the method
07984         Unit::areIdentical(Unit * unit1, %Unit * unit2), which compares Unit
07985         objects with respect to all attributes, not just the kind and
07986         exponent.)
07987 
07988         @param unit1 the first Unit object to compare
07989         @param unit2 the second Unit object to compare
07990 
07991         @return @c true if the 'kind' and 'exponent' attributes of unit1 are
07992         identical to the kind and exponent attributes of unit2, @c false
07993         otherwise.
07994 
07995         @see areIdentical(Unit * unit1, %Unit * unit2)
07996          
07997 
07998         """
07999         return _libsbml.Unit_areEquivalent(*args)
08000 
08001     if _newclass:areEquivalent = staticmethod(areEquivalent)
08002     __swig_getmethods__["areEquivalent"] = lambda x: areEquivalent
08003     def removeScale(*args):
08004         """
08005         removeScale(Unit unit) -> int
08006 
08007         Manipulates the attributes of the Unit to express the unit with the 
08008         value of the scale attribute reduced to zero.
08009 
08010         For example, 1 millimetre can be expressed as a Unit with kind=@c
08011         'metre' multiplier=@c '1' scale=@c '-3' exponent=@c '1'. It can also be
08012         expressed as a Unit with kind=@c 'metre'
08013         multiplier=<code>'0.001'</code> scale=@c '0' exponent=@c '1'.
08014 
08015         @param unit the Unit object to manipulate.
08016 
08017         @return integer value indicating success/failure of the
08018         function.  @if clike The value is drawn from the
08019         enumeration #OperationReturnValues_t. @endif The possible values
08020         returned by this function are:
08021         @li LIBSBML_OPERATION_SUCCESS
08022          
08023 
08024         """
08025         return _libsbml.Unit_removeScale(*args)
08026 
08027     if _newclass:removeScale = staticmethod(removeScale)
08028     __swig_getmethods__["removeScale"] = lambda x: removeScale
08029     def merge(*args):
08030         """
08031         merge(Unit unit1, Unit unit2)
08032 
08033         Merges two Unit objects with the same 'kind' attribute value into a
08034         single Unit.
08035 
08036         For example, the following,
08037         @code
08038         <unit kind='metre' exponent='2'/>
08039         <unit kind='metre' exponent='1'/>
08040         @endcode
08041         would be merged to become
08042         @code
08043         <unit kind='metre' exponent='3'/>
08044         @endcode
08045 
08046         @param unit1 the first Unit object; the result of the operation is
08047         left as a new version of this unit, modified in-place.
08048 
08049         @param unit2 the second Unit object to merge with the first
08050          
08051 
08052         """
08053         return _libsbml.Unit_merge(*args)
08054 
08055     if _newclass:merge = staticmethod(merge)
08056     __swig_getmethods__["merge"] = lambda x: merge
08057     def convertToSI(*args):
08058         """
08059         convertToSI(Unit unit) -> UnitDefinition
08060 
08061         Returns a UnitDefinition object which contains the argument Unit
08062         converted to the appropriate SI unit.
08063 
08064         @param unit the Unit object to convert to SI
08065 
08066         @return a UnitDefinition object containing the SI unit.
08067          
08068 
08069         """
08070         return _libsbml.Unit_convertToSI(*args)
08071 
08072     if _newclass:convertToSI = staticmethod(convertToSI)
08073     __swig_getmethods__["convertToSI"] = lambda x: convertToSI
08074     def hasRequiredAttributes(self):
08075         """
08076         hasRequiredAttributes(self) -> bool
08077 
08078         Predicate returning @c true or @c false depending on whether
08079         all the required attributes for this Unit object
08080         have been set.
08081 
08082         @note The required attributes for a Unit object are:
08083         kind
08084 
08085         @return a boolean value indicating whether all the required
08086         elements for this object have been defined.
08087           
08088 
08089         """
08090         return _libsbml.Unit_hasRequiredAttributes(self)
08091 
08092 Unit_swigregister = _libsbml.Unit_swigregister
08093 Unit_swigregister(Unit)
08094 
08095 def Unit_isBuiltIn(*args):
08096   """
08097     Unit_isBuiltIn(string name, unsigned int level) -> bool
08098 
08099     Predicate to test whether a given string is the name of a
08100     predefined SBML unit.
08101 
08102     @param name a string to be tested against the predefined unit names
08103 
08104     @param level the Level of SBML for which the determination should be
08105     made.  This is necessary because there are a few small differences
08106     in allowed units between SBML Level&nbsp;1 and Level&nbsp;2.
08107 
08108     @return @c true if @p name is one of the five SBML predefined unit
08109     identifiers (@c 'substance', @c 'volume', @c 'area', @c 'length' or @c
08110     'time'), @c false otherwise.
08111 
08112     @note The predefined unit identifiers @c 'length' and @c 'area' were
08113     added in Level&nbsp;2 Version&nbsp;1
08114       
08115 
08116     """
08117   return _libsbml.Unit_isBuiltIn(*args)
08118 
08119 def Unit_isUnitKind(*args):
08120   """
08121     Unit_isUnitKind(string name, unsigned int level, unsigned int version) -> bool
08122 
08123     Predicate to test whether a given string is the name of a valid
08124     base unit in SBML (such as @c 'gram' or @c 'mole').
08125 
08126     This method exists because prior to SBML Level&nbsp;2 Version&nbsp;3,
08127     an enumeration called @c UnitKind was defined by SBML.  This enumeration
08128     was removed in SBML Level&nbsp;2 Version&nbsp;3 and its values were
08129     folded into the space of values of a type called @c UnitSId.  This method
08130     therefore has less significance in SBML Level&nbsp;2 Version&nbsp;3
08131     and Level&nbsp;2 Version&nbsp;4, but remains for backward
08132     compatibility and support for reading models in older Versions of
08133     Level&nbsp;2.
08134 
08135     @param name a string to be tested
08136 
08137     @param level an unsigned int representing the SBML specification
08138     Level 
08139 
08140     @param version an unsigned int representing the SBML specification
08141     Version
08142 
08143     @return @c true if name is a valid UnitKind, @c false otherwise
08144 
08145     @note The allowed unit names differ between SBML Levels&nbsp;1
08146     and&nbsp;2 and again slightly between Level&nbsp;2 Versions&nbsp;1
08147     and&nbsp;2.
08148       
08149 
08150     """
08151   return _libsbml.Unit_isUnitKind(*args)
08152 
08153 def Unit_areIdentical(*args):
08154   """
08155     Unit_areIdentical(Unit unit1, Unit unit2) -> bool
08156 
08157     Predicate returning @c true or @c false depending on whether two
08158     Unit objects are identical.
08159 
08160     Two Unit objects are considered to be @em identical if they match in
08161     all attributes.  (Contrast this to the method
08162     Unit::areEquivalent(Unit * unit1, %Unit * unit2), which compares
08163     Unit objects only with respect to certain attributes.)
08164 
08165     @param unit1 the first Unit object to compare
08166     @param unit2 the second Unit object to compare
08167 
08168     @return @c true if all the attributes of unit1 are identical
08169     to the attributes of unit2, @c false otherwise.
08170 
08171     @see areEquivalent(Unit * unit1, %Unit * unit2)
08172      
08173 
08174     """
08175   return _libsbml.Unit_areIdentical(*args)
08176 
08177 def Unit_areEquivalent(*args):
08178   """
08179     Unit_areEquivalent(Unit unit1, Unit unit2) -> bool
08180 
08181     Predicate returning @c true or @c false depending on whether 
08182     Unit objects are equivalent.
08183 
08184     Two Unit objects are considered to be @em equivalent if their 'kind'
08185     and 'exponent' attributes are equal.  (Contrast this to the method
08186     Unit::areIdentical(Unit * unit1, %Unit * unit2), which compares Unit
08187     objects with respect to all attributes, not just the kind and
08188     exponent.)
08189 
08190     @param unit1 the first Unit object to compare
08191     @param unit2 the second Unit object to compare
08192 
08193     @return @c true if the 'kind' and 'exponent' attributes of unit1 are
08194     identical to the kind and exponent attributes of unit2, @c false
08195     otherwise.
08196 
08197     @see areIdentical(Unit * unit1, %Unit * unit2)
08198      
08199 
08200     """
08201   return _libsbml.Unit_areEquivalent(*args)
08202 
08203 def Unit_removeScale(*args):
08204   """
08205     Unit_removeScale(Unit unit) -> int
08206 
08207     Manipulates the attributes of the Unit to express the unit with the 
08208     value of the scale attribute reduced to zero.
08209 
08210     For example, 1 millimetre can be expressed as a Unit with kind=@c
08211     'metre' multiplier=@c '1' scale=@c '-3' exponent=@c '1'. It can also be
08212     expressed as a Unit with kind=@c 'metre'
08213     multiplier=<code>'0.001'</code> scale=@c '0' exponent=@c '1'.
08214 
08215     @param unit the Unit object to manipulate.
08216 
08217     @return integer value indicating success/failure of the
08218     function.  @if clike The value is drawn from the
08219     enumeration #OperationReturnValues_t. @endif The possible values
08220     returned by this function are:
08221     @li LIBSBML_OPERATION_SUCCESS
08222      
08223 
08224     """
08225   return _libsbml.Unit_removeScale(*args)
08226 
08227 def Unit_merge(*args):
08228   """
08229     Unit_merge(Unit unit1, Unit unit2)
08230 
08231     Merges two Unit objects with the same 'kind' attribute value into a
08232     single Unit.
08233 
08234     For example, the following,
08235     @code
08236     <unit kind='metre' exponent='2'/>
08237     <unit kind='metre' exponent='1'/>
08238     @endcode
08239     would be merged to become
08240     @code
08241     <unit kind='metre' exponent='3'/>
08242     @endcode
08243 
08244     @param unit1 the first Unit object; the result of the operation is
08245     left as a new version of this unit, modified in-place.
08246 
08247     @param unit2 the second Unit object to merge with the first
08248      
08249 
08250     """
08251   return _libsbml.Unit_merge(*args)
08252 
08253 def Unit_convertToSI(*args):
08254   """
08255     Unit_convertToSI(Unit unit) -> UnitDefinition
08256 
08257     Returns a UnitDefinition object which contains the argument Unit
08258     converted to the appropriate SI unit.
08259 
08260     @param unit the Unit object to convert to SI
08261 
08262     @return a UnitDefinition object containing the SI unit.
08263      
08264 
08265     """
08266   return _libsbml.Unit_convertToSI(*args)
08267 
08268 class ListOfUnits(ListOf):
08269     """
08270     LibSBML implementation of SBML's %ListOfUnits construct.
08271 
08272     The various ListOf___ classes in %SBML are merely containers used for
08273     organizing the main components of an %SBML model.  All are derived from
08274     the abstract class SBase, and inherit the various attributes and
08275     subelements of SBase, such as 'metaid' as and 'annotation'.  The
08276     ListOf___ classes do not add any attributes of their own.
08277 
08278     ListOfUnits is entirely contained within UnitDefinition.
08279 
08280     """
08281     __swig_setmethods__ = {}
08282     for _s in [ListOf]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
08283     __setattr__ = lambda self, name, value: _swig_setattr(self, ListOfUnits, name, value)
08284     __swig_getmethods__ = {}
08285     for _s in [ListOf]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
08286     __getattr__ = lambda self, name: _swig_getattr(self, ListOfUnits, name)
08287     __repr__ = _swig_repr
08288     def clone(self):
08289         """
08290         clone(self) -> ListOfUnits
08291 
08292         Creates and returns a deep copy of this ListOfUnits.
08293 
08294         @return a (deep) copy of this ListOfUnits.
08295           
08296 
08297         """
08298         return _libsbml.ListOfUnits_clone(self)
08299 
08300     def getTypeCode(self):
08301         """
08302         getTypeCode(self) -> SBMLTypeCode_t
08303 
08304         Returns the libSBML type code for this %SBML object.
08305 
08306         @if clike LibSBML attaches an identifying code to every
08307         kind of SBML object.  These are known as <em>SBML type codes</em>.
08308         The set of possible type codes is defined in the enumeration
08309         #SBMLTypeCode_t.  The names of the type codes all begin with the
08310         characters @c SBML_. @endif@if java LibSBML attaches an
08311         identifying code to every kind of SBML object.  These are known as
08312         <em>SBML type codes</em>.  In other languages, the set of type codes
08313         is stored in an enumeration; in the Java language interface for
08314         libSBML, the type codes are defined as static integer constants in
08315         interface class {@link libsbmlConstants}.  The names of the type codes
08316         all begin with the characters @c SBML_. @endif
08317 
08318         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
08319 
08320         @see getElementName()
08321           
08322 
08323         """
08324         return _libsbml.ListOfUnits_getTypeCode(self)
08325 
08326     def getItemTypeCode(self):
08327         """
08328         getItemTypeCode(self) -> SBMLTypeCode_t
08329 
08330         Returns the libSBML type code for the objects contained in this ListOf
08331         (i.e., Unit objects, if the list is non-empty).
08332 
08333         @if clike LibSBML attaches an identifying code to every
08334         kind of SBML object.  These are known as <em>SBML type codes</em>.
08335         The set of possible type codes is defined in the enumeration
08336         #SBMLTypeCode_t.  The names of the type codes all begin with the
08337         characters @c SBML_. @endif@if java LibSBML attaches an
08338         identifying code to every kind of SBML object.  These are known as
08339         <em>SBML type codes</em>.  In other languages, the set of type codes
08340         is stored in an enumeration; in the Java language interface for
08341         libSBML, the type codes are defined as static integer constants in
08342         interface class {@link libsbmlConstants}.  The names of the type codes
08343         all begin with the characters @c SBML_. @endif
08344 
08345         @return the SBML type code for the objects contained in this ListOf
08346         instance, or @c SBML_UNKNOWN (default).
08347 
08348         @see getElementName()
08349           
08350 
08351         """
08352         return _libsbml.ListOfUnits_getItemTypeCode(self)
08353 
08354     def getElementName(self):
08355         """
08356         getElementName(self) -> string
08357 
08358         Returns the XML element name of this object.
08359 
08360         For ListOfUnits, the XML element name is @c 'listOfUnits'.
08361 
08362         @return the name of this element, i.e., @c 'listOfUnits'.
08363           
08364 
08365         """
08366         return _libsbml.ListOfUnits_getElementName(self)
08367 
08368     def get(self, *args):
08369         """
08370         get(self, unsigned int n) -> Unit
08371         get(self, unsigned int n) -> Unit
08372 
08373         Get a Unit from the ListOfUnits.
08374 
08375         @param n the index number of the Unit to get.
08376 
08377         @return the nth Unit in this ListOfUnits.
08378 
08379         @see size()
08380           
08381 
08382         """
08383         return _libsbml.ListOfUnits_get(self, *args)
08384 
08385     def remove(self, *args):
08386         """
08387         remove(self, unsigned int n) -> Unit
08388 
08389         Removes the nth item from this ListOfUnits items and returns a pointer to
08390         it.
08391 
08392         The caller owns the returned item and is responsible for deleting it.
08393 
08394         @param n the index of the item to remove
08395 
08396         @see size()
08397           
08398 
08399         """
08400         return _libsbml.ListOfUnits_remove(self, *args)
08401 
08402     def __init__(self): 
08403         """__init__(self) -> ListOfUnits"""
08404         this = _libsbml.new_ListOfUnits()
08405         try: self.this.append(this)
08406         except: self.this = this
08407     __swig_destroy__ = _libsbml.delete_ListOfUnits
08408     __del__ = lambda self : None;
08409 ListOfUnits_swigregister = _libsbml.ListOfUnits_swigregister
08410 ListOfUnits_swigregister(ListOfUnits)
08411 
08412 class UnitDefinition(SBase):
08413     """
08414     LibSBML implementation of %SBML's %UnitDefinition construct.
08415 
08416     Units of measurement may be supplied in a number of contexts in an %SBML
08417     model.  The units of the following mathematical entities can be
08418     specified explicitly: the size of a compartment, the initial amount of a
08419     species, and the units of constant and variable parameter values.  The
08420     overall units of any mathematical formula appearing in %SBML are those
08421     that arise naturally from the components and mathematical expressions
08422     comprising the formula, or in other words, the units obtained by doing
08423     dimensional analysis on the formula.
08424 
08425     Rather than requiring a complete unit definition on every construct,
08426     %SBML provides a facility for defining units that can be referenced
08427     throughout a model.  In addition, every kind of %SBML mathematical
08428     entity has units assigned to it from a set of predefined defaults (listed
08429     below); by redefining these predefined default units, it is possible to
08430     change the units used throughout a model in a simple and consistent
08431     manner.
08432 
08433     The %SBML unit definition facility uses two classes of objects,
08434     UnitDefinition and Unit.  The approach to defining units in %SBML is
08435     compositional; for example, <em>meter second<sup> &ndash;2</sup></em> is
08436     constructed by combining a Unit object representing <em>meter</em> with
08437     another Unit object representing <em>second<sup> &ndash;2</sup></em>.
08438     The combination is wrapped inside a UnitDefinition, which provides for
08439     assigning an identifier and optional name to the combination.  The
08440     identifier can then be referenced from elsewhere in a model.  Thus, the
08441     UnitDefinition class is the container, and Unit instances are placed
08442     inside UnitDefinition instances.
08443 
08444     @section unitdef-summary Summary of the UnitDefinition construct
08445 
08446     UnitDefinition in SBML Level&nbsp;2 has two attributes and one
08447     subelement.  The two attributes are 'id' and 'name', and the subelement
08448     is ListOfUnits.
08449 
08450     The required attribute 'id' and optional attribute 'name' are both
08451     strings.  The 'id' attribute is used to give the defined unit a unique
08452     identifier by which other parts of an SBML model definition can refer to
08453     it.  The 'name' attribute is intended to be used for giving the unit
08454     definition an optional human-readable name.
08455 
08456     There are two important restrictions about the use of unit definition
08457     'id' values in SBML Level&nbsp;2 Versions&nbsp;3&ndash;4:
08458     <ul>
08459     <li> The 'id' of a UnitDefinition must @em not contain a value from the
08460       list of reserved base unit names (i.e., the strings @c gram, @c liter,
08461       etc.; see the definition of Unit for the complete list).  This
08462       constraint simply prevents the redefinition of the base units.
08463 
08464     <li> There is a set of reserved identifiers for the predefined
08465       units in SBML; these identifiers are @c substance, @c volume, @c area,
08466       @c length, and @c time.  Using one of these values for the attribute
08467       'id' of a UnitDefinition has the effect of redefining the model-wide
08468       default units for the corresponding quantities.  The list of
08469       predefined units is given in the table below:
08470 
08471       @htmlinclude libsbml-predefined-units.html
08472 
08473       Also, two limitations are imposed on redefining the predefined
08474       unit @c substance, @c volume, @c area, @c length, and @c time:
08475       (1) The UnitDefinition of a predefined SBML unit can only
08476          contain a single Unit object within it.
08477       (2) The value of the 'kind' attribute in 
08478          a Unit instance must be drawn from one of the values
08479          in the second column of the table above.
08480     </ul>
08481 
08482     A UnitDefinition must contain exactly one ListOfUnits, and this list
08483     must contain one or more Unit definitions; see the definitions of these
08484     other object classes for more information about them.  The following
08485     example illustrates a complete unit definition (when written in XML)
08486     when they all the pieces are combined together.  This defines 'mmls'
08487     to be millimoles per litre per second.
08488     @code
08489     <listOfUnitDefinitions>
08490         <unitDefinition id='mmls'>
08491             <listOfUnits>
08492                 <unit kind='mole'   scale='-3'/>
08493                 <unit kind='litre'  exponent='-1'/>
08494                 <unit kind='second' exponent='-1'/>
08495             </listOfUnits>
08496         </unitDefinition>
08497     </listOfUnitDefinitions>
08498     @endcode
08499 
08500 
08501     @section sbml-units-limits Further comments about SBML's unit definition system
08502 
08503     The vast majority of modeling situations requiring new %SBML unit
08504     definitions involve simple multiplicative combinations of base units and
08505     factors.  An example of this might be <em>moles per litre per
08506     second</em>.  What distinguishes these sorts of simpler unit definitions
08507     from more complex ones is that they may be expressed without the use of
08508     an additive offset from a zero point.  The use of offsets complicates
08509     all unit definition systems, yet in the domain of %SBML the real-life
08510     cases requiring offsets are few (and in fact, to the best of our
08511     knowledge, only involve temperature).  Consequently, the %SBML unit
08512     system has been consciously designed in a way that attempts to simplify
08513     implementation of unit support for the most common cases in systems
08514     biology.
08515 
08516     As of %SBML Level&nbsp;2 Version&nbsp;2, Unit no longer has the
08517     attribute called 'offset' introduced in SBML Level&nbsp;2
08518     Version&nbsp;1.  It turned out that the general case involving units
08519     with offsets was incorrectly defined, and few (if any) developers even
08520     attempted to support offset-based units in their software.  In the
08521     development of Level&nbsp;2 Version&nbsp;2, a consensus among %SBML
08522     developers emerged that a fully generalized unit scheme is @em so
08523     confusing and complicated that it actually @em impedes interoperability.
08524     SBML Level&nbsp;2 Version&nbsp;2, Version&nbsp;3 and Version&nbsp;4 acknowledge this
08525     reality by reducing and simplifying the unit system, specifically by
08526     removing the 'offset' attribute on Unit and @c Celsius as a pre-defined
08527     unit.
08528 
08529     The following guidelines suggest methods for handling units that do
08530     require the use of zero offsets for their definitions:
08531     <ul>
08532     <li> <em>Handling Celsius</em>.  A model in which certain quantities are
08533       temperatures measured in degrees Celsius can be converted
08534       straightforwardly to a model in which those temperatures are in
08535       kelvin.  A software tool could do this by performing a straightforward
08536       substitution using the following relationship: T<sub> kelvin</sub> =
08537       T<sub> Celsius</sub> + 273.15.  In every mathematical formula of the
08538       model where a quantity (call it @em x) in degrees Celsius appears,
08539       replace @em x with x<sub> k</sub>+ 273.15, where x<sub> k</sub> is now
08540       in kelvin.  An alternative approach would be to use a
08541       FunctionDefinition to define a function encapsulating this
08542       relationship above and then using that in the rest of the model as
08543       needed.  Since Celsius is a commonly-used unit, software tools could
08544       help users by providing users with the ability to express temperatures
08545       in Celsius in the tools' interfaces, and making substitutions
08546       automatically when writing out the SBML.
08547 
08548     <li> <em>Other units requiring offsets</em>.  One approach to handling
08549       other kinds of units is to use a FunctionDefinition to define a function
08550       encapsulating the necessary mathematical relationship, then
08551       substituting a call to this function wherever the original quantity
08552       appeared in the model.  For example, here is a possible definition for
08553       converting Fahrenheit to Celsius degrees:
08554       @code
08555     <functionDefinition id='Fahrenheit_to_kelvin'>
08556         <math xmlns='http://www.w3.org/1998/Math/MathML'>
08557             <lambda>
08558                 <bvar><ci> temp_in_fahrenheit </ci></bvar>
08559                 <apply>
08560                     <divide/>
08561                     <apply>
08562                         <plus/>
08563                         <ci> temp_in_fahrenheit </ci>
08564                         <cn> 459.67 </cn>
08565                     </apply>
08566                     <cn> 1.8 </cn>
08567                 </apply>
08568             </lambda>
08569         </math>
08570     </functionDefinition>
08571       @endcode
08572         
08573     <li> An alternative approach not requiring the use of function definitions
08574       is to use an AssignmentRule for each variable in Fahrenheit units.
08575       The AssignmentRule could compute the conversion from Fahrenheit to
08576       (say) kelvin, assign its value to a variable (in Kelvin units), and
08577       then that variable could be used elsewhere in the model.
08578 
08579     <li> Still another approach is to rewrite the mathematical formulas of a
08580       model to directly incorporate the conversion formula wherever the
08581       original quantity appeared.
08582     </ul>
08583 
08584     Please consult the SBML specifications for more information about this
08585     and other issues involving units.
08586      
08587     <!-- leave this next break as-is to work around some doxygen bug -->
08588 
08589     """
08590     __swig_setmethods__ = {}
08591     for _s in [SBase]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
08592     __setattr__ = lambda self, name, value: _swig_setattr(self, UnitDefinition, name, value)
08593     __swig_getmethods__ = {}
08594     for _s in [SBase]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
08595     __getattr__ = lambda self, name: _swig_getattr(self, UnitDefinition, name)
08596     __repr__ = _swig_repr
08597     __swig_destroy__ = _libsbml.delete_UnitDefinition
08598     __del__ = lambda self : None;
08599     def __init__(self, *args): 
08600         """
08601         __init__(self, unsigned int level, unsigned int version) -> UnitDefinition
08602         __init__(self, SBMLNamespaces sbmlns) -> UnitDefinition
08603         __init__(self, UnitDefinition orig) -> UnitDefinition
08604 
08605         Predicate returning @c true or @c false depending on whether
08606         all the required elements for this UnitDefinition object
08607         have been set.
08608 
08609         @note The required elements for a Constraint object are:
08610         listOfUnits (L2 only)
08611 
08612         @return a boolean value indicating whether all the required
08613         elements for this object have been defined.
08614         @deprecated libSBML internal
08615 
08616 
08617         """
08618         this = _libsbml.new_UnitDefinition(*args)
08619         try: self.this.append(this)
08620         except: self.this = this
08621     def clone(self):
08622         """
08623         clone(self) -> UnitDefinition
08624 
08625         Creates and returns a deep copy of this UnitDefinition.
08626 
08627         @return a (deep) copy of this UnitDefinition.
08628           
08629 
08630         """
08631         return _libsbml.UnitDefinition_clone(self)
08632 
08633     def getId(self):
08634         """
08635         getId(self) -> string
08636 
08637         Returns the value of the 'id' attribute of this UnitDefinition.
08638 
08639         @return the id of this UnitDefinition.
08640           
08641 
08642         """
08643         return _libsbml.UnitDefinition_getId(self)
08644 
08645     def getName(self):
08646         """
08647         getName(self) -> string
08648 
08649         Returns the value of the 'name' attribute of this UnitDefinition.
08650 
08651         @return the name of this UnitDefinition.
08652           
08653 
08654         """
08655         return _libsbml.UnitDefinition_getName(self)
08656 
08657     def isSetId(self):
08658         """
08659         isSetId(self) -> bool
08660 
08661         Predicate returning @c true or @c false depending on whether this
08662         UnitDefinition's 'id' attribute has been set.
08663 
08664         @htmlinclude libsbml-comment-set-methods.html
08665 
08666         @return @c true if the 'id' attribute of this UnitDefinition has been
08667         set, @c false otherwise.
08668           
08669 
08670         """
08671         return _libsbml.UnitDefinition_isSetId(self)
08672 
08673     def isSetName(self):
08674         """
08675         isSetName(self) -> bool
08676 
08677         Predicate returning @c true or @c false depending on whether this
08678         UnitDefinition's 'name' attribute has been set.
08679 
08680         @htmlinclude libsbml-comment-set-methods.html
08681 
08682         @return @c true if the 'name' attribute of this UnitDefinition has been
08683         set, @c false otherwise.
08684           
08685 
08686         """
08687         return _libsbml.UnitDefinition_isSetName(self)
08688 
08689     def setId(self, *args):
08690         """
08691         setId(self, string sid) -> int
08692 
08693         Sets the value of the 'id' attribute of this UnitDefinition.
08694 
08695         The string @p sid is copied.  Note that SBML has strict requirements
08696         for the syntax of identifiers.  The following is summary of the
08697         definition of the SBML identifier type @c SId (here expressed in an
08698         extended form of BNF notation):
08699         @code
08700           letter ::= 'a'..'z','A'..'Z'
08701           digit  ::= '0'..'9'
08702           idChar ::= letter | digit | '_'
08703           SId    ::= ( letter | '_' ) idChar*
08704         @endcode
08705         The equality of SBML identifiers is determined by an exact character
08706         sequence match; i.e., comparisons must be performed in a
08707         case-sensitive manner.  In addition, there are a few conditions for
08708         the uniqueness of identifiers in an SBML model.  Please consult the
08709         SBML specifications for the exact formulations.
08710 
08711         @htmlinclude libsbml-comment-set-methods.html
08712 
08713         @param sid the string to use as the identifier of this UnitDefinition
08714 
08715         @return integer value indicating success/failure of the
08716         function.  @if clike The value is drawn from the
08717         enumeration #OperationReturnValues_t. @endif The possible values
08718         returned by this function are:
08719         @li LIBSBML_OPERATION_SUCCESS
08720         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
08721           
08722 
08723         """
08724         return _libsbml.UnitDefinition_setId(self, *args)
08725 
08726     def setName(self, *args):
08727         """
08728         setName(self, string name) -> int
08729 
08730         Sets the value of the 'name' attribute of this UnitDefinition.
08731 
08732         The string in @p name is copied.
08733 
08734         @htmlinclude libsbml-comment-set-methods.html
08735 
08736         @param name the new name for the UnitDefinition
08737 
08738         @return integer value indicating success/failure of the
08739         function.  @if clike The value is drawn from the
08740         enumeration #OperationReturnValues_t. @endif The possible values
08741         returned by this function are:
08742         @li LIBSBML_OPERATION_SUCCESS
08743         @li LIBSBML_INVALID_ATTRIBUTE_VALUE
08744           
08745 
08746         """
08747         return _libsbml.UnitDefinition_setName(self, *args)
08748 
08749     def unsetName(self):
08750         """
08751         unsetName(self) -> int
08752 
08753         Unsets the value of the 'name' attribute of this UnitDefinition.
08754 
08755         @htmlinclude libsbml-comment-set-methods.html
08756 
08757         @return integer value indicating success/failure of the
08758         function.  @if clike The value is drawn from the
08759         enumeration #OperationReturnValues_t. @endif The possible values
08760         returned by this function are:
08761         @li LIBSBML_OPERATION_SUCCESS
08762         @li LIBSBML_OPERATION_FAILED
08763           
08764 
08765         """
08766         return _libsbml.UnitDefinition_unsetName(self)
08767 
08768     def isVariantOfArea(self):
08769         """
08770         isVariantOfArea(self) -> bool
08771 
08772         Convenience function for testing if a given unit definition is a
08773         variant of the predefined unit identifier @c 'area'.
08774 
08775         @return @c true if this UnitDefinition is a variant of the predefined
08776         unit @c area, meaning square metres with only abritrary variations
08777         in scale or multiplier values; @c false otherwise.
08778           
08779 
08780         """
08781         return _libsbml.UnitDefinition_isVariantOfArea(self)
08782 
08783     def isVariantOfLength(self):
08784         """
08785         isVariantOfLength(self) -> bool
08786 
08787         Convenience function for testing if a given unit definition is a
08788         variant of the predefined unit identifier @c 'length'.
08789 
08790         @return @c true if this UnitDefinition is a variant of the predefined
08791         unit @c length, meaning metres with only abritrary variations in scale
08792         or multiplier values; @c false otherwise.
08793           
08794 
08795         """
08796         return _libsbml.UnitDefinition_isVariantOfLength(self)
08797 
08798     def isVariantOfSubstance(self):
08799         """
08800         isVariantOfSubstance(self) -> bool
08801 
08802         Convenience function for testing if a given unit definition is a
08803         variant of the predefined unit identifier @c 'substance'.
08804 
08805         @return @c true if this UnitDefinition is a variant of the predefined
08806         unit @c substance, meaning moles or items (and grams or kilograms from
08807         SBML Level&nbsp;2 Version&nbsp;2 onwards) with only abritrary variations
08808         in scale or multiplier values; @c false otherwise.
08809           
08810 
08811         """
08812         return _libsbml.UnitDefinition_isVariantOfSubstance(self)
08813 
08814     def isVariantOfTime(self):
08815         """
08816         isVariantOfTime(self) -> bool
08817 
08818         Convenience function for testing if a given unit definition is a
08819         variant of the predefined unit identifier @c 'time'.
08820 
08821         @return @c true if this UnitDefinition is a variant of the predefined
08822         unit @c time, meaning seconds with only abritrary variations in scale or
08823         multiplier values; @c false otherwise.
08824           
08825 
08826         """
08827         return _libsbml.UnitDefinition_isVariantOfTime(self)
08828 
08829     def isVariantOfVolume(self):
08830         """
08831         isVariantOfVolume(self) -> bool
08832 
08833         Convenience function for testing if a given unit definition is a
08834         variant of the predefined unit identifier @c 'volume'.
08835 
08836         @return @c true if this UnitDefinition is a variant of the predefined
08837         unit @c volume, meaning litre or cubic metre with only abritrary
08838         variations in scale or multiplier values; @c false otherwise.
08839           
08840 
08841         """
08842         return _libsbml.UnitDefinition_isVariantOfVolume(self)
08843 
08844     def isVariantOfDimensionless(self):
08845         """
08846         isVariantOfDimensionless(self) -> bool
08847 
08848         Convenience function for testing if a given unit definition is a
08849         variant of the unit @c 'dimensionless'.
08850 
08851         @return @c true if this UnitDefinition is a variant of @c
08852         dimensionless, meaning dimensionless with only abritrary variations in
08853         scale or multiplier values; @c false otherwise.
08854           
08855 
08856         """
08857         return _libsbml.UnitDefinition_isVariantOfDimensionless(self)
08858 
08859     def isVariantOfMass(self):
08860         """
08861         isVariantOfMass(self) -> bool
08862 
08863         Convenience function for testing if a given unit definition is a
08864         variant of the predefined unit identifier @c 'mass'.
08865 
08866         @return @c true if this UnitDefinition is a variant of mass units,
08867         meaning gram or kilogram with only abritrary variations in scale or
08868         multiplier values; @c false otherwise.
08869           
08870 
08871         """
08872         return _libsbml.UnitDefinition_isVariantOfMass(self)
08873 
08874     def isVariantOfSubstancePerTime(self):
08875         """
08876         isVariantOfSubstancePerTime(self) -> bool
08877 
08878         Convenience function for testing if a given unit definition is a
08879         variant of the predefined unit @c 'substance' divided by the predefined
08880         unit @c 'time'.
08881 
08882         @return @c true if this UnitDefinition is a variant of the predefined
08883         unit @c substance per predefined unit @c time, meaning it contains two
08884         units one of which is a variant of substance and the other is a
08885         variant of time which an exponent of -1; @c false otherwise.
08886           
08887 
08888         """
08889         return _libsbml.UnitDefinition_isVariantOfSubstancePerTime(self)
08890 
08891     def addUnit(self, *args):
08892         """
08893         addUnit(self, Unit u) -> int
08894 
08895         Adds a copy of the given Unit to this UnitDefinition.
08896 
08897         @param u the Unit instance to add to this UnitDefinition.
08898 
08899         @return integer value indicating success/failure of the
08900         function.  @if clike The value is drawn from the
08901         enumeration #OperationReturnValues_t. @endif The possible values
08902         returned by this function are:
08903         @li LIBSBML_OPERATION_SUCCESS
08904         @li LIBSBML_LEVEL_MISMATCH
08905         @li LIBSBML_VERSION_MISMATCH
08906         @li LIBSBML_DUPLICATE_OBJECT_ID
08907         @li LIBSBML_OPERATION_FAILED
08908 
08909         @note This method should be used with some caution.  The fact that
08910         this method @em copies the object passed to it means that the caller
08911         will be left holding a physically different object instance than the
08912         one contained in this UnitDefinition.  Changes made to the original
08913         object instance (such as resetting attribute values) will <em>not
08914         affect the instance in the UnitDefinition</em>.  In addition, the
08915         caller should make sure to free the original object if it is no longer
08916         being used, or else a memory leak will result.  Please see
08917         UnitDefinition::createUnit() for a method that does not lead to these
08918         issues.
08919 
08920         @see createUnit()
08921           
08922 
08923         """
08924         return _libsbml.UnitDefinition_addUnit(self, *args)
08925 
08926     def createUnit(self):
08927         """
08928         createUnit(self) -> Unit
08929 
08930         Creates a new and empty Unit, adds it to this UnitDefinition's list of
08931         units, and returns it.
08932 
08933         @return a newly constructed (and empty) Unit instance.
08934 
08935         @note It is worth emphasizing that the attribute 'kind' value of a
08936         Unit is a required attribute for a valid Unit definition.  The
08937         createUnit() method does not assign a valid kind to the constructed
08938         unit (instead, it sets the 'kind' to @c UNIT_KIND_INVALID).  Callers
08939         are cautioned to set the newly-constructed Unit's kind using
08940         Unit::setKind() soon after calling this method.
08941 
08942         @see addUnit(const Unit* u)
08943           
08944 
08945         """
08946         return _libsbml.UnitDefinition_createUnit(self)
08947 
08948     def getListOfUnits(self, *args):
08949         """
08950         getListOfUnits(self) -> ListOfUnits
08951         getListOfUnits(self) -> ListOfUnits
08952 
08953         Returns the list of Units for this UnitDefinition instance.
08954         @return the ListOfUnits value for this UnitDefinition.
08955           
08956 
08957         """
08958         return _libsbml.UnitDefinition_getListOfUnits(self, *args)
08959 
08960     def getUnit(self, *args):
08961         """
08962         getUnit(self, unsigned int n) -> Unit
08963         getUnit(self, unsigned int n) -> Unit
08964 
08965         Returns a specific Unit instance belonging to this UnitDefinition.
08966 
08967         @param n an integer, the index of the Unit to be returned.
08968 
08969         @return the nth Unit of this UnitDefinition
08970           
08971 
08972         """
08973         return _libsbml.UnitDefinition_getUnit(self, *args)
08974 
08975     def getNumUnits(self):
08976         """
08977         getNumUnits(self) -> unsigned int
08978 
08979         Returns the number of Unit objects contained within this
08980         UnitDefinition.
08981 
08982         @return an integer representing the number of Units in this
08983         UnitDefinition.
08984           
08985 
08986         """
08987         return _libsbml.UnitDefinition_getNumUnits(self)
08988 
08989     def removeUnit(self, *args):
08990         """
08991         removeUnit(self, unsigned int n) -> Unit
08992 
08993         Removes the nth Unit object from this UnitDefinition object and
08994         returns a pointer to it.
08995 
08996         The caller owns the returned object and is responsible for deleting it.
08997 
08998         @param n the index of the Unit object to remove
08999 
09000         @return the Unit object removed.  As mentioned above, 
09001         the caller owns the returned item. NULL is returned if the given index 
09002         is out of range.
09003 
09004           
09005 
09006         """
09007         return _libsbml.UnitDefinition_removeUnit(self, *args)
09008 
09009     def getTypeCode(self):
09010         """
09011         getTypeCode(self) -> SBMLTypeCode_t
09012 
09013         Returns the libSBML type code for this object instance.
09014 
09015         @if clike LibSBML attaches an identifying code to every
09016         kind of SBML object.  These are known as <em>SBML type codes</em>.
09017         The set of possible type codes is defined in the enumeration
09018         #SBMLTypeCode_t.  The names of the type codes all begin with the
09019         characters @c SBML_. @endif@if java LibSBML attaches an
09020         identifying code to every kind of SBML object.  These are known as
09021         <em>SBML type codes</em>.  In other languages, the set of type codes
09022         is stored in an enumeration; in the Java language interface for
09023         libSBML, the type codes are defined as static integer constants in
09024         interface class {@link libsbmlConstants}.  The names of the type codes
09025         all begin with the characters @c SBML_. @endif
09026 
09027         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
09028 
09029         @see getElementName()
09030           
09031 
09032         """
09033         return _libsbml.UnitDefinition_getTypeCode(self)
09034 
09035     def getElementName(self):
09036         """
09037         getElementName(self) -> string
09038 
09039         Returns the XML element name of this object, which for UnitDefinition,
09040         is always @c 'unitDefinition'.
09041 
09042         @return the name of this element, i.e., @c 'unitDefinition'.
09043           
09044 
09045         """
09046         return _libsbml.UnitDefinition_getElementName(self)
09047 
09048     def simplify(*args):
09049         """
09050         simplify(UnitDefinition ud)
09051 
09052         Simplifies the UnitDefinition so that any Unit objects occurring within
09053         the ListOfUnits occurs only once.
09054 
09055         For example, the following definition,
09056         @code
09057         <unitDefinition>
09058          <listOfUnits>
09059            <unit kind='metre' exponent='1'/>
09060            <unit kind='metre' exponent='2'/>
09061          </listOfUnits>
09062         <unitDefinition>
09063         @endcode
09064         will be simplified to 
09065         @code
09066         <unitDefinition>
09067           <listOfUnits>
09068             <unit kind='metre' exponent='3'/>
09069           </listOfUnits>
09070         <unitDefinition>
09071         @endcode
09072 
09073         @param ud the UnitDefinition object to be simplified.
09074          
09075 
09076         """
09077         return _libsbml.UnitDefinition_simplify(*args)
09078 
09079     if _newclass:simplify = staticmethod(simplify)
09080     __swig_getmethods__["simplify"] = lambda x: simplify
09081     def reorder(*args):
09082         """
09083         reorder(UnitDefinition ud)
09084 
09085         Orders alphabetically the Unit objects within the ListOfUnits of a
09086         UnitDefinition.
09087 
09088         @param ud the UnitDefinition object whose units are to be reordered.
09089           
09090 
09091         """
09092         return _libsbml.UnitDefinition_reorder(*args)
09093 
09094     if _newclass:reorder = staticmethod(reorder)
09095     __swig_getmethods__["reorder"] = lambda x: reorder
09096     def convertToSI(*args):
09097         """
09098         convertToSI(UnitDefinition arg0) -> UnitDefinition
09099 
09100         Convert a given UnitDefinition into a new UnitDefinition object
09101         that uses SI units.
09102 
09103         @param ud the UnitDefinition object to convert to SI
09104 
09105         @return a new UnitDefinition object representing the results of the
09106         conversion.
09107           
09108 
09109         """
09110         return _libsbml.UnitDefinition_convertToSI(*args)
09111 
09112     if _newclass:convertToSI = staticmethod(convertToSI)
09113     __swig_getmethods__["convertToSI"] = lambda x: convertToSI
09114     def areIdentical(*args):
09115         """
09116         areIdentical(UnitDefinition ud1, UnitDefinition ud2) -> bool
09117 
09118         Predicate returning @c true or @c false depending on whether two
09119         UnitDefinition objects are identical.
09120 
09121         For the purposes of performing this comparison, two UnitDefinition
09122         objects are considered identical when they contain identical lists of
09123         Unit objects.  Pairs of Unit objects in the lists are in turn
09124         considered identical if they satisfy the predicate
09125         Unit::areIdentical().  The predicate compares every attribute of the
09126         Unit objects.
09127 
09128         @param ud1 the first UnitDefinition object to compare
09129         @param ud2 the second UnitDefinition object to compare
09130 
09131         @return @c true if all the Unit objects in ud1 are identical to the
09132         Unit objects of ud2, @c false otherwise.
09133 
09134         @see areEquivalent(const UnitDefinition * ud1, const %UnitDefinition * ud2)
09135         @see Unit::areIdentical(Unit * unit1, %Unit * unit2)
09136           
09137 
09138         """
09139         return _libsbml.UnitDefinition_areIdentical(*args)
09140 
09141     if _newclass:areIdentical = staticmethod(areIdentical)
09142     __swig_getmethods__["areIdentical"] = lambda x: areIdentical
09143     def areEquivalent(*args):
09144         """
09145         areEquivalent(UnitDefinition ud1, UnitDefinition ud2) -> bool
09146 
09147         Predicate returning @c true or @c false depending on whether two
09148         UnitDefinition objects are equivalent.
09149 
09150         For the purposes of performing this comparison, two UnitDefinition
09151         objects are considered equivalent when they contain @em equivalent
09152         list of Unit objects.  Unit objects are in turn considered equivalent
09153         if they satisfy the predicate Unit::areEquivalent().  The predicate
09154         tests a subset of the objects's attributes.
09155 
09156         @param ud1 the first UnitDefinition object to compare
09157 
09158         @param ud2 the second UnitDefinition object to compare
09159 
09160         @return @c true if all the Unit objects in ud1 are equivalent
09161         to the Unit objects in ud2, @c false otherwise.
09162 
09163         @see areIdentical(const UnitDefinition * ud1, const %UnitDefinition * ud2)
09164         @see Unit::areEquivalent(Unit * unit1, %Unit * unit2)
09165           
09166 
09167         """
09168         return _libsbml.UnitDefinition_areEquivalent(*args)
09169 
09170     if _newclass:areEquivalent = staticmethod(areEquivalent)
09171     __swig_getmethods__["areEquivalent"] = lambda x: areEquivalent
09172     def combine(*args):
09173         """
09174         combine(UnitDefinition ud1, UnitDefinition ud2) -> UnitDefinition
09175 
09176         Combines two UnitDefinition objects into a single UnitDefinition
09177         object which expresses the product of the units of the two
09178         UnitDefinition's.
09179 
09180         @param ud1 the first UnitDefinition object 
09181         @param ud2 the second UnitDefinition object
09182 
09183         @return a UnitDefinition which represents the product of the 
09184         units of the two argument UnitDefinitions.
09185           
09186 
09187         """
09188         return _libsbml.UnitDefinition_combine(*args)
09189 
09190     if _newclass:combine = staticmethod(combine)
09191     __swig_getmethods__["combine"] = lambda x: combine
09192     def printUnits(*args):
09193         """
09194         printUnits(UnitDefinition ud, bool compact = False) -> string
09195         printUnits(UnitDefinition ud) -> string
09196 
09197         Returns a string that expresses the unit definition
09198         represented by this UnitDefinition object.
09199 
09200         For example printUnits applied to
09201         @code
09202         <unitDefinition>
09203          <listOfUnits>
09204            <unit kind='metre' exponent='1'/>
09205            <unit kind='second' exponent='-2'/>
09206          </listOfUnits>
09207         <unitDefinition>
09208         @endcode
09209         will return the string <code>'metre (exponent = 1, multiplier = 1, scale = 0) 
09210         second (exponent = -2, multiplier = 1, scale = 0)'</code> or, if 
09211         compact = true, the string <code>'(1 metre)^1 (1 second)^-2'</code>
09212         This may be useful for printing unit information to
09213         human users, or in debugging, or other situations.
09214 
09215         @param ud the UnitDefinition object
09216         @param compact boolean indicating whether the compact form
09217         should be used (defaults to false)
09218 
09219         @return a string expressing the unit definition
09220           
09221 
09222         """
09223         return _libsbml.UnitDefinition_printUnits(*args)
09224 
09225     if _newclass:printUnits = staticmethod(printUnits)
09226     __swig_getmethods__["printUnits"] = lambda x: printUnits
09227     def hasRequiredAttributes(self):
09228         """
09229         hasRequiredAttributes(self) -> bool
09230 
09231         Predicate returning @c true or @c false depending on whether
09232         all the required attributes for this UnitDefinition object
09233         have been set.
09234 
09235         @note The required attributes for a UnitDefinition object are:
09236         id (name in L1)
09237 
09238         @return a boolean value indicating whether all the required
09239         attributes for this object have been defined.
09240           
09241 
09242         """
09243         return _libsbml.UnitDefinition_hasRequiredAttributes(self)
09244 
09245     def hasRequiredElements(self):
09246         """
09247         hasRequiredElements(self) -> bool
09248 
09249         Predicate returning @c true or @c false depending on whether
09250         all the required elements for this UnitDefinition object
09251         have been set.
09252 
09253         @note The required elements for a Constraint object are:
09254         listOfUnits (L2 only)
09255 
09256         @return a boolean value indicating whether all the required
09257         elements for this object have been defined.
09258           
09259 
09260         """
09261         return _libsbml.UnitDefinition_hasRequiredElements(self)
09262 
09263 UnitDefinition_swigregister = _libsbml.UnitDefinition_swigregister
09264 UnitDefinition_swigregister(UnitDefinition)
09265 
09266 def UnitDefinition_simplify(*args):
09267   """
09268     UnitDefinition_simplify(UnitDefinition ud)
09269 
09270     Simplifies the UnitDefinition so that any Unit objects occurring within
09271     the ListOfUnits occurs only once.
09272 
09273     For example, the following definition,
09274     @code
09275     <unitDefinition>
09276      <listOfUnits>
09277        <unit kind='metre' exponent='1'/>
09278        <unit kind='metre' exponent='2'/>
09279      </listOfUnits>
09280     <unitDefinition>
09281     @endcode
09282     will be simplified to 
09283     @code
09284     <unitDefinition>
09285       <listOfUnits>
09286         <unit kind='metre' exponent='3'/>
09287       </listOfUnits>
09288     <unitDefinition>
09289     @endcode
09290 
09291     @param ud the UnitDefinition object to be simplified.
09292      
09293 
09294     """
09295   return _libsbml.UnitDefinition_simplify(*args)
09296 
09297 def UnitDefinition_reorder(*args):
09298   """
09299     UnitDefinition_reorder(UnitDefinition ud)
09300 
09301     Orders alphabetically the Unit objects within the ListOfUnits of a
09302     UnitDefinition.
09303 
09304     @param ud the UnitDefinition object whose units are to be reordered.
09305       
09306 
09307     """
09308   return _libsbml.UnitDefinition_reorder(*args)
09309 
09310 def UnitDefinition_convertToSI(*args):
09311   """
09312     UnitDefinition_convertToSI(UnitDefinition arg0) -> UnitDefinition
09313 
09314     Convert a given UnitDefinition into a new UnitDefinition object
09315     that uses SI units.
09316 
09317     @param ud the UnitDefinition object to convert to SI
09318 
09319     @return a new UnitDefinition object representing the results of the
09320     conversion.
09321       
09322 
09323     """
09324   return _libsbml.UnitDefinition_convertToSI(*args)
09325 
09326 def UnitDefinition_areIdentical(*args):
09327   """
09328     UnitDefinition_areIdentical(UnitDefinition ud1, UnitDefinition ud2) -> bool
09329 
09330     Predicate returning @c true or @c false depending on whether two
09331     UnitDefinition objects are identical.
09332 
09333     For the purposes of performing this comparison, two UnitDefinition
09334     objects are considered identical when they contain identical lists of
09335     Unit objects.  Pairs of Unit objects in the lists are in turn
09336     considered identical if they satisfy the predicate
09337     Unit::areIdentical().  The predicate compares every attribute of the
09338     Unit objects.
09339 
09340     @param ud1 the first UnitDefinition object to compare
09341     @param ud2 the second UnitDefinition object to compare
09342 
09343     @return @c true if all the Unit objects in ud1 are identical to the
09344     Unit objects of ud2, @c false otherwise.
09345 
09346     @see areEquivalent(const UnitDefinition * ud1, const %UnitDefinition * ud2)
09347     @see Unit::areIdentical(Unit * unit1, %Unit * unit2)
09348       
09349 
09350     """
09351   return _libsbml.UnitDefinition_areIdentical(*args)
09352 
09353 def UnitDefinition_areEquivalent(*args):
09354   """
09355     UnitDefinition_areEquivalent(UnitDefinition ud1, UnitDefinition ud2) -> bool
09356 
09357     Predicate returning @c true or @c false depending on whether two
09358     UnitDefinition objects are equivalent.
09359 
09360     For the purposes of performing this comparison, two UnitDefinition
09361     objects are considered equivalent when they contain @em equivalent
09362     list of Unit objects.  Unit objects are in turn considered equivalent
09363     if they satisfy the predicate Unit::areEquivalent().  The predicate
09364     tests a subset of the objects's attributes.
09365 
09366     @param ud1 the first UnitDefinition object to compare
09367 
09368     @param ud2 the second UnitDefinition object to compare
09369 
09370     @return @c true if all the Unit objects in ud1 are equivalent
09371     to the Unit objects in ud2, @c false otherwise.
09372 
09373     @see areIdentical(const UnitDefinition * ud1, const %UnitDefinition * ud2)
09374     @see Unit::areEquivalent(Unit * unit1, %Unit * unit2)
09375       
09376 
09377     """
09378   return _libsbml.UnitDefinition_areEquivalent(*args)
09379 
09380 def UnitDefinition_combine(*args):
09381   """
09382     UnitDefinition_combine(UnitDefinition ud1, UnitDefinition ud2) -> UnitDefinition
09383 
09384     Combines two UnitDefinition objects into a single UnitDefinition
09385     object which expresses the product of the units of the two
09386     UnitDefinition's.
09387 
09388     @param ud1 the first UnitDefinition object 
09389     @param ud2 the second UnitDefinition object
09390 
09391     @return a UnitDefinition which represents the product of the 
09392     units of the two argument UnitDefinitions.
09393       
09394 
09395     """
09396   return _libsbml.UnitDefinition_combine(*args)
09397 
09398 def UnitDefinition_printUnits(*args):
09399   """
09400     printUnits(UnitDefinition ud, bool compact = False) -> string
09401     UnitDefinition_printUnits(UnitDefinition ud) -> string
09402 
09403     Returns a string that expresses the unit definition
09404     represented by this UnitDefinition object.
09405 
09406     For example printUnits applied to
09407     @code
09408     <unitDefinition>
09409      <listOfUnits>
09410        <unit kind='metre' exponent='1'/>
09411        <unit kind='second' exponent='-2'/>
09412      </listOfUnits>
09413     <unitDefinition>
09414     @endcode
09415     will return the string <code>'metre (exponent = 1, multiplier = 1, scale = 0) 
09416     second (exponent = -2, multiplier = 1, scale = 0)'</code> or, if 
09417     compact = true, the string <code>'(1 metre)^1 (1 second)^-2'</code>
09418     This may be useful for printing unit information to
09419     human users, or in debugging, or other situations.
09420 
09421     @param ud the UnitDefinition object
09422     @param compact boolean indicating whether the compact form
09423     should be used (defaults to false)
09424 
09425     @return a string expressing the unit definition
09426       
09427 
09428     """
09429   return _libsbml.UnitDefinition_printUnits(*args)
09430 
09431 class ListOfUnitDefinitions(ListOf):
09432     """
09433     LibSBML implementation of SBML's %ListOfUnitDefinitions construct.
09434 
09435     The various ListOf___ classes in %SBML are merely containers used for
09436     organizing the main components of an %SBML model.  All are derived from
09437     the abstract class SBase, and inherit the various attributes and
09438     subelements of SBase, such as 'metaid' as and 'annotation'.  The
09439     ListOf___ classes do not add any attributes of their own.
09440 
09441     The relationship between the lists and the rest of an %SBML model is
09442     illustrated by the following (for %SBML Level&nbsp;2 Version&nbsp;4):
09443 
09444     @image html listof-illustration.jpg 'ListOf___ elements in an SBML Model'
09445     @image latex listof-illustration.jpg 'ListOf___ elements in an SBML Model'
09446 
09447     Readers may wonder about the motivations for using the ListOf___
09448     containers.  A simpler approach in XML might be to place the components
09449     all directly at the top level of the model definition.  We chose instead
09450     to group them within XML elements named after ListOf<em>Classname</em>,
09451     in part because we believe this helps organize the components and makes
09452     visual reading of models in XML easier.  More importantly, the fact that
09453     the container classes are derived from SBase means that software tools
09454     can add information about the lists themselves into each list
09455     container's 'annotation'.
09456 
09457     @see ListOfFunctionDefinitions
09458     @see ListOfUnitDefinitions
09459     @see ListOfCompartmentTypes
09460     @see ListOfSpeciesTypes
09461     @see ListOfCompartments
09462     @see ListOfSpecies
09463     @see ListOfParameters
09464     @see ListOfInitialAssignments
09465     @see ListOfRules
09466     @see ListOfConstraints
09467     @see ListOfReactions
09468     @see ListOfEvents
09469 
09470     """
09471     __swig_setmethods__ = {}
09472     for _s in [ListOf]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
09473     __setattr__ = lambda self, name, value: _swig_setattr(self, ListOfUnitDefinitions, name, value)
09474     __swig_getmethods__ = {}
09475     for _s in [ListOf]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
09476     __getattr__ = lambda self, name: _swig_getattr(self, ListOfUnitDefinitions, name)
09477     __repr__ = _swig_repr
09478     def clone(self):
09479         """
09480         clone(self) -> ListOfUnitDefinitions
09481 
09482         Creates and returns a deep copy of this ListOfUnitDefinitions instance.
09483 
09484         @return a (deep) copy of this ListOfUnitDefinitions.
09485           
09486 
09487         """
09488         return _libsbml.ListOfUnitDefinitions_clone(self)
09489 
09490     def getTypeCode(self):
09491         """
09492         getTypeCode(self) -> SBMLTypeCode_t
09493 
09494         Returns the libSBML type code for this %SBML object.
09495 
09496         @if clike LibSBML attaches an identifying code to every
09497         kind of SBML object.  These are known as <em>SBML type codes</em>.
09498         The set of possible type codes is defined in the enumeration
09499         #SBMLTypeCode_t.  The names of the type codes all begin with the
09500         characters @c SBML_. @endif@if java LibSBML attaches an
09501         identifying code to every kind of SBML object.  These are known as
09502         <em>SBML type codes</em>.  In other languages, the set of type codes
09503         is stored in an enumeration; in the Java language interface for
09504         libSBML, the type codes are defined as static integer constants in
09505         interface class {@link libsbmlConstants}.  The names of the type codes
09506         all begin with the characters @c SBML_. @endif
09507 
09508         @return the SBML type code for this object, or @c SBML_UNKNOWN (default).
09509 
09510         @see getElementName()
09511           
09512 
09513         """
09514         return _libsbml.ListOfUnitDefinitions_getTypeCode(self)
09515 
09516     def getItemTypeCode(self):
09517         """
09518         getItemTypeCode(self) -> SBMLTypeCode_t
09519 
09520         Returns the libSBML type code for the objects contained in this ListOf
09521         (i.e., UnitDefinition objects, if the list is non-empty).
09522 
09523         @if clike LibSBML attaches an identifying code to every
09524         kind of SBML object.  These are known as <em>SBML type codes</em>.
09525         The set of possible type codes is defined in the enumeration
09526         #SBMLTypeCode_t.  The names of the type codes all begin with the
09527         characters @c SBML_. @endif@if java LibSBML attaches an
09528         identifying code to every kind of SBML object.  These are known as
09529         <em>SBML type codes</em>.  In other languages, the set of type codes
09530         is stored in an enumeration; in the Java language interface for
09531         libSBML, the type codes are defined as static integer constants in
09532         interface class {@link libsbmlConstants}.  The names of the type codes
09533         all begin with the characters @c SBML_. @endif
09534 
09535         @return the SBML type code for the objects contained in this ListOf
09536         instance, or @c SBML_UNKNOWN (default).
09537 
09538         @see getElementName()
09539           
09540 
09541         """
09542         return _libsbml.ListOfUnitDefinitions_getItemTypeCode(self)
09543 
09544     def getElementName(self):
09545         """
09546         getElementName(self) -> string
09547 
09548         Returns the XML element name of this object.
09549 
09550         For ListOfUnitDefinitions, the XML element name is @c
09551         'listOfUnitDefinitions'.
09552 
09553         @return the name of this element, i.e., @c 'listOfUnitDefinitions'.
09554           
09555 
09556         """
09557         return _libsbml.ListOfUnitDefinitions_getElementName(self)
09558 
09559     def get(self, *args):
09560         """
09561         get(self, unsigned int n) -> UnitDefinition
09562         get(self, unsigned int n) -> UnitDefinition
09563         get(self, string sid) -> UnitDefinition
09564         get(self, string sid) -> UnitDefinition
09565 
09566         Get a UnitDefinition from the ListOfUnitDefinitions
09567         based on its identifier.
09568 
09569         @param sid a string representing the identifier 
09570         of the UnitDefinition to get.
09571 
09572         @return UnitDefinition in this ListOfUnitDefinitions
09573         with the given id or NULL if no such
09574         UnitDefinition exists.
09575 
09576         @see get(unsigned int n)
09577         @see size()
09578           
09579 
09580         """
09581         return _libsbml.ListOfUnitDefinitions_get(self, *args)
09582 
09583     def remove(self, *args):
09584         """
09585         remove(self, unsigned int n) -> UnitDefinition
09586         remove(self, string sid) -> UnitDefinition
09587 
09588         Removes item in this ListOfUnitDefinitions items with the given identifier.
09589 
09590         The caller owns the returned item and is responsible for deleting it.
09591         If none of the items in this list have the identifier @p sid, then @c
09592         NULL is returned.
09593 
09594         @param sid the identifier of the item to remove
09595 
09596         @return the item removed.  As mentioned above, the caller owns the
09597         returned item.
09598           
09599 
09600         """
09601         return _libsbml.ListOfUnitDefinitions_remove(self, *args)
09602 
09603     def __init__(self): 
09604         """__init__(self) -> ListOfUnitDefinitions"""
09605         this = _libsbml.new_ListOfUnitDefinitions()
09606         try: self.this.append(this)
09607         except: self.this = this
09608     __swig_destroy__ = _libsbml.delete_ListOfUnitDefinitions
09609     __del__ = lambda self : None;
09610 ListOfUnitDefinitions_swigregister = _libsbml.ListOfUnitDefinitions_swigregister
09611 ListOfUnitDefinitions_swigregister(ListOfUnitDefinitions)
09612 
09613 class CompartmentType(SBase):
09614     """
09615     LibSBML implementation of %SBML's %CompartmentType construct.
09616 
09617     A <em>compartment type</em> in %SBML is a grouping construct used to
09618     establish a relationship between multiple Compartment objects.
09619     In %SBML Level 2 Versions 2, 3 and 4, a compartment type only has an
09620     identity, and this identity can only be used to indicate that particular
09621     compartments belong to this type.  This may be useful for conveying a
09622     modeling intention, such as when a model contains many similar
09623     compartments, either by their biological function or the reactions they
09624     carry.  Without a compartment type construct, it would be impossible in
09625     the language of %SBML to indicate that all of the compartments share an
09626     underlying conceptual relationship because each %SBML compartment must be
09627     given a unique and separate identity.  Compartment types have no
09628     mathematical meaning in %SBML Level 2&mdash;they have no effect on a
09629     model's mathematical interpretation.  Simulators and other numerical
09630     analysis software may ignore CompartmentType definitions and references
09631     to them in a model.
09632 
09633     There is no mechanism in %SBML for representing hierarchies of
09634     compartment types.  One CompartmentType instance cannot be the subtype
09635     of another CompartmentType instance; %SBML provides no means of defining
09636     such relationships.
09637 
09638     As with other major structures in %SBML, CompartmentType has a mandatory
09639     attribute, 'id', used to give the compartment type an identifier.  The
09640     identifier must be a text %string conforming to the identifer syntax
09641     permitted in %SBML.  CompartmentType also has an optional 'name'
09642     attribute, of type @c string.  The 'id' and 'name' must be used
09643     according to the guidelines described in the %SBML specification (e.g.,
09644     Section 3.3 in the Level 2 Version 4 specification).
09645 
09646     CompartmentType was introduced in SBML Level 2 Version 2.  It is not
09647     available in earlier versions of Level 2 nor in any version of Level 1.
09648 
09649     @see Compartment