1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 4.0.2
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
6
7from sys import version_info as _swig_python_version_info
8if _swig_python_version_info < (2, 7, 0):
9    raise RuntimeError("Python 2.7 or later required")
10
11# Import the low-level C/C++ module
12if __package__ or "." in __name__:
13    from . import _libsbml
14else:
15    import _libsbml
16
17try:
18    import builtins as __builtin__
19except ImportError:
20    import __builtin__
21
22def _swig_repr(self):
23    try:
24        strthis = "proxy of " + self.this.__repr__()
25    except __builtin__.Exception:
26        strthis = ""
27    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
28
29
30def _swig_setattr_nondynamic_instance_variable(set):
31    def set_instance_attr(self, name, value):
32        if name == "thisown":
33            self.this.own(value)
34        elif name == "this":
35            set(self, name, value)
36        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
37            set(self, name, value)
38        else:
39            raise AttributeError("You cannot add instance attributes to %s" % self)
40    return set_instance_attr
41
42
43def _swig_setattr_nondynamic_class_variable(set):
44    def set_class_attr(cls, name, value):
45        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
46            set(cls, name, value)
47        else:
48            raise AttributeError("You cannot add class attributes to %s" % cls)
49    return set_class_attr
50
51
52def _swig_add_metaclass(metaclass):
53    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
54    def wrapper(cls):
55        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
56    return wrapper
57
58
59class _SwigNonDynamicMeta(type):
60    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
61    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
62
63
64import weakref
65
66class ModelCreatorList(object):
67    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
68    __repr__ = _swig_repr
69
70    def __init__(self):
71        _libsbml.ModelCreatorList_swiginit(self, _libsbml.new_ModelCreatorList())
72    __swig_destroy__ = _libsbml.delete_ModelCreatorList
73
74    def add(self, item):
75        return _libsbml.ModelCreatorList_add(self, item)
76
77    def get(self, n):
78        return _libsbml.ModelCreatorList_get(self, n)
79
80    def prepend(self, item):
81        return _libsbml.ModelCreatorList_prepend(self, item)
82
83    def remove(self, n):
84        return _libsbml.ModelCreatorList_remove(self, n)
85
86    def getSize(self):
87        return _libsbml.ModelCreatorList_getSize(self)
88
89# Register ModelCreatorList in _libsbml:
90_libsbml.ModelCreatorList_swigregister(ModelCreatorList)
91
92class DateList(object):
93    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
94    __repr__ = _swig_repr
95
96    def __init__(self):
97        _libsbml.DateList_swiginit(self, _libsbml.new_DateList())
98    __swig_destroy__ = _libsbml.delete_DateList
99
100    def add(self, item):
101        return _libsbml.DateList_add(self, item)
102
103    def get(self, n):
104        return _libsbml.DateList_get(self, n)
105
106    def prepend(self, item):
107        return _libsbml.DateList_prepend(self, item)
108
109    def remove(self, n):
110        return _libsbml.DateList_remove(self, n)
111
112    def getSize(self):
113        return _libsbml.DateList_getSize(self)
114
115# Register DateList in _libsbml:
116_libsbml.DateList_swigregister(DateList)
117
118class CVTermList(object):
119    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
120    __repr__ = _swig_repr
121
122    def __init__(self):
123        _libsbml.CVTermList_swiginit(self, _libsbml.new_CVTermList())
124    __swig_destroy__ = _libsbml.delete_CVTermList
125
126    def add(self, item):
127        return _libsbml.CVTermList_add(self, item)
128
129    def get(self, n):
130        return _libsbml.CVTermList_get(self, n)
131
132    def prepend(self, item):
133        return _libsbml.CVTermList_prepend(self, item)
134
135    def remove(self, n):
136        return _libsbml.CVTermList_remove(self, n)
137
138    def getSize(self):
139        return _libsbml.CVTermList_getSize(self)
140
141# Register CVTermList in _libsbml:
142_libsbml.CVTermList_swigregister(CVTermList)
143
144class ASTNodeList(object):
145    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
146    __repr__ = _swig_repr
147
148    def __init__(self):
149        _libsbml.ASTNodeList_swiginit(self, _libsbml.new_ASTNodeList())
150    __swig_destroy__ = _libsbml.delete_ASTNodeList
151
152    def add(self, item):
153        return _libsbml.ASTNodeList_add(self, item)
154
155    def get(self, n):
156        return _libsbml.ASTNodeList_get(self, n)
157
158    def prepend(self, item):
159        return _libsbml.ASTNodeList_prepend(self, item)
160
161    def remove(self, n):
162        return _libsbml.ASTNodeList_remove(self, n)
163
164    def getSize(self):
165        return _libsbml.ASTNodeList_getSize(self)
166
167# Register ASTNodeList in _libsbml:
168_libsbml.ASTNodeList_swigregister(ASTNodeList)
169
170class SBMLNamespacesList(object):
171    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
172    __repr__ = _swig_repr
173
174    def __init__(self):
175        _libsbml.SBMLNamespacesList_swiginit(self, _libsbml.new_SBMLNamespacesList())
176    __swig_destroy__ = _libsbml.delete_SBMLNamespacesList
177
178    def add(self, item):
179        return _libsbml.SBMLNamespacesList_add(self, item)
180
181    def get(self, n):
182        return _libsbml.SBMLNamespacesList_get(self, n)
183
184    def prepend(self, item):
185        return _libsbml.SBMLNamespacesList_prepend(self, item)
186
187    def remove(self, n):
188        return _libsbml.SBMLNamespacesList_remove(self, n)
189
190    def getSize(self):
191        return _libsbml.SBMLNamespacesList_getSize(self)
192
193# Register SBMLNamespacesList in _libsbml:
194_libsbml.SBMLNamespacesList_swigregister(SBMLNamespacesList)
195
196class SBaseList(object):
197    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
198    __repr__ = _swig_repr
199
200    def __init__(self):
201        _libsbml.SBaseList_swiginit(self, _libsbml.new_SBaseList())
202    __swig_destroy__ = _libsbml.delete_SBaseList
203
204    def add(self, item):
205        return _libsbml.SBaseList_add(self, item)
206
207    def get(self, n):
208        return _libsbml.SBaseList_get(self, n)
209
210    def prepend(self, item):
211        return _libsbml.SBaseList_prepend(self, item)
212
213    def remove(self, n):
214        return _libsbml.SBaseList_remove(self, n)
215
216    def getSize(self):
217        return _libsbml.SBaseList_getSize(self)
218
219# Register SBaseList in _libsbml:
220_libsbml.SBaseList_swigregister(SBaseList)
221
222
223
224## enable optional new API2 functionality by configure or environment
225if 'USE_LIBSBML_PYTHON_API2_WARNINGS' in os.environ:
226    try:
227        _etest = int(os.environ['USE_LIBSBML_PYTHON_API2_WARNINGS'])
228    except ValueError:
229        _etest = 0
230        print('\nThe environment variable "USE_LIBSBML_PYTHON_API2_WARNINGS" should have the value 1 or 0\n')
231
232    if _etest:
233        USE_LIBSBML_PYTHON_API2_WARNINGS = True
234    else:
235        USE_LIBSBML_PYTHON_API2_WARNINGS = False
236
237# class decorator, from six, that will be used to solve Python2/3 metaclass issues
238# usage is NewClass(with_metaclass(MetaClass, BaseClasses)):
239#def with_metaclass(meta, *bases):
240#    """Create a base class with a metaclass.
241#Usage is: NewClass(with_metaclass(MetaClass, BaseClass*)"""
242# This requires a bit of explanation: the basic idea is to make a dummy
243# metaclass for one level of class instantiation that replaces itself with
244# the actual metaclass.
245#    class metaclass(type):
246#
247#        def __new__(cls, name, this_bases, d):
248#            return meta(name, bases, d)
249#
250#        @classmethod
251#        def __prepare__(cls, name, this_bases):
252#            return meta.__prepare__(name, bases)
253#    return type.__new__(metaclass, 'temporary_class', (), {})
254
255if USE_LIBSBML_PYTHON_API2_WARNINGS:
256    import warnings
257    class PythonAPI2Warning(UserWarning):
258        """ Custom warning class for warnings generated by libSBML Python API2. """
259
260        def __init__(self, msg):
261            """ x.__init__(...) initializes x; see help(type(x)) for signature """
262            print(msg)
263
264    def p_func_warning_decorator(F):
265        try:
266            incoming_name = F.__name__
267        except:
268            return F
269        from functools import wraps
270        @wraps(F)
271        def warning_wrap(*args, **kwargs):
272            res = msg = None
273            res = F(*args, **kwargs)
274            if type(res) == int and res < 0:
275                msg = '\"{}\" returns an error ({}): {}'.format(incoming_name, res,\
276                                            OperationReturnValue_toString(res))
277                warnings.warn(msg, category=PythonAPI2Warning)
278            return res
279        return warning_wrap
280
281class AutoProperty(type):
282    """
283    Auto-detect Python class getX/setX methods.
284
285    This class is attached to SBase and automatically applies for all classes
286    which inherit from it.  Its purpose is to make libSBML more convenient to
287    use from Python.  It works by analyzing classes at class creation time
288    (not at instantiation) and adding corresponding properties (directly
289    calling C methods where possible) to the class dictionary.
290
291    @note The code should work for python 2.6 upwards, however for python 3 it
292          needs to be attached via constructors.
293    """
294    def __new__(cls, classname, bases, classdict):
295        """
296        Iterate over the items in the classdict looking for get/set pairs
297        and declaring them as properties.
298        """
299        import re
300        import keyword
301        import sys
302        if sys.version_info < (3, 0):
303          from inspect import getargspec as mygetargspec
304        else:
305          from inspect import getfullargspec as mygetargspec
306
307        re_mangle = re.compile(r'[A-Za-z][a-z]+|[A-Z]+(?=$|[A-Z0-9])|\d+')
308        re_id = re.compile(r'^[A-Za-z_][A-Za-z0-9_]*$')
309        re_getdoc = re.compile(r'^\s*[A-Za-z_][A-Za-z0-9_]*\(self\)')
310        re_setdoc = re.compile(r'^\s*[A-Za-z_][A-Za-z0-9_]*\(self,[^,)]+\)')
311
312#convert ACapitalCasedStringXYZ123 -> a_capital_cased_string_xyz_123
313        mangle_name = lambda x: ('_'.join(re_mangle.findall(x))).lower()
314
315        get_methods = set()
316        set_methods = set()
317        swig_setter = classdict.get('__swig_setmethods__', {})
318
319        if USE_LIBSBML_PYTHON_API2_WARNINGS:
320# explicitly collect unsetX methods separately for method decorator
321            unset_methods = set()
322# collect addX and methods for method decorator
323            re_addfunc = re.compile(r'add[A-Z][A-Za-z0-9_]*')
324            add_methods = set()
325
326        allowed_methods = [
327            'Annotation',
328            'AnnotationString',
329            'Notes',
330            'NotesString',
331        ]
332
333#only search for get/set methods
334#we assume that any unset method also has either get or set
335#a small number of set without get cases exist so we can't only
336#search for get methods
337        for k, v in classdict.items():
338            name = k[3:]
339            prefix = k[:3]
340            mangled = mangle_name(name)
341            if name:
342                if callable(v):
343                    if re_id.match(mangled) and mangled not in keyword.kwlist:
344                        if prefix == 'get':
345                            get_methods.add(name)
346                        elif prefix == 'set':
347                            set_methods.add(name)
348            if USE_LIBSBML_PYTHON_API2_WARNINGS:
349# find addX methods for decoration
350                if re_addfunc.match(k) is not None:
351                    add_methods.add(k)
352
353        for name in get_methods | set_methods:
354
355            mangled = mangle_name(name)
356
357#ListOfFoobars -> foobars
358            if mangled.startswith('list_of_'):
359                mangled = mangled[8:]
360
361            getter = setter = deleter = None
362            if name in get_methods:
363                getter = classdict['get'+name]
364
365#this is a very dirty way of checking if the get method
366#requires extra arguments (and hence cannot be a property)
367#it should be possible to do this properly in SWIG?
368                try:
369                    argspec = mygetargspec(getter)
370                    numargs = len(argspec.args)
371                    if numargs > 1 or (numargs == 1 and argspec.args[0] != 'self')  \
372                       or (argspec.varargs!=None and name not in allowed_methods and not name.startswith('ListOf') ):
373                        continue
374                except Exception:
375                    continue
376
377#use the c-level get function if the python function
378#only consists of a call to it
379                cname = classname + '_get' + name
380#test if function is "return _libsbml.CLASS_getNAME(__args__)"
381                try:
382                    if getter.func_code.co_names == ('_libsbml', cname):
383                        getter = getattr(_libsbml, cname)
384                except:
385                    if getter.__code__.co_names == ('_libsbml', cname):
386                        getter = getattr(_libsbml, cname)
387
388            if name in set_methods:
389                setter = classdict['set'+name]
390                try:
391                    argspec = mygetargspec(getter)
392                    numargs = len(argspec.args)
393                    if numargs > 1 and argspec.args[0] == 'self':
394                        cname = classname + '_set' + name
395                        try:
396                            if setter.func_code.co_names == ('_libsbml', cname):
397                                setter = getattr(_libsbml, cname)
398                        except:
399                            if setter.__code__.co_names == ('_libsbml', cname):
400                                setter = getattr(_libsbml, cname)
401
402#property fget does not get intercepted by __getattr__
403#but fset does, so we implement property setting via
404#the __swig_setmethods__ dict
405                        if USE_LIBSBML_PYTHON_API2_WARNINGS:
406                            swig_setter[mangled] = p_func_warning_decorator(setter)
407                        else:
408                            swig_setter[mangled] = setter
409                        continue
410                except:
411                    pass
412
413            if 'unset' + name in classdict:
414                deleter = classdict['unset'+name]
415
416                try:
417                    argspec = mygetargspec(getter)
418                    numargs = len(argspec.args)
419                    if numargs == 1 and argspec.args[0] == 'self' and \
420                       (argspec.varargs==None or name in allowed_methods):
421                        cname = classname + '_unset' + name
422                        try:
423                            if deleter.func_code.co_names == ('_libsbml', cname):
424                                deleter = getattr(_libsbml, cname)
425                        except:
426                            if deleter.__code__.co_names == ('_libsbml', cname):
427                                deleter = getattr(_libsbml, cname)
428                except:
429                    pass
430
431# wrap mangled deleters
432                if USE_LIBSBML_PYTHON_API2_WARNINGS:
433                    unset_methods.add(name)
434
435            if getter or setter or deleter:
436#fset is technically redundant since the method is dispatched
437#via _swig_setattr rather than through the property due to that
438#function not delegating to object.__setattr__ which properly
439#handles properties
440                classdict[mangled] = property(fget=getter, fset=setter, fdel=deleter)
441
442
443            def __repr__(self):
444                desc = self.__class__.__name__
445                if hasattr(self, '__len__'):
446                    desc += '[%s]' % self.__len__()
447                if hasattr(self, 'id') and self.id:
448                    desc += ' %s' % self.id
449                if hasattr(self, 'name') and self.name:
450                    desc += ' "%s"' % self.name
451                return '<' + desc + '>'
452
453            if classdict.get('__repr__', None) in (_swig_repr, None):
454                classdict['__repr__'] = __repr__
455
456        if USE_LIBSBML_PYTHON_API2_WARNINGS:
457# decorate get methods
458            for gm in get_methods:
459                if 'get'+gm in classdict:
460                    classdict['get'+gm] = p_func_warning_decorator(classdict['get'+gm])
461
462# decorate set methods
463            for sm in set_methods:
464                if 'set'+sm in classdict:
465                    classdict['set'+sm] = p_func_warning_decorator(classdict['set'+sm])
466
467# decorate unset methods
468            for dm in unset_methods:
469                if 'unset'+dm in classdict:
470                    classdict['unset'+dm] = p_func_warning_decorator(classdict['unset'+dm])
471
472# decorate unset methods
473            if len(add_methods) > 0:
474                for am in add_methods:
475                    if am in classdict:
476                        classdict[am] = p_func_warning_decorator(classdict[am])
477
478        return type.__new__(cls, classname, bases, classdict)
479
480
481class SwigPyIterator(object):
482    r"""Proxy of C++ swig::SwigPyIterator class."""
483
484    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
485
486    def __init__(self, *args, **kwargs):
487        raise AttributeError("No constructor defined - class is abstract")
488    __repr__ = _swig_repr
489    __swig_destroy__ = _libsbml.delete_SwigPyIterator
490
491    def value(self):
492        r"""value(SwigPyIterator self) -> PyObject *"""
493        return _libsbml.SwigPyIterator_value(self)
494
495    def incr(self, n=1):
496        r"""incr(SwigPyIterator self, size_t n=1) -> SwigPyIterator"""
497        return _libsbml.SwigPyIterator_incr(self, n)
498
499    def decr(self, n=1):
500        r"""decr(SwigPyIterator self, size_t n=1) -> SwigPyIterator"""
501        return _libsbml.SwigPyIterator_decr(self, n)
502
503    def distance(self, x):
504        r"""distance(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t"""
505        return _libsbml.SwigPyIterator_distance(self, x)
506
507    def equal(self, x):
508        r"""equal(SwigPyIterator self, SwigPyIterator x) -> bool"""
509        return _libsbml.SwigPyIterator_equal(self, x)
510
511    def copy(self):
512        r"""copy(SwigPyIterator self) -> SwigPyIterator"""
513        return _libsbml.SwigPyIterator_copy(self)
514
515    def next(self):
516        r"""next(SwigPyIterator self) -> PyObject *"""
517        return _libsbml.SwigPyIterator_next(self)
518
519    def __next__(self):
520        r"""__next__(SwigPyIterator self) -> PyObject *"""
521        return _libsbml.SwigPyIterator___next__(self)
522
523    def previous(self):
524        r"""previous(SwigPyIterator self) -> PyObject *"""
525        return _libsbml.SwigPyIterator_previous(self)
526
527    def advance(self, n):
528        r"""advance(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
529        return _libsbml.SwigPyIterator_advance(self, n)
530
531    def __eq__(self, x):
532        r"""__eq__(SwigPyIterator self, SwigPyIterator x) -> bool"""
533        return _libsbml.SwigPyIterator___eq__(self, x)
534
535    def __ne__(self, x):
536        r"""__ne__(SwigPyIterator self, SwigPyIterator x) -> bool"""
537        return _libsbml.SwigPyIterator___ne__(self, x)
538
539    def __iadd__(self, n):
540        r"""__iadd__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
541        return _libsbml.SwigPyIterator___iadd__(self, n)
542
543    def __isub__(self, n):
544        r"""__isub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
545        return _libsbml.SwigPyIterator___isub__(self, n)
546
547    def __add__(self, n):
548        r"""__add__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
549        return _libsbml.SwigPyIterator___add__(self, n)
550
551    def __sub__(self, *args):
552        r"""
553        __sub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator
554        __sub__(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t
555        """
556        return _libsbml.SwigPyIterator___sub__(self, *args)
557    def __iter__(self):
558        return self
559
560# Register SwigPyIterator in _libsbml:
561_libsbml.SwigPyIterator_swigregister(SwigPyIterator)
562
563class string(object):
564    r"""Proxy of C++ std::basic_string< char > class."""
565
566    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
567    __repr__ = _swig_repr
568
569    def length(self):
570        r"""length(string self) -> std::basic_string< char >::size_type"""
571        return _libsbml.string_length(self)
572
573    def max_size(self):
574        r"""max_size(string self) -> std::basic_string< char >::size_type"""
575        return _libsbml.string_max_size(self)
576
577    def copy(self, __s, __n, __pos=0):
578        r"""copy(string self, char * __s, std::basic_string< char >::size_type __n, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type"""
579        return _libsbml.string_copy(self, __s, __n, __pos)
580
581    def c_str(self):
582        r"""c_str(string self) -> char const *"""
583        return _libsbml.string_c_str(self)
584
585    def find(self, *args):
586        r"""
587        find(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
588        find(string self, string __str, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
589        find(string self, char __c, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
590        """
591        return _libsbml.string_find(self, *args)
592
593    def rfind(self, *args):
594        r"""
595        rfind(string self, string __str, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
596        rfind(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
597        rfind(string self, char __c, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
598        """
599        return _libsbml.string_rfind(self, *args)
600
601    def find_first_of(self, *args):
602        r"""
603        find_first_of(string self, string __str, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
604        find_first_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
605        find_first_of(string self, char __c, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
606        """
607        return _libsbml.string_find_first_of(self, *args)
608
609    def find_last_of(self, *args):
610        r"""
611        find_last_of(string self, string __str, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
612        find_last_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
613        find_last_of(string self, char __c, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
614        """
615        return _libsbml.string_find_last_of(self, *args)
616
617    def find_first_not_of(self, *args):
618        r"""
619        find_first_not_of(string self, string __str, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
620        find_first_not_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
621        find_first_not_of(string self, char __c, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
622        """
623        return _libsbml.string_find_first_not_of(self, *args)
624
625    def find_last_not_of(self, *args):
626        r"""
627        find_last_not_of(string self, string __str, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
628        find_last_not_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
629        find_last_not_of(string self, char __c, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
630        """
631        return _libsbml.string_find_last_not_of(self, *args)
632
633    def substr(self, *args):
634        r"""substr(string self, std::basic_string< char >::size_type __pos=0, std::basic_string< char >::size_type __n=std::basic_string< char >::npos) -> string"""
635        return _libsbml.string_substr(self, *args)
636
637    def empty(self):
638        r"""empty(string self) -> bool"""
639        return _libsbml.string_empty(self)
640
641    def size(self):
642        r"""size(string self) -> std::basic_string< char >::size_type"""
643        return _libsbml.string_size(self)
644
645    def swap(self, v):
646        r"""swap(string self, string v)"""
647        return _libsbml.string_swap(self, v)
648
649    def erase(self, *args):
650        r"""
651        erase(string self, std::basic_string< char >::size_type __pos=0, std::basic_string< char >::size_type __n=std::basic_string< char >::npos) -> string
652        erase(string self, std::basic_string< char >::iterator pos) -> std::basic_string< char >::iterator
653        erase(string self, std::basic_string< char >::iterator first, std::basic_string< char >::iterator last) -> std::basic_string< char >::iterator
654        """
655        return _libsbml.string_erase(self, *args)
656
657    def __init__(self, *args):
658        r"""
659        __init__(string self, char const * __s, std::basic_string< char >::size_type __n) -> string
660        __init__(string self) -> string
661        __init__(string self, string other) -> string
662        __init__(string self, std::basic_string< char >::size_type size, std::basic_string< char >::value_type value) -> string
663        """
664        _libsbml.string_swiginit(self, _libsbml.new_string(*args))
665
666    def assign(self, *args):
667        r"""
668        assign(string self, string __str) -> string
669        assign(string self, string __str, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> string
670        assign(string self, char const * __s, std::basic_string< char >::size_type __n) -> string
671        assign(string self, std::basic_string< char >::size_type n, std::basic_string< char >::value_type x)
672        """
673        return _libsbml.string_assign(self, *args)
674
675    def resize(self, *args):
676        r"""
677        resize(string self, std::basic_string< char >::size_type new_size)
678        resize(string self, std::basic_string< char >::size_type new_size, std::basic_string< char >::value_type x)
679        """
680        return _libsbml.string_resize(self, *args)
681
682    def iterator(self):
683        r"""iterator(string self) -> SwigPyIterator"""
684        return _libsbml.string_iterator(self)
685    def __iter__(self):
686        return self.iterator()
687
688    def __nonzero__(self):
689        r"""__nonzero__(string self) -> bool"""
690        return _libsbml.string___nonzero__(self)
691
692    def __bool__(self):
693        r"""__bool__(string self) -> bool"""
694        return _libsbml.string___bool__(self)
695
696    def __len__(self):
697        r"""__len__(string self) -> std::basic_string< char >::size_type"""
698        return _libsbml.string___len__(self)
699
700    def __getslice__(self, i, j):
701        r"""__getslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j) -> string"""
702        return _libsbml.string___getslice__(self, i, j)
703
704    def __setslice__(self, *args):
705        r"""
706        __setslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j)
707        __setslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j, string v)
708        """
709        return _libsbml.string___setslice__(self, *args)
710
711    def __delslice__(self, i, j):
712        r"""__delslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j)"""
713        return _libsbml.string___delslice__(self, i, j)
714
715    def __delitem__(self, *args):
716        r"""
717        __delitem__(string self, std::basic_string< char >::difference_type i)
718        __delitem__(string self, PySliceObject * slice)
719        """
720        return _libsbml.string___delitem__(self, *args)
721
722    def __getitem__(self, *args):
723        r"""
724        __getitem__(string self, PySliceObject * slice) -> string
725        __getitem__(string self, std::basic_string< char >::difference_type i) -> std::basic_string< char >::value_type
726        """
727        return _libsbml.string___getitem__(self, *args)
728
729    def __setitem__(self, *args):
730        r"""
731        __setitem__(string self, PySliceObject * slice, string v)
732        __setitem__(string self, PySliceObject * slice)
733        __setitem__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::value_type x)
734        """
735        return _libsbml.string___setitem__(self, *args)
736
737    def insert(self, *args):
738        r"""
739        insert(string self, std::basic_string< char >::size_type __pos1, string __str) -> string
740        insert(string self, std::basic_string< char >::size_type __pos1, string __str, std::basic_string< char >::size_type __pos2, std::basic_string< char >::size_type __n) -> string
741        insert(string self, std::basic_string< char >::size_type __pos, char const * __s, std::basic_string< char >::size_type __n) -> string
742        insert(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n, char __c) -> string
743        insert(string self, std::basic_string< char >::iterator pos, std::basic_string< char >::value_type x) -> std::basic_string< char >::iterator
744        insert(string self, std::basic_string< char >::iterator pos, std::basic_string< char >::size_type n, std::basic_string< char >::value_type x)
745        insert(string self, std::basic_string< char >::iterator __p, std::basic_string< char >::size_type __n, char __c)
746        """
747        return _libsbml.string_insert(self, *args)
748
749    def replace(self, *args):
750        r"""
751        replace(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n, string __str) -> string
752        replace(string self, std::basic_string< char >::size_type __pos1, std::basic_string< char >::size_type __n1, string __str, std::basic_string< char >::size_type __pos2, std::basic_string< char >::size_type __n2) -> string
753        replace(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n1, char const * __s, std::basic_string< char >::size_type __n2) -> string
754        replace(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n1, std::basic_string< char >::size_type __n2, char __c) -> string
755        replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, string __str) -> string
756        replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, char const * __s, std::basic_string< char >::size_type __n) -> string
757        replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, std::basic_string< char >::size_type __n, char __c) -> string
758        replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, char const * __k1, char const * __k2) -> string
759        replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, std::basic_string< char >::const_iterator __k1, std::basic_string< char >::const_iterator __k2) -> string
760        """
761        return _libsbml.string_replace(self, *args)
762
763    def __iadd__(self, v):
764        r"""__iadd__(string self, string v) -> string"""
765        return _libsbml.string___iadd__(self, v)
766
767    def __add__(self, v):
768        r"""__add__(string self, string v) -> string"""
769        return _libsbml.string___add__(self, v)
770
771    def __radd__(self, v):
772        r"""__radd__(string self, string v) -> string"""
773        return _libsbml.string___radd__(self, v)
774
775    def __str__(self):
776        r"""__str__(string self) -> string"""
777        return _libsbml.string___str__(self)
778
779    def __rlshift__(self, out):
780        r"""__rlshift__(string self, ostream out) -> ostream"""
781        return _libsbml.string___rlshift__(self, out)
782
783    def __eq__(self, v):
784        r"""__eq__(string self, string v) -> bool"""
785        return _libsbml.string___eq__(self, v)
786
787    def __ne__(self, v):
788        r"""__ne__(string self, string v) -> bool"""
789        return _libsbml.string___ne__(self, v)
790
791    def __gt__(self, v):
792        r"""__gt__(string self, string v) -> bool"""
793        return _libsbml.string___gt__(self, v)
794
795    def __lt__(self, v):
796        r"""__lt__(string self, string v) -> bool"""
797        return _libsbml.string___lt__(self, v)
798
799    def __ge__(self, v):
800        r"""__ge__(string self, string v) -> bool"""
801        return _libsbml.string___ge__(self, v)
802
803    def __le__(self, v):
804        r"""__le__(string self, string v) -> bool"""
805        return _libsbml.string___le__(self, v)
806    __swig_destroy__ = _libsbml.delete_string
807
808# Register string in _libsbml:
809_libsbml.string_swigregister(string)
810cvar = _libsbml.cvar
811string.npos = _libsbml.cvar.string_npos
812
813class ostream(object):
814    r"""Proxy of C++ std::basic_ostream< char > class."""
815
816    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
817    __repr__ = _swig_repr
818
819    def __init__(self, __sb):
820        r"""__init__(ostream self, std::basic_streambuf< char,std::char_traits< char > > * __sb) -> ostream"""
821        _libsbml.ostream_swiginit(self, _libsbml.new_ostream(__sb))
822    __swig_destroy__ = _libsbml.delete_ostream
823
824# Register ostream in _libsbml:
825_libsbml.ostream_swigregister(ostream)
826
827class ostringstream(ostream):
828    r"""Proxy of C++ std::basic_ostringstream< char > class."""
829
830    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
831    __repr__ = _swig_repr
832
833    def __init__(self, *args):
834        r"""__init__(ostringstream self, std::ios_base::openmode __mode=std::ios_base::out) -> ostringstream"""
835        _libsbml.ostringstream_swiginit(self, _libsbml.new_ostringstream(*args))
836    __swig_destroy__ = _libsbml.delete_ostringstream
837
838    def str(self, *args):
839        r"""
840        str(ostringstream self) -> string
841        str(ostringstream self, string __s)
842        """
843        return _libsbml.ostringstream_str(self, *args)
844
845# Register ostringstream in _libsbml:
846_libsbml.ostringstream_swigregister(ostringstream)
847
848
849def endl(arg1):
850    r"""endl(ostream arg1) -> ostream"""
851    return _libsbml.endl(arg1)
852
853def flush(arg1):
854    r"""flush(ostream arg1) -> ostream"""
855    return _libsbml.flush(arg1)
856LIBSBML_DOTTED_VERSION = _libsbml.LIBSBML_DOTTED_VERSION
857
858LIBSBML_VERSION = _libsbml.LIBSBML_VERSION
859
860LIBSBML_VERSION_STRING = _libsbml.LIBSBML_VERSION_STRING
861
862
863def getLibSBMLVersion():
864    r"""
865    getLibSBMLVersion() -> int
866
867    Returns the version number of this copy of libSBML as an integer.
868
869    @return the libSBML version as an integer; version 1.2.3 becomes 10203.
870
871    """
872    return _libsbml.getLibSBMLVersion()
873
874def getLibSBMLDottedVersion():
875    r"""
876    getLibSBMLDottedVersion() -> char const *
877
878    Returns the version number of this copy of libSBML as a string.
879
880    @return the libSBML version as a string; version 1.2.3 becomes
881    '1.2.3'.
882
883    @see getLibSBMLVersionString()
884
885    """
886    return _libsbml.getLibSBMLDottedVersion()
887
888def getLibSBMLVersionString():
889    r"""
890    getLibSBMLVersionString() -> char const *
891
892    Returns the version number of this copy of libSBML as a string without
893    periods.
894
895    @return the libSBML version as a string: version 1.2.3 becomes '10203'.
896
897    @see getLibSBMLDottedVersion()
898
899    """
900    return _libsbml.getLibSBMLVersionString()
901
902def isLibSBMLCompiledWith(option):
903    r"""
904    isLibSBMLCompiledWith(char const * option) -> int
905
906    Returns an indication whether libSBML has been compiled with
907    against a specific library.
908
909    @param option the library to test against, this can be one of
910    'expat', 'libxml', 'xerces-c', 'bzip2', 'zip'
911
912    @return 0 in case the libSBML has not been compiled against
913    that library and nonzero otherwise (for libraries
914    that define an integer version number that number will
915    be returned).
916
917    @see getLibSBMLDependencyVersionOf()
918
919    """
920    return _libsbml.isLibSBMLCompiledWith(option)
921
922def getLibSBMLDependencyVersionOf(option):
923    r"""
924    getLibSBMLDependencyVersionOf(char const * option) -> char const *
925
926    Returns the version string for the dependency library used.
927
928    @param option the library for which the version
929    should be retrieved, this can be one of
930    'expat', 'libxml', 'xerces-c', 'bzip2', 'zip'
931
932    @return None in case libSBML has not been compiled against
933    that library and a version string otherwise.
934
935    @see isLibSBMLCompiledWith()
936
937    """
938    return _libsbml.getLibSBMLDependencyVersionOf(option)
939LIBSBML_OPERATION_SUCCESS = _libsbml.LIBSBML_OPERATION_SUCCESS
940
941LIBSBML_INDEX_EXCEEDS_SIZE = _libsbml.LIBSBML_INDEX_EXCEEDS_SIZE
942
943LIBSBML_UNEXPECTED_ATTRIBUTE = _libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE
944
945LIBSBML_OPERATION_FAILED = _libsbml.LIBSBML_OPERATION_FAILED
946
947LIBSBML_INVALID_ATTRIBUTE_VALUE = _libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE
948
949LIBSBML_INVALID_OBJECT = _libsbml.LIBSBML_INVALID_OBJECT
950
951LIBSBML_DUPLICATE_OBJECT_ID = _libsbml.LIBSBML_DUPLICATE_OBJECT_ID
952
953LIBSBML_LEVEL_MISMATCH = _libsbml.LIBSBML_LEVEL_MISMATCH
954
955LIBSBML_VERSION_MISMATCH = _libsbml.LIBSBML_VERSION_MISMATCH
956
957LIBSBML_INVALID_XML_OPERATION = _libsbml.LIBSBML_INVALID_XML_OPERATION
958
959LIBSBML_NAMESPACES_MISMATCH = _libsbml.LIBSBML_NAMESPACES_MISMATCH
960
961LIBSBML_DUPLICATE_ANNOTATION_NS = _libsbml.LIBSBML_DUPLICATE_ANNOTATION_NS
962
963LIBSBML_ANNOTATION_NAME_NOT_FOUND = _libsbml.LIBSBML_ANNOTATION_NAME_NOT_FOUND
964
965LIBSBML_ANNOTATION_NS_NOT_FOUND = _libsbml.LIBSBML_ANNOTATION_NS_NOT_FOUND
966
967LIBSBML_MISSING_METAID = _libsbml.LIBSBML_MISSING_METAID
968
969LIBSBML_DEPRECATED_ATTRIBUTE = _libsbml.LIBSBML_DEPRECATED_ATTRIBUTE
970
971LIBSBML_USE_ID_ATTRIBUTE_FUNCTION = _libsbml.LIBSBML_USE_ID_ATTRIBUTE_FUNCTION
972
973LIBSBML_PKG_VERSION_MISMATCH = _libsbml.LIBSBML_PKG_VERSION_MISMATCH
974
975LIBSBML_PKG_UNKNOWN = _libsbml.LIBSBML_PKG_UNKNOWN
976
977LIBSBML_PKG_UNKNOWN_VERSION = _libsbml.LIBSBML_PKG_UNKNOWN_VERSION
978
979LIBSBML_PKG_DISABLED = _libsbml.LIBSBML_PKG_DISABLED
980
981LIBSBML_PKG_CONFLICTED_VERSION = _libsbml.LIBSBML_PKG_CONFLICTED_VERSION
982
983LIBSBML_PKG_CONFLICT = _libsbml.LIBSBML_PKG_CONFLICT
984
985LIBSBML_CONV_INVALID_TARGET_NAMESPACE = _libsbml.LIBSBML_CONV_INVALID_TARGET_NAMESPACE
986
987LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE = _libsbml.LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE
988
989LIBSBML_CONV_INVALID_SRC_DOCUMENT = _libsbml.LIBSBML_CONV_INVALID_SRC_DOCUMENT
990
991LIBSBML_CONV_CONVERSION_NOT_AVAILABLE = _libsbml.LIBSBML_CONV_CONVERSION_NOT_AVAILABLE
992
993LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN = _libsbml.LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN
994
995
996def OperationReturnValue_toString(returnValue):
997    r"""
998    OperationReturnValue_toString(int returnValue) -> char const *
999
1000    This method takes an SBML operation return value and returns a string representing
1001    the code.
1002
1003    @param returnValue the operation return value to convert to a string.
1004
1005    @return a human readable name for the given
1006    @if clike #OperationReturnValues_t value@else operation return value @endif.
1007
1008    @note The caller does not own the returned string and is therefore not
1009    allowed to modify it.
1010
1011    """
1012    return _libsbml.OperationReturnValue_toString(returnValue)
1013class IdList(object):
1014    r"""
1015
1016    @sbmlpackage{core}
1017
1018    @htmlinclude pkg-marker-core.html Maintains a list of SIds.
1019    @internal
1020
1021    """
1022
1023    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1024    __repr__ = _swig_repr
1025
1026    def __init__(self, *args):
1027        r"""
1028        __init__(IdList self) -> IdList
1029        __init__(IdList self, string commaSeparated) -> IdList
1030
1031        @sbmlpackage{core}
1032
1033        @htmlinclude pkg-marker-core.html Maintains a list of SIds.
1034        @internal
1035
1036        """
1037        _libsbml.IdList_swiginit(self, _libsbml.new_IdList(*args))
1038
1039    def append(self, id):
1040        r"""
1041        append(IdList self, string id)
1042
1043        @internal
1044
1045        @internal
1046
1047        """
1048        return _libsbml.IdList_append(self, id)
1049
1050    def contains(self, id):
1051        r"""
1052        contains(IdList self, string id) -> bool
1053
1054        @internal
1055
1056        @internal
1057
1058        """
1059        return _libsbml.IdList_contains(self, id)
1060
1061    def empty(self):
1062        r"""
1063        empty(IdList self) -> bool
1064
1065        @internal
1066
1067        @internal
1068
1069        """
1070        return _libsbml.IdList_empty(self)
1071
1072    def removeIdsBefore(self, id):
1073        r"""
1074        removeIdsBefore(IdList self, string id)
1075
1076        @internal
1077
1078        @internal
1079
1080        """
1081        return _libsbml.IdList_removeIdsBefore(self, id)
1082
1083    def size(self):
1084        r"""
1085        size(IdList self) -> unsigned int
1086
1087        @internal
1088
1089        @internal
1090
1091        """
1092        return _libsbml.IdList_size(self)
1093
1094    def clear(self):
1095        r"""clear(IdList self)"""
1096        return _libsbml.IdList_clear(self)
1097
1098    def at(self, n):
1099        r"""at(IdList self, int n) -> string"""
1100        return _libsbml.IdList_at(self, n)
1101    __swig_destroy__ = _libsbml.delete_IdList
1102
1103# Register IdList in _libsbml:
1104_libsbml.IdList_swigregister(IdList)
1105cout = cvar.cout
1106cerr = cvar.cerr
1107clog = cvar.clog
1108
1109class IdentifierTransformer(object):
1110    r"""
1111
1112    @sbmlpackage{core}
1113
1114    @htmlinclude pkg-marker-core.html Base class for identifier transformers.
1115    @internal
1116
1117    """
1118
1119    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1120    __repr__ = _swig_repr
1121
1122    def __init__(self):
1123        r"""
1124        __init__(IdentifierTransformer self) -> IdentifierTransformer
1125
1126        @sbmlpackage{core}
1127
1128        @htmlinclude pkg-marker-core.html Base class for identifier transformers.
1129        @internal
1130
1131        """
1132        if self.__class__ == IdentifierTransformer:
1133            _self = None
1134        else:
1135            _self = self
1136        _libsbml.IdentifierTransformer_swiginit(self, _libsbml.new_IdentifierTransformer(_self, ))
1137    __swig_destroy__ = _libsbml.delete_IdentifierTransformer
1138
1139    def transform(self, element):
1140        r"""transform(IdentifierTransformer self, SBase element) -> int"""
1141        return _libsbml.IdentifierTransformer_transform(self, element)
1142    def __disown__(self):
1143        self.this.disown()
1144        _libsbml.disown_IdentifierTransformer(self)
1145        return weakref.proxy(self)
1146
1147# Register IdentifierTransformer in _libsbml:
1148_libsbml.IdentifierTransformer_swigregister(IdentifierTransformer)
1149
1150class ElementFilter(object):
1151    r"""
1152
1153    @sbmlpackage{core}
1154
1155    @htmlinclude pkg-marker-core.html Base class for filter functions.
1156
1157    @htmlinclude libsbml-facility-only-warning.html
1158
1159    Some libSBML objects provide the ability to return lists of components.
1160    To provide callers with greater control over exactly what is
1161    returned, these methods take optional arguments in the form of filters.
1162    The ElementFilter class is the parent class for these filters.
1163
1164    """
1165
1166    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1167    __repr__ = _swig_repr
1168
1169    def __init__(self):
1170        r"""
1171        __init__(ElementFilter self) -> ElementFilter
1172
1173        Creates a new ElementFilter object.
1174
1175        """
1176        if self.__class__ == ElementFilter:
1177            _self = None
1178        else:
1179            _self = self
1180        _libsbml.ElementFilter_swiginit(self, _libsbml.new_ElementFilter(_self, ))
1181    __swig_destroy__ = _libsbml.delete_ElementFilter
1182
1183    def filter(self, element):
1184        r"""
1185        filter(ElementFilter self, SBase element) -> bool
1186
1187        Predicate to test elements.
1188
1189        This is the central predicate of the ElementFilter class.  In subclasses
1190        of ElementFilter, callers should implement this method such that it
1191        returns @c True for @p element arguments that are 'desirable' and
1192        @c False for those that are 'undesirable' in whatever filtering context the
1193        ElementFilter subclass is designed to be used.
1194
1195        @param element the element to be tested.
1196
1197        @return @c True if the @p element is desirable or should be kept,
1198        @c False otherwise.
1199
1200        """
1201        return _libsbml.ElementFilter_filter(self, element)
1202    def __disown__(self):
1203        self.this.disown()
1204        _libsbml.disown_ElementFilter(self)
1205        return weakref.proxy(self)
1206
1207# Register ElementFilter in _libsbml:
1208_libsbml.ElementFilter_swigregister(ElementFilter)
1209
1210class SBMLReader(object):
1211    r"""
1212
1213    @sbmlpackage{core}
1214
1215    @htmlinclude pkg-marker-core.html File and text-string SBML reader.
1216
1217    @htmlinclude not-sbml-warning.html
1218
1219    The SBMLReader class provides the main interface for reading SBML content
1220    from files and strings.  The methods for reading SBML all return an
1221    SBMLDocument object representing the results.  In the case of failures
1222    (such as if the SBML contains errors or a file cannot be read), the errors
1223    will be recorded with the SBMLErrorLog object kept in the SBMLDocument
1224    returned by SBMLReader.  Consequently, immediately after calling a method
1225    on SBMLReader, callers should always check for errors and warnings using
1226    the methods for this purpose provided by SBMLDocument.
1227
1228    For convenience as well as easy access from other languages besides C++,
1229    this file also defines two global functions,
1230    @sbmlglobalfunction{readSBML, String} and
1231    @sbmlglobalfunction{readSBMLFromString, String}.  They are
1232    equivalent to creating an SBMLReader object and then calling the
1233    @if python @link SBMLReader.readSBML() SBMLReader.readSBML()@endlink@endif@if java SBMLReader.readSBML()@endif@if cpp SBMLReader.readSBML()@endif@if csharp SBMLReader.readSBML()@endif@~ and
1234    @if python @link SBMLReader.readSBMLFromString() SBMLReader.readSBMLFromString()@endlink@endif@if java SBMLReader.readSBMLFromString()@endif@if cpp SBMLReader.readSBMLFromString()@endif@if csharp SBMLReader.readSBMLFromString()@endif@~ methods, respectively.
1235
1236    @section compression Support for reading compressed files
1237
1238    LibSBML provides support for reading (as well as writing) compressed
1239    SBML files.  The process is transparent to the calling
1240    application---the application does not need to do anything
1241    deliberate to invoke the functionality.  If a given SBML filename ends
1242    with an extension for the @em gzip, @em zip or @em bzip2 compression
1243    formats (respectively, @c .gz, @c .zip, or @c .bz2), then the methods
1244    @if python @link SBMLReader.readSBML() SBMLReader.readSBML()@endlink@endif@if java @link SBMLReader.readSBML() SBMLReader.readSBML(String)@endlink@endif@if cpp SBMLReader.readSBML()@endif@if csharp SBMLReader.readSBML()@endif@~ and
1245    @if python @link SBMLWriter.writeSBML() SBMLWriter.writeSBML()@endlink@endif@if java @link SBMLWriter.writeSBML() SBMLWriter.writeSBML(String)@endlink@endif@if cpp SBMLWriter.writeSBML()@endif@if csharp SBMLWriter.writeSBML()@endif@~
1246    will automatically decompress and compress the file while reading and
1247    writing it.  If the filename has no such extension, it will be read and
1248    written uncompressed as normal.
1249
1250    The compression feature requires that the @em zlib (for @em gzip and @em
1251    zip formats) and/or @em bzip2 (for @em bzip2 format) be available on the
1252    system running libSBML, and that libSBML was configured with their
1253    support compiled-in.  Please see the libSBML
1254    @if java <a href='../../../libsbml-installation.html'>installation instructions</a> @else <a href='libsbml-installation.html'>installation instructions</a>@endif@~
1255    for more information about this.  The methods
1256    @if java SBMLReader.hasZlib()@else hasZlib()@endif@~ and
1257    @if java SBMLReader.hasBzip2()@else hasBzip2()@endif@~
1258    can be used by an application to query at run-time whether support
1259    for the compression libraries is available in the present copy of
1260    libSBML.
1261
1262    Support for compression is not mandated by the SBML standard, but
1263    applications may find it helpful, particularly when large SBML models
1264    are being communicated across data links of limited bandwidth.
1265
1266    """
1267
1268    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1269    __repr__ = _swig_repr
1270
1271    def __init__(self):
1272        r"""
1273        __init__(SBMLReader self) -> SBMLReader
1274
1275        Creates a new SBMLReader object and returns it.
1276
1277        The libSBML SBMLReader object offers methods for reading SBML in
1278        XML form from files and text strings.
1279
1280        """
1281        _libsbml.SBMLReader_swiginit(self, _libsbml.new_SBMLReader())
1282    __swig_destroy__ = _libsbml.delete_SBMLReader
1283
1284    def readSBML(self, filename):
1285        r"""
1286        readSBML(SBMLReader self, string filename) -> SBMLDocument
1287
1288        Reads an SBML document from the given file.
1289
1290        If the file named @p filename does not exist or its content is not valid
1291        SBML, one or more errors will be logged with the SBMLDocument object
1292        returned by this method.  Callers can use the methods on SBMLDocument such
1293        as
1294        @if python @link libsbml.SBMLDocument.getNumErrors() SBMLDocument.getNumErrors()@endlink@endif,
1295        @if conly SBMLDocument_getNumErrors() @else SBMLDocument.getNumErrors()@endif@~
1296        and
1297        @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
1298        @if java SBMLDocument.getError()@endif
1299        @if cpp SBMLDocument.getError()@endif
1300        @if csharp SBMLDocument.getError()@endif
1301        @if conly SBMLDocument_getError()@endif@~
1302        to get the errors.  The object returned by
1303        @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
1304        @if java SBMLDocument.getError()@endif
1305        @if cpp SBMLDocument.getError()@endif
1306        @if csharp SBMLDocument.getError()@endif
1307        @if conly SBMLDocument_getError()@endif@~
1308        is an SBMLError object, and it has methods to get the error code,
1309        category, and severity level of the problem, as well as a textual
1310        description of the problem.  The possible severity levels range from
1311        informational messages to fatal errors; see the documentation for
1312        @if conly SBMLError_t @else SBMLError@endif@~
1313        for more information.
1314
1315        If the file @p filename could not be read, the file-reading error will
1316        appear first.  The error code @if clike (a value drawn from the
1317        enumeration #XMLErrorCode_t)@endif@~ can provide a clue about what
1318        happened.  For example, a file might be unreadable (either because it does
1319        not actually exist or because the user does not have the necessary access
1320        privileges to read it) or some sort of file operation error may have been
1321        reported by the underlying operating system.  Callers can check for these
1322        situations using a program fragment such as the following:
1323        @if cpp
1324        @code{.cpp}
1325        SBMLReader reader;
1326        SBMLDocument doc  = reader.readSBMLFromFile(filename);
1327
1328        if (doc->getNumErrors() > 0)
1329        {
1330          if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable)
1331          {
1332            // Handle case of unreadable file here.
1333          }
1334          else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError)
1335          {
1336            // Handle case of other file operation error here.
1337          }
1338          else
1339          {
1340            // Handle other cases -- see error codes defined in XMLErrorCode_t
1341            // for other possible cases to check.
1342          }
1343        }
1344        @endcode
1345        @endif
1346        @if conly
1347        @code{.c}
1348        SBMLReader_t   *sr;
1349        SBMLDocument_t *d;
1350
1351        sr = SBMLReader_create();
1352
1353        d = SBMLReader_readSBML(sr, filename);
1354
1355        if (SBMLDocument_getNumErrors(d) > 0)
1356        {
1357          if (XMLError_getId(SBMLDocument_getError(d, 0))
1358              == SBML_READ_ERROR_FILE_NOT_FOUND)
1359          {
1360             ...
1361          }
1362          if (XMLError_getId(SBMLDocument_getError(d, 0))
1363              == SBML_READ_ERROR_NOT_SBML)
1364          {
1365             ...
1366          }
1367        }
1368        @endcode
1369        @endif
1370        @if java
1371        @code{.java}
1372        SBMLReader reader = new SBMLReader();
1373        SBMLDocument doc  = reader.readSBMLFromFile(filename);
1374
1375        if (doc.getNumErrors() > 0)
1376        {
1377            if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable)
1378            {
1379                // Handle case of unreadable file here.
1380            }
1381            else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError)
1382            {
1383                // Handle case of other file operation error here.
1384            }
1385            else
1386            {
1387                // Handle other error cases.
1388            }
1389        }
1390        @endcode
1391        @endif
1392        @if python
1393        @code{.py}
1394        reader = SBMLReader()
1395        if reader == None:
1396          # Handle the truly exceptional case of no object created here.
1397
1398        doc = reader.readSBMLFromFile(filename)
1399        if doc.getNumErrors() > 0:
1400          if doc.getError(0).getErrorId() == XMLFileUnreadable:
1401            # Handle case of unreadable file here.
1402          elif doc.getError(0).getErrorId() == XMLFileOperationError:
1403            # Handle case of other file error here.
1404          else:
1405            # Handle other error cases here.
1406        @endcode
1407        @endif
1408        @if csharp
1409        @code{.cs}
1410        SBMLReader reader = new SBMLReader();
1411        SBMLDocument doc = reader.readSBMLFromFile(filename);
1412
1413        if (doc.getNumErrors() > 0)
1414        {
1415            if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable)
1416            {
1417                 // Handle case of unreadable file here.
1418            }
1419            else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError)
1420            {
1421                 // Handle case of other file operation error here.
1422            }
1423            else
1424            {
1425                 // Handle other cases -- see error codes defined in XMLErrorCode_t
1426                 // for other possible cases to check.
1427            }
1428         }
1429        @endcode
1430        @endif@~
1431
1432        @par
1433        If the given filename ends with the suffix @c '.gz' (for example,
1434        @c 'myfile.xml.gz'), the file is assumed to be compressed in @em gzip
1435        format and will be automatically decompressed upon reading.
1436        Similarly, if the given filename ends with @c '.zip' or @c '.bz2', the
1437        file is assumed to be compressed in @em zip or @em bzip2 format
1438        (respectively).  Files whose names lack these suffixes will be read
1439        uncompressed.  Note that if the file is in @em zip format but the
1440        archive contains more than one file, only the first file in the
1441        archive will be read and the rest ignored.
1442
1443        @par
1444        To read a gzip/zip file, libSBML needs to be configured and linked with the
1445        <a target='_blank' href='http://www.zlib.net/'>zlib</a> library at compile
1446        time.  It also needs to be linked with the <a target='_blank'
1447        href=''>bzip2</a> library to read files in <em>bzip2</em> format.  (Both of
1448        these are the default configurations for libSBML.)  Errors about unreadable
1449        files will be logged if a compressed filename is given and libSBML was
1450        <em>not</em> linked with the corresponding required library.
1451
1452        This method is identical to
1453        @if python @link SBMLReader.readSBMLFromFile() SBMLReader.readSBMLFromFile()@endlink@endif@if java @link SBMLReader.readSBMLFromFile() SBMLReader.readSBMLFromFile(String)@endlink@endif@if cpp SBMLReader.readSBMLFromFile()@endif@if csharp SBMLReader.readSBMLFromFile()@endif.
1454
1455        @param filename the name or full pathname of the file to be read.
1456
1457        @return a pointer to the SBMLDocument object created from the SBML
1458        content in @p filename.
1459
1460        @note LibSBML versions 2.x and later versions behave differently in
1461        error handling in several respects.  One difference is how early some
1462        errors are caught and whether libSBML continues processing a file in
1463        the face of some early errors.  In general, libSBML versions after 2.x
1464        stop parsing SBML inputs sooner than libSBML version 2.x in the face
1465        of XML errors, because the errors may invalidate any further SBML
1466        content.  For example, a missing XML declaration at the beginning of
1467        the file was ignored by libSBML 2.x but in version 3.x and later, it
1468        will cause libSBML to stop parsing the rest of the input altogether.
1469        While this behavior may seem more severe and intolerant, it was
1470        necessary in order to provide uniform behavior regardless of which
1471        underlying XML parser (Expat, Xerces, libxml2) is being used by
1472        libSBML.  The XML parsers themselves behave differently in their error
1473        reporting, and sometimes libSBML has to resort to the lowest common
1474        denominator.
1475
1476        @see readSBMLFromString()
1477        @see SBMLError
1478        @see SBMLDocument
1479
1480        """
1481        return _libsbml.SBMLReader_readSBML(self, filename)
1482
1483    def readSBMLFromFile(self, filename):
1484        r"""
1485        readSBMLFromFile(SBMLReader self, string filename) -> SBMLDocument
1486
1487        Reads an SBML document from the given file.
1488
1489        If the file named @p filename does not exist or its content is not valid
1490        SBML, one or more errors will be logged with the SBMLDocument object
1491        returned by this method.  Callers can use the methods on SBMLDocument such
1492        as
1493        @if python @link libsbml.SBMLDocument.getNumErrors() SBMLDocument.getNumErrors()@endlink@endif,
1494        @if conly SBMLDocument_getNumErrors() @else SBMLDocument.getNumErrors()@endif@~
1495        and
1496        @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
1497        @if java SBMLDocument.getError()@endif
1498        @if cpp SBMLDocument.getError()@endif
1499        @if csharp SBMLDocument.getError()@endif
1500        @if conly SBMLDocument_getError()@endif@~
1501        to get the errors.  The object returned by
1502        @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
1503        @if java SBMLDocument.getError()@endif
1504        @if cpp SBMLDocument.getError()@endif
1505        @if csharp SBMLDocument.getError()@endif
1506        @if conly SBMLDocument_getError()@endif@~
1507        is an SBMLError object, and it has methods to get the error code,
1508        category, and severity level of the problem, as well as a textual
1509        description of the problem.  The possible severity levels range from
1510        informational messages to fatal errors; see the documentation for
1511        @if conly SBMLError_t @else SBMLError@endif@~
1512        for more information.
1513
1514        If the file @p filename could not be read, the file-reading error will
1515        appear first.  The error code @if clike (a value drawn from the
1516        enumeration #XMLErrorCode_t)@endif@~ can provide a clue about what
1517        happened.  For example, a file might be unreadable (either because it does
1518        not actually exist or because the user does not have the necessary access
1519        privileges to read it) or some sort of file operation error may have been
1520        reported by the underlying operating system.  Callers can check for these
1521        situations using a program fragment such as the following:
1522        @if cpp
1523        @code{.cpp}
1524        SBMLReader reader;
1525        SBMLDocument doc  = reader.readSBMLFromFile(filename);
1526
1527        if (doc->getNumErrors() > 0)
1528        {
1529          if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable)
1530          {
1531            // Handle case of unreadable file here.
1532          }
1533          else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError)
1534          {
1535            // Handle case of other file operation error here.
1536          }
1537          else
1538          {
1539            // Handle other cases -- see error codes defined in XMLErrorCode_t
1540            // for other possible cases to check.
1541          }
1542        }
1543        @endcode
1544        @endif
1545        @if conly
1546        @code{.c}
1547        SBMLReader_t   *sr;
1548        SBMLDocument_t *d;
1549
1550        sr = SBMLReader_create();
1551
1552        d = SBMLReader_readSBML(sr, filename);
1553
1554        if (SBMLDocument_getNumErrors(d) > 0)
1555        {
1556          if (XMLError_getId(SBMLDocument_getError(d, 0))
1557              == SBML_READ_ERROR_FILE_NOT_FOUND)
1558          {
1559             ...
1560          }
1561          if (XMLError_getId(SBMLDocument_getError(d, 0))
1562              == SBML_READ_ERROR_NOT_SBML)
1563          {
1564             ...
1565          }
1566        }
1567        @endcode
1568        @endif
1569        @if java
1570        @code{.java}
1571        SBMLReader reader = new SBMLReader();
1572        SBMLDocument doc  = reader.readSBMLFromFile(filename);
1573
1574        if (doc.getNumErrors() > 0)
1575        {
1576            if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable)
1577            {
1578                // Handle case of unreadable file here.
1579            }
1580            else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError)
1581            {
1582                // Handle case of other file operation error here.
1583            }
1584            else
1585            {
1586                // Handle other error cases.
1587            }
1588        }
1589        @endcode
1590        @endif
1591        @if python
1592        @code{.py}
1593        reader = SBMLReader()
1594        if reader == None:
1595          # Handle the truly exceptional case of no object created here.
1596
1597        doc = reader.readSBMLFromFile(filename)
1598        if doc.getNumErrors() > 0:
1599          if doc.getError(0).getErrorId() == XMLFileUnreadable:
1600            # Handle case of unreadable file here.
1601          elif doc.getError(0).getErrorId() == XMLFileOperationError:
1602            # Handle case of other file error here.
1603          else:
1604            # Handle other error cases here.
1605        @endcode
1606        @endif
1607        @if csharp
1608        @code{.cs}
1609        SBMLReader reader = new SBMLReader();
1610        SBMLDocument doc = reader.readSBMLFromFile(filename);
1611
1612        if (doc.getNumErrors() > 0)
1613        {
1614            if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable)
1615            {
1616                 // Handle case of unreadable file here.
1617            }
1618            else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError)
1619            {
1620                 // Handle case of other file operation error here.
1621            }
1622            else
1623            {
1624                 // Handle other cases -- see error codes defined in XMLErrorCode_t
1625                 // for other possible cases to check.
1626            }
1627         }
1628        @endcode
1629        @endif@~
1630
1631        @par
1632        If the given filename ends with the suffix @c '.gz' (for example,
1633        @c 'myfile.xml.gz'), the file is assumed to be compressed in @em gzip
1634        format and will be automatically decompressed upon reading.
1635        Similarly, if the given filename ends with @c '.zip' or @c '.bz2', the
1636        file is assumed to be compressed in @em zip or @em bzip2 format
1637        (respectively).  Files whose names lack these suffixes will be read
1638        uncompressed.  Note that if the file is in @em zip format but the
1639        archive contains more than one file, only the first file in the
1640        archive will be read and the rest ignored.
1641
1642        @par
1643        To read a gzip/zip file, libSBML needs to be configured and linked with the
1644        <a target='_blank' href='http://www.zlib.net/'>zlib</a> library at compile
1645        time.  It also needs to be linked with the <a target='_blank'
1646        href=''>bzip2</a> library to read files in <em>bzip2</em> format.  (Both of
1647        these are the default configurations for libSBML.)  Errors about unreadable
1648        files will be logged if a compressed filename is given and libSBML was
1649        <em>not</em> linked with the corresponding required library.
1650
1651        This method is identical to
1652        @if python @link SBMLReader.readSBML() SBMLReader.readSBML()@endlink@endif@if java @link SBMLReader.readSBML() SBMLReader.readSBML(String)@endlink@endif@if cpp SBMLReader.readSBML()@endif@if csharp SBMLReader.readSBML()@endif.
1653
1654        @param filename the name or full pathname of the file to be read.
1655
1656        @return a pointer to the SBMLDocument object created from the SBML
1657        content in @p filename.
1658
1659        @note LibSBML versions 2.x and later versions behave differently in
1660        error handling in several respects.  One difference is how early some
1661        errors are caught and whether libSBML continues processing a file in
1662        the face of some early errors.  In general, libSBML versions after 2.x
1663        stop parsing SBML inputs sooner than libSBML version 2.x in the face
1664        of XML errors, because the errors may invalidate any further SBML
1665        content.  For example, a missing XML declaration at the beginning of
1666        the file was ignored by libSBML 2.x but in version 3.x and later, it
1667        will cause libSBML to stop parsing the rest of the input altogether.
1668        While this behavior may seem more severe and intolerant, it was
1669        necessary in order to provide uniform behavior regardless of which
1670        underlying XML parser (Expat, Xerces, libxml2) is being used by
1671        libSBML.  The XML parsers themselves behave differently in their error
1672        reporting, and sometimes libSBML has to resort to the lowest common
1673        denominator.
1674
1675        @see readSBMLFromString()
1676        @see SBMLError
1677        @see SBMLDocument
1678
1679        """
1680        return _libsbml.SBMLReader_readSBMLFromFile(self, filename)
1681
1682    def readSBMLFromString(self, xml):
1683        r"""
1684        readSBMLFromString(SBMLReader self, string xml) -> SBMLDocument
1685
1686        Reads an SBML document from a text string.
1687
1688        This method is flexible with respect to the presence of an XML
1689        declaration at the beginning of the string.  In particular, if the
1690        string in @p xml does not begin with the XML declaration
1691        @verbatim
1692        <?xml version='1.0' encoding='UTF-8'?>
1693        @endverbatim
1694        then this method will automatically prepend the declaration
1695        to @p xml.
1696
1697        This method will log a fatal error if the content given in the parameter
1698        @p xml is not in SBML format.  See the method documentation for
1699        @if conly SBMLReader_readSBML()
1700        @elseif java SBMLReader.readSBML()
1701        @else SBMLReader.readSBML()
1702        @endif
1703        for an example of code for testing the returned error code.
1704
1705        @param xml a string containing a full SBML model.
1706
1707        @return a pointer to the SBMLDocument created from the SBML content,
1708        or a null pointer if @p xml is @c None.
1709
1710        @note When using this method to read an SBMLDocument that uses the SBML
1711        Level&nbsp;3 Hierarchical %Model Composition package (comp) the document
1712        location cannot be set automatically. Thus, if the model contains
1713        references to ExternalModelDefinition objects, it will be necessary to
1714        manually set the document URI location
1715        (@if conly SBMLDocument_setLocationURI()
1716        @elseif java SBMLDocument.setLocationURI()
1717        @else SBMLDocument.setLocationURI()
1718        @endif
1719        ) in order to facilitate resolving these models.
1720
1721        @see SBMLReader.readSBML()
1722
1723        """
1724        return _libsbml.SBMLReader_readSBMLFromString(self, xml)
1725
1726    @staticmethod
1727    def hasZlib():
1728        r"""
1729        hasZlib() -> bool
1730
1731        Static method; returns @c True if this copy of libSBML supports
1732        <i>gzip</I> and <i>zip</i> format compression.
1733
1734        @return @c True if libSBML has been linked with the <i>zlib</i>
1735        library, @c False otherwise.
1736
1737        @if python @note Because this is a static method on a class, the Python
1738        language interface for libSBML will contain two variants.  One will be the
1739        expected, normal static method on the class (i.e., a regular
1740        <em>methodName</em>), and the other will be a standalone top-level
1741        function with the name <em>ClassName_methodName()</em>. This is merely an
1742        artifact of how the language interfaces are created in libSBML.  The
1743        methods are functionally identical. @endif@~
1744
1745        @see @if clike hasBzip2() @else SBMLReader.hasBzip2()@endif@~
1746
1747        """
1748        return _libsbml.SBMLReader_hasZlib()
1749
1750    @staticmethod
1751    def hasBzip2():
1752        r"""
1753        hasBzip2() -> bool
1754
1755        Static method; returns @c True if this copy of libSBML supports
1756        <i>bzip2</i> format compression.
1757
1758        @return @c True if libSBML is linked with the <i>bzip2</i>
1759        libraries, @c False otherwise.
1760
1761        @if python @note Because this is a static method on a class, the Python
1762        language interface for libSBML will contain two variants.  One will be the
1763        expected, normal static method on the class (i.e., a regular
1764        <em>methodName</em>), and the other will be a standalone top-level
1765        function with the name <em>ClassName_methodName()</em>. This is merely an
1766        artifact of how the language interfaces are created in libSBML.  The
1767        methods are functionally identical. @endif@~
1768
1769        @see @if clike hasZlib() @else SBMLReader.hasZlib()@endif@~
1770
1771        """
1772        return _libsbml.SBMLReader_hasBzip2()
1773
1774    def __eq__(self, rhs):
1775      if ((self is None) and (rhs is None)): return True
1776      if ((self is None) or  (rhs is None)): return False
1777      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
1778        if (self.this == rhs.this): return True
1779      return False
1780
1781    def __ne__(self, rhs):
1782      if ((self is None) and (rhs is None)): return False
1783      if ((self is None) or  (rhs is None)): return True
1784      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
1785        if (self.this == rhs.this): return False
1786      return True
1787
1788
1789# Register SBMLReader in _libsbml:
1790_libsbml.SBMLReader_swigregister(SBMLReader)
1791
1792def SBMLReader_hasZlib():
1793    r"""
1794    SBMLReader_hasZlib() -> bool
1795
1796    Static method; returns @c True if this copy of libSBML supports
1797    <i>gzip</I> and <i>zip</i> format compression.
1798
1799    @return @c True if libSBML has been linked with the <i>zlib</i>
1800    library, @c False otherwise.
1801
1802    @if python @note Because this is a static method on a class, the Python
1803    language interface for libSBML will contain two variants.  One will be the
1804    expected, normal static method on the class (i.e., a regular
1805    <em>methodName</em>), and the other will be a standalone top-level
1806    function with the name <em>ClassName_methodName()</em>. This is merely an
1807    artifact of how the language interfaces are created in libSBML.  The
1808    methods are functionally identical. @endif@~
1809
1810    @see @if clike hasBzip2() @else SBMLReader.hasBzip2()@endif@~
1811
1812    """
1813    return _libsbml.SBMLReader_hasZlib()
1814
1815def SBMLReader_hasBzip2():
1816    r"""
1817    SBMLReader_hasBzip2() -> bool
1818
1819    Static method; returns @c True if this copy of libSBML supports
1820    <i>bzip2</i> format compression.
1821
1822    @return @c True if libSBML is linked with the <i>bzip2</i>
1823    libraries, @c False otherwise.
1824
1825    @if python @note Because this is a static method on a class, the Python
1826    language interface for libSBML will contain two variants.  One will be the
1827    expected, normal static method on the class (i.e., a regular
1828    <em>methodName</em>), and the other will be a standalone top-level
1829    function with the name <em>ClassName_methodName()</em>. This is merely an
1830    artifact of how the language interfaces are created in libSBML.  The
1831    methods are functionally identical. @endif@~
1832
1833    @see @if clike hasZlib() @else SBMLReader.hasZlib()@endif@~
1834
1835    """
1836    return _libsbml.SBMLReader_hasBzip2()
1837
1838
1839def readSBML(filename):
1840    r"""
1841    readSBML(char const * filename) -> SBMLDocument
1842
1843    Reads an SBML document from the given file.
1844
1845    If the file named @p filename does not exist or its content is not valid
1846    SBML, one or more errors will be logged with the SBMLDocument object
1847    returned by this method.  Callers can use the methods on SBMLDocument such
1848    as
1849    @if python @link libsbml.SBMLDocument.getNumErrors() SBMLDocument.getNumErrors()@endlink@endif,
1850    @if conly SBMLDocument_getNumErrors() @else SBMLDocument.getNumErrors()@endif@~
1851    and
1852    @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
1853    @if java SBMLDocument.getError()@endif
1854    @if cpp SBMLDocument.getError()@endif
1855    @if csharp SBMLDocument.getError()@endif
1856    @if conly SBMLDocument_getError()@endif@~
1857    to get the errors.  The object returned by
1858    @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
1859    @if java SBMLDocument.getError()@endif
1860    @if cpp SBMLDocument.getError()@endif
1861    @if csharp SBMLDocument.getError()@endif
1862    @if conly SBMLDocument_getError()@endif@~
1863    is an SBMLError object, and it has methods to get the error code,
1864    category, and severity level of the problem, as well as a textual
1865    description of the problem.  The possible severity levels range from
1866    informational messages to fatal errors; see the documentation for
1867    @if conly SBMLError_t @else SBMLError@endif@~
1868    for more information.
1869
1870    If the file @p filename could not be read, the file-reading error will
1871    appear first.  The error code @if clike (a value drawn from the
1872    enumeration #XMLErrorCode_t)@endif@~ can provide a clue about what
1873    happened.  For example, a file might be unreadable (either because it does
1874    not actually exist or because the user does not have the necessary access
1875    privileges to read it) or some sort of file operation error may have been
1876    reported by the underlying operating system.  Callers can check for these
1877    situations using a program fragment such as the following:
1878    @if cpp
1879    @code{.cpp}
1880    SBMLReader reader;
1881    SBMLDocument doc  = reader.readSBMLFromFile(filename);
1882
1883    if (doc->getNumErrors() > 0)
1884    {
1885      if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable)
1886      {
1887        // Handle case of unreadable file here.
1888      }
1889      else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError)
1890      {
1891        // Handle case of other file operation error here.
1892      }
1893      else
1894      {
1895        // Handle other cases -- see error codes defined in XMLErrorCode_t
1896        // for other possible cases to check.
1897      }
1898    }
1899    @endcode
1900    @endif
1901    @if conly
1902    @code{.c}
1903    SBMLReader_t   *sr;
1904    SBMLDocument_t *d;
1905
1906    sr = SBMLReader_create();
1907
1908    d = SBMLReader_readSBML(sr, filename);
1909
1910    if (SBMLDocument_getNumErrors(d) > 0)
1911    {
1912      if (XMLError_getId(SBMLDocument_getError(d, 0))
1913          == SBML_READ_ERROR_FILE_NOT_FOUND)
1914      {
1915         ...
1916      }
1917      if (XMLError_getId(SBMLDocument_getError(d, 0))
1918          == SBML_READ_ERROR_NOT_SBML)
1919      {
1920         ...
1921      }
1922    }
1923    @endcode
1924    @endif
1925    @if java
1926    @code{.java}
1927    SBMLReader reader = new SBMLReader();
1928    SBMLDocument doc  = reader.readSBMLFromFile(filename);
1929
1930    if (doc.getNumErrors() > 0)
1931    {
1932        if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable)
1933        {
1934            // Handle case of unreadable file here.
1935        }
1936        else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError)
1937        {
1938            // Handle case of other file operation error here.
1939        }
1940        else
1941        {
1942            // Handle other error cases.
1943        }
1944    }
1945    @endcode
1946    @endif
1947    @if python
1948    @code{.py}
1949    reader = SBMLReader()
1950    if reader == None:
1951      # Handle the truly exceptional case of no object created here.
1952
1953    doc = reader.readSBMLFromFile(filename)
1954    if doc.getNumErrors() > 0:
1955      if doc.getError(0).getErrorId() == XMLFileUnreadable:
1956        # Handle case of unreadable file here.
1957      elif doc.getError(0).getErrorId() == XMLFileOperationError:
1958        # Handle case of other file error here.
1959      else:
1960        # Handle other error cases here.
1961    @endcode
1962    @endif
1963    @if csharp
1964    @code{.cs}
1965    SBMLReader reader = new SBMLReader();
1966    SBMLDocument doc = reader.readSBMLFromFile(filename);
1967
1968    if (doc.getNumErrors() > 0)
1969    {
1970        if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable)
1971        {
1972             // Handle case of unreadable file here.
1973        }
1974        else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError)
1975        {
1976             // Handle case of other file operation error here.
1977        }
1978        else
1979        {
1980             // Handle other cases -- see error codes defined in XMLErrorCode_t
1981             // for other possible cases to check.
1982        }
1983     }
1984    @endcode
1985    @endif@~
1986
1987    @par
1988    If the given filename ends with the suffix @c '.gz' (for example,
1989    @c 'myfile.xml.gz'), the file is assumed to be compressed in @em gzip
1990    format and will be automatically decompressed upon reading.
1991    Similarly, if the given filename ends with @c '.zip' or @c '.bz2', the
1992    file is assumed to be compressed in @em zip or @em bzip2 format
1993    (respectively).  Files whose names lack these suffixes will be read
1994    uncompressed.  Note that if the file is in @em zip format but the
1995    archive contains more than one file, only the first file in the
1996    archive will be read and the rest ignored.
1997
1998    @par
1999    To read a gzip/zip file, libSBML needs to be configured and linked with the
2000    <a target='_blank' href='http://www.zlib.net/'>zlib</a> library at compile
2001    time.  It also needs to be linked with the <a target='_blank'
2002    href=''>bzip2</a> library to read files in <em>bzip2</em> format.  (Both of
2003    these are the default configurations for libSBML.)  Errors about unreadable
2004    files will be logged if a compressed filename is given and libSBML was
2005    <em>not</em> linked with the corresponding required library.
2006
2007    @if conly
2008    @memberof SBMLReader_t
2009    @endif
2010
2011    """
2012    return _libsbml.readSBML(filename)
2013
2014def readSBMLFromFile(filename):
2015    r"""
2016    readSBMLFromFile(char const * filename) -> SBMLDocument
2017
2018    Reads an SBML document from the given file.
2019
2020    If the file named @p filename does not exist or its content is not valid
2021    SBML, one or more errors will be logged with the SBMLDocument object
2022    returned by this method.  Callers can use the methods on SBMLDocument such
2023    as
2024    @if python @link libsbml.SBMLDocument.getNumErrors() SBMLDocument.getNumErrors()@endlink@endif,
2025    @if conly SBMLDocument_getNumErrors() @else SBMLDocument.getNumErrors()@endif@~
2026    and
2027    @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
2028    @if java SBMLDocument.getError()@endif
2029    @if cpp SBMLDocument.getError()@endif
2030    @if csharp SBMLDocument.getError()@endif
2031    @if conly SBMLDocument_getError()@endif@~
2032    to get the errors.  The object returned by
2033    @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
2034    @if java SBMLDocument.getError()@endif
2035    @if cpp SBMLDocument.getError()@endif
2036    @if csharp SBMLDocument.getError()@endif
2037    @if conly SBMLDocument_getError()@endif@~
2038    is an SBMLError object, and it has methods to get the error code,
2039    category, and severity level of the problem, as well as a textual
2040    description of the problem.  The possible severity levels range from
2041    informational messages to fatal errors; see the documentation for
2042    @if conly SBMLError_t @else SBMLError@endif@~
2043    for more information.
2044
2045    If the file @p filename could not be read, the file-reading error will
2046    appear first.  The error code @if clike (a value drawn from the
2047    enumeration #XMLErrorCode_t)@endif@~ can provide a clue about what
2048    happened.  For example, a file might be unreadable (either because it does
2049    not actually exist or because the user does not have the necessary access
2050    privileges to read it) or some sort of file operation error may have been
2051    reported by the underlying operating system.  Callers can check for these
2052    situations using a program fragment such as the following:
2053    @if cpp
2054    @code{.cpp}
2055    SBMLReader reader;
2056    SBMLDocument doc  = reader.readSBMLFromFile(filename);
2057
2058    if (doc->getNumErrors() > 0)
2059    {
2060      if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable)
2061      {
2062        // Handle case of unreadable file here.
2063      }
2064      else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError)
2065      {
2066        // Handle case of other file operation error here.
2067      }
2068      else
2069      {
2070        // Handle other cases -- see error codes defined in XMLErrorCode_t
2071        // for other possible cases to check.
2072      }
2073    }
2074    @endcode
2075    @endif
2076    @if conly
2077    @code{.c}
2078    SBMLReader_t   *sr;
2079    SBMLDocument_t *d;
2080
2081    sr = SBMLReader_create();
2082
2083    d = SBMLReader_readSBML(sr, filename);
2084
2085    if (SBMLDocument_getNumErrors(d) > 0)
2086    {
2087      if (XMLError_getId(SBMLDocument_getError(d, 0))
2088          == SBML_READ_ERROR_FILE_NOT_FOUND)
2089      {
2090         ...
2091      }
2092      if (XMLError_getId(SBMLDocument_getError(d, 0))
2093          == SBML_READ_ERROR_NOT_SBML)
2094      {
2095         ...
2096      }
2097    }
2098    @endcode
2099    @endif
2100    @if java
2101    @code{.java}
2102    SBMLReader reader = new SBMLReader();
2103    SBMLDocument doc  = reader.readSBMLFromFile(filename);
2104
2105    if (doc.getNumErrors() > 0)
2106    {
2107        if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileUnreadable)
2108        {
2109            // Handle case of unreadable file here.
2110        }
2111        else if (doc.getError(0).getErrorId() == libsbmlConstants.XMLFileOperationError)
2112        {
2113            // Handle case of other file operation error here.
2114        }
2115        else
2116        {
2117            // Handle other error cases.
2118        }
2119    }
2120    @endcode
2121    @endif
2122    @if python
2123    @code{.py}
2124    reader = SBMLReader()
2125    if reader == None:
2126      # Handle the truly exceptional case of no object created here.
2127
2128    doc = reader.readSBMLFromFile(filename)
2129    if doc.getNumErrors() > 0:
2130      if doc.getError(0).getErrorId() == XMLFileUnreadable:
2131        # Handle case of unreadable file here.
2132      elif doc.getError(0).getErrorId() == XMLFileOperationError:
2133        # Handle case of other file error here.
2134      else:
2135        # Handle other error cases here.
2136    @endcode
2137    @endif
2138    @if csharp
2139    @code{.cs}
2140    SBMLReader reader = new SBMLReader();
2141    SBMLDocument doc = reader.readSBMLFromFile(filename);
2142
2143    if (doc.getNumErrors() > 0)
2144    {
2145        if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable)
2146        {
2147             // Handle case of unreadable file here.
2148        }
2149        else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError)
2150        {
2151             // Handle case of other file operation error here.
2152        }
2153        else
2154        {
2155             // Handle other cases -- see error codes defined in XMLErrorCode_t
2156             // for other possible cases to check.
2157        }
2158     }
2159    @endcode
2160    @endif@~
2161
2162    @par
2163    If the given filename ends with the suffix @c '.gz' (for example,
2164    @c 'myfile.xml.gz'), the file is assumed to be compressed in @em gzip
2165    format and will be automatically decompressed upon reading.
2166    Similarly, if the given filename ends with @c '.zip' or @c '.bz2', the
2167    file is assumed to be compressed in @em zip or @em bzip2 format
2168    (respectively).  Files whose names lack these suffixes will be read
2169    uncompressed.  Note that if the file is in @em zip format but the
2170    archive contains more than one file, only the first file in the
2171    archive will be read and the rest ignored.
2172
2173    @par
2174    To read a gzip/zip file, libSBML needs to be configured and linked with the
2175    <a target='_blank' href='http://www.zlib.net/'>zlib</a> library at compile
2176    time.  It also needs to be linked with the <a target='_blank'
2177    href=''>bzip2</a> library to read files in <em>bzip2</em> format.  (Both of
2178    these are the default configurations for libSBML.)  Errors about unreadable
2179    files will be logged if a compressed filename is given and libSBML was
2180    <em>not</em> linked with the corresponding required library.
2181
2182    @param filename the name or full pathname of the file to be read.
2183
2184    @return a pointer to the SBMLDocument structure created from the SBML
2185    content in @p filename.
2186
2187    @if conly
2188    @memberof SBMLReader_t
2189    @endif
2190
2191    """
2192    return _libsbml.readSBMLFromFile(filename)
2193
2194def readSBMLFromString(xml):
2195    r"""
2196    readSBMLFromString(char const * xml) -> SBMLDocument
2197
2198    Reads an SBML document from a text string.
2199
2200    This method is flexible with respect to the presence of an XML
2201    declaration at the beginning of the string.  In particular, if the
2202    string in @p xml does not begin with the XML declaration
2203    @verbatim
2204    <?xml version='1.0' encoding='UTF-8'?>
2205    @endverbatim
2206    then this method will automatically prepend the declaration
2207    to @p xml.
2208
2209    This method will log a fatal error if the content given in the parameter
2210    @p xml is not in SBML format.  See the method documentation for
2211    @if conly SBMLReader_readSBML()
2212    @elseif java SBMLReader.readSBML()
2213    @else SBMLReader.readSBML()
2214    @endif
2215    for an example of code for testing the returned error code.
2216
2217    @param xml a string containing a full SBML model.
2218
2219    @return a pointer to the SBMLDocument structure created from the SBML
2220    content in @p xml.
2221
2222    @note When using this method to read an SBMLDocument that uses the SBML
2223    Level&nbsp;3 Hierarchical %Model Composition package (comp) the document
2224    location cannot be set automatically. Thus, if the model contains
2225    references to ExternalModelDefinition objects, it will be necessary to
2226    manually set the document URI location
2227    (@if conly SBMLDocument_setLocationURI()
2228    @elseif java SBMLDocument.setLocationURI()
2229    @else SBMLDocument.setLocationURI()
2230    @endif
2231    ) in order to facilitate resolving these models.
2232
2233    @if conly
2234    @memberof SBMLReader_t
2235    @endif
2236
2237    """
2238    return _libsbml.readSBMLFromString(xml)
2239class SBMLWriter(object):
2240    r"""
2241
2242    @sbmlpackage{core}
2243
2244    @htmlinclude pkg-marker-core.html File and text-string SBML writer.
2245
2246    @htmlinclude not-sbml-warning.html
2247
2248    The SBMLWriter class is the converse of SBMLReader, and provides the
2249    main interface for serializing SBML models into XML and writing the
2250    result to an output stream or to files and text strings.  The methods
2251    for writing SBML all take an SBMLDocument object and a destination.
2252    They return a boolean or integer value to indicate success or failure.
2253
2254    @section sbmlwriter-compression Support for writing compressed files
2255
2256    LibSBML provides support for writing (as well as reading) compressed
2257    SBML files.  The process is transparent to the calling
2258    application---the application does not need to do anything
2259    deliberate to invoke the functionality.  If a given SBML filename ends
2260    with an extension for the @em gzip, @em zip or @em bzip2 compression
2261    formats (respectively, <code>&quot;.gz&quot;</code>,
2262    <code>&quot;.zip&quot;</code>, or <code>&quot;.bz2&quot;</code>),
2263    then the methods
2264    SBMLWriter.writeSBML()
2265    and SBMLReader.readSBML()
2266    will automatically compress and decompress the file while writing and
2267    reading it.  If the filename has no such extension, it
2268    will be written and read uncompressed as normal.
2269
2270    The compression feature requires that the @em zlib (for @em gzip and @em
2271    zip formats) and/or @em bzip2 (for @em bzip2 format) be available on the
2272    system running libSBML, and that libSBML was configured with their
2273    support compiled-in.  Please see the libSBML @if clike <a href='libsbml-installation.html'>installation instructions</a>@endif@if python <a href='libsbml-installation.html'>installation instructions</a>@endif@if java  <a href='../../../libsbml-installation.html'>installation instructions</a>@endif@~ for
2274    more information about this.  The methods
2275    SBMLWriter.hasZlib() and
2276    SBMLWriter.hasBzip2()
2277    can be used by an application to query at run-time whether support
2278    for the compression libraries is available in the present copy of
2279    libSBML.
2280
2281    Support for compression is not mandated by the SBML standard, but
2282    applications may find it helpful, particularly when large SBML models
2283    are being communicated across data links of limited bandwidth.
2284
2285    """
2286
2287    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2288    __repr__ = _swig_repr
2289
2290    def __init__(self):
2291        r"""
2292        __init__(SBMLWriter self) -> SBMLWriter
2293
2294        Creates a new SBMLWriter.
2295
2296        The libSBML SBMLWriter objects offer methods for writing SBML in
2297        XML form to files and text strings.
2298
2299        """
2300        _libsbml.SBMLWriter_swiginit(self, _libsbml.new_SBMLWriter())
2301    __swig_destroy__ = _libsbml.delete_SBMLWriter
2302
2303    def setProgramName(self, name):
2304        r"""
2305        setProgramName(SBMLWriter self, string name) -> int
2306
2307        Sets the name of this program, i.e., the program that is about to
2308        write out the SBMLDocument.
2309
2310        If the program name and version are set (see
2311        SBMLWriter.setProgramVersion()), the
2312        following XML comment, intended for human consumption, will be written
2313        at the beginning of the XML document:
2314        @verbatim
2315         <!-- Created by <program name> version <program version>
2316         on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
2317         @endverbatim
2318
2319        If the program name and version are not set at some point before
2320        calling the writeSBML() methods, no such comment is written out.
2321
2322        @param name the name of this program (where 'this program' refers to
2323        program in which libSBML is embedded, not libSBML itself!)
2324
2325        @return integer value indicating success/failure of the
2326        function.  @if clike The value is drawn from the
2327        enumeration #OperationReturnValues_t. @endif@~ This particular
2328        function only does one thing irrespective of user input or
2329        object state, and thus will only return a single value:
2330        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2331
2332        @see setProgramVersion()
2333
2334        """
2335        return _libsbml.SBMLWriter_setProgramName(self, name)
2336
2337    def setProgramVersion(self, version):
2338        r"""
2339        setProgramVersion(SBMLWriter self, string version) -> int
2340
2341        Sets the version of this program, i.e., the program that is about to
2342        write out the SBMLDocument.
2343
2344        If the program version and name are set (see
2345        SBMLWriter.setProgramName()), the
2346        following XML comment, intended for human consumption, will be written
2347        at the beginning of the document:
2348        @verbatim
2349         <!-- Created by <program name> version <program version>
2350         on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
2351         @endverbatim
2352
2353        If the program version and name are not set at some point before
2354        calling the writeSBML() methods, no such comment is written out.
2355
2356        @param version the version of this program (where 'this program'
2357        refers to program in which libSBML is embedded, not libSBML itself!)
2358
2359        @return integer value indicating success/failure of the
2360        function.  @if clike The value is drawn from the
2361        enumeration #OperationReturnValues_t. @endif@~ This particular
2362        function only does one thing irrespective of user input or
2363        object state, and thus will only return a single value:
2364        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2365
2366        @see setProgramName()
2367
2368        """
2369        return _libsbml.SBMLWriter_setProgramVersion(self, version)
2370
2371    def writeSBML(self, *args):
2372        r"""
2373        writeSBML(SBMLWriter self, SBMLDocument d, string filename) -> bool
2374        writeSBML(SBMLWriter self, SBMLDocument d, ostream stream) -> bool
2375
2376        This method has multiple variants; they differ in the arguments
2377         they accept.  Each variant is described separately below.
2378
2379        @par
2380        <hr>
2381        <span class='variant-sig-heading'>Method variant with the following signature</span>:
2382         <pre class='signature'>writeSBML(SBMLDocument d, string filename)</pre>
2383
2384        Writes the given SBML document to filename.
2385
2386        @htmlinclude assuming-compressed-file.html
2387
2388        @param d the SBML document to be written.
2389
2390        @param filename the name or full pathname of the file where the SBML
2391        is to be written.
2392
2393        @return @c True on success and @c False if the filename could not be
2394        opened for writing.
2395
2396        @note @htmlinclude note-writing-zipped-files.html
2397
2398        @see setProgramVersion()
2399        @see setProgramName()
2400
2401
2402        @par
2403        <hr>
2404        <span class='variant-sig-heading'>Method variant with the following signature</span>:
2405         <pre class='signature'>writeSBML(SBMLDocument d, std::ostream stream)</pre>
2406
2407        Writes the given SBML document to the output stream.
2408
2409        @param d the SBML document to be written.
2410
2411        @param stream the stream object where the SBML is to be written.
2412
2413        @return @c True on success and @c False if one of the underlying
2414        parser components fail (rare).
2415
2416        @see setProgramVersion()
2417        @see setProgramName()
2418
2419        """
2420        return _libsbml.SBMLWriter_writeSBML(self, *args)
2421
2422    def writeToString(self, d):
2423        r"""
2424        writeToString(SBMLWriter self, SBMLDocument d) -> char *
2425
2426        @internal
2427
2428        @internal
2429
2430        """
2431        return _libsbml.SBMLWriter_writeToString(self, d)
2432
2433    def writeSBMLToFile(self, d, filename):
2434        r"""
2435        writeSBMLToFile(SBMLWriter self, SBMLDocument d, string filename) -> bool
2436
2437        Writes the given SBML document to filename.
2438
2439        @htmlinclude assuming-compressed-file.html
2440
2441        @param d the SBML document to be written.
2442
2443        @param filename the name or full pathname of the file where the SBML
2444        is to be written.
2445
2446        @return @c True on success and @c False if the filename could not be
2447        opened for writing.
2448
2449        @note @htmlinclude note-writing-zipped-files.html
2450
2451        @see setProgramVersion()
2452        @see setProgramName()
2453
2454        """
2455        return _libsbml.SBMLWriter_writeSBMLToFile(self, d, filename)
2456
2457    def writeSBMLToString(self, d):
2458        r"""
2459        writeSBMLToString(SBMLWriter self, SBMLDocument d) -> char *
2460
2461        Writes the given SBML document to an in-memory string and returns a
2462        pointer to it.
2463
2464        The string is owned by the caller and should be freed (with @c free())
2465        when no longer needed.
2466
2467        @param d the SBML document to be written.
2468
2469        @return the string on success and @c 0 if one of the underlying parser
2470        components fail.
2471
2472        @see setProgramVersion()
2473        @see setProgramName()
2474
2475        """
2476        return _libsbml.SBMLWriter_writeSBMLToString(self, d)
2477
2478    @staticmethod
2479    def hasZlib():
2480        r"""
2481        hasZlib() -> bool
2482
2483        Predicate returning @c True if this copy of libSBML has been linked
2484        with the <em>zlib</em> library.
2485
2486        LibSBML supports reading and writing files compressed with either
2487        bzip2 or zip/gzip compression.  The facility depends on libSBML having
2488        been compiled with the necessary support libraries.  This method
2489        allows a calling program to inquire whether that is the case for the
2490        copy of libSBML it is using.
2491
2492        @return @c True if libSBML is linked with zlib, @c False otherwise.
2493
2494        @if python @note Because this is a static method on a class, the Python
2495        language interface for libSBML will contain two variants.  One will be the
2496        expected, normal static method on the class (i.e., a regular
2497        <em>methodName</em>), and the other will be a standalone top-level
2498        function with the name <em>ClassName_methodName()</em>. This is merely an
2499        artifact of how the language interfaces are created in libSBML.  The
2500        methods are functionally identical. @endif@~
2501
2502        @see @if clike hasBzip2() @else SBMLWriter.hasBzip2() @endif@~
2503
2504        """
2505        return _libsbml.SBMLWriter_hasZlib()
2506
2507    @staticmethod
2508    def hasBzip2():
2509        r"""
2510        hasBzip2() -> bool
2511
2512        Predicate returning @c True if this copy of libSBML has been linked
2513        with the <em>bzip2</em> library.
2514
2515        LibSBML supports reading and writing files compressed with either
2516        bzip2 or zip/gzip compression.  The facility depends on libSBML having
2517        been compiled with the necessary support libraries.  This method
2518        allows a calling program to inquire whether that is the case for the
2519        copy of libSBML it is using.
2520
2521        @return @c True if libSBML is linked with bzip2, @c False otherwise.
2522
2523        @if python @note Because this is a static method on a class, the Python
2524        language interface for libSBML will contain two variants.  One will be the
2525        expected, normal static method on the class (i.e., a regular
2526        <em>methodName</em>), and the other will be a standalone top-level
2527        function with the name <em>ClassName_methodName()</em>. This is merely an
2528        artifact of how the language interfaces are created in libSBML.  The
2529        methods are functionally identical. @endif@~
2530
2531        @see @if clike hasZlib() @else SBMLWriter.hasZlib() @endif@~
2532
2533        """
2534        return _libsbml.SBMLWriter_hasBzip2()
2535
2536    def __eq__(self, rhs):
2537      if ((self is None) and (rhs is None)): return True
2538      if ((self is None) or  (rhs is None)): return False
2539      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
2540        if (self.this == rhs.this): return True
2541      return False
2542
2543    def __ne__(self, rhs):
2544      if ((self is None) and (rhs is None)): return False
2545      if ((self is None) or  (rhs is None)): return True
2546      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
2547        if (self.this == rhs.this): return False
2548      return True
2549
2550
2551# Register SBMLWriter in _libsbml:
2552_libsbml.SBMLWriter_swigregister(SBMLWriter)
2553
2554def SBMLWriter_hasZlib():
2555    r"""
2556    SBMLWriter_hasZlib() -> bool
2557
2558    Predicate returning @c True if this copy of libSBML has been linked
2559    with the <em>zlib</em> library.
2560
2561    LibSBML supports reading and writing files compressed with either
2562    bzip2 or zip/gzip compression.  The facility depends on libSBML having
2563    been compiled with the necessary support libraries.  This method
2564    allows a calling program to inquire whether that is the case for the
2565    copy of libSBML it is using.
2566
2567    @return @c True if libSBML is linked with zlib, @c False otherwise.
2568
2569    @if python @note Because this is a static method on a class, the Python
2570    language interface for libSBML will contain two variants.  One will be the
2571    expected, normal static method on the class (i.e., a regular
2572    <em>methodName</em>), and the other will be a standalone top-level
2573    function with the name <em>ClassName_methodName()</em>. This is merely an
2574    artifact of how the language interfaces are created in libSBML.  The
2575    methods are functionally identical. @endif@~
2576
2577    @see @if clike hasBzip2() @else SBMLWriter.hasBzip2() @endif@~
2578
2579    """
2580    return _libsbml.SBMLWriter_hasZlib()
2581
2582def SBMLWriter_hasBzip2():
2583    r"""
2584    SBMLWriter_hasBzip2() -> bool
2585
2586    Predicate returning @c True if this copy of libSBML has been linked
2587    with the <em>bzip2</em> library.
2588
2589    LibSBML supports reading and writing files compressed with either
2590    bzip2 or zip/gzip compression.  The facility depends on libSBML having
2591    been compiled with the necessary support libraries.  This method
2592    allows a calling program to inquire whether that is the case for the
2593    copy of libSBML it is using.
2594
2595    @return @c True if libSBML is linked with bzip2, @c False otherwise.
2596
2597    @if python @note Because this is a static method on a class, the Python
2598    language interface for libSBML will contain two variants.  One will be the
2599    expected, normal static method on the class (i.e., a regular
2600    <em>methodName</em>), and the other will be a standalone top-level
2601    function with the name <em>ClassName_methodName()</em>. This is merely an
2602    artifact of how the language interfaces are created in libSBML.  The
2603    methods are functionally identical. @endif@~
2604
2605    @see @if clike hasZlib() @else SBMLWriter.hasZlib() @endif@~
2606
2607    """
2608    return _libsbml.SBMLWriter_hasBzip2()
2609
2610
2611def writeSBML(d, filename):
2612    r"""
2613    writeSBML(SBMLDocument d, char const * filename) -> int
2614
2615    Writes the given SBML document @p d to the file named by @p filename.
2616    This convenience function is functionally equivalent to:
2617
2618    SBMLWriter_writeSBML(SBMLWriter_create(), d, filename);
2619
2620    @htmlinclude assuming-compressed-file.html
2621
2622    @param d the SBMLDocument object to be written out in XML format.
2623
2624    @param filename a string giving the path to a file where the XML
2625    content is to be written.
2626
2627    @return @c 1 (true) on success and @c 0 (false) if @p filename could not be
2628    written.  Some possible reasons for failure include (a) being unable to
2629    open the file, and (b) using a filename that indicates a compressed SBML
2630    file (i.e., a filename ending in <code>&quot;.zip&quot;</code> or
2631    similar) when the compression functionality has not been enabled in
2632    the underlying copy of libSBML.
2633
2634    @see @if conly SBMLWriter_hasZlib() @else SBMLWriter.hasZlib() @endif
2635    @see @if conly SBMLWriter_hasBzip2() @else SBMLWriter.hasBzip2() @endif
2636
2637    @if conly
2638    @memberof SBMLWriter_t
2639    @endif
2640
2641    """
2642    return _libsbml.writeSBML(d, filename)
2643
2644def writeSBMLToString(d):
2645    r"""
2646    writeSBMLToString(SBMLDocument d) -> char *
2647
2648    Writes the given SBML document @p d to an in-memory string and returns a
2649    pointer to it.  The string is owned by the caller and should be freed
2650    (with free()) when no longer needed.  This convenience function is
2651    functionally equivalent to:
2652
2653    SBMLWriter_writeSBMLToString(SBMLWriter_create(), d);
2654
2655    but does not require the caller to create an SBMLWriter object first.
2656
2657    @param d an SBMLDocument object to be written out in XML format.
2658
2659    @return the string on success and @c None if one of the underlying parser
2660    components fail.
2661
2662    @if clike @warning Note that the string is owned by the caller and
2663    should be freed after it is no longer needed.@endif@~
2664
2665    @if conly
2666    @memberof SBMLWriter_t
2667    @endif
2668
2669    """
2670    return _libsbml.writeSBMLToString(d)
2671
2672def writeSBMLToFile(d, filename):
2673    r"""
2674    writeSBMLToFile(SBMLDocument d, char const * filename) -> int
2675
2676    Writes the given SBML document @p d to the file @p filename.
2677    This convenience function is functionally equivalent to:
2678
2679    SBMLWriter_writeSBMLToFile(SBMLWriter_create(), d, filename);
2680
2681    but that does not require the caller to create an SBMLWriter object first.
2682
2683    @htmlinclude assuming-compressed-file.html
2684
2685    @param d an SBMLDocument object to be written out in XML format.
2686
2687    @param filename a string giving the path to a file where the XML
2688    content is to be written.
2689
2690    @return @c 1 (true) on success and @c 0 (false) if @p filename could not be
2691    written.  Some possible reasons for failure include (a) being unable to
2692    open the file, and (b) using a filename that indicates a compressed SBML
2693    file (i.e., a filename ending in <code>&quot;.zip&quot;</code> or
2694    similar) when the compression functionality has not been enabled in
2695    the underlying copy of libSBML.
2696
2697    @if clike @warning Note that the string is owned by the caller and
2698    should be freed (with the normal string <code>free()</code> C++
2699    function) after it is no longer needed.@endif@~
2700
2701    @see SBMLWriter.hasZlib()
2702    @see SBMLWriter.hasBzip2()
2703
2704    @if conly
2705    @memberof SBMLWriter_t
2706    @endif
2707
2708    """
2709    return _libsbml.writeSBMLToFile(d, filename)
2710SBML_UNKNOWN = _libsbml.SBML_UNKNOWN
2711
2712SBML_COMPARTMENT = _libsbml.SBML_COMPARTMENT
2713
2714SBML_COMPARTMENT_TYPE = _libsbml.SBML_COMPARTMENT_TYPE
2715
2716SBML_CONSTRAINT = _libsbml.SBML_CONSTRAINT
2717
2718SBML_DOCUMENT = _libsbml.SBML_DOCUMENT
2719
2720SBML_EVENT = _libsbml.SBML_EVENT
2721
2722SBML_EVENT_ASSIGNMENT = _libsbml.SBML_EVENT_ASSIGNMENT
2723
2724SBML_FUNCTION_DEFINITION = _libsbml.SBML_FUNCTION_DEFINITION
2725
2726SBML_INITIAL_ASSIGNMENT = _libsbml.SBML_INITIAL_ASSIGNMENT
2727
2728SBML_KINETIC_LAW = _libsbml.SBML_KINETIC_LAW
2729
2730SBML_LIST_OF = _libsbml.SBML_LIST_OF
2731
2732SBML_MODEL = _libsbml.SBML_MODEL
2733
2734SBML_PARAMETER = _libsbml.SBML_PARAMETER
2735
2736SBML_REACTION = _libsbml.SBML_REACTION
2737
2738SBML_RULE = _libsbml.SBML_RULE
2739
2740SBML_SPECIES = _libsbml.SBML_SPECIES
2741
2742SBML_SPECIES_REFERENCE = _libsbml.SBML_SPECIES_REFERENCE
2743
2744SBML_SPECIES_TYPE = _libsbml.SBML_SPECIES_TYPE
2745
2746SBML_MODIFIER_SPECIES_REFERENCE = _libsbml.SBML_MODIFIER_SPECIES_REFERENCE
2747
2748SBML_UNIT_DEFINITION = _libsbml.SBML_UNIT_DEFINITION
2749
2750SBML_UNIT = _libsbml.SBML_UNIT
2751
2752SBML_ALGEBRAIC_RULE = _libsbml.SBML_ALGEBRAIC_RULE
2753
2754SBML_ASSIGNMENT_RULE = _libsbml.SBML_ASSIGNMENT_RULE
2755
2756SBML_RATE_RULE = _libsbml.SBML_RATE_RULE
2757
2758SBML_SPECIES_CONCENTRATION_RULE = _libsbml.SBML_SPECIES_CONCENTRATION_RULE
2759
2760SBML_COMPARTMENT_VOLUME_RULE = _libsbml.SBML_COMPARTMENT_VOLUME_RULE
2761
2762SBML_PARAMETER_RULE = _libsbml.SBML_PARAMETER_RULE
2763
2764SBML_TRIGGER = _libsbml.SBML_TRIGGER
2765
2766SBML_DELAY = _libsbml.SBML_DELAY
2767
2768SBML_STOICHIOMETRY_MATH = _libsbml.SBML_STOICHIOMETRY_MATH
2769
2770SBML_LOCAL_PARAMETER = _libsbml.SBML_LOCAL_PARAMETER
2771
2772SBML_PRIORITY = _libsbml.SBML_PRIORITY
2773
2774SBML_GENERIC_SBASE = _libsbml.SBML_GENERIC_SBASE
2775
2776
2777def SBMLTypeCode_toString(tc, pkgName):
2778    r"""
2779    SBMLTypeCode_toString(int tc, char const * pkgName) -> char const *
2780
2781    This method takes an SBML type code and returns a string representing
2782    the code.
2783
2784    @if clike LibSBML attaches an identifying code to every kind of SBML
2785    object.  These are known as <em>SBML type codes</em>.  The set of
2786    possible type codes is defined in the enumeration #SBMLTypeCode_t.
2787    The names of the type codes all begin with the characters
2788    @c SBML_. @endif@if java LibSBML attaches an identifying code to every
2789    kind of SBML object.  These are known as <em>SBML type codes</em>.  In
2790    other languages, the set of type codes is stored in an enumeration; in
2791    the Java language interface for libSBML, the type codes are defined as
2792    static integer constants in the interface class {@link
2793    libsbmlConstants}.  The names of the type codes all begin with the
2794    characters @c SBML_. @endif@if python LibSBML attaches an identifying
2795    code to every kind of SBML object.  These are known as <em>SBML type
2796    codes</em>.  In the Python language interface for libSBML, the type
2797    codes are defined as static integer constants in the interface class
2798    @link libsbml@endlink.  The names of the type codes all begin with the
2799    characters @c SBML_. @endif@if csharp LibSBML attaches an identifying
2800    code to every kind of SBML object.  These are known as <em>SBML type
2801    codes</em>.  In the C# language interface for libSBML, the type codes
2802    are defined as static integer constants in the interface class @link
2803    libsbml@endlink.  The names of the type codes all begin with
2804    the characters @c SBML_. @endif@~
2805
2806    @return a human readable name for the given
2807    @if clike #SBMLTypeCode_t value@else SBML type code@endif.
2808
2809    @note The caller does not own the returned string and is therefore not
2810    allowed to modify it.
2811
2812    """
2813    return _libsbml.SBMLTypeCode_toString(tc, pkgName)
2814class SBase(object):
2815    r"""
2816
2817    @sbmlpackage{core}
2818
2819    @htmlinclude pkg-marker-core.html SBML's <em>%SBase</em> class, base class of most SBML objects.
2820
2821    Most components in SBML are derived from a single abstract base type,
2822    SBase.  In addition to serving as the parent class for most other
2823    classes of objects in SBML, this base type is designed to allow a
2824    modeler or a software package to attach arbitrary information to each
2825    major element or list in an SBML model.
2826
2827    SBase has an optional subelement called 'notes'.  It is intended to
2828    serve as a place for storing optional information intended to be seen by
2829    humans.  An example use of the 'notes' element would be to contain
2830    formatted user comments about the model element in which the 'notes'
2831    element is enclosed.  There are certain conditions on the XHTML content
2832    permitted inside the 'notes' element; please consult the <a
2833    target='_blank' href='http://sbml.org/Documents/Specifications'>SBML
2834    specification document</a> corresponding to the SBML Level and Version
2835    of your model for more information about the requirements for 'notes'
2836    content.
2837
2838    SBase has another optional subelement called 'annotation'.  Whereas the
2839    'notes' element described above is a container for content to be shown
2840    directly to humans, the 'annotation' element is a container for optional
2841    software-generated content @em not meant to be shown to humans.  The
2842    element's content type is <a target='_blank'
2843    href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
2844    'any'</a>, allowing essentially arbitrary data content.  SBML places
2845    only a few restrictions on the organization of the content; these are
2846    intended to help software tools read and write the data as well as help
2847    reduce conflicts between annotations added by different tools.  As is
2848    the case with 'notes', it is important to refer to the <a
2849    target='_blank' href='http://sbml.org/Documents/Specifications'>SBML
2850    specification document</a> corresponding to the SBML Level and Version
2851    of your model for more information about the requirements for
2852    'annotation' content.
2853
2854    It is worth pointing out that the 'annotation' element in the definition
2855    of SBase exists in order that software developers may attach optional
2856    application-specific data to the elements in an SBML model.  However, it
2857    is important that this facility not be misused.  In particular, it is
2858    <em>critical</em> that data essential to a model definition or that can
2859    be encoded in existing SBML elements is <em>not</em> stored in
2860    'annotation'. Parameter values, functional dependencies between model
2861    elements, etc., should not be recorded as annotations.  It is crucial to
2862    keep in mind the fact that data placed in annotations can be freely
2863    ignored by software applications.  If such data affects the
2864    interpretation of a model, then software interoperability is greatly
2865    impeded.
2866
2867    SBML Level 2 introduced an optional SBase attribute named 'metaid' for
2868    supporting metadata annotations using RDF (<a target='_blank'
2869    href='http://www.w3.org/RDF/'>Resource Description Format</a>). The
2870    attribute value has the data type <a
2871    href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML identifier
2872    type, which means each 'metaid' value must be globally unique within an
2873    SBML file.  (Importantly, this uniqueness criterion applies across any
2874    attribute with type <a href='http://www.w3.org/TR/REC-xml/#id'>XML
2875    ID</a>, not just the 'metaid' attribute used by SBML---something to
2876    be aware of if your application-specific XML content inside the
2877    'annotation' subelement happens to use <a
2878    href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)  The 'metaid' value
2879    serves to identify a model component for purposes such as referencing
2880    that component from metadata placed within 'annotation' subelements.
2881
2882    Beginning with SBML Level 2 Version 2, SBase has an optional
2883    attribute named 'sboTerm' for supporting the use of the Systems Biology
2884    Ontology.  In SBML proper, the data type of the attribute is a string of
2885    the form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit integer number;
2886    libSBML simplifies the representation by only storing the 'NNNNNNN'
2887    integer portion.  Thus, in libSBML, the 'sboTerm' attribute on SBase has
2888    data type @c int, and SBO identifiers are stored simply as integers.
2889    (For convenience, SBase offers methods for returning both the integer
2890    form and a text-string form of the SBO identifier.)  SBO terms are a
2891    type of optional annotation, and each different class of SBML object
2892    derived from SBase imposes its own requirements about the values
2893    permitted for 'sboTerm'.  More details can be found in SBML specifications
2894    for Level&nbsp;2 Version&nbsp;2 and above.
2895
2896    Finally, note that, in the list of methods on SBase, there is no public
2897    constructor because SBase is an abstract class.  The constructors reside
2898    in the subclasses derived from SBase.
2899
2900
2901    @section sbase-miriam Standard format for annotations linking data resources
2902
2903    SBML Level 2 Versions 2, 3 and 4, and Level&nbsp;3, define a proposed
2904    regular format for encoding two particular categories of annotations:
2905    (a) references to controlled vocabulary terms and database identifiers
2906    which define and describe biological and biochemical entities in a
2907    model; and (b) descriptions of the provenance of a model, including its
2908    author(s) and modification history.
2909
2910    """
2911
2912    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2913
2914    def __init__(self, *args, **kwargs):
2915        raise AttributeError("No constructor defined - class is abstract")
2916    __repr__ = _swig_repr
2917    __swig_destroy__ = _libsbml.delete_SBase
2918
2919    def clone(self):
2920        r"""
2921        clone(SBase self) -> SBase
2922
2923        Creates and returns a deep copy of this SBase object.
2924
2925        @return the (deep) copy of this SBase object.
2926
2927        """
2928        return _libsbml.SBase_clone(self)
2929
2930    def getElementBySId(self, *args):
2931        r"""
2932        getElementBySId(SBase self, string id) -> SBase
2933        getElementBySId(SBase self, string id) -> SBase
2934
2935        Returns the first child element found that has the given @p id in the
2936        model-wide @c SId namespace, or @c None if no such object is found.
2937
2938        @param id string representing the 'id' attribute value of the object
2939        to find.
2940
2941        @return pointer to the first element found with the given identifier.
2942
2943        """
2944        return _libsbml.SBase_getElementBySId(self, *args)
2945
2946    def getElementByMetaId(self, *args):
2947        r"""
2948        getElementByMetaId(SBase self, string metaid) -> SBase
2949        getElementByMetaId(SBase self, string metaid) -> SBase
2950
2951        Returns the first child element it can find with a specific 'metaid'
2952        attribute value, or @c None if no such object is found.
2953
2954        @par
2955        The optional attribute named 'metaid', present on every major SBML
2956        component type, is for supporting metadata annotations using RDF (<a
2957        href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
2958        attribute value has the data type <a
2959        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
2960        identifier type, which means each 'metaid' value must be globally unique
2961        within an SBML file.  The latter point is important, because the
2962        uniqueness criterion applies across <em>any</em> attribute with type
2963        <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
2964        by SBML---something to be aware of if your application-specific XML
2965        content inside the 'annotation' subelement happens to use the XML
2966        <code>ID</code> type.  Although SBML itself specifies the use of <a
2967        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
2968        the 'metaid' attribute, SBML-compatible applications should be careful if
2969        they use XML <code>ID</code>'s in XML portions of a model that are not
2970        defined by SBML, such as in the application-specific content of the
2971        'annotation' subelement.  Finally, note that LibSBML does not provide an
2972        explicit XML <code>ID</code> data type; it uses ordinary character
2973        strings, which is easier for applications to support.
2974
2975        @param metaid string representing the 'metaid' attribute value of the
2976        object to find.
2977
2978        @return pointer to the first element found with the given meta-identifier.
2979
2980        """
2981        return _libsbml.SBase_getElementByMetaId(self, *args)
2982
2983    def renameSIdRefs(self, oldid, newid):
2984        r"""
2985        renameSIdRefs(SBase self, string oldid, string newid)
2986
2987        Replaces all uses of a given @c SIdRef type attribute value with another
2988        value.
2989
2990        @par
2991        In SBML, object identifiers are of a data type called <code>SId</code>.
2992        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
2993        introduced for attribute values that refer to <code>SId</code> values; in
2994        previous Levels of SBML, this data type did not exist and attributes were
2995        simply described to as 'referring to an identifier', but the effective
2996        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
2997        other methods of libSBML refer to the type <code>SIdRef</code> for all
2998        Levels of SBML, even if the corresponding SBML specification did not
2999        explicitly name the data type.
3000
3001        This method works by looking at all attributes and (if appropriate)
3002        mathematical formulas in MathML content, comparing the referenced
3003        identifiers to the value of @p oldid.  If any matches are found, the
3004        matching values are replaced with @p newid.  The method does @em not
3005        descend into child elements.
3006
3007        @param oldid the old identifier.
3008        @param newid the new identifier.
3009
3010        """
3011        return _libsbml.SBase_renameSIdRefs(self, oldid, newid)
3012
3013    def renameMetaIdRefs(self, oldid, newid):
3014        r"""
3015        renameMetaIdRefs(SBase self, string oldid, string newid)
3016
3017        Replaces all uses of a given meta identifier attribute value with
3018        another value.
3019
3020        @par
3021        In SBML, object 'meta' identifiers are of the XML data type <code>ID</code>;
3022        the SBML object attribute itself is typically named <code>metaid</code>.  All
3023        attributes that hold values <em>referring</em> to values of type
3024        <code>ID</code> are of the XML data type <code>IDREF</code>.  They are also
3025        sometimes informally referred to as 'metaid refs', in analogy to the
3026        SBML-defined type <code>SIdRef</code>.
3027
3028        This method works by looking at all meta-identifier attribute values,
3029        comparing the identifiers to the value of @p oldid.  If any matches are
3030        found, the matching identifiers are replaced with @p newid.  The method
3031        does @em not descend into child elements.
3032
3033        @param oldid the old identifier.
3034        @param newid the new identifier.
3035
3036        """
3037        return _libsbml.SBase_renameMetaIdRefs(self, oldid, newid)
3038
3039    def renameUnitSIdRefs(self, oldid, newid):
3040        r"""
3041        renameUnitSIdRefs(SBase self, string oldid, string newid)
3042
3043        Replaces all uses of a given @c UnitSIdRef type attribute value with
3044        another value.
3045
3046        @par
3047        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
3048        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
3049        introduced for attribute values that refer to <code>UnitSId</code> values; in
3050        previous Levels of SBML, this data type did not exist and attributes were
3051        simply described to as 'referring to a unit identifier', but the effective
3052        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
3053        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
3054        Levels of SBML, even if the corresponding SBML specification did not
3055        explicitly name the data type.
3056
3057        This method works by looking at all unit identifier attribute values
3058        (including, if appropriate, inside mathematical formulas), comparing the
3059        referenced unit identifiers to the value of @p oldid.  If any matches
3060        are found, the matching values are replaced with @p newid.  The method
3061        does @em not descend into child elements.
3062
3063        @param oldid the old identifier.
3064        @param newid the new identifier.
3065
3066        """
3067        return _libsbml.SBase_renameUnitSIdRefs(self, oldid, newid)
3068
3069    def replaceSIDWithFunction(self, id, function):
3070        r"""
3071        replaceSIDWithFunction(SBase self, string id, ASTNode function)
3072
3073        @internal
3074
3075        @internal
3076
3077        """
3078        return _libsbml.SBase_replaceSIDWithFunction(self, id, function)
3079
3080    def divideAssignmentsToSIdByFunction(self, id, function):
3081        r"""
3082        divideAssignmentsToSIdByFunction(SBase self, string id, ASTNode function)
3083
3084        @internal
3085
3086        @internal
3087
3088        """
3089        return _libsbml.SBase_divideAssignmentsToSIdByFunction(self, id, function)
3090
3091    def multiplyAssignmentsToSIdByFunction(self, id, function):
3092        r"""
3093        multiplyAssignmentsToSIdByFunction(SBase self, string id, ASTNode function)
3094
3095        @internal
3096
3097        @internal
3098
3099        """
3100        return _libsbml.SBase_multiplyAssignmentsToSIdByFunction(self, id, function)
3101
3102    def getElementFromPluginsBySId(self, id):
3103        r"""
3104        getElementFromPluginsBySId(SBase self, string id) -> SBase
3105
3106        @internal
3107
3108        @internal
3109
3110        """
3111        return _libsbml.SBase_getElementFromPluginsBySId(self, id)
3112
3113    def getElementFromPluginsByMetaId(self, metaid):
3114        r"""
3115        getElementFromPluginsByMetaId(SBase self, string metaid) -> SBase
3116
3117        @internal
3118
3119        @internal
3120
3121        """
3122        return _libsbml.SBase_getElementFromPluginsByMetaId(self, metaid)
3123
3124    def hasNonstandardIdentifierBeginningWith(self, prefix):
3125        r"""
3126        hasNonstandardIdentifierBeginningWith(SBase self, string prefix) -> bool
3127
3128        @internal
3129
3130        @internal
3131
3132        """
3133        return _libsbml.SBase_hasNonstandardIdentifierBeginningWith(self, prefix)
3134
3135    def prependStringToAllIdentifiers(self, prefix):
3136        r"""
3137        prependStringToAllIdentifiers(SBase self, string prefix) -> int
3138
3139        @internal
3140
3141        @internal
3142
3143        """
3144        return _libsbml.SBase_prependStringToAllIdentifiers(self, prefix)
3145
3146    def transformIdentifiers(self, idTransformer):
3147        r"""
3148        transformIdentifiers(SBase self, IdentifierTransformer idTransformer) -> int
3149
3150        @internal
3151
3152        @internal
3153
3154        """
3155        return _libsbml.SBase_transformIdentifiers(self, idTransformer)
3156
3157    def getMetaId(self):
3158        r"""
3159        getMetaId(SBase self) -> string
3160
3161        Returns the value of the 'metaid' attribute of this SBML object.
3162
3163        @par
3164        The optional attribute named 'metaid', present on every major SBML
3165        component type, is for supporting metadata annotations using RDF (<a
3166        href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
3167        attribute value has the data type <a
3168        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
3169        identifier type, which means each 'metaid' value must be globally unique
3170        within an SBML file.  The latter point is important, because the
3171        uniqueness criterion applies across <em>any</em> attribute with type
3172        <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
3173        by SBML---something to be aware of if your application-specific XML
3174        content inside the 'annotation' subelement happens to use the XML
3175        <code>ID</code> type.  Although SBML itself specifies the use of <a
3176        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
3177        the 'metaid' attribute, SBML-compatible applications should be careful if
3178        they use XML <code>ID</code>'s in XML portions of a model that are not
3179        defined by SBML, such as in the application-specific content of the
3180        'annotation' subelement.  Finally, note that LibSBML does not provide an
3181        explicit XML <code>ID</code> data type; it uses ordinary character
3182        strings, which is easier for applications to support.
3183
3184        @return the meta-identifier of this SBML object.
3185
3186        @see isSetMetaId()
3187        @see setMetaId()
3188
3189        """
3190        return _libsbml.SBase_getMetaId(self)
3191
3192    def getId(self):
3193        r"""
3194        getId(SBase self) -> string
3195
3196        Returns the value of the 'id' attribute of this SBML object, if it has one,
3197        or the 'variable' attribute of a Rule, or the 'symbol' attribute of
3198        an InitialAssignment.
3199
3200        @par
3201        The identifier given by an object's 'id' attribute value
3202        is used to identify the object within the SBML model definition.
3203        Other objects can refer to the component using this identifier.  The
3204        data type of 'id' is always <code>SId</code> or a type derived
3205        from that, such as <code>UnitSId</code>, depending on the object in
3206        question.  All data types are defined as follows:
3207        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
3208        letter ::= 'a'..'z','A'..'Z'
3209        digit  ::= '0'..'9'
3210        idChar ::= letter | digit | '_'
3211        SId    ::= ( letter | '_' ) idChar*
3212        </pre>
3213        The characters <code>(</code> and <code>)</code> are used for grouping,
3214        the character <code>*</code> 'zero or more times', and the character
3215        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
3216        is determined by an exact character sequence match; i.e., comparisons must
3217        be performed in a case-sensitive manner.  This applies to all uses of
3218        <code>SId</code>, <code>SIdRef</code>, and derived types.
3219
3220        Users need to be aware of some important API issues that are the result of
3221        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
3222        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
3223        of SBML objects.  To simplify the work of programmers, libSBML's API
3224        provided get, set, check, and unset on the SBase object class itself
3225        instead of on individual subobject classes. This made the
3226        get/set/etc. methods uniformly available on all objects in the libSBML
3227        API.  LibSBML simply returned empty strings or otherwise did not act when
3228        the methods were applied to SBML objects that were not defined by the SBML
3229        specification to have 'id' or 'name' attributes.  Additional complications
3230        arose with the rule and assignment objects: InitialAssignment,
3231        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
3232        the rule object hierarchy was different, and in addition, then as now,
3233        they possess different attributes: 'variable' (for the rules and event
3234        assignments), 'symbol' (for initial assignments), or neither (for
3235        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
3236        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
3237
3238        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
3239        Version&nbsp;2, it became necessary to introduce a new way to interact
3240        with the attributes more consistently in libSBML to avoid breaking
3241        backward compatibility in the behavior of the original 'id' methods.  For
3242        this reason, libSBML provides four functions (getIdAttribute(),
3243        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
3244        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
3245        from SBase, regardless of the object's type.  <strong>These new methods
3246        should be used instead of the older getId()/setId()/etc. methods</strong>
3247        unless the old behavior is somehow necessary.  Regardless of the Level and
3248        Version of the SBML, these functions allow client applications to use more
3249        generalized code in some situations (for instance, when manipulating
3250        objects that are all known to have identifiers).  If the object in
3251        question does not posess an 'id' attribute according to the SBML
3252        specification for the Level and Version in use, libSBML will not allow the
3253        identifier to be set, nor will it read or write 'id' attributes for those
3254        objects.
3255
3256        @return the id of this SBML object, or the 'variable' if the object is a
3257        Rule, or the 'symbol' if the object is an InitialAssignment.
3258
3259        @note Because of the inconsistent behavior of this function with respect
3260        to assignments and rules, callers should use getIdAttribute() instead.
3261
3262        @see getIdAttribute()
3263        @see setIdAttribute()
3264        @see isSetIdAttribute()
3265        @see unsetIdAttribute()
3266
3267        """
3268        return _libsbml.SBase_getId(self)
3269
3270    def getIdAttribute(self):
3271        r"""
3272        getIdAttribute(SBase self) -> string
3273
3274        Returns the value of the 'id' attribute of this SBML object.
3275
3276        @par
3277        The identifier given by an object's 'id' attribute value
3278        is used to identify the object within the SBML model definition.
3279        Other objects can refer to the component using this identifier.  The
3280        data type of 'id' is always <code>SId</code> or a type derived
3281        from that, such as <code>UnitSId</code>, depending on the object in
3282        question.  All data types are defined as follows:
3283        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
3284        letter ::= 'a'..'z','A'..'Z'
3285        digit  ::= '0'..'9'
3286        idChar ::= letter | digit | '_'
3287        SId    ::= ( letter | '_' ) idChar*
3288        </pre>
3289        The characters <code>(</code> and <code>)</code> are used for grouping,
3290        the character <code>*</code> 'zero or more times', and the character
3291        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
3292        is determined by an exact character sequence match; i.e., comparisons must
3293        be performed in a case-sensitive manner.  This applies to all uses of
3294        <code>SId</code>, <code>SIdRef</code>, and derived types.
3295
3296        Users need to be aware of some important API issues that are the result of
3297        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
3298        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
3299        of SBML objects.  To simplify the work of programmers, libSBML's API
3300        provided get, set, check, and unset on the SBase object class itself
3301        instead of on individual subobject classes. This made the
3302        get/set/etc. methods uniformly available on all objects in the libSBML
3303        API.  LibSBML simply returned empty strings or otherwise did not act when
3304        the methods were applied to SBML objects that were not defined by the SBML
3305        specification to have 'id' or 'name' attributes.  Additional complications
3306        arose with the rule and assignment objects: InitialAssignment,
3307        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
3308        the rule object hierarchy was different, and in addition, then as now,
3309        they possess different attributes: 'variable' (for the rules and event
3310        assignments), 'symbol' (for initial assignments), or neither (for
3311        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
3312        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
3313
3314        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
3315        Version&nbsp;2, it became necessary to introduce a new way to interact
3316        with the attributes more consistently in libSBML to avoid breaking
3317        backward compatibility in the behavior of the original 'id' methods.  For
3318        this reason, libSBML provides four functions (getIdAttribute(),
3319        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
3320        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
3321        from SBase, regardless of the object's type.  <strong>These new methods
3322        should be used instead of the older getId()/setId()/etc. methods</strong>
3323        unless the old behavior is somehow necessary.  Regardless of the Level and
3324        Version of the SBML, these functions allow client applications to use more
3325        generalized code in some situations (for instance, when manipulating
3326        objects that are all known to have identifiers).  If the object in
3327        question does not posess an 'id' attribute according to the SBML
3328        specification for the Level and Version in use, libSBML will not allow the
3329        identifier to be set, nor will it read or write 'id' attributes for those
3330        objects.
3331
3332        @return the id of this SBML object, if set and valid for this
3333        level and version of SBML; an empty string otherwise.
3334
3335        @note Because of the inconsistent behavior of this function with respect
3336        to assignments and rules, callers should use getIdAttribute() instead.
3337
3338        @see setIdAttribute()
3339        @see isSetIdAttribute()
3340        @see unsetIdAttribute()
3341
3342        """
3343        return _libsbml.SBase_getIdAttribute(self)
3344
3345    def getName(self):
3346        r"""
3347        getName(SBase self) -> string
3348
3349        Returns the value of the 'name' attribute of this SBML object.
3350
3351        @par
3352        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
3353        moved to SBase directly, instead of being defined individually for many
3354        (but not all) objects.  LibSBML has for a long time provided functions
3355        defined on SBase itself to get, set, and unset those attributes, which
3356        would fail or otherwise return empty strings if executed on any object
3357        for which those attributes were not defined.  Now that all SBase objects
3358        define those attributes, those functions now succeed for any object with
3359        the appropriate level and version.
3360
3361        The 'name' attribute is
3362        optional and is not intended to be used for cross-referencing purposes
3363        within a model.  Its purpose instead is to provide a human-readable
3364        label for the component.  The data type of 'name' is the type
3365        <code>string</code> defined in XML Schema.  SBML imposes no
3366        restrictions as to the content of 'name' attributes beyond those
3367        restrictions defined by the <code>string</code> type in XML Schema.
3368
3369        The recommended practice for handling 'name' is as follows.  If a
3370        software tool has the capability for displaying the content of 'name'
3371        attributes, it should display this content to the user as a
3372        component's label instead of the component's 'id'.  If the user
3373        interface does not have this capability (e.g., because it cannot
3374        display or use special characters in symbol names), or if the 'name'
3375        attribute is missing on a given component, then the user interface
3376        should display the value of the 'id' attribute instead.  (Script
3377        language interpreters are especially likely to display 'id' instead of
3378        'name'.)
3379
3380        As a consequence of the above, authors of systems that automatically
3381        generate the values of 'id' attributes should be aware some systems
3382        may display the 'id''s to the user.  Authors therefore may wish to
3383        take some care to have their software create 'id' values that are: (a)
3384        reasonably easy for humans to type and read; and (b) likely to be
3385        meaningful, for example by making the 'id' attribute be an abbreviated
3386        form of the name attribute value.
3387
3388        An additional point worth mentioning is although there are
3389        restrictions on the uniqueness of 'id' values, there are no
3390        restrictions on the uniqueness of 'name' values in a model.  This
3391        allows software applications leeway in assigning component identifiers.
3392
3393        Regardless of the level and version of the SBML, these functions allow
3394        client applications to use more generalized code in some situations
3395        (for instance, when manipulating objects that are all known to have
3396        names).  If the object in question does not posess a 'name' attribute
3397        according to the SBML specification for the Level and Version in use,
3398        libSBML will not allow the name to be set, nor will it read or
3399        write 'name' attributes for those objects.
3400
3401        @return the name of this SBML object, or the empty string if not set or unsettable.
3402
3403        @see getIdAttribute()
3404        @see isSetName()
3405        @see setName()
3406        @see unsetName()
3407
3408        """
3409        return _libsbml.SBase_getName(self)
3410
3411    def getNotes(self, *args):
3412        r"""
3413        getNotes(SBase self) -> XMLNode
3414        getNotes(SBase self) -> XMLNode
3415
3416        Returns the content of the 'notes' subelement of this object as
3417        a tree of XMLNode objects.
3418
3419        @par
3420        The optional SBML element named 'notes', present on every major SBML
3421        component type (and in SBML Level&nbsp;3, the 'message' subelement of
3422        Constraint), is intended as a place for storing optional information
3423        intended to be seen by humans.  An example use of the 'notes' element
3424        would be to contain formatted user comments about the model element in
3425        which the 'notes' element is enclosed.  Every object derived directly or
3426        indirectly from type SBase can have a separate value for 'notes', allowing
3427        users considerable freedom when adding comments to their models.
3428
3429        The format of 'notes' elements conform to the definition of <a
3430        target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
3431        However, the content cannot be @em entirely free-form; it must satisfy
3432        certain requirements defined in the <a target='_blank'
3433        href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
3434        for specific SBML Levels.  To help verify the formatting of 'notes'
3435        content, libSBML provides the static utility method
3436        SyntaxChecker.hasExpectedXHTMLSyntax(); this
3437        method implements a verification process that lets callers check whether
3438        the content of a given XMLNode object conforms to the SBML requirements
3439        for 'notes' and 'message' structure.  Developers are urged to consult the
3440        appropriate <a target='_blank'
3441        href='http://sbml.org/Documents/Specifications'>SBML specification
3442        document</a> for the Level and Version of their model for more in-depth
3443        explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and&nbsp;3
3444        specifications have considerable detail about how 'notes' element content
3445        must be structured.
3446
3447        The 'notes' element content returned by this method will be in XML
3448        form, but libSBML does not provide an object model specifically for
3449        the content of notes.  Callers will need to traverse the XML tree
3450        structure using the facilities available on XMLNode and related
3451        objects.  For an alternative method of accessing the notes, see
3452        getNotesString().
3453
3454        @return the content of the 'notes' subelement of this SBML object as a
3455        tree structure composed of XMLNode objects.
3456
3457        @see getNotesString()
3458        @see isSetNotes()
3459        @see setNotes()
3460        @see setNotes()
3461        @see appendNotes()
3462        @see appendNotes()
3463        @see unsetNotes()
3464        @see SyntaxChecker.hasExpectedXHTMLSyntax()
3465
3466        """
3467        return _libsbml.SBase_getNotes(self, *args)
3468
3469    def getNotesString(self, *args):
3470        r"""
3471        getNotesString(SBase self) -> string
3472        getNotesString(SBase self) -> string
3473
3474        Returns the content of the 'notes' subelement of this object as a
3475        string.
3476
3477        @par
3478        The optional SBML element named 'notes', present on every major SBML
3479        component type (and in SBML Level&nbsp;3, the 'message' subelement of
3480        Constraint), is intended as a place for storing optional information
3481        intended to be seen by humans.  An example use of the 'notes' element
3482        would be to contain formatted user comments about the model element in
3483        which the 'notes' element is enclosed.  Every object derived directly or
3484        indirectly from type SBase can have a separate value for 'notes', allowing
3485        users considerable freedom when adding comments to their models.
3486
3487        The format of 'notes' elements conform to the definition of <a
3488        target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
3489        However, the content cannot be @em entirely free-form; it must satisfy
3490        certain requirements defined in the <a target='_blank'
3491        href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
3492        for specific SBML Levels.  To help verify the formatting of 'notes'
3493        content, libSBML provides the static utility method
3494        SyntaxChecker.hasExpectedXHTMLSyntax(); this
3495        method implements a verification process that lets callers check whether
3496        the content of a given XMLNode object conforms to the SBML requirements
3497        for 'notes' and 'message' structure.  Developers are urged to consult the
3498        appropriate <a target='_blank'
3499        href='http://sbml.org/Documents/Specifications'>SBML specification
3500        document</a> for the Level and Version of their model for more in-depth
3501        explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and&nbsp;3
3502        specifications have considerable detail about how 'notes' element content
3503        must be structured.
3504
3505        For an alternative method of accessing the notes, see getNotes(),
3506        which returns the content as an XMLNode tree structure.  Depending on
3507        an application's needs, one or the other method may be more
3508        convenient.
3509
3510        @return the content of the 'notes' subelement of this SBML object as a
3511        string.
3512
3513        @see getNotes()
3514        @see isSetNotes()
3515        @see setNotes()
3516        @see setNotes()
3517        @see appendNotes()
3518        @see appendNotes()
3519        @see unsetNotes()
3520        @see SyntaxChecker.hasExpectedXHTMLSyntax()
3521
3522        """
3523        return _libsbml.SBase_getNotesString(self, *args)
3524
3525    def getAnnotation(self, *args):
3526        r"""
3527        getAnnotation(SBase self) -> XMLNode
3528        getAnnotation(SBase self) -> XMLNode
3529
3530        Returns the content of the 'annotation' subelement of this object as
3531        a tree of XMLNode objects.
3532
3533        @par
3534        Whereas the SBML 'notes' subelement is a container for content to be
3535        shown directly to humans, the 'annotation' element is a container for
3536        optional software-generated content @em not meant to be shown to
3537        humans.  Every object derived from SBase can have its own value for
3538        'annotation'.  The element's content type is <a target='_blank'
3539        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
3540        'any'</a>, allowing essentially arbitrary well-formed XML data
3541        content.
3542
3543        SBML places a few restrictions on the organization of the content of
3544        annotations; these are intended to help software tools read and write
3545        the data as well as help reduce conflicts between annotations added by
3546        different tools.  Please see the SBML specifications for more details.
3547
3548        The annotations returned by this method will be in XML form.  LibSBML
3549        provides an object model and related interfaces for certain specific
3550        kinds of annotations, namely model history information and RDF
3551        content.  See the ModelHistory, CVTerm and RDFAnnotationParser classes
3552        for more information about the facilities available.
3553
3554        @return the annotation of this SBML object as a tree of XMLNode objects.
3555
3556        @see getAnnotationString()
3557        @see isSetAnnotation()
3558        @see setAnnotation()
3559        @see setAnnotation()
3560        @see appendAnnotation()
3561        @see appendAnnotation()
3562        @see unsetAnnotation()
3563
3564        """
3565        return _libsbml.SBase_getAnnotation(self, *args)
3566
3567    def getAnnotationString(self, *args):
3568        r"""
3569        getAnnotationString(SBase self) -> string
3570        getAnnotationString(SBase self) -> string
3571
3572        Returns the content of the 'annotation' subelement of this object as a
3573        character string.
3574
3575        @par
3576        Whereas the SBML 'notes' subelement is a container for content to be
3577        shown directly to humans, the 'annotation' element is a container for
3578        optional software-generated content @em not meant to be shown to
3579        humans.  Every object derived from SBase can have its own value for
3580        'annotation'.  The element's content type is <a target='_blank'
3581        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
3582        'any'</a>, allowing essentially arbitrary well-formed XML data
3583        content.
3584
3585        SBML places a few restrictions on the organization of the content of
3586        annotations; these are intended to help software tools read and write
3587        the data as well as help reduce conflicts between annotations added by
3588        different tools.  Please see the SBML specifications for more details.
3589
3590        The annotations returned by this method will be in string form.  See the
3591        method getAnnotation() for a version that returns annotations in XML form.
3592
3593        @return the annotation of this SBML object as a character string.
3594
3595        @see getAnnotation()
3596        @see isSetAnnotation()
3597        @see setAnnotation()
3598        @see setAnnotation()
3599        @see appendAnnotation()
3600        @see appendAnnotation()
3601        @see unsetAnnotation()
3602
3603        """
3604        return _libsbml.SBase_getAnnotationString(self, *args)
3605
3606    def getNamespaces(self):
3607        r"""
3608        getNamespaces(SBase self) -> XMLNamespaces
3609
3610        Returns a list of the XML Namespaces declared on the SBML document
3611        owning this object.
3612
3613        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
3614        information.  It is used to communicate the SBML Level, Version, and (in
3615        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.
3616
3617        @return the XML Namespaces associated with this SBML object, or @c None
3618        in certain very usual circumstances where a namespace is not set.
3619
3620        @see getLevel()
3621        @see getVersion()
3622
3623        """
3624        return _libsbml.SBase_getNamespaces(self)
3625
3626    def getSBMLDocument(self, *args):
3627        r"""
3628        getSBMLDocument(SBase self) -> SBMLDocument
3629        getSBMLDocument(SBase self) -> SBMLDocument
3630
3631        Returns the SBMLDocument object containing this object instance.
3632
3633        @par
3634        LibSBML uses the class SBMLDocument as a top-level container for
3635        storing SBML content and data associated with it (such as warnings and
3636        error messages).  An SBML model in libSBML is contained inside an
3637        SBMLDocument object.  SBMLDocument corresponds roughly to the class
3638        <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
3639        specifications, but it does not have a direct correspondence in SBML
3640        Level&nbsp;1.  (But, it is created by libSBML no matter whether the
3641        model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
3642
3643        This method allows the caller to obtain the SBMLDocument for the
3644        current object.
3645
3646        @return the parent SBMLDocument object of this SBML object.
3647
3648        @see getParentSBMLObject()
3649        @see getModel()
3650
3651        """
3652        return _libsbml.SBase_getSBMLDocument(self, *args)
3653
3654    def getParentSBMLObject(self, *args):
3655        r"""
3656        getParentSBMLObject(SBase self) -> SBase
3657        getParentSBMLObject(SBase self) -> SBase
3658
3659        Returns the parent SBML object containing this object.
3660
3661        This returns the immediately-containing object.  This method is
3662        convenient when holding an object nested inside other objects in an
3663        SBML model.
3664
3665        @return the parent SBML object of this SBML object.
3666
3667        @see getSBMLDocument()
3668        @see getModel()
3669
3670        """
3671        return _libsbml.SBase_getParentSBMLObject(self, *args)
3672
3673    def getAncestorOfType(self, *args):
3674        r"""
3675        getAncestorOfType(SBase self, int type, string pkgName="core") -> SBase
3676        getAncestorOfType(SBase self, int type, string pkgName="core") -> SBase
3677
3678        This method has multiple variants; they differ in the arguments
3679         they accept.  Each variant is described separately below.
3680
3681        @par
3682        <hr>
3683        <span class='variant-sig-heading'>Method variant with the following signature</span>:
3684         <pre class='signature'>getAncestorOfType(int type, string pkgName = 'core')</pre>
3685
3686        Returns the first ancestor object that has the given SBML type code from the given package.
3687
3688        @if clike LibSBML attaches an identifying code to every kind of SBML
3689        object.  These are known as <em>SBML type codes</em>.  The set of
3690        possible type codes is defined in the enumeration #SBMLTypeCode_t.
3691        The names of the type codes all begin with the characters
3692        @c SBML_. @endif@if java LibSBML attaches an identifying code to every
3693        kind of SBML object.  These are known as <em>SBML type codes</em>.  In
3694        other languages, the set of type codes is stored in an enumeration; in
3695        the Java language interface for libSBML, the type codes are defined as
3696        static integer constants in the interface class {@link
3697        libsbmlConstants}.  The names of the type codes all begin with the
3698        characters @c SBML_. @endif@if python LibSBML attaches an identifying
3699        code to every kind of SBML object.  These are known as <em>SBML type
3700        codes</em>.  In the Python language interface for libSBML, the type
3701        codes are defined as static integer constants in the interface class
3702        @link libsbml@endlink.  The names of the type codes all begin with the
3703        characters @c SBML_. @endif@if csharp LibSBML attaches an identifying
3704        code to every kind of SBML object.  These are known as <em>SBML type
3705        codes</em>.  In the C# language interface for libSBML, the type codes
3706        are defined as static integer constants in the interface class @link
3707        libsbmlcs.libsbml libsbml@endlink.  The names of the type codes all begin with
3708        the characters @c SBML_. @endif@~
3709
3710        This method searches the tree of objects that are parents of this
3711        object, and returns the first one that has the given SBML type code from
3712        the given @p pkgName.
3713
3714        @param type the SBML type code of the object sought.
3715
3716        @param pkgName (optional) the short name of an SBML Level&nbsp;3
3717        package to which the sought-after object must belong.
3718
3719        @return the ancestor SBML object of this SBML object that corresponds
3720        to the given @if clike #SBMLTypeCode_t value@else SBML object type
3721        code@endif, or @c None if no ancestor exists.
3722
3723        @warning The optional argument @p pkgName must be used for all type codes
3724        from SBML Level&nbsp;3 packages.  Otherwise, the function will search the
3725        'core' namespace alone, not find any corresponding elements, and return
3726        None.
3727
3728        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
3729
3730
3731
3732        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
3733
3734
3735        @par
3736        <hr>
3737        <span class='variant-sig-heading'>Method variant with the following signature</span>:
3738         <pre class='signature'>getAncestorOfType(int type, string pkgName = 'core')</pre>
3739
3740        Returns the first ancestor object that has the given SBML type code from the given package.
3741
3742        @if clike LibSBML attaches an identifying code to every kind of SBML
3743        object.  These are known as <em>SBML type codes</em>.  The set of
3744        possible type codes is defined in the enumeration #SBMLTypeCode_t.
3745        The names of the type codes all begin with the characters
3746        @c SBML_. @endif@if java LibSBML attaches an identifying code to every
3747        kind of SBML object.  These are known as <em>SBML type codes</em>.  In
3748        other languages, the set of type codes is stored in an enumeration; in
3749        the Java language interface for libSBML, the type codes are defined as
3750        static integer constants in the interface class {@link
3751        libsbmlConstants}.  The names of the type codes all begin with the
3752        characters @c SBML_. @endif@if python LibSBML attaches an identifying
3753        code to every kind of SBML object.  These are known as <em>SBML type
3754        codes</em>.  In the Python language interface for libSBML, the type
3755        codes are defined as static integer constants in the interface class
3756        @link libsbml@endlink.  The names of the type codes all begin with the
3757        characters @c SBML_. @endif@if csharp LibSBML attaches an identifying
3758        code to every kind of SBML object.  These are known as <em>SBML type
3759        codes</em>.  In the C# language interface for libSBML, the type codes
3760        are defined as static integer constants in the interface class @link
3761        libsbmlcs.libsbml libsbml@endlink.  The names of the type codes all begin with
3762        the characters @c SBML_. @endif@~
3763
3764        This method searches the tree of objects that are parents of this
3765        object, and returns the first one that has the given SBML type code from
3766        the given @p pkgName.
3767
3768        @param type the SBML type code of the object sought.
3769
3770        @param pkgName (optional) the short name of an SBML Level&nbsp;3
3771        package to which the sought-after object must belong.
3772
3773        @return the ancestor SBML object of this SBML object that corresponds
3774        to the given @if clike #SBMLTypeCode_t value@else SBML object type
3775        code@endif, or @c None if no ancestor exists.
3776
3777        @warning The optional argument @p pkgName must be used for all type codes
3778        from SBML Level&nbsp;3 packages.  Otherwise, the function will search the
3779        'core' namespace alone, not find any corresponding elements, and return
3780        None.
3781
3782        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
3783
3784
3785
3786        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
3787
3788        """
3789        return _libsbml.SBase_getAncestorOfType(self, *args)
3790
3791    def getSBOTerm(self):
3792        r"""
3793        getSBOTerm(SBase self) -> int
3794
3795        Returns the integer portion of the value of the 'sboTerm' attribute of
3796        this object.
3797
3798        @par
3799        Beginning with SBML Level 2 Version 2, objects derived from SBase have
3800        an optional attribute named 'sboTerm' for supporting the use of the
3801        Systems Biology Ontology.  In SBML proper, the data type of the
3802        attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
3803        seven digit integer number; libSBML simplifies the representation by
3804        only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
3805        'sboTerm' attribute on SBase has data type @c int, and SBO identifiers
3806        are stored simply as integers.
3807        @par
3808        SBO terms are a type of optional annotation, and each different class
3809        of SBML object derived from SBase imposes its own requirements about
3810        the values permitted for 'sboTerm'. More details can be found in SBML
3811        specifications for Level&nbsp;2 Version&nbsp;2 and above.
3812
3813        @return the value of the 'sboTerm' attribute as an integer, or @c -1
3814        if the value is not set.
3815
3816        """
3817        return _libsbml.SBase_getSBOTerm(self)
3818
3819    def getSBOTermID(self):
3820        r"""
3821        getSBOTermID(SBase self) -> string
3822
3823        Returns the string representation of the 'sboTerm' attribute of
3824        this object.
3825
3826        @par
3827        Beginning with SBML Level 2 Version 2, objects derived from SBase have
3828        an optional attribute named 'sboTerm' for supporting the use of the
3829        Systems Biology Ontology.  In SBML proper, the data type of the
3830        attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
3831        seven digit integer number; libSBML simplifies the representation by
3832        only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
3833        'sboTerm' attribute on SBase has data type @c int, and SBO identifiers
3834        are stored simply as integers.
3835        @par
3836        SBO terms are a type of optional annotation, and each different class
3837        of SBML object derived from SBase imposes its own requirements about
3838        the values permitted for 'sboTerm'. More details can be found in SBML
3839        specifications for Level&nbsp;2 Version&nbsp;2 and above.
3840
3841        @return the value of the 'sboTerm' attribute as a string (its value
3842        will be of the form 'SBO:NNNNNNN'), or an empty string if
3843        the value is not set.
3844
3845        """
3846        return _libsbml.SBase_getSBOTermID(self)
3847
3848    def getSBOTermAsURL(self):
3849        r"""
3850        getSBOTermAsURL(SBase self) -> string
3851
3852        Returns the URL representation of the 'sboTerm' attribute of this
3853        object.
3854
3855        This method returns the entire SBO identifier as a text string in the
3856        form <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://identifiers.org/biomodels.sbo/SBO:NNNNNNN'</code>.
3857
3858        @par
3859        SBO terms are a type of optional annotation, and each different class
3860        of SBML object derived from SBase imposes its own requirements about
3861        the values permitted for 'sboTerm'. More details can be found in SBML
3862        specifications for Level&nbsp;2 Version&nbsp;2 and above.
3863
3864        @return the value of the 'sboTerm' attribute as an identifiers.org URL,
3865        or an empty string if the value is not set.
3866
3867        """
3868        return _libsbml.SBase_getSBOTermAsURL(self)
3869
3870    def getLine(self):
3871        r"""
3872        getLine(SBase self) -> unsigned int
3873
3874        Returns the line number where this object first appears in the XML
3875        representation of the SBML document.
3876
3877        @return the line number of this SBML object.  If this object was
3878        created programmatically and not read from a file, this method will
3879        return the value @c 0.
3880
3881        @note The line number for each construct in an SBML model is set upon
3882        reading the model.  The accuracy of the line number depends on the
3883        correctness of the XML representation of the model, and on the
3884        particular XML parser library being used.  The former limitation
3885        relates to the following problem: if the model is actually invalid
3886        XML, then the parser may not be able to interpret the data correctly
3887        and consequently may not be able to establish the real line number.
3888        The latter limitation is simply that different parsers seem to have
3889        their own accuracy limitations, and out of all the parsers supported
3890        by libSBML, none have been 100% accurate in all situations. (At this
3891        time, libSBML supports the use of <a target='_blank'
3892        href='http://xmlsoft.org'>libxml2</a>, <a target='_blank'
3893        href='http://expat.sourceforge.net/'>Expat</a> and <a target='_blank'
3894        href='http://xerces.apache.org/xerces-c/'>Xerces</a>.)
3895
3896        @see getColumn()
3897
3898        """
3899        return _libsbml.SBase_getLine(self)
3900
3901    def getColumn(self):
3902        r"""
3903        getColumn(SBase self) -> unsigned int
3904
3905        Returns the column number where this object first appears in the XML
3906        representation of the SBML document.
3907
3908        @return the column number of this SBML object.  If this object was
3909        created programmatically and not read from a file, this method will
3910        return the value @c 0.
3911
3912        @note The column number for each construct in an SBML model is set
3913        upon reading the model.  The accuracy of the column number depends on
3914        the correctness of the XML representation of the model, and on the
3915        particular XML parser library being used.  The former limitation
3916        relates to the following problem: if the model is actually invalid
3917        XML, then the parser may not be able to interpret the data correctly
3918        and consequently may not be able to establish the real column number.
3919        The latter limitation is simply that different parsers seem to have
3920        their own accuracy limitations, and out of all the parsers supported
3921        by libSBML, none have been 100% accurate in all situations. (At this
3922        time, libSBML supports the use of <a target='_blank'
3923        href='http://xmlsoft.org'>libxml2</a>, <a target='_blank'
3924        href='http://expat.sourceforge.net/'>Expat</a> and <a target='_blank'
3925        href='http://xerces.apache.org/xerces-c/'>Xerces</a>.)
3926
3927        @see getLine()
3928
3929        """
3930        return _libsbml.SBase_getColumn(self)
3931
3932    def getModelHistory(self, *args):
3933        r"""
3934        getModelHistory(SBase self) -> ModelHistory
3935        getModelHistory(SBase self) -> ModelHistory
3936
3937        Returns the ModelHistory object, if any, attached to this object.
3938
3939        @return the ModelHistory object attached to this object, or @c None if
3940        none exist.
3941
3942        @note In SBML Level&nbsp;2, model history annotations were only
3943        permitted on the Model element.  In SBML Level&nbsp;3, they are
3944        permitted on all SBML components derived from SBase.
3945
3946        """
3947        return _libsbml.SBase_getModelHistory(self, *args)
3948
3949    def isSetMetaId(self):
3950        r"""
3951        isSetMetaId(SBase self) -> bool
3952
3953        Predicate returning @c True if this object's 'metaid' attribute is set.
3954
3955        @par
3956        The optional attribute named 'metaid', present on every major SBML
3957        component type, is for supporting metadata annotations using RDF (<a
3958        href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
3959        attribute value has the data type <a
3960        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
3961        identifier type, which means each 'metaid' value must be globally unique
3962        within an SBML file.  The latter point is important, because the
3963        uniqueness criterion applies across <em>any</em> attribute with type
3964        <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
3965        by SBML---something to be aware of if your application-specific XML
3966        content inside the 'annotation' subelement happens to use the XML
3967        <code>ID</code> type.  Although SBML itself specifies the use of <a
3968        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
3969        the 'metaid' attribute, SBML-compatible applications should be careful if
3970        they use XML <code>ID</code>'s in XML portions of a model that are not
3971        defined by SBML, such as in the application-specific content of the
3972        'annotation' subelement.  Finally, note that LibSBML does not provide an
3973        explicit XML <code>ID</code> data type; it uses ordinary character
3974        strings, which is easier for applications to support.
3975
3976        @return @c True if the 'metaid' attribute of this SBML object is
3977        set, @c False otherwise.
3978
3979        @see getMetaId()
3980        @see setMetaId()
3981
3982        """
3983        return _libsbml.SBase_isSetMetaId(self)
3984
3985    def isSetId(self):
3986        r"""
3987        isSetId(SBase self) -> bool
3988
3989        Predicate returning @c True if a call to getId() returns a
3990        non-empty string.
3991
3992        For most objects, this function will return @c True if its 'id'
3993        attribute is set, and @c False if it is not, or if the object has no
3994        'id' attribute at all.  However, for an EventAssignment or a Rule,
3995        isSetId() checks whether the 'variable' attribute is set, and for an
3996        InitialAssignment, it checks whether the 'symbol' attribute is set.
3997        Because those elements will also have an 'id' attribute in SBML
3998        Level&nbsp;3 Version&nbsp;2 which isSetId() will not check, the function
3999        itself is deprecated, and it is recommended to use isSetIdAttribute() in
4000        all cases where one needs to know whether the 'id' attribute is set, and
4001        to use EventAssignment.isSetVariable(), Rule.isSetVariable() and
4002        InitialAssignment.isSetSymbol() when the status of the 'variable' or
4003        'symbol' attributes need to be checked.
4004
4005        @par
4006        The identifier given by an object's 'id' attribute value
4007        is used to identify the object within the SBML model definition.
4008        Other objects can refer to the component using this identifier.  The
4009        data type of 'id' is always <code>SId</code> or a type derived
4010        from that, such as <code>UnitSId</code>, depending on the object in
4011        question.  All data types are defined as follows:
4012        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
4013        letter ::= 'a'..'z','A'..'Z'
4014        digit  ::= '0'..'9'
4015        idChar ::= letter | digit | '_'
4016        SId    ::= ( letter | '_' ) idChar*
4017        </pre>
4018        The characters <code>(</code> and <code>)</code> are used for grouping,
4019        the character <code>*</code> 'zero or more times', and the character
4020        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
4021        is determined by an exact character sequence match; i.e., comparisons must
4022        be performed in a case-sensitive manner.  This applies to all uses of
4023        <code>SId</code>, <code>SIdRef</code>, and derived types.
4024
4025        Users need to be aware of some important API issues that are the result of
4026        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
4027        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
4028        of SBML objects.  To simplify the work of programmers, libSBML's API
4029        provided get, set, check, and unset on the SBase object class itself
4030        instead of on individual subobject classes. This made the
4031        get/set/etc. methods uniformly available on all objects in the libSBML
4032        API.  LibSBML simply returned empty strings or otherwise did not act when
4033        the methods were applied to SBML objects that were not defined by the SBML
4034        specification to have 'id' or 'name' attributes.  Additional complications
4035        arose with the rule and assignment objects: InitialAssignment,
4036        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
4037        the rule object hierarchy was different, and in addition, then as now,
4038        they possess different attributes: 'variable' (for the rules and event
4039        assignments), 'symbol' (for initial assignments), or neither (for
4040        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
4041        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
4042
4043        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
4044        Version&nbsp;2, it became necessary to introduce a new way to interact
4045        with the attributes more consistently in libSBML to avoid breaking
4046        backward compatibility in the behavior of the original 'id' methods.  For
4047        this reason, libSBML provides four functions (getIdAttribute(),
4048        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
4049        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
4050        from SBase, regardless of the object's type.  <strong>These new methods
4051        should be used instead of the older getId()/setId()/etc. methods</strong>
4052        unless the old behavior is somehow necessary.  Regardless of the Level and
4053        Version of the SBML, these functions allow client applications to use more
4054        generalized code in some situations (for instance, when manipulating
4055        objects that are all known to have identifiers).  If the object in
4056        question does not posess an 'id' attribute according to the SBML
4057        specification for the Level and Version in use, libSBML will not allow the
4058        identifier to be set, nor will it read or write 'id' attributes for those
4059        objects.
4060
4061        @return @c True if the 'id' attribute of this SBML object is
4062        set, @c False otherwise.
4063
4064        @note Because of the inconsistent behavior of this function with
4065        respect to assignments and rules, it is recommended that callers
4066        use isSetIdAttribute() instead.
4067
4068        @see getIdAttribute()
4069        @see setIdAttribute()
4070        @see unsetIdAttribute()
4071        @see isSetIdAttribute()
4072
4073        """
4074        return _libsbml.SBase_isSetId(self)
4075
4076    def isSetIdAttribute(self):
4077        r"""
4078        isSetIdAttribute(SBase self) -> bool
4079
4080        Predicate returning @c True if this object's 'id' attribute is set.
4081
4082        @par
4083        The identifier given by an object's 'id' attribute value
4084        is used to identify the object within the SBML model definition.
4085        Other objects can refer to the component using this identifier.  The
4086        data type of 'id' is always <code>SId</code> or a type derived
4087        from that, such as <code>UnitSId</code>, depending on the object in
4088        question.  All data types are defined as follows:
4089        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
4090        letter ::= 'a'..'z','A'..'Z'
4091        digit  ::= '0'..'9'
4092        idChar ::= letter | digit | '_'
4093        SId    ::= ( letter | '_' ) idChar*
4094        </pre>
4095        The characters <code>(</code> and <code>)</code> are used for grouping,
4096        the character <code>*</code> 'zero or more times', and the character
4097        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
4098        is determined by an exact character sequence match; i.e., comparisons must
4099        be performed in a case-sensitive manner.  This applies to all uses of
4100        <code>SId</code>, <code>SIdRef</code>, and derived types.
4101
4102        Users need to be aware of some important API issues that are the result of
4103        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
4104        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
4105        of SBML objects.  To simplify the work of programmers, libSBML's API
4106        provided get, set, check, and unset on the SBase object class itself
4107        instead of on individual subobject classes. This made the
4108        get/set/etc. methods uniformly available on all objects in the libSBML
4109        API.  LibSBML simply returned empty strings or otherwise did not act when
4110        the methods were applied to SBML objects that were not defined by the SBML
4111        specification to have 'id' or 'name' attributes.  Additional complications
4112        arose with the rule and assignment objects: InitialAssignment,
4113        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
4114        the rule object hierarchy was different, and in addition, then as now,
4115        they possess different attributes: 'variable' (for the rules and event
4116        assignments), 'symbol' (for initial assignments), or neither (for
4117        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
4118        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
4119
4120        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
4121        Version&nbsp;2, it became necessary to introduce a new way to interact
4122        with the attributes more consistently in libSBML to avoid breaking
4123        backward compatibility in the behavior of the original 'id' methods.  For
4124        this reason, libSBML provides four functions (getIdAttribute(),
4125        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
4126        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
4127        from SBase, regardless of the object's type.  <strong>These new methods
4128        should be used instead of the older getId()/setId()/etc. methods</strong>
4129        unless the old behavior is somehow necessary.  Regardless of the Level and
4130        Version of the SBML, these functions allow client applications to use more
4131        generalized code in some situations (for instance, when manipulating
4132        objects that are all known to have identifiers).  If the object in
4133        question does not posess an 'id' attribute according to the SBML
4134        specification for the Level and Version in use, libSBML will not allow the
4135        identifier to be set, nor will it read or write 'id' attributes for those
4136        objects.
4137
4138        @return @c True if the 'id' attribute of this SBML object is
4139        set, @c False otherwise.
4140
4141        @see getIdAttribute()
4142        @see setIdAttribute()
4143        @see unsetIdAttribute()
4144
4145        """
4146        return _libsbml.SBase_isSetIdAttribute(self)
4147
4148    def isSetName(self):
4149        r"""
4150        isSetName(SBase self) -> bool
4151
4152        Predicate returning @c True if this
4153        object's 'name' attribute is set.
4154
4155        @par
4156        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
4157        moved to SBase directly, instead of being defined individually for many
4158        (but not all) objects.  LibSBML has for a long time provided functions
4159        defined on SBase itself to get, set, and unset those attributes, which
4160        would fail or otherwise return empty strings if executed on any object
4161        for which those attributes were not defined.  Now that all SBase objects
4162        define those attributes, those functions now succeed for any object with
4163        the appropriate level and version.
4164
4165        The 'name' attribute is
4166        optional and is not intended to be used for cross-referencing purposes
4167        within a model.  Its purpose instead is to provide a human-readable
4168        label for the component.  The data type of 'name' is the type
4169        <code>string</code> defined in XML Schema.  SBML imposes no
4170        restrictions as to the content of 'name' attributes beyond those
4171        restrictions defined by the <code>string</code> type in XML Schema.
4172
4173        The recommended practice for handling 'name' is as follows.  If a
4174        software tool has the capability for displaying the content of 'name'
4175        attributes, it should display this content to the user as a
4176        component's label instead of the component's 'id'.  If the user
4177        interface does not have this capability (e.g., because it cannot
4178        display or use special characters in symbol names), or if the 'name'
4179        attribute is missing on a given component, then the user interface
4180        should display the value of the 'id' attribute instead.  (Script
4181        language interpreters are especially likely to display 'id' instead of
4182        'name'.)
4183
4184        As a consequence of the above, authors of systems that automatically
4185        generate the values of 'id' attributes should be aware some systems
4186        may display the 'id''s to the user.  Authors therefore may wish to
4187        take some care to have their software create 'id' values that are: (a)
4188        reasonably easy for humans to type and read; and (b) likely to be
4189        meaningful, for example by making the 'id' attribute be an abbreviated
4190        form of the name attribute value.
4191
4192        An additional point worth mentioning is although there are
4193        restrictions on the uniqueness of 'id' values, there are no
4194        restrictions on the uniqueness of 'name' values in a model.  This
4195        allows software applications leeway in assigning component identifiers.
4196
4197        Regardless of the level and version of the SBML, these functions allow
4198        client applications to use more generalized code in some situations
4199        (for instance, when manipulating objects that are all known to have
4200        names).  If the object in question does not posess a 'name' attribute
4201        according to the SBML specification for the Level and Version in use,
4202        libSBML will not allow the name to be set, nor will it read or
4203        write 'name' attributes for those objects.
4204
4205        @return @c True if the 'name' attribute of this SBML object is
4206        set, @c False otherwise.
4207
4208        @see getName()
4209        @see setName()
4210        @see unsetName()
4211
4212        """
4213        return _libsbml.SBase_isSetName(self)
4214
4215    def isSetNotes(self):
4216        r"""
4217        isSetNotes(SBase self) -> bool
4218
4219        Predicate returning @c True if this
4220        object's 'notes' subelement exists and has content.
4221
4222        The optional SBML element named 'notes', present on every major SBML
4223        component type, is intended as a place for storing optional
4224        information intended to be seen by humans.  An example use of the
4225        'notes' element would be to contain formatted user comments about the
4226        model element in which the 'notes' element is enclosed.  Every object
4227        derived directly or indirectly from type SBase can have a separate
4228        value for 'notes', allowing users considerable freedom when adding
4229        comments to their models.
4230
4231        The format of 'notes' elements must be <a target='_blank'
4232        href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
4233        verify the formatting of 'notes' content, libSBML provides the static
4234        utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however,
4235        readers are urged to consult the appropriate <a target='_blank'
4236        href='http://sbml.org/Documents/Specifications'>SBML specification
4237        document</a> for the Level and Version of their model for more
4238        in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
4239        specifications have considerable detail about how 'notes' element
4240        content must be structured.
4241
4242        @return @c True if a 'notes' subelement exists, @c False otherwise.
4243
4244        @see getNotes()
4245        @see getNotesString()
4246        @see setNotes()
4247        @see setNotes()
4248        @see appendNotes()
4249        @see appendNotes()
4250        @see unsetNotes()
4251        @see SyntaxChecker.hasExpectedXHTMLSyntax()
4252
4253        """
4254        return _libsbml.SBase_isSetNotes(self)
4255
4256    def isSetAnnotation(self):
4257        r"""
4258        isSetAnnotation(SBase self) -> bool
4259
4260        Predicate returning @c True if this
4261        object's 'annotation' subelement exists and has content.
4262
4263        Whereas the SBase 'notes' subelement is a container for content to be
4264        shown directly to humans, the 'annotation' element is a container for
4265        optional software-generated content @em not meant to be shown to
4266        humans.  Every object derived from SBase can have its own value for
4267        'annotation'.  The element's content type is <a target='_blank'
4268        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
4269        'any'</a>, allowing essentially arbitrary well-formed XML data
4270        content.
4271
4272        SBML places a few restrictions on the organization of the content of
4273        annotations; these are intended to help software tools read and write
4274        the data as well as help reduce conflicts between annotations added by
4275        different tools.  Please see the SBML specifications for more details.
4276
4277        @return @c True if a 'annotation' subelement exists, @c False
4278        otherwise.
4279
4280        @see getAnnotation()
4281        @see getAnnotationString()
4282        @see setAnnotation()
4283        @see setAnnotation()
4284        @see appendAnnotation()
4285        @see appendAnnotation()
4286        @see unsetAnnotation()
4287
4288        """
4289        return _libsbml.SBase_isSetAnnotation(self)
4290
4291    def isSetSBOTerm(self):
4292        r"""
4293        isSetSBOTerm(SBase self) -> bool
4294
4295        Predicate returning @c True if this
4296        object's 'sboTerm' attribute is set.
4297
4298        @return @c True if the 'sboTerm' attribute of this SBML object is
4299        set, @c False otherwise.
4300
4301        """
4302        return _libsbml.SBase_isSetSBOTerm(self)
4303
4304    def setMetaId(self, metaid):
4305        r"""
4306        setMetaId(SBase self, string metaid) -> int
4307
4308        Sets the value of the meta-identifier attribute of this SBML object.
4309
4310        @par
4311        The optional attribute named 'metaid', present on every major SBML
4312        component type, is for supporting metadata annotations using RDF (<a
4313        href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
4314        attribute value has the data type <a
4315        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
4316        identifier type, which means each 'metaid' value must be globally unique
4317        within an SBML file.  The latter point is important, because the
4318        uniqueness criterion applies across <em>any</em> attribute with type
4319        <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
4320        by SBML---something to be aware of if your application-specific XML
4321        content inside the 'annotation' subelement happens to use the XML
4322        <code>ID</code> type.  Although SBML itself specifies the use of <a
4323        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
4324        the 'metaid' attribute, SBML-compatible applications should be careful if
4325        they use XML <code>ID</code>'s in XML portions of a model that are not
4326        defined by SBML, such as in the application-specific content of the
4327        'annotation' subelement.  Finally, note that LibSBML does not provide an
4328        explicit XML <code>ID</code> data type; it uses ordinary character
4329        strings, which is easier for applications to support.
4330
4331        The string @p metaid is copied.
4332
4333        @param metaid the identifier string to use as the value of the
4334        'metaid' attribute.
4335
4336        @return integer value indicating success/failure of the
4337        function.  @if clike The value is drawn from the
4338        enumeration #OperationReturnValues_t. @endif@~ The possible values
4339        returned by this function are:
4340        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4341        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
4342        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
4343
4344        @see getMetaId()
4345        @see isSetMetaId()
4346
4347        """
4348        return _libsbml.SBase_setMetaId(self, metaid)
4349
4350    def isSetModelHistory(self):
4351        r"""
4352        isSetModelHistory(SBase self) -> bool
4353
4354        Predicate returning @c True if this
4355        object has a ModelHistory object attached to it.
4356
4357        @return @c True if the ModelHistory of this object is set,
4358        @c False otherwise.
4359
4360        @note In SBML Level&nbsp;2, model history annotations were only
4361        permitted on the Model element.  In SBML Level&nbsp;3, they are
4362        permitted on all SBML components derived from SBase.
4363
4364        """
4365        return _libsbml.SBase_isSetModelHistory(self)
4366
4367    def setId(self, sid):
4368        r"""
4369        setId(SBase self, string sid) -> int
4370
4371        Sets the value of the 'id' attribute of this SBML object.
4372
4373        @par
4374        The string @p sid is copied.
4375
4376        @par
4377        The identifier given by an object's 'id' attribute value
4378        is used to identify the object within the SBML model definition.
4379        Other objects can refer to the component using this identifier.  The
4380        data type of 'id' is always <code>SId</code> or a type derived
4381        from that, such as <code>UnitSId</code>, depending on the object in
4382        question.  All data types are defined as follows:
4383        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
4384        letter ::= 'a'..'z','A'..'Z'
4385        digit  ::= '0'..'9'
4386        idChar ::= letter | digit | '_'
4387        SId    ::= ( letter | '_' ) idChar*
4388        </pre>
4389        The characters <code>(</code> and <code>)</code> are used for grouping,
4390        the character <code>*</code> 'zero or more times', and the character
4391        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
4392        is determined by an exact character sequence match; i.e., comparisons must
4393        be performed in a case-sensitive manner.  This applies to all uses of
4394        <code>SId</code>, <code>SIdRef</code>, and derived types.
4395
4396        Users need to be aware of some important API issues that are the result of
4397        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
4398        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
4399        of SBML objects.  To simplify the work of programmers, libSBML's API
4400        provided get, set, check, and unset on the SBase object class itself
4401        instead of on individual subobject classes. This made the
4402        get/set/etc. methods uniformly available on all objects in the libSBML
4403        API.  LibSBML simply returned empty strings or otherwise did not act when
4404        the methods were applied to SBML objects that were not defined by the SBML
4405        specification to have 'id' or 'name' attributes.  Additional complications
4406        arose with the rule and assignment objects: InitialAssignment,
4407        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
4408        the rule object hierarchy was different, and in addition, then as now,
4409        they possess different attributes: 'variable' (for the rules and event
4410        assignments), 'symbol' (for initial assignments), or neither (for
4411        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
4412        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
4413
4414        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
4415        Version&nbsp;2, it became necessary to introduce a new way to interact
4416        with the attributes more consistently in libSBML to avoid breaking
4417        backward compatibility in the behavior of the original 'id' methods.  For
4418        this reason, libSBML provides four functions (getIdAttribute(),
4419        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
4420        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
4421        from SBase, regardless of the object's type.  <strong>These new methods
4422        should be used instead of the older getId()/setId()/etc. methods</strong>
4423        unless the old behavior is somehow necessary.  Regardless of the Level and
4424        Version of the SBML, these functions allow client applications to use more
4425        generalized code in some situations (for instance, when manipulating
4426        objects that are all known to have identifiers).  If the object in
4427        question does not posess an 'id' attribute according to the SBML
4428        specification for the Level and Version in use, libSBML will not allow the
4429        identifier to be set, nor will it read or write 'id' attributes for those
4430        objects.
4431
4432        @param sid the string to use as the identifier of this object.
4433
4434        @return integer value indicating success/failure of the
4435        function.  @if clike The value is drawn from the
4436        enumeration #OperationReturnValues_t. @endif@~ The possible values
4437        returned by this function are:
4438        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4439        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
4440        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
4441
4442        @see getIdAttribute()
4443        @see setIdAttribute()
4444        @see isSetIdAttribute()
4445        @see unsetIdAttribute()
4446
4447        """
4448        return _libsbml.SBase_setId(self, sid)
4449
4450    def setIdAttribute(self, sid):
4451        r"""
4452        setIdAttribute(SBase self, string sid) -> int
4453
4454        Sets the value of the 'id' attribute of this SBML object.
4455
4456        @par
4457        The string @p sid is copied.
4458
4459        @par
4460        The identifier given by an object's 'id' attribute value
4461        is used to identify the object within the SBML model definition.
4462        Other objects can refer to the component using this identifier.  The
4463        data type of 'id' is always <code>SId</code> or a type derived
4464        from that, such as <code>UnitSId</code>, depending on the object in
4465        question.  All data types are defined as follows:
4466        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
4467        letter ::= 'a'..'z','A'..'Z'
4468        digit  ::= '0'..'9'
4469        idChar ::= letter | digit | '_'
4470        SId    ::= ( letter | '_' ) idChar*
4471        </pre>
4472        The characters <code>(</code> and <code>)</code> are used for grouping,
4473        the character <code>*</code> 'zero or more times', and the character
4474        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
4475        is determined by an exact character sequence match; i.e., comparisons must
4476        be performed in a case-sensitive manner.  This applies to all uses of
4477        <code>SId</code>, <code>SIdRef</code>, and derived types.
4478
4479        Users need to be aware of some important API issues that are the result of
4480        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
4481        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
4482        of SBML objects.  To simplify the work of programmers, libSBML's API
4483        provided get, set, check, and unset on the SBase object class itself
4484        instead of on individual subobject classes. This made the
4485        get/set/etc. methods uniformly available on all objects in the libSBML
4486        API.  LibSBML simply returned empty strings or otherwise did not act when
4487        the methods were applied to SBML objects that were not defined by the SBML
4488        specification to have 'id' or 'name' attributes.  Additional complications
4489        arose with the rule and assignment objects: InitialAssignment,
4490        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
4491        the rule object hierarchy was different, and in addition, then as now,
4492        they possess different attributes: 'variable' (for the rules and event
4493        assignments), 'symbol' (for initial assignments), or neither (for
4494        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
4495        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
4496
4497        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
4498        Version&nbsp;2, it became necessary to introduce a new way to interact
4499        with the attributes more consistently in libSBML to avoid breaking
4500        backward compatibility in the behavior of the original 'id' methods.  For
4501        this reason, libSBML provides four functions (getIdAttribute(),
4502        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
4503        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
4504        from SBase, regardless of the object's type.  <strong>These new methods
4505        should be used instead of the older getId()/setId()/etc. methods</strong>
4506        unless the old behavior is somehow necessary.  Regardless of the Level and
4507        Version of the SBML, these functions allow client applications to use more
4508        generalized code in some situations (for instance, when manipulating
4509        objects that are all known to have identifiers).  If the object in
4510        question does not posess an 'id' attribute according to the SBML
4511        specification for the Level and Version in use, libSBML will not allow the
4512        identifier to be set, nor will it read or write 'id' attributes for those
4513        objects.
4514
4515        @param sid the string to use as the identifier of this object.
4516
4517        @return integer value indicating success/failure of the
4518        function.  @if clike The value is drawn from the
4519        enumeration #OperationReturnValues_t. @endif@~ The possible values
4520        returned by this function are:
4521        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4522        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
4523        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
4524
4525        @see getIdAttribute()
4526        @see setIdAttribute()
4527        @see isSetIdAttribute()
4528        @see unsetIdAttribute()
4529
4530        """
4531        return _libsbml.SBase_setIdAttribute(self, sid)
4532
4533    def setName(self, name):
4534        r"""
4535        setName(SBase self, string name) -> int
4536
4537        Sets the value of the 'name' attribute of this SBML object.
4538
4539        @par
4540
4541        The string in @p name is copied.
4542
4543        @param name the new name for the SBML object.
4544
4545        @return integer value indicating success/failure of the
4546        function.  @if clike The value is drawn from the
4547        enumeration #OperationReturnValues_t. @endif@~ The possible values
4548        returned by this function are:
4549        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4550        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
4551
4552        """
4553        return _libsbml.SBase_setName(self, name)
4554
4555    def setAnnotation(self, *args):
4556        r"""
4557        setAnnotation(SBase self, XMLNode annotation) -> int
4558        setAnnotation(SBase self, string annotation) -> int
4559
4560        This method has multiple variants; they differ in the arguments
4561         they accept.  Each variant is described separately below.
4562
4563        @par
4564        <hr>
4565        <span class='variant-sig-heading'>Method variant with the following signature</span>:
4566         <pre class='signature'>setAnnotation(XMLNode annotation)</pre>
4567
4568        Sets the value of the 'annotation' subelement of this SBML object.
4569
4570        The content of @p annotation is copied, and any previous content of
4571        this object's 'annotation' subelement is deleted.
4572
4573        Whereas the SBase 'notes' subelement is a container for content to be
4574        shown directly to humans, the 'annotation' element is a container for
4575        optional software-generated content @em not meant to be shown to
4576        humans.  Every object derived from SBase can have its own value for
4577        'annotation'.  The element's content type is <a target='_blank'
4578        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
4579        'any'</a>, allowing essentially arbitrary well-formed XML data
4580        content.
4581
4582        SBML places a few restrictions on the organization of the content of
4583        annotations; these are intended to help software tools read and write
4584        the data as well as help reduce conflicts between annotations added by
4585        different tools.  Please see the SBML specifications for more details.
4586
4587        Call this method will result in any existing content of the
4588        'annotation' subelement to be discarded.  Unless you have taken steps
4589        to first copy and reconstitute any existing annotations into the @p
4590        annotation that is about to be assigned, it is likely that performing
4591        such wholesale replacement is unfriendly towards other software
4592        applications whose annotations are discarded.  An alternative may be
4593        to use SBase.appendAnnotation() or
4594        SBase.appendAnnotation().
4595
4596        @param annotation an XML structure that is to be used as the new content
4597        of the 'annotation' subelement of this object.
4598
4599        @return integer value indicating success/failure of the
4600        function.  @if clike The value is drawn from the
4601        enumeration #OperationReturnValues_t. @endif@~ This particular
4602        function only does one thing irrespective of user input or
4603        object state, and thus will only return a single value:
4604        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4605
4606        @see getAnnotationString()
4607        @see isSetAnnotation()
4608        @see setAnnotation()
4609        @see appendAnnotation()
4610        @see appendAnnotation()
4611        @see unsetAnnotation()
4612
4613
4614        @par
4615        <hr>
4616        <span class='variant-sig-heading'>Method variant with the following signature</span>:
4617         <pre class='signature'>setAnnotation(string annotation)</pre>
4618
4619        Sets the value of the 'annotation' subelement of this SBML object.
4620
4621        The content of @p annotation is copied, and any previous content of
4622        this object's 'annotation' subelement is deleted.
4623
4624        Whereas the SBase 'notes' subelement is a container for content to be
4625        shown directly to humans, the 'annotation' element is a container for
4626        optional software-generated content @em not meant to be shown to
4627        humans.  Every object derived from SBase can have its own value for
4628        'annotation'.  The element's content type is <a target='_blank'
4629        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
4630        'any'</a>, allowing essentially arbitrary well-formed XML data
4631        content.
4632
4633        SBML places a few restrictions on the organization of the content of
4634        annotations; these are intended to help software tools read and write
4635        the data as well as help reduce conflicts between annotations added by
4636        different tools.  Please see the SBML specifications for more details.
4637
4638        Call this method will result in any existing content of the
4639        'annotation' subelement to be discarded.  Unless you have taken steps
4640        to first copy and reconstitute any existing annotations into the @p
4641        annotation that is about to be assigned, it is likely that performing
4642        such wholesale replacement is unfriendly towards other software
4643        applications whose annotations are discarded.  An alternative may be
4644        to use SBase.appendAnnotation() or
4645        SBase.appendAnnotation().
4646
4647        @param annotation an XML string that is to be used as the content
4648        of the 'annotation' subelement of this object.
4649
4650        @return integer value indicating success/failure of the
4651        function.  @if clike The value is drawn from the
4652        enumeration #OperationReturnValues_t. @endif@~ The possible values
4653        returned by this function are:
4654        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4655        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
4656
4657        @see getAnnotationString()
4658        @see isSetAnnotation()
4659        @see setAnnotation()
4660        @see appendAnnotation()
4661        @see appendAnnotation()
4662        @see unsetAnnotation()
4663
4664        """
4665        return _libsbml.SBase_setAnnotation(self, *args)
4666
4667    def appendAnnotation(self, *args):
4668        r"""
4669        appendAnnotation(SBase self, XMLNode annotation) -> int
4670        appendAnnotation(SBase self, string annotation) -> int
4671
4672        This method has multiple variants; they differ in the arguments
4673         they accept.  Each variant is described separately below.
4674
4675        @par
4676        <hr>
4677        <span class='variant-sig-heading'>Method variant with the following signature</span>:
4678         <pre class='signature'>appendAnnotation(XMLNode annotation)</pre>
4679
4680        Appends the given @p annotation to the 'annotation' subelement of this
4681        object.
4682
4683        Whereas the SBase 'notes' subelement is a container for content to be
4684        shown directly to humans, the 'annotation' element is a container for
4685        optional software-generated content @em not meant to be shown to
4686        humans.  Every object derived from SBase can have its own value for
4687        'annotation'.  The element's content type is <a
4688        target='_blank'
4689        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type 'any'</a>,
4690        allowing essentially arbitrary well-formed XML data content.
4691
4692        SBML places a few restrictions on the organization of the content of
4693        annotations; these are intended to help software tools read and write
4694        the data as well as help reduce conflicts between annotations added by
4695        different tools.  Please see the SBML specifications for more details.
4696
4697        Unlike SBase.setAnnotation() or
4698        SBase.setAnnotation(), this method
4699        allows other annotations to be preserved when an application adds its
4700        own data.
4701
4702        @param annotation an XML structure that is to be copied and appended
4703        to the content of the 'annotation' subelement of this object.
4704
4705        @return integer value indicating success/failure of the
4706        function.  @if clike The value is drawn from the
4707        enumeration #OperationReturnValues_t. @endif@~ The possible values
4708        returned by this function are:
4709        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4710        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
4711        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
4712        (if the parent element does not have the 'metaid' attribute set)
4713        @li @link libsbml#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS@endlink
4714        (if the parent was already annotated with the annotation in question)
4715
4716        @see getAnnotationString()
4717        @see isSetAnnotation()
4718        @see setAnnotation()
4719        @see setAnnotation()
4720        @see appendAnnotation()
4721        @see unsetAnnotation()
4722
4723
4724        @par
4725        <hr>
4726        <span class='variant-sig-heading'>Method variant with the following signature</span>:
4727         <pre class='signature'>appendAnnotation(string annotation)</pre>
4728
4729        Appends the given @p annotation to the 'annotation' subelement of this
4730        object.
4731
4732        Whereas the SBase 'notes' subelement is a container for content to be
4733        shown directly to humans, the 'annotation' element is a container for
4734        optional software-generated content @em not meant to be shown to
4735        humans.  Every object derived from SBase can have its own value for
4736        'annotation'.  The element's content type is <a
4737        target='_blank'
4738        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type 'any'</a>,
4739        allowing essentially arbitrary well-formed XML data content.
4740
4741        SBML places a few restrictions on the organization of the content of
4742        annotations; these are intended to help software tools read and write
4743        the data as well as help reduce conflicts between annotations added by
4744        different tools.  Please see the SBML specifications for more details.
4745
4746        Unlike SBase.setAnnotation() or
4747        SBase.setAnnotation(), this method
4748        allows other annotations to be preserved when an application adds its
4749        own data.
4750
4751        @param annotation an XML string that is to be copied and appended
4752        to the content of the 'annotation' subelement of this object.
4753
4754        @return integer value indicating success/failure of the
4755        function.  @if clike The value is drawn from the
4756        enumeration #OperationReturnValues_t. @endif@~ The possible values
4757        returned by this function are:
4758        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4759        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
4760        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
4761        (if the parent element does not have the 'metaid' attribute set)
4762        @li @link libsbml#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS@endlink
4763        (if the parent was already annotated with the annotation in question)
4764
4765        @see getAnnotationString()
4766        @see isSetAnnotation()
4767        @see setAnnotation()
4768        @see setAnnotation()
4769        @see appendAnnotation()
4770        @see unsetAnnotation()
4771
4772        """
4773        return _libsbml.SBase_appendAnnotation(self, *args)
4774
4775    def removeTopLevelAnnotationElement(self, *args):
4776        r"""
4777        removeTopLevelAnnotationElement(SBase self, string elementName, string elementURI="", bool removeEmpty=True) -> int
4778
4779        Removes the top-level element within the 'annotation' subelement of this
4780        SBML object with the given name and optional URI.
4781
4782        SBML places a few restrictions on the organization of the content of
4783        annotations; these are intended to help software tools read and write
4784        the data as well as help reduce conflicts between annotations added by
4785        different tools.  Please see the SBML specifications for more details.
4786
4787        Calling this method allows a particular annotation element to be removed
4788        whilst the remaining annotations remain intact.
4789
4790        @param elementName a string representing the name of the top level
4791        annotation element that is to be removed.
4792        @param elementURI an optional string that is used to check both the name
4793        and URI of the top level element to be removed.
4794        @param removeEmpty if after removing of the element, the annotation is
4795        empty, and the removeEmpty argument is true, the annotation node will be
4796        deleted (default).
4797
4798        @return integer value indicating success/failure of the
4799        function.  @if clike The value is drawn from the
4800        enumeration #OperationReturnValues_t. @endif@~ The possible values
4801        returned by this function are:
4802        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4803        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
4804        @li @link libsbml#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND@endlink
4805        @li @link libsbml#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND@endlink
4806
4807        @see replaceTopLevelAnnotationElement()
4808        @see replaceTopLevelAnnotationElement()
4809
4810
4811
4812        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
4813
4814        """
4815        return _libsbml.SBase_removeTopLevelAnnotationElement(self, *args)
4816
4817    def replaceTopLevelAnnotationElement(self, *args):
4818        r"""
4819        replaceTopLevelAnnotationElement(SBase self, XMLNode annotation) -> int
4820        replaceTopLevelAnnotationElement(SBase self, string annotation) -> int
4821
4822        This method has multiple variants; they differ in the arguments
4823         they accept.  Each variant is described separately below.
4824
4825        @par
4826        <hr>
4827        <span class='variant-sig-heading'>Method variant with the following signature</span>:
4828         <pre class='signature'>replaceTopLevelAnnotationElement(XMLNode annotation)</pre>
4829
4830        Replaces the given top-level element within the 'annotation'
4831        subelement of this SBML object and with the annotation element supplied.
4832
4833        SBML places a few restrictions on the organization of the content of
4834        annotations; these are intended to help software tools read and write
4835        the data as well as help reduce conflicts between annotations added by
4836        different tools.  Please see the SBML specifications for more details.
4837
4838        This method determines the name of the element to be replaced from the
4839        annotation argument. Functionally it is equivalent to calling <code>
4840        removeTopLevelAnnotationElement(name)</code> followed by calling
4841        <code>appendAnnotation(annotation_with_name)</code>, with the exception
4842        that the placement of the annotation element remains the same.
4843
4844        @param annotation XMLNode representing the replacement top level annotation.
4845
4846        @return integer value indicating success/failure of the
4847        function.  @if clike The value is drawn from the
4848        enumeration #OperationReturnValues_t. @endif@~ The possible values
4849        returned by this function are:
4850        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4851        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
4852        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
4853
4854        @see removeTopLevelAnnotationElement()
4855        @see replaceTopLevelAnnotationElement()
4856
4857
4858        @par
4859        <hr>
4860        <span class='variant-sig-heading'>Method variant with the following signature</span>:
4861         <pre class='signature'>replaceTopLevelAnnotationElement(string annotation)</pre>
4862
4863        Replaces the given top-level element within the 'annotation'
4864        subelement of this SBML object and with the annotation element supplied.
4865
4866        SBML places a few restrictions on the organization of the content of
4867        annotations; these are intended to help software tools read and write
4868        the data as well as help reduce conflicts between annotations added by
4869        different tools.  Please see the SBML specifications for more details.
4870
4871        This method determines the name of the element to be replaced from the
4872        annotation argument. Functionally it is equivalent to calling <code>
4873        removeTopLevelAnnotationElement(name)</code> followed by calling
4874        <code>appendAnnotation(annotation_with_name)</code>, with the exception
4875        that the placement of the annotation element remains the same.
4876
4877        @param annotation string representing the replacement top level annotation.
4878
4879        @return integer value indicating success/failure of the
4880        function.  @if clike The value is drawn from the
4881        enumeration #OperationReturnValues_t. @endif@~ The possible values
4882        returned by this function are:
4883        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4884        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
4885        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
4886
4887        @see removeTopLevelAnnotationElement()
4888        @see replaceTopLevelAnnotationElement()
4889
4890        """
4891        return _libsbml.SBase_replaceTopLevelAnnotationElement(self, *args)
4892
4893    def setNotes(self, *args):
4894        r"""
4895        setNotes(SBase self, XMLNode notes) -> int
4896        setNotes(SBase self, string notes, bool addXHTMLMarkup=False) -> int
4897
4898        This method has multiple variants; they differ in the arguments
4899         they accept.  Each variant is described separately below.
4900
4901        @par
4902        <hr>
4903        <span class='variant-sig-heading'>Method variant with the following signature</span>:
4904         <pre class='signature'>setNotes(string notes, bool addXHTMLMarkup = false)</pre>
4905
4906        Sets the value of the 'notes' subelement of this SBML object to a copy
4907        of the string @p notes.
4908
4909        The content of @p notes is copied, and any existing content of this
4910        object's 'notes' subelement is deleted.
4911
4912        The optional SBML element named 'notes', present on every major SBML
4913        component type, is intended as a place for storing optional
4914        information intended to be seen by humans.  An example use of the
4915        'notes' element would be to contain formatted user comments about the
4916        model element in which the 'notes' element is enclosed.  Every object
4917        derived directly or indirectly from type SBase can have a separate
4918        value for 'notes', allowing users considerable freedom when adding
4919        comments to their models.
4920
4921        The format of 'notes' elements must be <a target='_blank'
4922        href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
4923        verify the formatting of 'notes' content, libSBML provides the static
4924        utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however,
4925        readers are urged to consult the appropriate <a target='_blank'
4926        href='http://sbml.org/Documents/Specifications'>SBML specification
4927        document</a> for the Level and Version of their model for more
4928        in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
4929        specifications have considerable detail about how 'notes' element
4930        content must be structured.
4931
4932        The following code illustrates a very simple way of setting the notes
4933        using this method.  Here, the object being annotated is the whole SBML
4934        document, but that is for illustration purposes only; you could of
4935        course use this same approach to annotate any other SBML component.
4936        @if cpp
4937        @code{.cpp}
4938        SBMLDocument s = new SBMLDocument(3, 1);
4939        s->setNotes('<body xmlns='http://www.w3.org/1999/xhtml'><p>here is my note</p></body>');
4940        @endcode
4941        @endif
4942        @if java
4943        @code{.java}
4944        SBMLDocument s = new SBMLDocument(3, 1);
4945        s.setNotes('<body xmlns='http://www.w3.org/1999/xhtml'><p>here is my note</p></body>');
4946        @endcode
4947        @endif
4948        @if python
4949        @code{.py}
4950        try:
4951          sbmlDoc = SBMLDocument(3, 1)
4952        except ValueError:
4953          print('Could not create SBMLDocument object')
4954          sys.exit(1)
4955
4956        note = '<body xmlns='http://www.w3.org/1999/xhtml'><p>here is my note</p></body>'
4957
4958        status = sbmlDoc.setNotes(note)
4959        if status != LIBSBML_OPERATION_SUCCESS:
4960          # Do something to handle the error here.
4961          print('Unable to set notes on the SBML document object')
4962          sys.exit(1)
4963        @endcode
4964        @endif
4965        @if csharp
4966        @code
4967        SBMLDocument s = new SBMLDocument(3, 1);
4968        s.setNotes('<body xmlns='http://www.w3.org/1999/xhtml'><p>here is my note</p></body>');
4969        @endcode
4970        @endif@~
4971
4972        @param notes an XML string that is to be used as the content of the
4973        'notes' subelement of this object.
4974
4975        @param addXHTMLMarkup a boolean indicating whether to wrap the contents
4976        of the @p notes argument with XHTML paragraph (<code>&lt;p&gt;</code>)
4977        tags.  This is appropriate when the string in @p notes does not already
4978        containg the appropriate XHTML markup.
4979
4980        @return integer value indicating success/failure of the
4981        function.  @if clike The value is drawn from the
4982        enumeration #OperationReturnValues_t. @endif@~ The possible values
4983        returned by this function are:
4984        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
4985        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
4986        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
4987
4988        @see getNotesString()
4989        @see isSetNotes()
4990        @see setNotes()
4991        @see appendNotes()
4992        @see appendNotes()
4993        @see unsetNotes()
4994        @see SyntaxChecker.hasExpectedXHTMLSyntax()
4995
4996
4997
4998        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
4999
5000
5001        @par
5002        <hr>
5003        <span class='variant-sig-heading'>Method variant with the following signature</span>:
5004         <pre class='signature'>setNotes(XMLNode notes)</pre>
5005
5006        Sets the value of the 'notes' subelement of this SBML object.
5007
5008        The content of @p notes is copied, and any existing content of this
5009        object's 'notes' subelement is deleted.
5010
5011        The optional SBML element named 'notes', present on every major SBML
5012        component type, is intended as a place for storing optional
5013        information intended to be seen by humans.  An example use of the
5014        'notes' element would be to contain formatted user comments about the
5015        model element in which the 'notes' element is enclosed.  Every object
5016        derived directly or indirectly from type SBase can have a separate
5017        value for 'notes', allowing users considerable freedom when adding
5018        comments to their models.
5019
5020        The format of 'notes' elements must be <a target='_blank'
5021        href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
5022        verify the formatting of 'notes' content, libSBML provides the static
5023        utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however,
5024        readers are urged to consult the appropriate <a target='_blank'
5025        href='http://sbml.org/Documents/Specifications'>SBML specification
5026        document</a> for the Level and Version of their model for more
5027        in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
5028        specifications have considerable detail about how 'notes' element
5029        content must be structured.
5030
5031        @param notes an XML structure that is to be used as the content of the
5032        'notes' subelement of this object.
5033
5034        @return integer value indicating success/failure of the
5035        function.  @if clike The value is drawn from the
5036        enumeration #OperationReturnValues_t. @endif@~ The possible values
5037        returned by this function are:
5038        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5039        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
5040
5041        @see getNotesString()
5042        @see isSetNotes()
5043        @see setNotes()
5044        @see appendNotes()
5045        @see appendNotes()
5046        @see unsetNotes()
5047        @see SyntaxChecker.hasExpectedXHTMLSyntax()
5048
5049        """
5050        return _libsbml.SBase_setNotes(self, *args)
5051
5052    def appendNotes(self, *args):
5053        r"""
5054        appendNotes(SBase self, XMLNode notes) -> int
5055        appendNotes(SBase self, string notes) -> int
5056
5057        This method has multiple variants; they differ in the arguments
5058         they accept.  Each variant is described separately below.
5059
5060        @par
5061        <hr>
5062        <span class='variant-sig-heading'>Method variant with the following signature</span>:
5063         <pre class='signature'>appendNotes(string notes)</pre>
5064
5065        Appends the given @p notes to the 'notes' subelement of this object.
5066
5067        The content of the parameter @p notes is copied.
5068
5069        The optional SBML element named 'notes', present on every major SBML
5070        component type, is intended as a place for storing optional
5071        information intended to be seen by humans.  An example use of the
5072        'notes' element would be to contain formatted user comments about the
5073        model element in which the 'notes' element is enclosed.  Every object
5074        derived directly or indirectly from type SBase can have a separate
5075        value for 'notes', allowing users considerable freedom when adding
5076        comments to their models.
5077
5078        The format of 'notes' elements must be <a target='_blank'
5079        href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
5080        verify the formatting of 'notes' content, libSBML provides the static
5081        utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however,
5082        readers are urged to consult the appropriate <a target='_blank'
5083        href='http://sbml.org/Documents/Specifications'>SBML specification
5084        document</a> for the Level and Version of their model for more
5085        in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
5086        specifications have considerable detail about how 'notes' element
5087        content must be structured.
5088
5089        @param notes an XML string that is to appended to the content of
5090        the 'notes' subelement of this object.
5091
5092        @return integer value indicating success/failure of the
5093        function.  @if clike The value is drawn from the
5094        enumeration #OperationReturnValues_t. @endif@~ The possible values
5095        returned by this function are:
5096        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5097        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
5098        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5099
5100        @see getNotesString()
5101        @see isSetNotes()
5102        @see setNotes()
5103        @see setNotes()
5104        @see appendNotes()
5105        @see unsetNotes()
5106        @see SyntaxChecker.hasExpectedXHTMLSyntax()
5107
5108
5109        @par
5110        <hr>
5111        <span class='variant-sig-heading'>Method variant with the following signature</span>:
5112         <pre class='signature'>appendNotes(XMLNode notes)</pre>
5113
5114        Appends the given @p notes to the 'notes' subelement of this object.
5115
5116        The content of @p notes is copied.
5117
5118        The optional SBML element named 'notes', present on every major SBML
5119        component type, is intended as a place for storing optional
5120        information intended to be seen by humans.  An example use of the
5121        'notes' element would be to contain formatted user comments about the
5122        model element in which the 'notes' element is enclosed.  Every object
5123        derived directly or indirectly from type SBase can have a separate
5124        value for 'notes', allowing users considerable freedom when adding
5125        comments to their models.
5126
5127        The format of 'notes' elements must be <a target='_blank'
5128        href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
5129        verify the formatting of 'notes' content, libSBML provides the static
5130        utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however,
5131        readers are urged to consult the appropriate <a target='_blank'
5132        href='http://sbml.org/Documents/Specifications'>SBML specification
5133        document</a> for the Level and Version of their model for more
5134        in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
5135        specifications have considerable detail about how 'notes' element
5136        content must be structured.
5137
5138        @param notes an XML node structure that is to appended to the content
5139        of the 'notes' subelement of this object.
5140
5141        @return integer value indicating success/failure of the
5142        function.  @if clike The value is drawn from the
5143        enumeration #OperationReturnValues_t. @endif@~ The possible values
5144        returned by this function are:
5145        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5146        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
5147        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5148
5149        @see getNotesString()
5150        @see isSetNotes()
5151        @see setNotes()
5152        @see setNotes()
5153        @see appendNotes()
5154        @see unsetNotes()
5155        @see SyntaxChecker.hasExpectedXHTMLSyntax()
5156
5157        """
5158        return _libsbml.SBase_appendNotes(self, *args)
5159
5160    def setModelHistory(self, history):
5161        r"""
5162        setModelHistory(SBase self, ModelHistory history) -> int
5163
5164        Sets the ModelHistory of this object.
5165
5166        The content of @p history is copied, and this object's existing model
5167        history content is deleted.
5168
5169        @param history ModelHistory of this object.
5170
5171        @return integer value indicating success/failure of the
5172        function.  @if clike The value is drawn from the
5173        enumeration #OperationReturnValues_t. @endif@~ The possible values
5174        returned by this function are:
5175        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5176        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
5177        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
5178
5179        @note In SBML Level&nbsp;2, model history annotations were only
5180        permitted on the Model element.  In SBML Level&nbsp;3, they are
5181        permitted on all SBML components derived from SBase.
5182
5183        """
5184        return _libsbml.SBase_setModelHistory(self, history)
5185
5186    def connectToParent(self, parent):
5187        r"""
5188        connectToParent(SBase self, SBase parent)
5189
5190        @internal
5191
5192        @internal
5193
5194        """
5195        return _libsbml.SBase_connectToParent(self, parent)
5196
5197    def connectToChild(self):
5198        r"""connectToChild(SBase self)"""
5199        return _libsbml.SBase_connectToChild(self)
5200
5201    def setSBOTerm(self, *args):
5202        r"""
5203        setSBOTerm(SBase self, int value) -> int
5204        setSBOTerm(SBase self, string sboid) -> int
5205
5206        This method has multiple variants; they differ in the arguments
5207         they accept.  Each variant is described separately below.
5208
5209        @par
5210        <hr>
5211        <span class='variant-sig-heading'>Method variant with the following signature</span>:
5212         <pre class='signature'>setSBOTerm(int value)</pre>
5213
5214        Sets the value of the 'sboTerm' attribute.
5215
5216        @par
5217        Beginning with SBML Level 2 Version 2, objects derived from SBase have
5218        an optional attribute named 'sboTerm' for supporting the use of the
5219        Systems Biology Ontology.  In SBML proper, the data type of the
5220        attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
5221        seven digit integer number; libSBML simplifies the representation by
5222        only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
5223        'sboTerm' attribute on SBase has data type @c int, and SBO identifiers
5224        are stored simply as integers.
5225        @par
5226        SBO terms are a type of optional annotation, and each different class
5227        of SBML object derived from SBase imposes its own requirements about
5228        the values permitted for 'sboTerm'. More details can be found in SBML
5229        specifications for Level&nbsp;2 Version&nbsp;2 and above.
5230
5231        @param value the NNNNNNN integer portion of the SBO identifier.
5232
5233        @return integer value indicating success/failure of the
5234        function.  @if clike The value is drawn from the
5235        enumeration #OperationReturnValues_t. @endif@~ The possible values
5236        returned by this function are:
5237        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5238        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
5239        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
5240
5241        @see setSBOTerm()
5242
5243
5244        @par
5245        <hr>
5246        <span class='variant-sig-heading'>Method variant with the following signature</span>:
5247         <pre class='signature'>setSBOTerm(string &sboid)</pre>
5248
5249        Sets the value of the 'sboTerm' attribute by string.
5250
5251        @par
5252        Beginning with SBML Level 2 Version 2, objects derived from SBase have
5253        an optional attribute named 'sboTerm' for supporting the use of the
5254        Systems Biology Ontology.  In SBML proper, the data type of the
5255        attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
5256        seven digit integer number; libSBML simplifies the representation by
5257        only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
5258        'sboTerm' attribute on SBase has data type @c int, and SBO identifiers
5259        are stored simply as integers.
5260        @par
5261        SBO terms are a type of optional annotation, and each different class
5262        of SBML object derived from SBase imposes its own requirements about
5263        the values permitted for 'sboTerm'. More details can be found in SBML
5264        specifications for Level&nbsp;2 Version&nbsp;2 and above.
5265
5266        @param sboid the SBO identifier string of the form 'SBO:NNNNNNN'.
5267
5268        @return integer value indicating success/failure of the
5269        function.  @if clike The value is drawn from the
5270        enumeration #OperationReturnValues_t. @endif@~ The possible values
5271        returned by this function are:
5272        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5273        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
5274        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
5275
5276        @see setSBOTerm()
5277
5278        """
5279        return _libsbml.SBase_setSBOTerm(self, *args)
5280
5281    def setNamespaces(self, xmlns):
5282        r"""
5283        setNamespaces(SBase self, XMLNamespaces xmlns) -> int
5284
5285        Sets the namespaces relevant of this SBML object.
5286
5287        The content of @p xmlns is copied, and this object's existing
5288        namespace content is deleted.
5289
5290        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
5291        information.  It is used to communicate the SBML Level, Version, and
5292        (in Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.
5293
5294        @param xmlns the namespaces to set.
5295
5296        @return integer value indicating success/failure of the
5297        function.  @if clike The value is drawn from the
5298        enumeration #OperationReturnValues_t. @endif@~ The possible values
5299        returned by this function are:
5300        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5301
5302        """
5303        return _libsbml.SBase_setNamespaces(self, xmlns)
5304
5305    def unsetMetaId(self):
5306        r"""
5307        unsetMetaId(SBase self) -> int
5308
5309        Unsets the value of the 'metaid' attribute of this SBML object.
5310
5311        @par
5312        The optional attribute named 'metaid', present on every major SBML
5313        component type, is for supporting metadata annotations using RDF (<a
5314        href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
5315        attribute value has the data type <a
5316        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
5317        identifier type, which means each 'metaid' value must be globally unique
5318        within an SBML file.  The latter point is important, because the
5319        uniqueness criterion applies across <em>any</em> attribute with type
5320        <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
5321        by SBML---something to be aware of if your application-specific XML
5322        content inside the 'annotation' subelement happens to use the XML
5323        <code>ID</code> type.  Although SBML itself specifies the use of <a
5324        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
5325        the 'metaid' attribute, SBML-compatible applications should be careful if
5326        they use XML <code>ID</code>'s in XML portions of a model that are not
5327        defined by SBML, such as in the application-specific content of the
5328        'annotation' subelement.  Finally, note that LibSBML does not provide an
5329        explicit XML <code>ID</code> data type; it uses ordinary character
5330        strings, which is easier for applications to support.
5331
5332        @return integer value indicating success/failure of the
5333        function.  @if clike The value is drawn from the
5334        enumeration #OperationReturnValues_t. @endif@~ The possible values
5335        returned by this function are:
5336        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5337        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
5338        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5339
5340        """
5341        return _libsbml.SBase_unsetMetaId(self)
5342
5343    def unsetId(self):
5344        r"""
5345        unsetId(SBase self) -> int
5346
5347        Unsets the value of the 'id' attribute of this SBML object.
5348
5349        @par
5350        The identifier given by an object's 'id' attribute value
5351        is used to identify the object within the SBML model definition.
5352        Other objects can refer to the component using this identifier.  The
5353        data type of 'id' is always <code>SId</code> or a type derived
5354        from that, such as <code>UnitSId</code>, depending on the object in
5355        question.  All data types are defined as follows:
5356        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
5357        letter ::= 'a'..'z','A'..'Z'
5358        digit  ::= '0'..'9'
5359        idChar ::= letter | digit | '_'
5360        SId    ::= ( letter | '_' ) idChar*
5361        </pre>
5362        The characters <code>(</code> and <code>)</code> are used for grouping,
5363        the character <code>*</code> 'zero or more times', and the character
5364        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
5365        is determined by an exact character sequence match; i.e., comparisons must
5366        be performed in a case-sensitive manner.  This applies to all uses of
5367        <code>SId</code>, <code>SIdRef</code>, and derived types.
5368
5369        Users need to be aware of some important API issues that are the result of
5370        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
5371        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
5372        of SBML objects.  To simplify the work of programmers, libSBML's API
5373        provided get, set, check, and unset on the SBase object class itself
5374        instead of on individual subobject classes. This made the
5375        get/set/etc. methods uniformly available on all objects in the libSBML
5376        API.  LibSBML simply returned empty strings or otherwise did not act when
5377        the methods were applied to SBML objects that were not defined by the SBML
5378        specification to have 'id' or 'name' attributes.  Additional complications
5379        arose with the rule and assignment objects: InitialAssignment,
5380        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
5381        the rule object hierarchy was different, and in addition, then as now,
5382        they possess different attributes: 'variable' (for the rules and event
5383        assignments), 'symbol' (for initial assignments), or neither (for
5384        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
5385        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
5386
5387        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
5388        Version&nbsp;2, it became necessary to introduce a new way to interact
5389        with the attributes more consistently in libSBML to avoid breaking
5390        backward compatibility in the behavior of the original 'id' methods.  For
5391        this reason, libSBML provides four functions (getIdAttribute(),
5392        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
5393        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
5394        from SBase, regardless of the object's type.  <strong>These new methods
5395        should be used instead of the older getId()/setId()/etc. methods</strong>
5396        unless the old behavior is somehow necessary.  Regardless of the Level and
5397        Version of the SBML, these functions allow client applications to use more
5398        generalized code in some situations (for instance, when manipulating
5399        objects that are all known to have identifiers).  If the object in
5400        question does not posess an 'id' attribute according to the SBML
5401        specification for the Level and Version in use, libSBML will not allow the
5402        identifier to be set, nor will it read or write 'id' attributes for those
5403        objects.
5404
5405        @return integer value indicating success/failure of the
5406        function.  @if clike The value is drawn from the
5407        enumeration #OperationReturnValues_t. @endif@~ The possible values
5408        returned by this function are:
5409        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5410        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5411
5412        @see getIdAttribute()
5413        @see setIdAttribute()
5414        @see isSetIdAttribute()
5415        @see unsetIdAttribute()
5416
5417        """
5418        return _libsbml.SBase_unsetId(self)
5419
5420    def unsetIdAttribute(self):
5421        r"""
5422        unsetIdAttribute(SBase self) -> int
5423
5424        Unsets the value of the 'id' attribute of this SBML object.
5425
5426        Most (but not all) objects in SBML include two common attributes: 'id'
5427        and 'name'.  The identifier given by an object's 'id' attribute value
5428        is used to identify the object within the SBML model definition.
5429        Other objects can refer to the component using this identifier.
5430
5431        @return integer value indicating success/failure of the
5432        function.  @if clike The value is drawn from the
5433        enumeration #OperationReturnValues_t. @endif@~ The possible values
5434        returned by this function are:
5435        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5436        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5437
5438        @see getIdAttribute()
5439        @see setIdAttribute()
5440        @see isSetIdAttribute()
5441
5442        """
5443        return _libsbml.SBase_unsetIdAttribute(self)
5444
5445    def unsetName(self):
5446        r"""
5447        unsetName(SBase self) -> int
5448
5449        Unsets the value of the 'name' attribute of this SBML object.
5450
5451        @par
5452        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
5453        moved to SBase directly, instead of being defined individually for many
5454        (but not all) objects.  LibSBML has for a long time provided functions
5455        defined on SBase itself to get, set, and unset those attributes, which
5456        would fail or otherwise return empty strings if executed on any object
5457        for which those attributes were not defined.  Now that all SBase objects
5458        define those attributes, those functions now succeed for any object with
5459        the appropriate level and version.
5460
5461        The 'name' attribute is
5462        optional and is not intended to be used for cross-referencing purposes
5463        within a model.  Its purpose instead is to provide a human-readable
5464        label for the component.  The data type of 'name' is the type
5465        <code>string</code> defined in XML Schema.  SBML imposes no
5466        restrictions as to the content of 'name' attributes beyond those
5467        restrictions defined by the <code>string</code> type in XML Schema.
5468
5469        The recommended practice for handling 'name' is as follows.  If a
5470        software tool has the capability for displaying the content of 'name'
5471        attributes, it should display this content to the user as a
5472        component's label instead of the component's 'id'.  If the user
5473        interface does not have this capability (e.g., because it cannot
5474        display or use special characters in symbol names), or if the 'name'
5475        attribute is missing on a given component, then the user interface
5476        should display the value of the 'id' attribute instead.  (Script
5477        language interpreters are especially likely to display 'id' instead of
5478        'name'.)
5479
5480        As a consequence of the above, authors of systems that automatically
5481        generate the values of 'id' attributes should be aware some systems
5482        may display the 'id''s to the user.  Authors therefore may wish to
5483        take some care to have their software create 'id' values that are: (a)
5484        reasonably easy for humans to type and read; and (b) likely to be
5485        meaningful, for example by making the 'id' attribute be an abbreviated
5486        form of the name attribute value.
5487
5488        An additional point worth mentioning is although there are
5489        restrictions on the uniqueness of 'id' values, there are no
5490        restrictions on the uniqueness of 'name' values in a model.  This
5491        allows software applications leeway in assigning component identifiers.
5492
5493        Regardless of the level and version of the SBML, these functions allow
5494        client applications to use more generalized code in some situations
5495        (for instance, when manipulating objects that are all known to have
5496        names).  If the object in question does not posess a 'name' attribute
5497        according to the SBML specification for the Level and Version in use,
5498        libSBML will not allow the name to be set, nor will it read or
5499        write 'name' attributes for those objects.
5500
5501        @return integer value indicating success/failure of the
5502        function.  @if clike The value is drawn from the
5503        enumeration #OperationReturnValues_t. @endif@~ The possible values
5504        returned by this function are:
5505        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5506        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5507
5508        @see getName()
5509        @see setName()
5510        @see isSetName()
5511
5512        """
5513        return _libsbml.SBase_unsetName(self)
5514
5515    def unsetNotes(self):
5516        r"""
5517        unsetNotes(SBase self) -> int
5518
5519        Unsets the value of the 'notes' subelement of this SBML object.
5520
5521        The optional SBML element named 'notes', present on every major SBML
5522        component type, is intended as a place for storing optional
5523        information intended to be seen by humans.  An example use of the
5524        'notes' element would be to contain formatted user comments about the
5525        model element in which the 'notes' element is enclosed.  Every object
5526        derived directly or indirectly from type SBase can have a separate
5527        value for 'notes', allowing users considerable freedom when adding
5528        comments to their models.
5529
5530        The format of 'notes' elements must be <a target='_blank'
5531        href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
5532        verify the formatting of 'notes' content, libSBML provides the static
5533        utility method SyntaxChecker.hasExpectedXHTMLSyntax(); however,
5534        readers are urged to consult the appropriate <a target='_blank'
5535        href='http://sbml.org/Documents/Specifications'>SBML specification
5536        document</a> for the Level and Version of their model for more
5537        in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
5538        specifications have considerable detail about how 'notes' element
5539        content must be structured.
5540
5541        @return integer value indicating success/failure of the
5542        function.  @if clike The value is drawn from the
5543        enumeration #OperationReturnValues_t. @endif@~ This particular
5544        function only does one thing irrespective of user input or
5545        object state, and thus will only return a single value:
5546        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5547
5548        @see getNotesString()
5549        @see isSetNotes()
5550        @see setNotes()
5551        @see setNotes()
5552        @see appendNotes()
5553        @see appendNotes()
5554        @see SyntaxChecker.hasExpectedXHTMLSyntax()
5555
5556        """
5557        return _libsbml.SBase_unsetNotes(self)
5558
5559    def unsetAnnotation(self):
5560        r"""
5561        unsetAnnotation(SBase self) -> int
5562
5563        Unsets the value of the 'annotation' subelement of this SBML object.
5564
5565        Whereas the SBase 'notes' subelement is a container for content to be
5566        shown directly to humans, the 'annotation' element is a container for
5567        optional software-generated content @em not meant to be shown to
5568        humans.  Every object derived from SBase can have its own value for
5569        'annotation'.  The element's content type is <a target='_blank'
5570        href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
5571        'any'</a>, allowing essentially arbitrary well-formed XML data
5572        content.
5573
5574        SBML places a few restrictions on the organization of the content of
5575        annotations; these are intended to help software tools read and write
5576        the data as well as help reduce conflicts between annotations added by
5577        different tools.  Please see the SBML specifications for more details.
5578
5579        @return integer value indicating success/failure of the
5580        function.  @if clike The value is drawn from the
5581        enumeration #OperationReturnValues_t. @endif@~ This particular
5582        function only does one thing irrespective of user input or
5583        object state, and thus will only return a single value:
5584        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5585
5586        @see getAnnotation()
5587        @see getAnnotationString()
5588        @see isSetAnnotation()
5589        @see setAnnotation()
5590        @see setAnnotation()
5591        @see appendAnnotation()
5592        @see appendAnnotation()
5593
5594        """
5595        return _libsbml.SBase_unsetAnnotation(self)
5596
5597    def unsetSBOTerm(self):
5598        r"""
5599        unsetSBOTerm(SBase self) -> int
5600
5601        Unsets the value of the 'sboTerm' attribute of this SBML object.
5602
5603        @return integer value indicating success/failure of the
5604        function.  @if clike The value is drawn from the
5605        enumeration #OperationReturnValues_t. @endif@~ The possible values
5606        returned by this function are:
5607        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5608        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
5609
5610        """
5611        return _libsbml.SBase_unsetSBOTerm(self)
5612
5613    def addCVTerm(self, term, newBag=False):
5614        r"""
5615        addCVTerm(SBase self, CVTerm term, bool newBag=False) -> int
5616
5617        Adds a copy of the given CVTerm object to this SBML object.
5618
5619        @param term the CVTerm to assign.
5620
5621        @param newBag if @c True, creates a new RDF bag with the same identifier
5622        as a previous bag, and if @c False, adds the term to an existing
5623        RDF bag with the same type of qualifier as the term being added.
5624
5625        @return integer value indicating success/failure of the
5626        function.  @if clike The value is drawn from the
5627        enumeration #OperationReturnValues_t. @endif@~ The possible values
5628        returned by this function are:
5629        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5630        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5631        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink, if
5632        this object lacks a 'metaid' attribute
5633        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
5634
5635        @note Since the CV Term uses the 'metaid' attribute of the object as a
5636        reference, if the object has no 'metaid' attribute value set, then the
5637        CVTerm will not be added.
5638
5639        @note This method should be used with some caution.  The fact that this
5640        method @em copies the object passed to it means that the caller will be
5641        left holding a physically different object instance than the one contained
5642        inside this object.  Changes made to the original object instance (such as
5643        resetting attribute values) will <em>not affect the instance in this
5644        object</em>.  In addition, the caller should make sure to free the
5645        original object if it is no longer being used, or else a memory leak will
5646        result.  Please see other methods on this class (particularly a
5647        corresponding method whose name begins with the word <code>create</code>)
5648        for alternatives that do not lead to these issues.
5649
5650        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
5651
5652
5653
5654        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
5655
5656        """
5657        return _libsbml.SBase_addCVTerm(self, term, newBag)
5658
5659    def getCVTerms(self, *args):
5660        r"""
5661        getCVTerms(SBase self) -> List
5662        getCVTerms(SBase self) -> List *
5663
5664        Returns a list of CVTerm objects in the annotations of this SBML
5665        object.
5666
5667        @return the list of CVTerms for this SBML object.
5668
5669        """
5670        return _libsbml.SBase_getCVTerms(self, *args)
5671
5672    def getNumCVTerms(self):
5673        r"""
5674        getNumCVTerms(SBase self) -> unsigned int
5675
5676        Returns the number of CVTerm objects in the annotations of this SBML
5677        object.
5678
5679        @return the number of CVTerms for this SBML object.
5680
5681        """
5682        return _libsbml.SBase_getNumCVTerms(self)
5683
5684    def getCVTerm(self, n):
5685        r"""
5686        getCVTerm(SBase self, unsigned int n) -> CVTerm
5687
5688        Returns the nth CVTerm in the list of CVTerms of this SBML
5689        object.
5690
5691        @param n long the index of the CVTerm to retrieve.
5692
5693        @return the nth CVTerm in the list of CVTerms for this SBML object.
5694        If the index @p n is invalid, @c None is returned.
5695
5696        """
5697        return _libsbml.SBase_getCVTerm(self, n)
5698
5699    def unsetCVTerms(self):
5700        r"""
5701        unsetCVTerms(SBase self) -> int
5702
5703        Clears the list of CVTerm objects attached to this SBML object.
5704
5705        @return integer value indicating success/failure of the
5706        function.  @if clike The value is drawn from the
5707        enumeration #OperationReturnValues_t. @endif@~ The possible values
5708        returned by this function are:
5709        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5710        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5711
5712        """
5713        return _libsbml.SBase_unsetCVTerms(self)
5714
5715    def unsetModelHistory(self):
5716        r"""
5717        unsetModelHistory(SBase self) -> int
5718
5719        Unsets the ModelHistory object attached to this object.
5720
5721        @return integer value indicating success/failure of the
5722        function.  @if clike The value is drawn from the
5723        enumeration #OperationReturnValues_t. @endif@~ The possible values
5724        returned by this function are:
5725        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
5726        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
5727        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
5728
5729        @note In SBML Level&nbsp;2, model history annotations were only
5730        permitted on the Model element.  In SBML Level&nbsp;3, they are
5731        permitted on all SBML components derived from SBase.
5732
5733        """
5734        return _libsbml.SBase_unsetModelHistory(self)
5735
5736    def getResourceBiologicalQualifier(self, resource):
5737        r"""
5738        getResourceBiologicalQualifier(SBase self, string resource) -> BiolQualifierType_t
5739
5740        Returns the MIRIAM <em>biological qualifier</em> associated with the
5741        given resource.
5742
5743        In <a target='_blank' href='http://biomodels.net/miriam'>MIRIAM</a>,
5744        qualifiers are an optional means of indicating the relationship
5745        between a model component and its annotations.  There are two broad
5746        kinds of annotations: <em>model</em> and <em>biological</em>.  The
5747        latter kind is used to qualify the relationship between a model
5748        component and a biological entity which it represents.  Examples of
5749        relationships include 'is' and 'has part', but many others are
5750        possible.  MIRIAM defines <a target='_blank'
5751        href='http://www.ebi.ac.uk/miriam/main/qualifiers/'>numerous
5752        relationship qualifiers</a> to enable different software tools to
5753        qualify biological annotations in the same standardized way.  In
5754        libSBML, the MIRIAM controlled-vocabulary annotations on an SBML model
5755        element are represented using lists of CVTerm objects, and the
5756        the MIRIAM biological qualifiers are represented using
5757        values @if clike from the enumeration
5758        type #BiolQualifierType_t.@endif@if python whose
5759        names begin with <code>BQB_</code> in the interface class
5760        @link libsbml libsbml@endlink.@endif@if java whose
5761        names begin with <code>BQB_</code> in the interface class
5762        {@link libsbmlConstants}.@endif@if csharp whose
5763        names begin with <code>BQB_</code> in the interface class
5764        @link libsbmlcs.libsbml libsbml@endlink.@endif@~
5765
5766        This method searches the controlled-vocabulary annotations
5767        (i.e., the list of CVTerm objects) on the present object, then out of
5768        those that have biological qualifiers, looks for an annotation to the
5769        given @p resource.  If such an annotation is found, it returns the
5770        type of biological qualifier associated with that resource as a
5771        value @if clike from the enumeration type
5772        #BiolQualifierType_t.@endif@if python whose name begins with
5773        <code>BQB_</code> from the interface
5774        class @link libsbml libsbml@endlink.@endif@if java whose name
5775        begins with <code>BQB_</code> from the interface
5776        class {@link libsbmlConstants}.@endif@if csharp whose
5777        names begin with <code>BQB_</code> in the interface class
5778        @link libsbmlcs.libsbml libsbml@endlink.@endif@~
5779
5780        @param resource string representing the resource; e.g.,
5781        <code>'http://www.geneontology.org/#GO:0005892'</code>.
5782
5783        @return the qualifier associated with the resource,
5784        or @link libsbml#BQB_UNKNOWN BQB_UNKNOWN@endlink if the
5785        resource does not exist.
5786
5787        @if clike
5788        @note The set of MIRIAM biological qualifiers grows over
5789        time, although relatively slowly.  The values in the enumeration
5790        #BiolQualifierType_t are up to date with MIRIAM at the time of a given
5791        libSBML release.  The set of values may be expanded in later libSBML
5792        releases, to match the values defined by MIRIAM at that later time.
5793        @endif@if python
5794        @note The set of MIRIAM biological qualifiers grows over
5795        time, although relatively slowly.  The values are up to date with
5796        MIRIAM at the time of a given libSBML release.  The set of values in
5797        list of <code>BQB_</code> constants defined in @link libsbml
5798        libsbml@endlink may be expanded in later libSBML releases, to match
5799        the values defined by MIRIAM at that later time.
5800        @endif@if java
5801        @note The set of MIRIAM biological qualifiers grows over
5802        time, although relatively slowly.  The values are up to date with
5803        MIRIAM at the time of a given libSBML release.  The set of values in
5804        list of <code>BQB_</code> constants defined in {@link libsbmlConstants}
5805        may be expanded in later libSBML releases, to match
5806        the values defined by MIRIAM at that later time.
5807        @endif@if csharp
5808        @note The set of MIRIAM biological qualifiers grows over
5809        time, although relatively slowly.  The values are up to date with
5810        MIRIAM at the time of a given libSBML release.  The set of values in
5811        list of <code>BQB_</code> constants defined in @link libsbmlcs.libsbml libsbml@endlink
5812        may be expanded in later libSBML releases, to match
5813        the values defined by MIRIAM at that later time.
5814        @endif@~
5815
5816        """
5817        return _libsbml.SBase_getResourceBiologicalQualifier(self, resource)
5818
5819    def getResourceModelQualifier(self, resource):
5820        r"""
5821        getResourceModelQualifier(SBase self, string resource) -> ModelQualifierType_t
5822
5823        Returns the MIRIAM <em>model qualifier</em> associated with the
5824        given resource.
5825
5826        In <a target='_blank' href='http://biomodels.net/miriam'>MIRIAM</a>,
5827        qualifiers are an optional means of indicating the relationship
5828        between a model component and its annotations.  There are two broad
5829        kinds of annotations: <em>model</em> and <em>biological</em>.  The
5830        former kind is used to qualify the relationship between a model
5831        component and another modeling object.  An example qualifier is
5832        'isDerivedFrom', to indicate that a given component of the model is
5833        derived from the modeling object represented by the referenced
5834        resource.  MIRIAM defines <a target='_blank'
5835        href='http://www.ebi.ac.uk/miriam/main/qualifiers/'>numerous
5836        relationship qualifiers</a> to enable different software tools to
5837        qualify model annotations in the same standardized way.  In libSBML,
5838        the MIRIAM controlled-vocabulary annotations on an SBML model element
5839        are represented using lists of CVTerm objects, and the
5840        the MIRIAM model qualifiers are represented using
5841        values @if clike from the enumeration
5842        type #ModelQualifierType_t.@endif@if python whose
5843        names begin with <code>BQM_</code> in the interface class
5844        @link libsbml libsbml@endlink.@endif@if java whose
5845        names begin with <code>BQM_</code> in the interface class
5846        {@link libsbmlConstants}.@endif@if csharp whose
5847        names begin with <code>BQB_</code> in the interface class
5848        @link libsbmlcs.libsbml libsbml@endlink.@endif@~
5849
5850        This method method searches the controlled-vocabulary annotations
5851        (i.e., the list of CVTerm objects) on the present object, then out of
5852        those that have model qualifiers, looks for an annotation to the given
5853        @p resource.  If such an annotation is found, it returns the type of
5854        type of model qualifier associated with that resource as a
5855        value @if clike from the enumeration type
5856        #ModelQualifierType_t.@endif@if python whose name begins with
5857        <code>BQM_</code> from the interface
5858        class @link libsbml libsbml@endlink.@endif@if java whose name
5859        begins with <code>BQM_</code> from the interface
5860        class {@link libsbmlConstants}.@endif@if csharp whose
5861        names begin with <code>BQB_</code> in the interface class
5862        @link libsbmlcs.libsbml libsbml@endlink.@endif@~
5863
5864        @param resource string representing the resource; e.g.,
5865        <code>'http://www.geneontology.org/#GO:0005892'</code>.
5866
5867        @return the @if clike #ModelQualifierType_t value@else model qualifier
5868        type@endif@~ associated with the resource, or @link libsbml#BQM_UNKNOWN BQM_UNKNOWN@endlink if the resource does not exist.
5869
5870        @if clike
5871        @note The set of MIRIAM biological qualifiers grows over
5872        time, although relatively slowly.  The values in the enumeration
5873        #ModelQualifierType_t are up to date with MIRIAM at the time of a given
5874        libSBML release.  The set of values may be expanded in later libSBML
5875        releases, to match the values defined by MIRIAM at that later time.
5876        @endif@if python
5877        @note The set of MIRIAM model qualifiers grows over
5878        time, although relatively slowly.  The values are up to date with
5879        MIRIAM at the time of a given libSBML release.  The set of values in
5880        list of <code>BQM_</code> constants defined in @link libsbml
5881        libsbml@endlink may be expanded in later libSBML releases, to match
5882        the values defined by MIRIAM at that later time.
5883        @endif@if java
5884        @note The set of MIRIAM model qualifiers grows over
5885        time, although relatively slowly.  The values are up to date with
5886        MIRIAM at the time of a given libSBML release.  The set of values in
5887        list of <code>BQM_</code> constants defined in {@link libsbmlConstants}
5888        may be expanded in later libSBML releases, to match
5889        the values defined by MIRIAM at that later time.
5890        @endif@if csharp
5891        @note The set of MIRIAM model qualifiers grows over
5892        time, although relatively slowly.  The values are up to date with
5893        MIRIAM at the time of a given libSBML release.  The set of values in
5894        list of <code>BQM_</code> constants defined in @link libsbmlcs.libsbml libsbml@endlink
5895        may be expanded in later libSBML releases, to match
5896        the values defined by MIRIAM at that later time.
5897        @endif@~
5898
5899        """
5900        return _libsbml.SBase_getResourceModelQualifier(self, resource)
5901
5902    def getModel(self):
5903        r"""
5904        getModel(SBase self) -> Model
5905
5906        Returns the Model object for the SBML Document in which the current object is located.
5907
5908        @return the Model object for the SBML Document of this SBML object.
5909
5910        @see getParentSBMLObject()
5911        @see getSBMLDocument()
5912
5913        """
5914        return _libsbml.SBase_getModel(self)
5915
5916    def getLevel(self):
5917        r"""
5918        getLevel(SBase self) -> unsigned int
5919
5920        Returns the SBML Level of the SBMLDocument object containing @em this
5921        object.
5922
5923        @par
5924        LibSBML uses the class SBMLDocument as a top-level container for
5925        storing SBML content and data associated with it (such as warnings and
5926        error messages).  An SBML model in libSBML is contained inside an
5927        SBMLDocument object.  SBMLDocument corresponds roughly to the class
5928        <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
5929        specifications, but it does not have a direct correspondence in SBML
5930        Level&nbsp;1.  (But, it is created by libSBML no matter whether the
5931        model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
5932
5933        @return the SBML level of this SBML object.
5934
5935        @see getVersion()
5936        @see getNamespaces()
5937        @see getPackageVersion()
5938
5939        """
5940        return _libsbml.SBase_getLevel(self)
5941
5942    def getVersion(self):
5943        r"""
5944        getVersion(SBase self) -> unsigned int
5945
5946        Returns the Version within the SBML Level of the SBMLDocument object
5947        containing @em this object.
5948
5949        @par
5950        LibSBML uses the class SBMLDocument as a top-level container for
5951        storing SBML content and data associated with it (such as warnings and
5952        error messages).  An SBML model in libSBML is contained inside an
5953        SBMLDocument object.  SBMLDocument corresponds roughly to the class
5954        <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
5955        specifications, but it does not have a direct correspondence in SBML
5956        Level&nbsp;1.  (But, it is created by libSBML no matter whether the
5957        model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
5958
5959        @return the SBML version of this SBML object.
5960
5961        @see getLevel()
5962        @see getNamespaces()
5963
5964        """
5965        return _libsbml.SBase_getVersion(self)
5966
5967    def getPackageCoreVersion(self):
5968        r"""
5969        getPackageCoreVersion(SBase self) -> unsigned int
5970
5971        Returns the SBML Core Version within the SBML Level of the actual object.
5972
5973        @par
5974        LibSBML uses the class SBMLDocument as a top-level container for
5975        storing SBML content and data associated with it (such as warnings and
5976        error messages).  An SBML model in libSBML is contained inside an
5977        SBMLDocument object.  SBMLDocument corresponds roughly to the class
5978        <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
5979        specifications, but it does not have a direct correspondence in SBML
5980        Level&nbsp;1.  (But, it is created by libSBML no matter whether the
5981        model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
5982
5983        @return the SBML core version of this SBML object.
5984
5985        """
5986        return _libsbml.SBase_getPackageCoreVersion(self)
5987
5988    def getPackageVersion(self):
5989        r"""
5990        getPackageVersion(SBase self) -> unsigned int
5991
5992        Returns the Version of the SBML Level&nbsp;3 package to which this
5993        element belongs to.
5994
5995        @return the version of the SBML Level&nbsp;3 package to which this
5996        element belongs. The value @c 0 will be returned if this element
5997        belongs to the SBML Level&nbsp;3 Core package.
5998
5999        @see getLevel()
6000        @see getVersion()
6001
6002        """
6003        return _libsbml.SBase_getPackageVersion(self)
6004
6005    def getPackageName(self):
6006        r"""
6007        getPackageName(SBase self) -> string
6008
6009        Returns the name of the SBML Level&nbsp;3 package in which this element
6010        is defined.
6011
6012        @return the name of the SBML package in which this element is defined.
6013        The string <code>&quot;core&quot;</code> will be returned if this
6014        element is defined in SBML Level&nbsp;3 Core. The string
6015        <code>&quot;unknown&quot;</code> will be returned if this element is
6016        not defined in any SBML package.
6017
6018        """
6019        return _libsbml.SBase_getPackageName(self)
6020
6021    def getTypeCode(self):
6022        r"""
6023        getTypeCode(SBase self) -> int
6024
6025        Returns the libSBML type code for this object.
6026
6027        @par
6028        LibSBML attaches an identifying code to every kind of SBML object.  These
6029        are integer constants known as <em>SBML type codes</em>.  The names of all
6030        the codes begin with the characters <code>SBML_</code>.
6031        @if clike The set of possible type codes for core elements is defined in
6032        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
6033        SBML Level&nbsp;3 packages define their own extra enumerations of type
6034        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
6035        package).@endif@if java In the Java language interface for libSBML, the
6036        type codes are defined as static integer constants in the interface class
6037        {@link libsbmlConstants}.  @endif@if python In the Python language
6038        interface for libSBML, the type codes are defined as static integer
6039        constants in the interface class @link libsbml@endlink.@endif@if csharp In
6040        the C# language interface for libSBML, the type codes are defined as
6041        static integer constants in the interface class
6042        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
6043        package plug-ins may use overlapping type codes; to identify the package
6044        to which a given object belongs, call the
6045        <code>@if conly SBase_getPackageName()
6046        @else SBase.getPackageName()
6047        @endif</code>
6048        method on the object.
6049
6050        The exception to this is lists:  all SBML-style list elements have the type
6051        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
6052        are from.
6053
6054        @par
6055        Here follow some additional general information about libSBML type codes:
6056
6057        @li The codes are the possible return values (integers) for the following
6058        functions:
6059        <ul>
6060        <li> SBase.getTypeCode()
6061        <li> ListOf.getItemTypeCode()
6062        </ul>
6063        (Compatibility note: in libSBML 5, the type of return values of these
6064        functions changed from an enumeration to an integer for extensibility
6065        in the face of different programming languages.)
6066
6067        @li Each package extension must define similar sets of values for each
6068        SBase subclass (e.g. <code>SBMLLayoutTypeCode_t</code> for the SBML Level&nbsp;3
6069        %Layout extension, <code>SBMLFbcTypeCode_t</code> for the SBML Level&nbsp;3 Flux
6070        Balance Constraints extension, etc.).
6071
6072        @li The value of each package-specific type code can be duplicated between
6073        those of different packages.  (This is necessary because the development
6074        of libSBML extensions for different SBML packages may be undertaken by
6075        different developers at different times; requiring the developers to
6076        coordinate their use of type codes would be nettlesome and probably
6077        doomed to failure.)
6078
6079        @li To distinguish between the type codes of different packages, both the
6080        return value of SBase.getTypeCode() and SBase.getPackageName() must be
6081        checked.  This is particularly important for functions that take an SBML
6082        type code as an argument, such as
6083        SBase.getAncestorOfType(), which by
6084        default assumes you are handing it a core type, and will return @c None if
6085        the value you give it is actually from a package.
6086
6087        The following example code illustrates the combined use of
6088        SBase.getPackageName() and SBase.getTypeCode():
6089        @if cpp
6090        @code{.cpp}
6091         void example (SBase sb)
6092         {
6093           cons string pkgName = sb->getPackageName();
6094           if (pkgName == 'core')
6095           {
6096             switch (sb->getTypeCode())
6097             {
6098               case SBML_MODEL:
6099                  ....
6100                  break;
6101               case SBML_REACTION:
6102                  ....
6103             }
6104           }
6105           else if (pkgName == 'layout')
6106           {
6107             switch (sb->getTypeCode())
6108             {
6109               case SBML_LAYOUT_LAYOUT:
6110                  ....
6111                  break;
6112               case SBML_LAYOUT_REACTIONGLYPH:
6113                  ....
6114             }
6115           }
6116           ...
6117         }
6118        @endcode
6119        @endif
6120        @if python
6121        @code{.py}
6122        def example(item):
6123          pkg_name  = item.getPackageName()
6124          type_code = item.getTypeCode()
6125          if pkg_name == 'core':
6126            print('Got a ' + SBMLTypeCode_toString(type_code, 'core') + ' object')
6127            if type_code == SBML_MODEL:
6128              print('This is a very, very nice model')
6129              # Do whatever the application wants to do with the model.
6130            elif type_code == SBML_COMPARTMENT:
6131              print('This is a very, very nice compartment')
6132              # Do whatever the application wants to do with the compartment.
6133            elif type_code == SBML_SPECIES:
6134              print('This is a very, very nice species')
6135              # Do whatever the application wants to do with the species.
6136            elif ...
6137              ...
6138          elif pkg_name == 'layout':
6139            print('Got a ' + SBMLTypeCode_toString(type_code, 'layout') + ' object')
6140            if type_code == SBML_LAYOUT_POINT:
6141              print('This is a very, very nice layout point')
6142              # Do whatever the application wants to do with the layout point.
6143            elif type_code == SBML_LAYOUT_BOUNDINGBOX:
6144              print('This is a very, very nice layout bounding box')
6145              # Do whatever the application wants to do with the layout bounding box.
6146            elif ...
6147              ...
6148          elif pkg_name == 'unknown':
6149            print('Something went wrong -- libSBML did not recognize the object type')
6150            # Handle errors
6151        @endcode
6152        @endif
6153        @if java
6154        @code{.java}
6155        void example (SBase sb)
6156        {
6157          String pkgName = sb.getPackageName();
6158          if (pkgName.equals('core'))
6159          {
6160            switch (sb.getTypeCode())
6161            {
6162              case libsbml.SBML_MODEL:
6163                 ....
6164                 break;
6165              case libsbml.SBML_REACTION:
6166                 ....
6167            }
6168          }
6169          else if (pkgName.equals('layout'))
6170          {
6171            switch (sb.getTypeCode())
6172            {
6173              case libsbml.SBML_LAYOUT_LAYOUT:
6174                 ....
6175                 break;
6176              case libsbml.SBML_LAYOUT_REACTIONGLYPH:
6177                 ....
6178            }
6179          }
6180          ...
6181        }
6182        @endcode
6183        @endif
6184
6185        @return the @if clike #SBMLTypeCode_t value@else SBML object type
6186        code@endif@~ of this SBML object, or @link libsbml#SBML_UNKNOWN SBML_UNKNOWN@endlink (the default).  The latter is possible because
6187        subclasses of SBase are not required to implement this method to return
6188        a type code.
6189
6190        @warning <span class='warning'>The specific integer values of the possible
6191        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
6192        packages,  To fully identify the correct code, <strong>it is necessary to
6193        invoke both getPackageName() and getTypeCode()</strong> (or
6194        ListOf.getItemTypeCode()).</span>
6195
6196        @see getPackageName()
6197        @see getElementName()
6198
6199        """
6200        return _libsbml.SBase_getTypeCode(self)
6201
6202    def hasValidLevelVersionNamespaceCombination(self):
6203        r"""
6204        hasValidLevelVersionNamespaceCombination(SBase self) -> bool
6205
6206        Predicate returning @c true if this object's level/version and namespace
6207        values correspond to a valid SBML specification.
6208
6209        The valid combinations of SBML Level, Version and Namespace as of this
6210        release of libSBML are the following:
6211        <ul>
6212        <li> Level&nbsp;1 Version&nbsp;2: <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level1</code>
6213        <li> Level&nbsp;2 Version&nbsp;1: <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2</code>
6214        <li> Level&nbsp;2 Version&nbsp;2: <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2/version2</code>
6215        <li> Level&nbsp;2 Version&nbsp;3: <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2/version3</code>
6216        <li> Level&nbsp;2 Version&nbsp;4: <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2/version4</code>
6217        <li> Level&nbsp;3 Version&nbsp;1 Core: <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level3/version1/core</code>
6218        </ul>
6219
6220        @return @c true if the level, version and namespace values of this
6221        SBML object correspond to a valid set of values, @c false otherwise.
6222
6223        """
6224        return _libsbml.SBase_hasValidLevelVersionNamespaceCombination(self)
6225
6226    def getElementName(self):
6227        r"""
6228        getElementName(SBase self) -> string
6229
6230        Returns the XML element name of this object.
6231
6232        This is overridden by subclasses to return a string appropriate to the
6233        SBML component.  For example, Model defines it as returning
6234        @c 'model', CompartmentType defines it as returning @c 'compartmentType',
6235        and so on.
6236
6237        """
6238        return _libsbml.SBase_getElementName(self)
6239
6240    def toSBML(self):
6241        r"""
6242        toSBML(SBase self) -> char *
6243
6244        Returns a string consisting of a partial SBML corresponding to just
6245        this object.
6246
6247        @return the partial SBML that describes this SBML object.
6248
6249        @warning <span class='warning'>This is primarily provided for testing
6250        and debugging purposes.  It may be removed in a future version of
6251        libSBML.</span>
6252
6253        """
6254        return _libsbml.SBase_toSBML(self)
6255
6256    def toXMLNode(self):
6257        r"""
6258        toXMLNode(SBase self) -> XMLNode
6259
6260        Returns this element as an XMLNode.
6261
6262        @return this element as an XMLNode.
6263
6264        @warning <span class='warning'>This operation is computationally
6265        expensive, because the element has to be fully serialized to a string
6266        and then parsed into the XMLNode structure.  Attempting to convert a
6267        large tree structure (e.g., a large Model) may consume significant
6268        computer memory and time.</span>
6269
6270        """
6271        return _libsbml.SBase_toXMLNode(self)
6272
6273    def getPlugin(self, *args):
6274        r"""
6275        getPlugin(SBase self, string package) -> SBasePlugin
6276        getPlugin(SBase self, string package) -> SBasePlugin
6277        getPlugin(SBase self, unsigned int n) -> SBasePlugin
6278        getPlugin(SBase self, unsigned int n) -> SBasePlugin
6279
6280        This method has multiple variants; they differ in the arguments
6281         they accept.  Each variant is described separately below.
6282
6283        @par
6284        <hr>
6285        <span class='variant-sig-heading'>Method variant with the following signature</span>:
6286         <pre class='signature'>getPlugin(long n)</pre>
6287
6288        Returns the nth plug-in object (extension interface) for an SBML Level&nbsp;3
6289        package extension.
6290        The returned plug-in will be the appropriate type of plugin requested:
6291        calling Model.getPlugin() will return an FbcModelPlugin; calling
6292        Parameter.getPlugin() will return CompSBasePlugin, etc.
6293
6294        If no such plugin exists, None is returned.
6295
6296        @par
6297        SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
6298        via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
6299        that it uses one or more SBML packages, and likewise, a software tool may be
6300        able to support one or more packages.  LibSBML does not come preconfigured
6301        with all possible packages included and enabled, in part because not all
6302        package specifications have been finalized.  To support the ability for
6303        software systems to enable support for the Level&nbsp;3 packages they choose,
6304        libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
6305        package is implemented in a separate code plug-in that can be enabled by the
6306        application to support working with that SBML package.  A given SBML model
6307        may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
6308        objects created by libSBML plug-ins supporting additional Level&nbsp;3
6309        packages.
6310
6311        @param n the index of the plug-in to return.
6312
6313        @return the nth plug-in object (the libSBML extension interface) of a
6314        package extension.
6315        If the index @p n is invalid, @c None is returned.
6316
6317        @see getNumPlugins()
6318        @see getPlugin()
6319
6320
6321        @par
6322        <hr>
6323        <span class='variant-sig-heading'>Method variant with the following signature</span>:
6324         <pre class='signature'>getPlugin(string package)</pre>
6325
6326        Returns a plug-in object (extension interface) for an SBML Level&nbsp;3
6327        package extension with the given package name or URI.
6328        The returned plug-in will be the appropriate type of plugin requested:
6329        calling Model.getPlugin() will return an FbcModelPlugin; calling
6330        Parameter.getPlugin() will return CompSBasePlugin, etc.
6331
6332        If no such plugin exists, None is returned.
6333
6334        @par
6335        SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
6336        via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
6337        that it uses one or more SBML packages, and likewise, a software tool may be
6338        able to support one or more packages.  LibSBML does not come preconfigured
6339        with all possible packages included and enabled, in part because not all
6340        package specifications have been finalized.  To support the ability for
6341        software systems to enable support for the Level&nbsp;3 packages they choose,
6342        libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
6343        package is implemented in a separate code plug-in that can be enabled by the
6344        application to support working with that SBML package.  A given SBML model
6345        may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
6346        objects created by libSBML plug-ins supporting additional Level&nbsp;3
6347        packages.
6348
6349        @param package the name or URI of the package.
6350
6351        @return the plug-in object (the libSBML extension interface) of a
6352        package extension with the given package name or URI.
6353
6354        @see getPlugin()
6355
6356        """
6357        return _libsbml.SBase_getPlugin(self, *args)
6358
6359    def getDisabledPlugin(self, *args):
6360        r"""
6361        getDisabledPlugin(SBase self, unsigned int n) -> SBasePlugin
6362        getDisabledPlugin(SBase self, unsigned int n) -> SBasePlugin
6363
6364        Returns the nth disabled plug-in object (extension interface) for an SBML Level&nbsp;3
6365        package extension.  If no such plugin exists, None is returned.
6366
6367        @par
6368        SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
6369        via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
6370        that it uses one or more SBML packages, and likewise, a software tool may be
6371        able to support one or more packages.  LibSBML does not come preconfigured
6372        with all possible packages included and enabled, in part because not all
6373        package specifications have been finalized.  To support the ability for
6374        software systems to enable support for the Level&nbsp;3 packages they choose,
6375        libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
6376        package is implemented in a separate code plug-in that can be enabled by the
6377        application to support working with that SBML package.  A given SBML model
6378        may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
6379        objects created by libSBML plug-ins supporting additional Level&nbsp;3
6380        packages.
6381
6382        @par
6383        If a plugin is <em>disabled</em>, the package information it contains is
6384        no longer considered to be part of the SBML document for the purposes of
6385        searching the document or writing out the document.  However, the information
6386        is still retained, so if the plugin is enabled again, the same information
6387        will once again be available, and will be written out to the final model.
6388
6389        @param n the index of the disabled plug-in to return.
6390
6391        @return the nth disabled plug-in object (the libSBML extension interface) of a
6392        package extension.
6393        If the index @p n is invalid, @c None is returned.
6394
6395        @see getNumDisabledPlugins()
6396        @see getPlugin()
6397
6398        """
6399        return _libsbml.SBase_getDisabledPlugin(self, *args)
6400
6401    def getNumPlugins(self):
6402        r"""
6403        getNumPlugins(SBase self) -> unsigned int
6404
6405        Returns the number of plug-in objects (extenstion interfaces) for SBML
6406        Level&nbsp;3 package extensions known.
6407
6408        @par
6409        SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
6410        via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
6411        that it uses one or more SBML packages, and likewise, a software tool may be
6412        able to support one or more packages.  LibSBML does not come preconfigured
6413        with all possible packages included and enabled, in part because not all
6414        package specifications have been finalized.  To support the ability for
6415        software systems to enable support for the Level&nbsp;3 packages they choose,
6416        libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
6417        package is implemented in a separate code plug-in that can be enabled by the
6418        application to support working with that SBML package.  A given SBML model
6419        may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
6420        objects created by libSBML plug-ins supporting additional Level&nbsp;3
6421        packages.
6422
6423        @return the number of plug-in objects (extension interfaces) of
6424        package extensions known by this instance of libSBML.
6425
6426        @see getPlugin()
6427
6428        """
6429        return _libsbml.SBase_getNumPlugins(self)
6430
6431    def getNumDisabledPlugins(self):
6432        r"""
6433        getNumDisabledPlugins(SBase self) -> unsigned int
6434
6435        Returns the number of disabled plug-in objects (extension interfaces)
6436        for SBML Level&nbsp;3 package extensions known.
6437
6438        @par
6439        SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
6440        via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
6441        that it uses one or more SBML packages, and likewise, a software tool may be
6442        able to support one or more packages.  LibSBML does not come preconfigured
6443        with all possible packages included and enabled, in part because not all
6444        package specifications have been finalized.  To support the ability for
6445        software systems to enable support for the Level&nbsp;3 packages they choose,
6446        libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
6447        package is implemented in a separate code plug-in that can be enabled by the
6448        application to support working with that SBML package.  A given SBML model
6449        may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
6450        objects created by libSBML plug-ins supporting additional Level&nbsp;3
6451        packages.
6452
6453        @par
6454        If a plugin is <em>disabled</em>, the package information it contains is
6455        no longer considered to be part of the SBML document for the purposes of
6456        searching the document or writing out the document.  However, the information
6457        is still retained, so if the plugin is enabled again, the same information
6458        will once again be available, and will be written out to the final model.
6459
6460        @return the number of disabled plug-in objects (extension interfaces)
6461        of package extensions known by this instance of libSBML.
6462
6463        """
6464        return _libsbml.SBase_getNumDisabledPlugins(self)
6465
6466    def deleteDisabledPlugins(self, recursive=True):
6467        r"""
6468        deleteDisabledPlugins(SBase self, bool recursive=True)
6469
6470        Deletes all information stored in disabled plugins.  If the plugin is
6471        re-enabled later, it will then not have any previously-stored information.
6472
6473        @par
6474        SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
6475        via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
6476        that it uses one or more SBML packages, and likewise, a software tool may be
6477        able to support one or more packages.  LibSBML does not come preconfigured
6478        with all possible packages included and enabled, in part because not all
6479        package specifications have been finalized.  To support the ability for
6480        software systems to enable support for the Level&nbsp;3 packages they choose,
6481        libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
6482        package is implemented in a separate code plug-in that can be enabled by the
6483        application to support working with that SBML package.  A given SBML model
6484        may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
6485        objects created by libSBML plug-ins supporting additional Level&nbsp;3
6486        packages.
6487
6488        @par
6489        If a plugin is <em>disabled</em>, the package information it contains is
6490        no longer considered to be part of the SBML document for the purposes of
6491        searching the document or writing out the document.  However, the information
6492        is still retained, so if the plugin is enabled again, the same information
6493        will once again be available, and will be written out to the final model.
6494
6495        @param recursive if @c True, the disabled information will be deleted
6496        also from all child elements, otherwise only from this SBase element.
6497
6498        @see getNumDisabledPlugins()
6499
6500        """
6501        return _libsbml.SBase_deleteDisabledPlugins(self, recursive)
6502
6503    def enablePackage(self, pkgURI, pkgPrefix, flag):
6504        r"""
6505        enablePackage(SBase self, string pkgURI, string pkgPrefix, bool flag) -> int
6506
6507        Enables or disables the given SBML Level&nbsp;3 package on this object.
6508
6509        This method enables the specified package on this object and other
6510        objects connected by child-parent links in the same SBMLDocument object.
6511        This method is the converse of
6512        SBase.disablePackage().
6513
6514        @param pkgURI the URI of the package.
6515
6516        @param pkgPrefix the XML prefix of the package.
6517
6518        @param flag whether to enable (@c True) or disable (@c False) the package.
6519
6520        @return integer value indicating success/failure of the
6521        function.  @if clike The value is drawn from the
6522        enumeration #OperationReturnValues_t. @endif@~ The possible values
6523        returned by this function are:
6524        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
6525        @li @link libsbml#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN@endlink
6526        @li @link libsbml#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH@endlink
6527        @li @link libsbml#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION@endlink
6528
6529        @see disablePackage()
6530
6531        """
6532        return _libsbml.SBase_enablePackage(self, pkgURI, pkgPrefix, flag)
6533
6534    def disablePackage(self, pkgURI, pkgPrefix):
6535        r"""
6536        disablePackage(SBase self, string pkgURI, string pkgPrefix) -> int
6537
6538        Disables the given SBML Level&nbsp;3 package on this object.
6539
6540        This method disables the specified package on this object
6541        and other objects connected by child-parent links in the same
6542        SBMLDocument object.
6543
6544        An example of when this may be useful is during construction of model
6545        components when mixing existing and new models.  Suppose your
6546        application read an SBML document containing a model that used the SBML
6547        Hierarchical %Model Composition (&ldquo;comp&rdquo;) package, and
6548        extracted parts of that model in order to construct a new model in
6549        memory.  The new, in-memory model will not accept a component drawn from
6550        an other SBMLDocument with different package namespace declarations.
6551        You could reconstruct the same namespaces in the in-memory model first,
6552        but as a shortcut, you could also disable the package namespace on the
6553        object being added.  Here is a code example to help clarify this:
6554        @if cpp
6555        @code{.cpp}
6556        // We read in an SBML L3V1 model that uses the 'comp'
6557        // package namespace.
6558        doc = readSBML('sbml-file-with-comp-elements.xml');
6559
6560        // We extract one of the species from the model.
6561        Species s1 = doc->getModel()->getSpecies(0);
6562
6563        // We construct a new model.  This model does not use the
6564        // 'comp' package.
6565        Model  newModel = new Model(3,1);
6566
6567        // The following will fail with an error, because addSpecies()
6568        // will first check that the parent of the given object has
6569        // namespaces declared, and will discover that s1 does but
6570        // newModel does not.
6571
6572        // newModel->addSpecies(s1);
6573
6574        // However, if we disable the 'comp' package on s1, then
6575        // the call to addSpecies will work.
6576
6577        s1->disablePackage('http://www.sbml.org/sbml/level3/version1/comp/version1',
6578                           'comp');
6579        newModel->addSpecies(s1);
6580        @endcode
6581        @endif
6582        @if python
6583        @code{.py}
6584        import sys
6585        import os.path
6586        from libsbml import *
6587
6588        # We read an SBML L3V1 model that uses the 'comp' package.
6589
6590        doc = readSBML('sbml-file-with-comp-elements.xml');
6591        if doc.getNumErrors() > 0:
6592          print('readSBML encountered errors while reading the file.')
6593          doc.printErrors()
6594          sys.exit(1)
6595
6596        # We extract one of the species from the model.
6597
6598        model = doc.getModel()
6599        if model == None:
6600          print('Unable to retrieve Model object')
6601          sys.exit(1)
6602
6603        s1 = model.getSpecies(0)
6604        if s1 == None:
6605          print('Unable to retrieve Species object')
6606          sys.exit(1)
6607
6608        # We construct a new model.
6609        # This model does not use the 'comp' package.
6610
6611        try:
6612          newDoc = SBMLDocument(3, 1)
6613        except ValueError:
6614          print('Could not create SBMLDocument object')
6615          sys.exit(1)
6616
6617        newModel = newDoc.createModel()
6618        if newModel == None:
6619          print('Unable to create new Model object')
6620          sys.exit(1)
6621
6622        # The following would normally fail with an error, because
6623        # addSpecies() would first check that the parent of the given
6624        # object has namespaces declared, and will discover that s1
6625        # does but newModel does not.
6626
6627        #   newModel.addSpecies(s1)
6628
6629        # However, if we disable the 'comp' package on s1, then the
6630        # call to addSpecies will work.
6631
6632        compNS = 'http://www.sbml.org/sbml/level3/version1/comp/version1'
6633        status = s1.disablePackage(compNS, 'comp')
6634        if status != LIBSBML_OPERATION_SUCCESS:
6635          print('Unable to disable package.')
6636          sys.exit(1)
6637
6638        newSpecies = newModel.addSpecies(s1)   # This will work now.
6639        if newSpecies == None:
6640          print('Could not add Species')       # (This will not happen,
6641          sys.exit(1)                          # but always check errors.)
6642        @endcode
6643        @endif
6644        @if java
6645        @code{.java}
6646        // We read in an SBML L3V1 model that uses the 'comp' package namespace
6647        SBMLReader reader = new SBMLReader();
6648        SBMLDocument doc = reader.readSBML('sbml-file-with-comp-elements.xml');
6649
6650        // We extract one of the species from the model we just read in.
6651        Species s1 = doc.getModel().getSpecies(0);
6652
6653        // We construct a new model.  This model does not use the 'comp' package.
6654        Model newModel = new Model(3,1);
6655
6656        // The following will fail with an error, because addSpecies() will
6657        // first check that the parent of the given object has namespaces
6658        // declared, and will discover that s1 does but newModel does not.
6659
6660        // newModel->addSpecies(s1);
6661
6662        // However, if we disable the 'comp' package on s1, then the call
6663        // to addSpecies will work.
6664
6665        s1->disablePackage('http://www.sbml.org/sbml/level3/version1/comp/version1',
6666                           'comp');
6667        newModel.addSpecies(s1);
6668        @endcode
6669        @endif
6670
6671        @param pkgURI the URI of the package.
6672
6673        @param pkgPrefix the XML prefix of the package.
6674
6675        @return integer value indicating success/failure of the
6676        function.  @if clike The value is drawn from the
6677        enumeration #OperationReturnValues_t. @endif@~ The possible values
6678        returned by this function are:
6679        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
6680        @li @link libsbml#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN@endlink
6681        @li @link libsbml#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH@endlink
6682        @li @link libsbml#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION@endlink
6683
6684        @see enablePackage()
6685
6686        """
6687        return _libsbml.SBase_disablePackage(self, pkgURI, pkgPrefix)
6688
6689    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
6690        r"""
6691        enablePackageInternal(SBase self, string pkgURI, string pkgPrefix, bool flag)
6692
6693        @internal
6694
6695        @internal
6696
6697        """
6698        return _libsbml.SBase_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
6699
6700    def isPackageURIEnabled(self, pkgURI):
6701        r"""
6702        isPackageURIEnabled(SBase self, string pkgURI) -> bool
6703
6704        Predicate returning @c True if an SBML Level&nbsp;3 package with the
6705        given URI is enabled with this object.
6706
6707        @param pkgURI the URI of the package.
6708
6709        @return @c True if the given package is enabled within this object, @c False otherwise.
6710
6711        @see isPackageEnabled()
6712
6713        """
6714        return _libsbml.SBase_isPackageURIEnabled(self, pkgURI)
6715
6716    def isPackageEnabled(self, pkgName):
6717        r"""
6718        isPackageEnabled(SBase self, string pkgName) -> bool
6719
6720        Predicate returning @c True if the given SBML Level&nbsp;3 package is
6721        enabled with this object.
6722
6723        The search ignores the package version.
6724
6725        @param pkgName the name of the package.
6726
6727        @return @c True if the given package is enabled within this object,
6728        @c False otherwise.
6729
6730        @see isPackageURIEnabled()
6731
6732        """
6733        return _libsbml.SBase_isPackageEnabled(self, pkgName)
6734
6735    def isPkgURIEnabled(self, pkgURI):
6736        r"""
6737        isPkgURIEnabled(SBase self, string pkgURI) -> bool
6738
6739        Predicate returning @c True if an SBML Level&nbsp;3 package with the
6740        given URI is enabled with this object.
6741
6742        @param pkgURI the URI of the package.
6743
6744        @return @c True if the given package is enabled within this object, @c False otherwise.
6745
6746        @deprecated Replaced in libSBML 5.2.0 by
6747        SBase.isPackageURIEnabled().
6748
6749        @see isPkgEnabled()
6750
6751        """
6752        return _libsbml.SBase_isPkgURIEnabled(self, pkgURI)
6753
6754    def isPkgEnabled(self, pkgName):
6755        r"""
6756        isPkgEnabled(SBase self, string pkgName) -> bool
6757
6758        Predicate returning @c True if the given SBML Level&nbsp;3 package is
6759        enabled with this object.
6760
6761        The search ignores the package version.
6762
6763        @param pkgName the name of the package.
6764
6765        @return @c True if the given package is enabled within this object,
6766        @c False otherwise.
6767
6768        @deprecated Replaced in libSBML 5.2.0 by
6769        SBase.isPackageEnabled().
6770
6771        @see isPkgURIEnabled()
6772
6773        """
6774        return _libsbml.SBase_isPkgEnabled(self, pkgName)
6775
6776    def writeExtensionElements(self, stream):
6777        r"""
6778        writeExtensionElements(SBase self, XMLOutputStream stream)
6779
6780        @internal
6781
6782        @internal
6783
6784        """
6785        return _libsbml.SBase_writeExtensionElements(self, stream)
6786
6787    def read(self, *args):
6788        r"""
6789        read(SBase self, XMLNode node, XMLErrorSeverityOverride_t flag=LIBSBML_OVERRIDE_DISABLED)
6790        read(SBase self, XMLInputStream stream)
6791        """
6792        return _libsbml.SBase_read(self, *args)
6793
6794    def write(self, stream):
6795        r"""
6796        write(SBase self, XMLOutputStream stream)
6797
6798        @internal
6799
6800        @internal
6801
6802        """
6803        return _libsbml.SBase_write(self, stream)
6804
6805    def hasRequiredAttributes(self):
6806        r"""
6807        hasRequiredAttributes(SBase self) -> bool
6808
6809        @internal
6810
6811        @internal
6812
6813        """
6814        return _libsbml.SBase_hasRequiredAttributes(self)
6815
6816    def hasRequiredElements(self):
6817        r"""
6818        hasRequiredElements(SBase self) -> bool
6819
6820        @internal
6821
6822        @internal
6823
6824        """
6825        return _libsbml.SBase_hasRequiredElements(self)
6826
6827    def checkCompatibility(self, object):
6828        r"""
6829        checkCompatibility(SBase self, SBase object) -> int
6830
6831        @internal
6832
6833        @internal
6834
6835        """
6836        return _libsbml.SBase_checkCompatibility(self, object)
6837
6838    def setSBMLNamespacesAndOwn(self, disownedNs):
6839        r"""
6840        setSBMLNamespacesAndOwn(SBase self, SBMLNamespaces disownedNs)
6841
6842        @internal
6843
6844        @internal
6845
6846        """
6847        return _libsbml.SBase_setSBMLNamespacesAndOwn(self, disownedNs)
6848
6849    def getSBMLNamespaces(self):
6850        r"""
6851        getSBMLNamespaces(SBase self) -> SBMLNamespaces
6852
6853        @internal
6854
6855        @internal
6856
6857        """
6858        return _libsbml.SBase_getSBMLNamespaces(self)
6859
6860    def removeDuplicateAnnotations(self):
6861        r"""
6862        removeDuplicateAnnotations(SBase self)
6863
6864        @internal
6865
6866        @internal
6867
6868        """
6869        return _libsbml.SBase_removeDuplicateAnnotations(self)
6870
6871    def checkMathMLNamespace(self, elem):
6872        r"""
6873        checkMathMLNamespace(SBase self, XMLToken elem) -> string
6874
6875        @internal
6876
6877        @internal
6878
6879        """
6880        return _libsbml.SBase_checkMathMLNamespace(self, elem)
6881
6882    def getDerivedUnitDefinition(self):
6883        r"""
6884        getDerivedUnitDefinition(SBase self) -> UnitDefinition
6885
6886        @internal
6887
6888        @internal
6889
6890        """
6891        return _libsbml.SBase_getDerivedUnitDefinition(self)
6892
6893    def containsUndeclaredUnits(self):
6894        r"""
6895        containsUndeclaredUnits(SBase self) -> bool
6896
6897        @internal
6898
6899        @internal
6900
6901        """
6902        return _libsbml.SBase_containsUndeclaredUnits(self)
6903
6904    def removeFromParentAndDelete(self):
6905        r"""
6906        removeFromParentAndDelete(SBase self) -> int
6907
6908        Removes this object from its parent.
6909
6910        If the parent was storing this object as a pointer, it is deleted.  If
6911        not, it is simply cleared (as in ListOf objects).  This is a pure
6912        virtual method, as every SBase element has different parents, and
6913        therefore different methods of removing itself.  Will fail (and not
6914        delete itself) if it has no parent object.  This function is designed to
6915        be overridden, but for all objects whose parent is of the class ListOf,
6916        the default implementation will work.
6917
6918        @return integer value indicating success/failure of the
6919        function.  @if clike The value is drawn from the
6920        enumeration #OperationReturnValues_t. @endif@~ The possible values
6921        returned by this function are:
6922        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
6923        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
6924
6925        """
6926        return _libsbml.SBase_removeFromParentAndDelete(self)
6927
6928    def matchesSBMLNamespaces(self, *args):
6929        r"""
6930        matchesSBMLNamespaces(SBase self, SBase sb) -> bool
6931        matchesSBMLNamespaces(SBase self, SBase sb) -> bool
6932
6933        Returns @c True if this object's set of XML namespaces are the same
6934        as the given object's XML namespaces.
6935
6936        @par
6937        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
6938        information.  It is used to communicate the SBML Level, Version, and (in
6939        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
6940        common approach to using libSBML's SBMLNamespaces facilities is to create an
6941        SBMLNamespaces object somewhere in a program once, then hand that object
6942        as needed to object constructors that accept SBMLNamespaces as arguments.
6943
6944        @param sb an object to compare with respect to namespaces.
6945
6946        @return boolean, @c True if this object's collection of namespaces is
6947        the same as @p sb's, @c False otherwise.
6948
6949        """
6950        return _libsbml.SBase_matchesSBMLNamespaces(self, *args)
6951
6952    def matchesRequiredSBMLNamespacesForAddition(self, *args):
6953        r"""
6954        matchesRequiredSBMLNamespacesForAddition(SBase self, SBase sb) -> bool
6955        matchesRequiredSBMLNamespacesForAddition(SBase self, SBase sb) -> bool
6956
6957        Returns @c True if this object's set of XML namespaces are a subset
6958        of the given object's XML namespaces.
6959
6960        @par
6961        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
6962        information.  It is used to communicate the SBML Level, Version, and (in
6963        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
6964        common approach to using libSBML's SBMLNamespaces facilities is to create an
6965        SBMLNamespaces object somewhere in a program once, then hand that object
6966        as needed to object constructors that accept SBMLNamespaces as arguments.
6967
6968        @param sb an object to compare with respect to namespaces.
6969
6970        @return boolean, @c True if this object's collection of namespaces is
6971        a subset of @p sb's, @c False otherwise.
6972
6973        """
6974        return _libsbml.SBase_matchesRequiredSBMLNamespacesForAddition(self, *args)
6975
6976    def isSetUserData(self):
6977        r"""
6978        isSetUserData(SBase self) -> bool
6979
6980        Predicate returning true or false depending on whether
6981        the user data of this element has been set.
6982
6983        @par
6984        The user data associated with an SBML object can be used by an application
6985        developer to attach custom information to that object in the model.  In case
6986        of a deep copy, this data will passed as-is.  The data attribute will never
6987        be interpreted by libSBML.
6988
6989        @return boolean, @c True if this object's user data has been set,
6990        @c False otherwise.
6991
6992        """
6993        return _libsbml.SBase_isSetUserData(self)
6994
6995    def unsetUserData(self):
6996        r"""
6997        unsetUserData(SBase self) -> int
6998
6999        Unsets the user data of this element.
7000
7001        @par
7002        The user data associated with an SBML object can be used by an application
7003        developer to attach custom information to that object in the model.  In case
7004        of a deep copy, this data will passed as-is.  The data attribute will never
7005        be interpreted by libSBML.
7006
7007        @return integer value indicating success/failure of the
7008        function.  @if clike The value is drawn from the
7009        enumeration #OperationReturnValues_t. @endif@~ The possible values
7010        returned by this function are:
7011        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
7012        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
7013
7014        """
7015        return _libsbml.SBase_unsetUserData(self)
7016
7017    def getURI(self):
7018        r"""
7019        getURI(SBase self) -> string
7020
7021        Returns the namespace URI to which this element belongs to.
7022
7023        For example, all elements that belong to SBML Level&nbsp;3 Version&nbsp;1 Core
7024        must would have the URI <code>'http://www.sbml.org/sbml/level3/version1/core'</code>;
7025        all elements that belong to Layout Extension Version 1 for SBML Level&nbsp;3
7026        Version&nbsp;1 Core must would have the URI
7027        <code>'http://www.sbml.org/sbml/level3/version1/layout/version1'</code>.
7028
7029        This function first returns the URI for this element by looking into the
7030        SBMLNamespaces object of the document with the its package name.  If not
7031        found, it will then look for the namespace associated with the element
7032        itself.
7033
7034        @return the URI of this element, as a text string.
7035
7036        @see getSBMLDocument()
7037        @see getPackageName()
7038
7039        """
7040        return _libsbml.SBase_getURI(self)
7041
7042    def getPrefix(self):
7043        r"""
7044        getPrefix(SBase self) -> string
7045
7046        Returns the XML namespace prefix of this element.
7047
7048        This reports the XML namespace prefix chosen for this class of object in
7049        the current SBML document.  This may be an empty string if the component
7050        has no explicit prefix (for instance, if it is a core SBML object placed
7051        in the default SBML namespace of the document).  If it is not empty, then
7052        it corresponds to the XML namespace prefix used set the object, whatever
7053        that may be in a given SBML document.
7054
7055        @return a text string representing the XML namespace prefix.
7056
7057        """
7058        return _libsbml.SBase_getPrefix(self)
7059
7060    def hasOptionalAttributes(self):
7061        r"""
7062        hasOptionalAttributes(SBase self) -> bool
7063
7064        @internal
7065
7066        @internal
7067
7068        """
7069        return _libsbml.SBase_hasOptionalAttributes(self)
7070
7071    def hasOptionalElements(self):
7072        r"""
7073        hasOptionalElements(SBase self) -> bool
7074
7075        @internal
7076
7077        @internal
7078
7079        """
7080        return _libsbml.SBase_hasOptionalElements(self)
7081
7082    def updateSBMLNamespace(self, package, level, version):
7083        r"""
7084        updateSBMLNamespace(SBase self, string package, unsigned int level, unsigned int version)
7085
7086        @internal
7087
7088        @internal
7089
7090        """
7091        return _libsbml.SBase_updateSBMLNamespace(self, package, level, version)
7092
7093    __metaclass__ = AutoProperty
7094
7095
7096    def __eq__(self, rhs):
7097      if ((self is None) and (rhs is None)): return True
7098      if ((self is None) or  (rhs is None)): return False
7099      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
7100        if (self.this == rhs.this): return True
7101      return False
7102
7103    def __ne__(self, rhs):
7104      if ((self is None) and (rhs is None)): return False
7105      if ((self is None) or  (rhs is None)): return True
7106      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
7107        if (self.this == rhs.this): return False
7108      return True
7109
7110
7111    def getListOfAllElements(self, filter=None):
7112        r"""
7113        getListOfAllElements(SBase self, ElementFilter filter=None) -> SBaseList
7114
7115        Returns an SBaseList of all child SBase objects, including those
7116        nested to an arbitrary depth.
7117
7118        @return a list of all objects that are children of this object.
7119
7120        """
7121        return _libsbml.SBase_getListOfAllElements(self, filter)
7122
7123    def getListOfAllElementsFromPlugins(self, filter=None):
7124        r"""
7125        getListOfAllElementsFromPlugins(SBase self, ElementFilter filter=None) -> SBaseList
7126
7127        Returns a List of all child SBase objects contained in SBML package
7128        plug-ins.
7129
7130        @copydetails doc_what_are_plugins
7131
7132        This method walks down the list of all SBML Level&nbsp;3 packages used
7133        by this object and returns all child objects defined by those packages.
7134
7135        @return a pointer to a List of pointers to all children objects from
7136        plug-ins.
7137
7138        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
7139
7140        """
7141        return _libsbml.SBase_getListOfAllElementsFromPlugins(self, filter)
7142
7143# Register SBase in _libsbml:
7144_libsbml.SBase_swigregister(SBase)
7145
7146class ListOf(SBase):
7147    r"""
7148
7149    @sbmlpackage{core}
7150
7151    @htmlinclude pkg-marker-core.html Parent class for libSBML's 'ListOfXYZ' classes.
7152
7153    @htmlinclude not-sbml-warning.html
7154
7155    The ListOf class in libSBML is a utility class that serves as the parent
7156    class for implementing the ListOf__ classes.  It provides methods for
7157    working generically with the various SBML lists of objects in a program.
7158    LibSBML uses this separate list class rather than ordinary
7159    @if conly C@endif@if cpp C++; @endif@if java Java@endif@if python Python@endif@~ lists,
7160    so that it can provide the methods and features associated with SBase.
7161
7162    Whether a given ListOf element may be empty or not depends on the
7163    element in question, and on what level and version of SBML it
7164    is being used for.  For ListOf elements in SBML Level&nbsp;3
7165    Version&nbsp;1 and prior, no core list and few package lists could
7166    be empty.  As of SBML Level&nbsp;3 Version&nbsp;2, the rules
7167    were relaxed, and lists were allowed to be empty.  In libSBML,
7168    documents created for Level&nbsp;3 Version&nbsp;2 will be written
7169    with empty ListOf's if that ListOf contains some other 'extra'
7170    information: an attribute such as metaid or sboTerm, a child
7171    '&lt;notes&gt;' or '&lt;annotation&gt;', or information from a SBML
7172    Level&nbsp;3 package.
7173
7174    @par
7175    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
7176    are merely containers used for organizing the main components of an SBML
7177    model.  In libSBML's implementation, ListOf___
7178    @if conly data structures @else classes@endif@~ are derived from the
7179    intermediate utility @if conly structure @else class@endif@~ ListOf, which
7180    is not defined by the SBML specifications but serves as a useful
7181    programmatic construct.  ListOf is itself is in turn derived from SBase,
7182    which provides all of the various ListOf___
7183    @if conly data structures @else classes@endif@~ with common features
7184    defined by the SBML specification, such as 'metaid' attributes and
7185    annotations.
7186
7187    The relationship between the lists and the rest of an SBML model is
7188    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
7189
7190    @htmlinclude listof-illustration.html
7191
7192    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
7193    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
7194    Version&nbsp;2 allows
7195    containers to contain zero or more of the relevant object, instead of
7196    requiring at least one.  As such, libsbml will write out an
7197    otherwise-empty ListOf___ element that has any optional attribute set
7198    (such as 'id' or 'metaid'), that has an optional child (such
7199    as a 'notes' or 'annotation'), or that has attributes or children set
7200    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
7201    any other children.
7202
7203    Readers may wonder about the motivations for using the ListOf___
7204    containers in SBML.  A simpler approach in XML might be to place the
7205    components all directly at the top level of the model definition.  The
7206    choice made in SBML is to group them within XML elements named after
7207    %ListOf<em>Classname</em>, in part because it helps organize the
7208    components.  More importantly, the fact that the container classes are
7209    derived from SBase means that software tools can add information @em about
7210    the lists themselves into each list container's 'annotation'.
7211
7212    @see ListOfFunctionDefinitions
7213    @see ListOfUnitDefinitions
7214    @see ListOfCompartmentTypes
7215    @see ListOfSpeciesTypes
7216    @see ListOfCompartments
7217    @see ListOfSpecies
7218    @see ListOfParameters
7219    @see ListOfInitialAssignments
7220    @see ListOfRules
7221    @see ListOfConstraints
7222    @see ListOfReactions
7223    @see ListOfEvents
7224
7225    @if conly
7226    @note In the C API for libSBML, functions that in other language APIs
7227    would be inherited by the various ListOf___ structures not shown in the
7228    pages for the individual ListOf___'s.  Instead, the functions are defined
7229    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
7230    the many common functions available for manipulating ListOf___
7231    structures</strong>.  The documentation for the individual ListOf___
7232    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
7233    all of the functionality available. @endif@~
7234
7235    """
7236
7237    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7238    __repr__ = _swig_repr
7239    __swig_destroy__ = _libsbml.delete_ListOf
7240
7241    def __init__(self, *args):
7242        r"""
7243        __init__(ListOf self, unsigned int level=SBML_DEFAULT_LEVEL, unsigned int version=SBML_DEFAULT_VERSION) -> ListOf
7244        __init__(ListOf self, SBMLNamespaces sbmlns) -> ListOf
7245        __init__(ListOf self, ListOf orig) -> ListOf
7246
7247        This method has multiple variants; they differ in the arguments
7248         they accept.  Each variant is described separately below.
7249
7250        @par
7251        <hr>
7252        <span class='variant-sig-heading'>Method variant with the following signature</span>:
7253         <pre class='signature'>ListOf(SBMLNamespaces sbmlns)</pre>
7254
7255        Creates a new ListOf with a given SBMLNamespaces object.
7256
7257        @param sbmlns the set of SBML namespaces that this ListOf should
7258        contain.
7259
7260        @note Bare ListOf @if conly structures @else objects@endif@~ are
7261        impossible to add to SBML models.  The ListOf
7262        @if conly structure type@else class@endif@~ is simply the base
7263        of <em>other</em> @if conly structure types @else classes@endif@~ in
7264        libSBML.  Calling programs are not intended to create bare ListOf
7265        @if conly structures @else objects@endif@~ themselves.
7266
7267        @note Attempting to add an object to an SBMLDocument having a different
7268        combination of SBML Level, Version and XML namespaces than the object
7269        itself will result in an error at the time a caller attempts to make the
7270        addition.  A parent object must have compatible Level, Version and XML
7271        namespaces.  (Strictly speaking, a parent may also have more XML
7272        namespaces than a child, but the reverse is not permitted.)  The
7273        restriction is necessary to ensure that an SBML model has a consistent
7274        overall structure.  This requires callers to manage their objects
7275        carefully, but the benefit is increased flexibility in how models can be
7276        created by permitting callers to create objects bottom-up if desired.  In
7277        situations where objects are not yet attached to parents (e.g.,
7278        SBMLDocument), knowledge of the intented SBML Level and Version help
7279        libSBML determine such things as whether it is valid to assign a
7280        particular value to an attribute.
7281
7282
7283        @par
7284        <hr>
7285        <span class='variant-sig-heading'>Method variant with the following signature</span>:
7286         <pre class='signature'>ListOf(long level   = SBML_DEFAULT_LEVEL, long version = SBML_DEFAULT_VERSION)</pre>
7287
7288        Creates a new ListOf object.
7289
7290        @param level the SBML Level; if not assigned, defaults to the
7291        value of SBMLDocument.getDefaultLevel().
7292
7293        @param version the Version within the SBML Level; if not assigned,
7294        defaults to the value of SBMLDocument.getDefaultVersion().
7295
7296        @note Bare ListOf @if conly structures @else objects@endif@~ are
7297        impossible to add to SBML models.  The ListOf
7298        @if conly structure type@else class@endif@~ is simply the base
7299        of <em>other</em> @if conly structure types @else classes@endif@~ in
7300        libSBML.  Calling programs are not intended to create bare ListOf
7301        @if conly structures @else objects@endif@~ themselves.
7302
7303        @note Attempting to add an object to an SBMLDocument having a different
7304        combination of SBML Level, Version and XML namespaces than the object
7305        itself will result in an error at the time a caller attempts to make the
7306        addition.  A parent object must have compatible Level, Version and XML
7307        namespaces.  (Strictly speaking, a parent may also have more XML
7308        namespaces than a child, but the reverse is not permitted.)  The
7309        restriction is necessary to ensure that an SBML model has a consistent
7310        overall structure.  This requires callers to manage their objects
7311        carefully, but the benefit is increased flexibility in how models can be
7312        created by permitting callers to create objects bottom-up if desired.  In
7313        situations where objects are not yet attached to parents (e.g.,
7314        SBMLDocument), knowledge of the intented SBML Level and Version help
7315        libSBML determine such things as whether it is valid to assign a
7316        particular value to an attribute.
7317
7318        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
7319
7320
7321
7322        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
7323
7324
7325        @par
7326        <hr>
7327        <span class='variant-sig-heading'>Method variant with the following signature</span>:
7328         <pre class='signature'>ListOf(ListOf orig)</pre>
7329
7330        Copy constructor; creates a copy of this ListOf.
7331
7332        @param orig the ListOf instance to copy.
7333
7334        """
7335        _libsbml.ListOf_swiginit(self, _libsbml.new_ListOf(*args))
7336
7337    def clone(self):
7338        r"""
7339        clone(ListOf self) -> ListOf
7340
7341        Creates and returns a deep copy of this ListOf object.
7342
7343        @return the (deep) copy of this ListOf object.
7344
7345        """
7346        return _libsbml.ListOf_clone(self)
7347
7348    def append(self, item):
7349        r"""
7350        append(ListOf self, SBase item) -> int
7351
7352        Adds an item to the end of this ListOf's list of items.
7353
7354        This method makes a clone of the @p item handed to it.  This means that
7355        when the ListOf object is destroyed, the original items will not be
7356        destroyed.  For a method with an alternative ownership behavior, see the
7357        ListOf.appendAndOwn() method.
7358
7359        @param item the item to be added to the list.
7360
7361        @return integer value indicating success/failure of the
7362        function.  @if clike The value is drawn from the
7363        enumeration #OperationReturnValues_t. @endif@~ The possible values
7364        returned by this function are:
7365        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
7366        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
7367
7368        @see appendAndOwn()
7369        @see appendFrom()
7370
7371        """
7372        return _libsbml.ListOf_append(self, item)
7373
7374    def appendAndOwn(self, disownedItem):
7375        r"""
7376        appendAndOwn(ListOf self, SBase disownedItem) -> int
7377
7378        Adds an item to the end of this ListOf's list of items.
7379
7380        This method does not clone the @p disownedItem handed to it; instead, it assumes
7381        ownership of it.  This means that when the ListOf is destroyed, the item
7382        will be destroyed along with it.  For a method with an alternative
7383        ownership behavior, see the ListOf.append() method.
7384
7385        @param disownedItem the item to be added to the list.
7386        Will become a child of the parent list.
7387
7388        @return integer value indicating success/failure of the
7389        function.  @if clike The value is drawn from the
7390        enumeration #OperationReturnValues_t. @endif@~ The possible values
7391        returned by this function are:
7392        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
7393        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
7394
7395        @see append()
7396        @see appendFrom()
7397
7398        """
7399        return _libsbml.ListOf_appendAndOwn(self, disownedItem)
7400
7401    def appendFrom(self, list):
7402        r"""
7403        appendFrom(ListOf self, ListOf list) -> int
7404
7405        Adds a clone of a list of items to this ListOf's list.
7406
7407        Note that because this clones the objects handed to it, the original
7408        items will not be destroyed when this ListOf object is destroyed.
7409
7410        @param list a list of items to be added.
7411
7412        @return integer value indicating success/failure of the
7413        function.  @if clike The value is drawn from the
7414        enumeration #OperationReturnValues_t. @endif@~ The possible values
7415        returned by this function are:
7416        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
7417        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
7418
7419        @see append()
7420        @see appendAndOwn()
7421
7422        """
7423        return _libsbml.ListOf_appendFrom(self, list)
7424
7425    def insert(self, location, item):
7426        r"""
7427        insert(ListOf self, int location, SBase item) -> int
7428
7429        Inserts an item at a given position in this ListOf's list of items.
7430
7431        This variant of the method makes a clone of the @p item handed to it.
7432        This means that when the ListOf is destroyed, the original @p item will
7433        <em>not</em> be destroyed.
7434
7435        @param location the location in the list where to insert the item.
7436        @param item the item to be inserted to the list.
7437
7438        @return integer value indicating success/failure of the
7439        function.  @if clike The value is drawn from the
7440        enumeration #OperationReturnValues_t. @endif@~ The possible values
7441        returned by this function are:
7442        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
7443        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
7444
7445        @see insertAndOwn()
7446
7447        """
7448        return _libsbml.ListOf_insert(self, location, item)
7449
7450    def insertAndOwn(self, location, disownedItem):
7451        r"""
7452        insertAndOwn(ListOf self, int location, SBase disownedItem) -> int
7453
7454        Inserts an item at a given position in this ListOf's list of items.
7455
7456        This variant of the method does not make a clone of the @p disownedItem handed to it.
7457        This means that when the ListOf is destroyed, the original @p item
7458        <em>will</em> be destroyed.
7459
7460        @param location the location where to insert the item.
7461        @param disownedItem the item to be inserted to the list.
7462        Will become a child of the parent list.
7463
7464        @return integer value indicating success/failure of the
7465        function.  @if clike The value is drawn from the
7466        enumeration #OperationReturnValues_t. @endif@~ The possible values
7467        returned by this function are:
7468        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
7469        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
7470
7471        @see insert()
7472
7473        """
7474        return _libsbml.ListOf_insertAndOwn(self, location, disownedItem)
7475
7476    def get(self, *args):
7477        r"""
7478        get(ListOf self, unsigned int n) -> SBase
7479        get(ListOf self, unsigned int n) -> SBase
7480
7481        Get an item from the list.
7482
7483        @param n the index number of the item to get.
7484
7485        @return the <em>n</em>th item in this ListOf items, or a null pointer if
7486        the index number @p n refers to a nonexistent position in this list.
7487
7488        @see size()
7489
7490        """
7491        return _libsbml.ListOf_get(self, *args)
7492
7493    def getElementBySId(self, id):
7494        r"""
7495        getElementBySId(ListOf self, string id) -> SBase
7496
7497        Returns the first child element found that has the given identifier.
7498
7499        This method searches this ListOf's list of items for SBML objects based
7500        on their 'id' attribute value in the model-wide <code>SId</code>
7501        identifier namespace.
7502
7503        @param id string representing the id of the object to find.
7504
7505        @return the first element found with the given @p id, or @c None if no
7506        such object is found.
7507
7508        """
7509        return _libsbml.ListOf_getElementBySId(self, id)
7510
7511    def getElementByMetaId(self, metaid):
7512        r"""
7513        getElementByMetaId(ListOf self, string metaid) -> SBase
7514
7515        Returns the first child element found with the given meta-identifier.
7516
7517        @param metaid string representing the 'metaid' attribute of the object
7518        to find.
7519
7520        @return the first element found with the given @p metaid, or @c None if
7521        no such object is found.
7522
7523        """
7524        return _libsbml.ListOf_getElementByMetaId(self, metaid)
7525
7526    def clear(self, doDelete=True):
7527        r"""
7528        clear(ListOf self, bool doDelete=True)
7529
7530        Removes all items in this ListOf object.
7531
7532        If parameter @p doDelete is @c True (default), all items in this ListOf
7533        object are deleted and cleared, and thus the caller doesn't have to
7534        delete those items.  Otherwise, all items are cleared only from this
7535        ListOf object; the caller is still responsible for deleting the actual
7536        items.  (In the latter case, callers are advised to store pointers to
7537        all items elsewhere before calling this function.)
7538
7539        @param doDelete if @c True (default), all items are deleted and cleared.
7540        Otherwise, all items are just cleared and not deleted.
7541
7542        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
7543
7544
7545
7546        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
7547
7548        """
7549        return _libsbml.ListOf_clear(self, doDelete)
7550
7551    def removeFromParentAndDelete(self):
7552        r"""
7553        removeFromParentAndDelete(ListOf self) -> int
7554
7555        Removes all items in this ListOf object and deletes its properties too.
7556
7557        This performs a call to clear() with an argument of @c True (thus removing
7558        all the child objects in the list), followed by calls to various libSBML
7559        <code>unset<em>Foo</em></code> methods to delete everything else: CVTerm
7560        objects, model history objects, etc.
7561
7562        @if cpp Implementations of subclasses of ListOf may need to override
7563        this method if different handling of child objects is needed.@endif@~
7564
7565        @return integer value indicating success/failure of the
7566        function.  @if clike The value is drawn from the
7567        enumeration #OperationReturnValues_t. @endif@~ The possible values
7568        returned by this function are:
7569        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
7570
7571        """
7572        return _libsbml.ListOf_removeFromParentAndDelete(self)
7573
7574    def remove(self, n):
7575        r"""
7576        remove(ListOf self, unsigned int n) -> SBase
7577
7578        Removes the <em>n</em>th item from this ListOf list of items and returns
7579        it.
7580
7581        The caller owns the returned item and is responsible for deleting it.
7582
7583        @param n the index of the item to remove.
7584
7585        @see size()
7586
7587        """
7588        return _libsbml.ListOf_remove(self, n)
7589
7590    def size(self):
7591        r"""
7592        size(ListOf self) -> unsigned int
7593
7594        Returns number of items in this ListOf list.
7595
7596        @return the number of items in this ListOf items.
7597
7598        """
7599        return _libsbml.ListOf_size(self)
7600
7601    def connectToChild(self):
7602        r"""connectToChild(ListOf self)"""
7603        return _libsbml.ListOf_connectToChild(self)
7604
7605    def getTypeCode(self):
7606        r"""
7607        getTypeCode(ListOf self) -> int
7608
7609        Returns the libSBML type code for this object, namely,
7610        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink.
7611
7612        @par
7613        LibSBML attaches an identifying code to every kind of SBML object.  These
7614        are integer constants known as <em>SBML type codes</em>.  The names of all
7615        the codes begin with the characters <code>SBML_</code>.
7616        @if clike The set of possible type codes for core elements is defined in
7617        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
7618        SBML Level&nbsp;3 packages define their own extra enumerations of type
7619        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
7620        package).@endif@if java In the Java language interface for libSBML, the
7621        type codes are defined as static integer constants in the interface class
7622        {@link libsbmlConstants}.  @endif@if python In the Python language
7623        interface for libSBML, the type codes are defined as static integer
7624        constants in the interface class @link libsbml@endlink.@endif@if csharp In
7625        the C# language interface for libSBML, the type codes are defined as
7626        static integer constants in the interface class
7627        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
7628        package plug-ins may use overlapping type codes; to identify the package
7629        to which a given object belongs, call the
7630        <code>@if conly SBase_getPackageName()
7631        @else SBase.getPackageName()
7632        @endif</code>
7633        method on the object.
7634
7635        The exception to this is lists:  all SBML-style list elements have the type
7636        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
7637        are from.
7638
7639        @return the SBML type code for this object:
7640        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink (default).
7641
7642        @note The various ListOf classes mostly differ from each other in what they
7643        contain.  Hence, one must call getItemTypeCode() to fully determine the
7644        class of this SBML object.
7645
7646        @warning <span class='warning'>The specific integer values of the possible
7647        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
7648        packages,  To fully identify the correct code, <strong>it is necessary to
7649        invoke both getPackageName() and getTypeCode()</strong> (or
7650        ListOf.getItemTypeCode()).</span>
7651
7652        @see getItemTypeCode()
7653        @see getElementName()
7654        @see getPackageName()
7655
7656        """
7657        return _libsbml.ListOf_getTypeCode(self)
7658
7659    def getItemTypeCode(self):
7660        r"""
7661        getItemTypeCode(ListOf self) -> int
7662
7663        Get the type code of the objects contained in this ListOf.
7664
7665        @par
7666        LibSBML attaches an identifying code to every kind of SBML object.  These
7667        are integer constants known as <em>SBML type codes</em>.  The names of all
7668        the codes begin with the characters <code>SBML_</code>.
7669        @if clike The set of possible type codes for core elements is defined in
7670        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
7671        SBML Level&nbsp;3 packages define their own extra enumerations of type
7672        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
7673        package).@endif@if java In the Java language interface for libSBML, the
7674        type codes are defined as static integer constants in the interface class
7675        {@link libsbmlConstants}.  @endif@if python In the Python language
7676        interface for libSBML, the type codes are defined as static integer
7677        constants in the interface class @link libsbml@endlink.@endif@if csharp In
7678        the C# language interface for libSBML, the type codes are defined as
7679        static integer constants in the interface class
7680        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
7681        package plug-ins may use overlapping type codes; to identify the package
7682        to which a given object belongs, call the
7683        <code>@if conly SBase_getPackageName()
7684        @else SBase.getPackageName()
7685        @endif</code>
7686        method on the object.
7687
7688        The exception to this is lists:  all SBML-style list elements have the type
7689        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
7690        are from.
7691
7692        Classes that inherit from the ListOf class should override this method
7693        to return the SBML type code for the objects contained in this ListOf.
7694        If they do not, this method will return
7695        @link libsbml#SBML_UNKNOWN SBML_UNKNOWN@endlink
7696
7697        @return The ListOf base class contains no SBML objects, and therefore
7698        this method returns @link libsbml#SBML_UNKNOWN SBML_UNKNOWN@endlink.
7699
7700        @see getElementName()
7701        @see getPackageName()
7702
7703        """
7704        return _libsbml.ListOf_getItemTypeCode(self)
7705
7706    def getElementName(self):
7707        r"""
7708        getElementName(ListOf self) -> string
7709
7710        Returns the XML element name of this object, which for ListOf, is
7711        always @c 'listOf'.
7712
7713        @return the XML name of this element.
7714
7715        """
7716        return _libsbml.ListOf_getElementName(self)
7717
7718    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
7719        r"""
7720        enablePackageInternal(ListOf self, string pkgURI, string pkgPrefix, bool flag)
7721
7722        @internal
7723
7724        @internal
7725
7726        """
7727        return _libsbml.ListOf_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
7728
7729    def updateSBMLNamespace(self, package, level, version):
7730        r"""
7731        updateSBMLNamespace(ListOf self, string package, unsigned int level, unsigned int version)
7732
7733        @internal
7734
7735        @internal
7736
7737        """
7738        return _libsbml.ListOf_updateSBMLNamespace(self, package, level, version)
7739
7740    def hasOptionalElements(self):
7741        r"""
7742        hasOptionalElements(ListOf self) -> bool
7743
7744        @internal
7745
7746        @internal
7747
7748        """
7749        return _libsbml.ListOf_hasOptionalElements(self)
7750
7751    def isExplicitlyListed(self):
7752        r"""
7753        isExplicitlyListed(ListOf self) -> bool
7754
7755        @internal
7756
7757        @internal
7758
7759        """
7760        return _libsbml.ListOf_isExplicitlyListed(self)
7761
7762    def setExplicitlyListed(self, value=True):
7763        r"""
7764        setExplicitlyListed(ListOf self, bool value=True)
7765
7766        @internal
7767
7768        @internal
7769
7770        """
7771        return _libsbml.ListOf_setExplicitlyListed(self, value)
7772
7773    def sort(self):
7774        r"""
7775        sort(ListOf self)
7776
7777        @internal
7778
7779        @internal
7780
7781        """
7782        return _libsbml.ListOf_sort(self)
7783
7784    def __len__(self):
7785        r"""__len__(ListOf self) -> int"""
7786        return _libsbml.ListOf___len__(self)
7787
7788    def __getitem__(self, key):
7789
7790      try:
7791         keyIsSlice = isinstance(key, slice)
7792      except:
7793         keyIsSlice = 0
7794
7795      if keyIsSlice:
7796        start = key.start
7797        if start is None:
7798          start = 0
7799        stop = key.stop
7800        if stop is None:
7801          stop = self.size()
7802        return [self[i] for i in range(
7803          self._fixNegativeIndex(start), self._fixNegativeIndex(stop)
7804        )]
7805
7806      key = self._fixNegativeIndex(key)
7807      if key < 0 or key >= self.size():
7808        raise IndexError(key)
7809      return self.get(key)
7810
7811
7812    def _fixNegativeIndex(self, index):
7813      if index < 0:
7814        return index + self.size()
7815      else:
7816        return index
7817
7818
7819    def __iter__(self):
7820      for i in range(self.size()):
7821        yield self[i]
7822
7823
7824    def __repr__(self):
7825      return "[" + ", ".join([repr(self[i]) for i in range(len(self))]) + "]"
7826
7827
7828    def __str__(self):
7829      return repr(self)
7830
7831
7832# Register ListOf in _libsbml:
7833_libsbml.ListOf_swigregister(ListOf)
7834
7835class Model(SBase):
7836    r"""
7837
7838    @sbmlpackage{core}
7839
7840    @htmlinclude pkg-marker-core.html An SBML model.
7841
7842    In an SBML model definition, a single object of class Model serves as
7843    the overall container for the lists of the various model components.
7844    All of the lists are optional, but if a given list container is present
7845    within the model, the list must not be empty; that is, it must have
7846    length one or more.  The following are the components and lists
7847    permitted in different Levels and Versions of SBML in
7848    version @htmlinclude libsbml-version.html
7849    of libSBML:
7850    <ul>
7851    <li> In SBML Level 1, the components are: UnitDefinition, Compartment,
7852    Species, Parameter, Rule, and Reaction.  Instances of the classes are
7853    placed inside instances of classes ListOfUnitDefinitions,
7854    ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, and
7855    ListOfReactions.
7856
7857    <li> In SBML Level 2 Version 1, the components are: FunctionDefinition,
7858    UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and
7859    Event.  Instances of the classes are placed inside instances of classes
7860    ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments,
7861    ListOfSpecies, ListOfParameters, ListOfRules, ListOfReactions, and
7862    ListOfEvents.
7863
7864    <li> In SBML Level 2 Versions 2, 3 and 4, the components are:
7865    FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType,
7866    Compartment, Species, Parameter, InitialAssignment, Rule, Constraint,
7867    Reaction and Event.  Instances of the classes are placed inside
7868    instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions,
7869    ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments,
7870    ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules,
7871    ListOfConstraints, ListOfReactions, and ListOfEvents.
7872
7873    <li> In SBML Level 3 Version 1, the components are: FunctionDefinition,
7874    UnitDefinition, Compartment, Species, Parameter, InitialAssignment,
7875    Rule, Constraint, Reaction and Event.  Instances of the classes are
7876    placed inside instances of classes ListOfFunctionDefinitions,
7877    ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies,
7878    ListOfParameters, ListOfInitialAssignments, ListOfRules,
7879    ListOfConstraints, ListOfReactions, and ListOfEvents.
7880    </ul>
7881
7882    Although all the lists are optional, there are dependencies between SBML
7883    components such that defining some components requires defining others.
7884    An example is that defining a species requires defining a compartment,
7885    and defining a reaction requires defining a species.  The dependencies
7886    are explained in more detail in the SBML specifications.
7887
7888    In addition to the above lists and attributes, the Model class in both
7889    SBML Level&nbsp;2 and Level&nbsp;3 has the usual two attributes of 'id'
7890    and 'name', and both are optional.  As is the case for other SBML
7891    components with 'id' and 'name' attributes, they must be used according
7892    to the guidelines described in the SBML specifications.  (Within the
7893    frameworks of SBML Level&nbsp;2 and Level&nbsp;3, a
7894    Model object identifier has no assigned meaning, but extension packages
7895    planned for SBML Level&nbsp;3 are likely to make use of this
7896    identifier.)
7897
7898    Finally, SBML Level&nbsp;3 has introduced a number of additional Model
7899    attributes.  They are discussed in a separate section below.
7900
7901
7902    @section approaches Approaches to creating objects using the libSBML API
7903
7904    LibSBML provides two main mechanisms for creating objects: class
7905    constructors
7906    (e.g., @if java <a href='org/sbml/libsbml/Species.html'>Species()</a> @else Species.Species() @endif),
7907    and <code>create<span class='placeholder-nospace'><em>Object</em></span>()</code>
7908    methods (such as Model.createSpecies()) provided by certain <span
7909    class='placeholder-nospace'><em>Object</em></span> classes such as Model.  These
7910    multiple mechanisms are provided by libSBML for flexibility and to
7911    support different use-cases, but they also have different implications
7912    for the overall model structure.
7913
7914    In general, the recommended approach is to use the <code>create<span
7915    class='placeholder-nospace'><em>Object</em></span>()</code> methods.  These
7916    methods both create an object @em and link it to the parent in one step.
7917    Here is an example:@if clike
7918    @code{.cpp}
7919    // Create an SBMLDocument object in Level 3 Version 1 format:
7920
7921    SBMLDocument sbmlDoc = new SBMLDocument(3, 1);
7922
7923    // Create a Model object inside the SBMLDocument object and set
7924    // its identifier.  The call returns a pointer to the Model object
7925    // created, and methods called on that object affect the attributes
7926    // of the object attached to the model (as expected).
7927
7928    Model model = sbmlDoc->createModel();
7929    model->setId('BestModelEver');
7930
7931    // Create a Species object inside the Model and set its identifier.
7932    // Similar to the lines above, this call returns a pointer to the Species
7933    // object created, and methods called on that object affect the attributes
7934    // of the object attached to the model (as expected).
7935
7936    Species sp = model->createSpecies();
7937    sp->setId('MySpecies');
7938    @endcode
7939    @endif@if java
7940    @code{.java}
7941    // Create an SBMLDocument object in Level 3 Version 1 format:
7942
7943    SBMLDocument sbmlDoc = new SBMLDocument(3, 1);
7944
7945    // Create a Model object inside the SBMLDocument object and set
7946    // its identifier.  The call returns a pointer to the Model object
7947    // created, and methods called on that object affect the attributes
7948    // of the object attached to the model (as expected).  Note that
7949    // the call to setId() returns a status code, and a real program
7950    // should check this status code to make sure everything went okay.
7951
7952    Model model = sbmlDoc.createModel();
7953    model.setId(&#34;BestModelEver&#34;);
7954
7955    // Create a Species object inside the Model and set its identifier.
7956    // Similar to the lines above, this call returns a pointer to the Species
7957    // object created, and methods called on that object affect the attributes
7958    // of the object attached to the model (as expected).  Note that, like
7959    // with Model, the call to setId() returns a status code, and a real program
7960    // should check this status code to make sure everything went okay.
7961
7962    Species sp = model.createSpecies();
7963    sp.setId(&#34;BestSpeciesEver&#34;);
7964    @endcode
7965    @endif@if python
7966    @code{.py}
7967    # Create an SBMLDocument object in Level 3 Version 1 format.
7968    # Make sure to check for possible failures.
7969
7970    try:
7971      sbmlDoc = SBMLDocument(3, 1)
7972    except ValueError:
7973      print('Could not create SBMLDocument object')
7974      sys.exit(1)
7975
7976    # Create a Model object inside the SBMLDocument object and set its
7977    # identifier, checking the returned values.  The call to setId() returns a
7978    # status code to indicate whether the assignment was successful.
7979
7980    model = sbmlDoc.createModel()
7981    if model == None:
7982      # Do something to handle the error here.
7983      print('Unable to create Model object.')
7984      sys.exit(1)
7985
7986    status = model.setId('BestModelEver')
7987    if status != LIBSBML_OPERATION_SUCCESS:
7988      # Do something to handle the error here.
7989      print('Unable to set identifier on the Model object')
7990      sys.exit(1)
7991
7992    # Create a Species object inside the Model and set its identifier.
7993    # Again, the setId() returns a status code to indicate whether the
7994    # assignment was successful.
7995
7996    sp = model.createSpecies()
7997    if sp == None:
7998      # Do something to handle the error here.
7999      print('Unable to create Species object.')
8000      sys.exit(1)
8001
8002    status = sp.setId('BestSpeciesEver')
8003    if status != LIBSBML_OPERATION_SUCCESS:
8004      # Do something to handle the error here.
8005      print('Unable to set identifier on the Species object')
8006      sys.exit(1)
8007    @endcode
8008    @endif@if csharp
8009    @code
8010    // Create an SBMLDocument object in Level 3 Version 1 format:
8011
8012    SBMLDocument sbmlDoc = new SBMLDocument(3, 1);
8013
8014    // Create a Model object inside the SBMLDocument object and set
8015    // its identifier.  The call returns a pointer to the Model object
8016    // created, and methods called on that object affect the attributes
8017    // of the object attached to the model (as expected).
8018
8019    Model model = sbmlDoc.createModel();
8020    model.setId('BestModelEver');
8021
8022    // Create a Species object inside the Model and set its identifier.
8023    // Similar to the lines above, this call returns a pointer to the Species
8024    // object created, and methods called on that object affect the attributes
8025    // of the object attached to the model (as expected).
8026
8027    Species sp = model.createSpecies();
8028    sp.setId('MySpecies');
8029    @endcode
8030    @endif@~
8031
8032    The <code>create<span
8033    class='placeholder-nospace'><em>Object</em></span>()</code> methods return a
8034    pointer to the object created, but they also add the object to the
8035    relevant list of object instances contained in the parent.  (These lists
8036    become the <code>&lt;listOf<span
8037    class='placeholder-nospace'><em>Object</em></span>s&gt;</code> elements in the
8038    finished XML rendition of SBML.)  In the example above,
8039    Model.createSpecies() adds the created species directly to the
8040    <code>&lt;listOfSpeciesgt;</code> list in the model.  Subsequently,
8041    methods called on the species change the species in the model (which is
8042    what is expected in most situations).
8043
8044    @section model-checking Consistency and adherence to SBML specifications
8045
8046    To make it easier for applications to do whatever they need,
8047    libSBML version @htmlinclude libsbml-version.html
8048    is relatively lax when it comes to enforcing correctness and
8049    completeness of models @em during model construction and editing.
8050    Essentially, libSBML @em will @em not in most cases check automatically
8051    that a model's components have valid attribute values, or that the
8052    overall model is consistent and free of errors---even obvious errors
8053    such as duplication of identifiers.  This allows applications great
8054    leeway in how they build their models, but it means that software
8055    authors must take deliberate steps to ensure that the model will be, in
8056    the end, valid SBML.  These steps include such things as keeping track
8057    of the identifiers used in a model, manually performing updates in
8058    certain situations where an entity is referenced in more than one place
8059    (e.g., a species that is referenced by multiple SpeciesReference
8060    objects), and so on.
8061
8062    That said, libSBML does provide powerful features for deliberately
8063    performing validation of SBML when an application decides it is time to
8064    do so.  The interfaces to these facilities are on the SBMLDocument
8065    class, in the form of SBMLDocument.checkInternalConsistency() and
8066    SBMLDocument.checkConsistency().  Please refer to the documentation for
8067    SBMLDocument for more information about this.
8068
8069    While applications may play fast and loose and live like free spirits
8070    during the construction and editing of SBML models, they should always
8071    make sure to call SBMLDocument.checkInternalConsistency() and/or
8072    SBMLDocument.checkConsistency() before writing out the final version of
8073    an SBML model.
8074
8075
8076    @section model-l3-attrib Model attributes introduced in SBML Level&nbsp;3
8077
8078    As mentioned above, the Model class has a number of optional attributes
8079    in SBML Level&nbsp;3.  These are 'substanceUnits',
8080    'timeUnits', 'volumeUnits', 'areaUnits', 'lengthUnits', 'extentUnits',
8081    and 'conversionFactor.  The following provide more information about
8082    them.
8083
8084    @subsection model-l3-substanceunits The 'substanceUnits' attribute
8085
8086    The 'substanceUnits' attribute is used to specify the unit of
8087    measurement associated with substance quantities of Species objects that
8088    do not specify units explicitly.  If a given Species object definition
8089    does not specify its unit of substance quantity via the 'substanceUnits'
8090    attribute on the Species object instance, then that species inherits the
8091    value of the Model 'substanceUnits' attribute.  If the Model does not
8092    define a value for this attribute, then there is no unit to inherit, and
8093    all species that do not specify individual 'substanceUnits' attribute
8094    values then have <em>no</em> declared units for their quantities.  The
8095    SBML Level&nbsp;3 specifications provide more details.
8096
8097    Note that when the identifier of a species appears in a model's
8098    mathematical expressions, the unit of measurement associated with that
8099    identifier is <em>not solely determined</em> by setting 'substanceUnits'
8100    on Model or Species.  Please see the discussion about units given in
8101    the documentation for the Species class.
8102
8103
8104    @subsection model-l3-timeunits The 'timeUnits' attribute
8105
8106    The 'timeUnits' attribute on SBML Level&nbsp;3's Model object is used to
8107    specify the unit in which time is measured in the model.  This attribute
8108    on Model is the <em>only</em> way to specify a unit for time in a model.
8109    It is a global attribute; time is measured in the model everywhere in
8110    the same way.  This is particularly relevant to Reaction and RateRule
8111    objects in a model: all Reaction and RateRule objects in SBML define
8112    per-time values, and the unit of time is given by the 'timeUnits'
8113    attribute on the Model object instance.  If the Model 'timeUnits'
8114    attribute has no value, it means that the unit of time is not defined
8115    for the model's reactions and rate rules.  Leaving it unspecified in an
8116    SBML model does not result in an invalid model in SBML Level&nbsp;3;
8117    however, as a matter of best practice, we strongly recommend that all
8118    models specify units of measurement for time.
8119
8120
8121    @subsection model-l3-voletc The 'volumeUnits', 'areaUnits', and 'lengthUnits' attributes
8122
8123    The attributes 'volumeUnits', 'areaUnits' and 'lengthUnits' together are
8124    used to set the units of measurements for the sizes of Compartment
8125    objects in an SBML Level&nbsp;3 model when those objects do not
8126    otherwise specify units.  The three attributes correspond to the most
8127    common cases of compartment dimensions: 'volumeUnits' for compartments
8128    having a 'spatialDimensions' attribute value of @c '3', 'areaUnits' for
8129    compartments having a 'spatialDimensions' attribute value of @c '2', and
8130    'lengthUnits' for compartments having a 'spatialDimensions' attribute
8131    value of @c '1'.  The attributes are not applicable to compartments
8132    whose 'spatialDimensions' attribute values are @em not one of @c '1',
8133    @c '2' or @c '3'.
8134
8135    If a given Compartment object instance does not provide a value for its
8136    'units' attribute, then the unit of measurement of that compartment's
8137    size is inherited from the value specified by the Model 'volumeUnits',
8138    'areaUnits' or 'lengthUnits' attribute, as appropriate based on the
8139    Compartment object's 'spatialDimensions' attribute value.  If the Model
8140    object does not define the relevant attribute, then there are no units
8141    to inherit, and all Compartment objects that do not set a value for
8142    their 'units' attribute then have <em>no</em> units associated with
8143    their compartment sizes.
8144
8145    The use of three separate attributes is a carry-over from SBML
8146    Level&nbsp;2.  Note that it is entirely possible for a model to define a
8147    value for two or more of the attributes 'volumeUnits', 'areaUnits' and
8148    'lengthUnits' simultaneously, because SBML models may contain
8149    compartments with different numbers of dimensions.
8150
8151
8152    @subsection model-l3-extentunits The 'extentUnits' attribute
8153
8154    Reactions are processes that occur over time.  These processes involve
8155    events of some sort, where a single ``reaction event'' is one in which
8156    some set of entities (known as reactants, products and modifiers in
8157    SBML) interact, once.  The <em>extent</em> of a reaction is a measure of
8158    how many times the reaction has occurred, while the time derivative of
8159    the extent gives the instantaneous rate at which the reaction is
8160    occurring.  Thus, what is colloquially referred to as the 'rate of the
8161    reaction' is in fact equal to the rate of change of reaction extent.
8162
8163    In SBML Level&nbsp;3, the combination of 'extentUnits' and 'timeUnits'
8164    defines the units of kinetic laws in SBML and establishes how the
8165    numerical value of each KineticLaw object's mathematical formula is
8166    meant to be interpreted in a model.  The units of the kinetic laws are
8167    taken to be 'extentUnits' divided by 'timeUnits'.
8168
8169    Note that this embodies an important principle in SBML Level&nbsp;3
8170    models: <em>all reactions in an SBML model must have the same units</em>
8171    for the rate of change of extent.  In other words, the units of all
8172    reaction rates in the model <em>must be the same</em>.  There is only
8173    one global value for 'extentUnits' and one global value for 'timeUnits'.
8174
8175
8176    @subsection model-l3-convfactor The 'conversionFactor' attribute
8177
8178    The attribute 'conversionFactor' in SBML Level&nbsp;3's Model object
8179    defines a global value inherited by all Species object instances that do
8180    not define separate values for their 'conversionFactor' attributes.  The
8181    value of this attribute must refer to a Parameter object instance
8182    defined in the model.  The Parameter object in question must be a
8183    constant; ie it must have its 'constant' attribute value set to
8184    @c 'True'.
8185
8186    If a given Species object definition does not specify a conversion
8187    factor via the 'conversionFactor' attribute on Species, then the species
8188    inherits the conversion factor specified by the Model 'conversionFactor'
8189    attribute.  If the Model does not define a value for this attribute,
8190    then there is no conversion factor to inherit.  More information about
8191    conversion factors is provided in the SBML Level&nbsp;3
8192    specifications.
8193
8194    """
8195
8196    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8197    __repr__ = _swig_repr
8198    __swig_destroy__ = _libsbml.delete_Model
8199
8200    def __init__(self, *args):
8201        r"""
8202        __init__(Model self, unsigned int level, unsigned int version) -> Model
8203        __init__(Model self, SBMLNamespaces sbmlns) -> Model
8204        __init__(Model self, Model orig) -> Model
8205
8206        This method has multiple variants; they differ in the arguments
8207         they accept.  Each variant is described separately below.
8208
8209        @par
8210        <hr>
8211        <span class='variant-sig-heading'>Method variant with the following signature</span>:
8212         <pre class='signature'>Model(SBMLNamespaces sbmlns)</pre>
8213
8214        Creates a new Model using the given SBMLNamespaces object
8215        @p sbmlns.
8216
8217        @par
8218        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
8219        information.  It is used to communicate the SBML Level, Version, and (in
8220        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
8221        common approach to using libSBML's SBMLNamespaces facilities is to create an
8222        SBMLNamespaces object somewhere in a program once, then hand that object
8223        as needed to object constructors that accept SBMLNamespaces as arguments.
8224
8225        @param sbmlns an SBMLNamespaces object.
8226
8227        @throws SBMLConstructorException
8228        Thrown if the given @p sbmlns is inconsistent or incompatible
8229        with this object.
8230
8231        @note Attempting to add an object to an SBMLDocument having a different
8232        combination of SBML Level, Version and XML namespaces than the object
8233        itself will result in an error at the time a caller attempts to make the
8234        addition.  A parent object must have compatible Level, Version and XML
8235        namespaces.  (Strictly speaking, a parent may also have more XML
8236        namespaces than a child, but the reverse is not permitted.)  The
8237        restriction is necessary to ensure that an SBML model has a consistent
8238        overall structure.  This requires callers to manage their objects
8239        carefully, but the benefit is increased flexibility in how models can be
8240        created by permitting callers to create objects bottom-up if desired.  In
8241        situations where objects are not yet attached to parents (e.g.,
8242        SBMLDocument), knowledge of the intented SBML Level and Version help
8243        libSBML determine such things as whether it is valid to assign a
8244        particular value to an attribute.
8245
8246
8247        @par
8248        <hr>
8249        <span class='variant-sig-heading'>Method variant with the following signature</span>:
8250         <pre class='signature'>Model(long level, long version)</pre>
8251
8252        Creates a new Model using the given SBML @p level and @p version
8253        values.
8254
8255        @param level a long integer, the SBML Level to assign to this Model.
8256
8257        @param version a long integer, the SBML Version to assign to this
8258        Model.
8259
8260        @throws SBMLConstructorException
8261        Thrown if the given @p level and @p version combination are invalid
8262        or if this object is incompatible with the given level and version.
8263
8264        @note Attempting to add an object to an SBMLDocument having a different
8265        combination of SBML Level, Version and XML namespaces than the object
8266        itself will result in an error at the time a caller attempts to make the
8267        addition.  A parent object must have compatible Level, Version and XML
8268        namespaces.  (Strictly speaking, a parent may also have more XML
8269        namespaces than a child, but the reverse is not permitted.)  The
8270        restriction is necessary to ensure that an SBML model has a consistent
8271        overall structure.  This requires callers to manage their objects
8272        carefully, but the benefit is increased flexibility in how models can be
8273        created by permitting callers to create objects bottom-up if desired.  In
8274        situations where objects are not yet attached to parents (e.g.,
8275        SBMLDocument), knowledge of the intented SBML Level and Version help
8276        libSBML determine such things as whether it is valid to assign a
8277        particular value to an attribute.
8278
8279
8280        @par
8281        <hr>
8282        <span class='variant-sig-heading'>Method variant with the following signature</span>:
8283         <pre class='signature'>Model(Model orig)</pre>
8284
8285        Copy constructor; creates a (deep) copy of the given Model object.
8286
8287        @param orig the object to copy.
8288
8289        """
8290        _libsbml.Model_swiginit(self, _libsbml.new_Model(*args))
8291
8292    def clone(self):
8293        r"""
8294        clone(Model self) -> Model
8295
8296        Creates and returns a deep copy of this Model object.
8297
8298        @return the (deep) copy of this Model object.
8299
8300        """
8301        return _libsbml.Model_clone(self)
8302
8303    def getElementBySId(self, id):
8304        r"""
8305        getElementBySId(Model self, string id) -> SBase
8306
8307        Returns the first child element found that has the given @p id.
8308
8309        This operation searches the model-wide <code>SId</code> identifier
8310        type namespace
8311
8312        @param id string representing the id of the object to find.
8313
8314        @return pointer to the first element found with the given @p id, or
8315        @c None if no such object is found.
8316
8317        """
8318        return _libsbml.Model_getElementBySId(self, id)
8319
8320    def getElementByMetaId(self, metaid):
8321        r"""
8322        getElementByMetaId(Model self, string metaid) -> SBase
8323
8324        Returns the first child element it can find with the given @p metaid.
8325
8326        @param metaid string representing the meta-identifier of the object to
8327        find.
8328
8329        @return pointer to the first element found with the given @p metaid, or
8330        None if no such object is found.
8331
8332        """
8333        return _libsbml.Model_getElementByMetaId(self, metaid)
8334
8335    def getId(self):
8336        r"""
8337        getId(Model self) -> string
8338
8339        Returns the value of the 'id' attribute of this Model.
8340
8341        @note Because of the inconsistent behavior of this function with
8342        respect to assignments and rules, it is now recommended to
8343        use the getIdAttribute() function instead.
8344
8345        @par
8346        The identifier given by an object's 'id' attribute value
8347        is used to identify the object within the SBML model definition.
8348        Other objects can refer to the component using this identifier.  The
8349        data type of 'id' is always <code>SId</code> or a type derived
8350        from that, such as <code>UnitSId</code>, depending on the object in
8351        question.  All data types are defined as follows:
8352        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
8353        letter ::= 'a'..'z','A'..'Z'
8354        digit  ::= '0'..'9'
8355        idChar ::= letter | digit | '_'
8356        SId    ::= ( letter | '_' ) idChar*
8357        </pre>
8358        The characters <code>(</code> and <code>)</code> are used for grouping,
8359        the character <code>*</code> 'zero or more times', and the character
8360        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
8361        is determined by an exact character sequence match; i.e., comparisons must
8362        be performed in a case-sensitive manner.  This applies to all uses of
8363        <code>SId</code>, <code>SIdRef</code>, and derived types.
8364
8365        Users need to be aware of some important API issues that are the result of
8366        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
8367        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
8368        of SBML objects.  To simplify the work of programmers, libSBML's API
8369        provided get, set, check, and unset on the SBase object class itself
8370        instead of on individual subobject classes. This made the
8371        get/set/etc. methods uniformly available on all objects in the libSBML
8372        API.  LibSBML simply returned empty strings or otherwise did not act when
8373        the methods were applied to SBML objects that were not defined by the SBML
8374        specification to have 'id' or 'name' attributes.  Additional complications
8375        arose with the rule and assignment objects: InitialAssignment,
8376        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
8377        the rule object hierarchy was different, and in addition, then as now,
8378        they possess different attributes: 'variable' (for the rules and event
8379        assignments), 'symbol' (for initial assignments), or neither (for
8380        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
8381        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
8382
8383        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
8384        Version&nbsp;2, it became necessary to introduce a new way to interact
8385        with the attributes more consistently in libSBML to avoid breaking
8386        backward compatibility in the behavior of the original 'id' methods.  For
8387        this reason, libSBML provides four functions (getIdAttribute(),
8388        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
8389        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
8390        from SBase, regardless of the object's type.  <strong>These new methods
8391        should be used instead of the older getId()/setId()/etc. methods</strong>
8392        unless the old behavior is somehow necessary.  Regardless of the Level and
8393        Version of the SBML, these functions allow client applications to use more
8394        generalized code in some situations (for instance, when manipulating
8395        objects that are all known to have identifiers).  If the object in
8396        question does not posess an 'id' attribute according to the SBML
8397        specification for the Level and Version in use, libSBML will not allow the
8398        identifier to be set, nor will it read or write 'id' attributes for those
8399        objects.
8400
8401        @return the id of this Model.
8402
8403        @see getIdAttribute()
8404        @see setIdAttribute()
8405        @see isSetIdAttribute()
8406        @see unsetIdAttribute()
8407
8408        """
8409        return _libsbml.Model_getId(self)
8410
8411    def getName(self):
8412        r"""
8413        getName(Model self) -> string
8414
8415        Returns the value of the 'name' attribute of this Model object.
8416
8417        @par
8418        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
8419        moved to SBase directly, instead of being defined individually for many
8420        (but not all) objects.  LibSBML has for a long time provided functions
8421        defined on SBase itself to get, set, and unset those attributes, which
8422        would fail or otherwise return empty strings if executed on any object
8423        for which those attributes were not defined.  Now that all SBase objects
8424        define those attributes, those functions now succeed for any object with
8425        the appropriate level and version.
8426
8427        The 'name' attribute is
8428        optional and is not intended to be used for cross-referencing purposes
8429        within a model.  Its purpose instead is to provide a human-readable
8430        label for the component.  The data type of 'name' is the type
8431        <code>string</code> defined in XML Schema.  SBML imposes no
8432        restrictions as to the content of 'name' attributes beyond those
8433        restrictions defined by the <code>string</code> type in XML Schema.
8434
8435        The recommended practice for handling 'name' is as follows.  If a
8436        software tool has the capability for displaying the content of 'name'
8437        attributes, it should display this content to the user as a
8438        component's label instead of the component's 'id'.  If the user
8439        interface does not have this capability (e.g., because it cannot
8440        display or use special characters in symbol names), or if the 'name'
8441        attribute is missing on a given component, then the user interface
8442        should display the value of the 'id' attribute instead.  (Script
8443        language interpreters are especially likely to display 'id' instead of
8444        'name'.)
8445
8446        As a consequence of the above, authors of systems that automatically
8447        generate the values of 'id' attributes should be aware some systems
8448        may display the 'id''s to the user.  Authors therefore may wish to
8449        take some care to have their software create 'id' values that are: (a)
8450        reasonably easy for humans to type and read; and (b) likely to be
8451        meaningful, for example by making the 'id' attribute be an abbreviated
8452        form of the name attribute value.
8453
8454        An additional point worth mentioning is although there are
8455        restrictions on the uniqueness of 'id' values, there are no
8456        restrictions on the uniqueness of 'name' values in a model.  This
8457        allows software applications leeway in assigning component identifiers.
8458
8459        Regardless of the level and version of the SBML, these functions allow
8460        client applications to use more generalized code in some situations
8461        (for instance, when manipulating objects that are all known to have
8462        names).  If the object in question does not posess a 'name' attribute
8463        according to the SBML specification for the Level and Version in use,
8464        libSBML will not allow the name to be set, nor will it read or
8465        write 'name' attributes for those objects.
8466
8467        @return the name of this SBML object, or the empty string if not set or unsettable.
8468
8469        @see getIdAttribute()
8470        @see isSetName()
8471        @see setName()
8472        @see unsetName()
8473
8474        """
8475        return _libsbml.Model_getName(self)
8476
8477    def getSubstanceUnits(self):
8478        r"""
8479        getSubstanceUnits(Model self) -> string
8480
8481        Returns the value of the 'substanceUnits' attribute of this Model.
8482
8483        @return the substanceUnits of this Model.
8484
8485        @note The 'substanceUnits' attribute is available in
8486        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8487
8488        """
8489        return _libsbml.Model_getSubstanceUnits(self)
8490
8491    def getTimeUnits(self):
8492        r"""
8493        getTimeUnits(Model self) -> string
8494
8495        Returns the value of the 'timeUnits' attribute of this Model.
8496
8497        @return the timeUnits of this Model.
8498
8499        @note The 'timeUnits' attribute is available in
8500        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8501
8502        """
8503        return _libsbml.Model_getTimeUnits(self)
8504
8505    def getVolumeUnits(self):
8506        r"""
8507        getVolumeUnits(Model self) -> string
8508
8509        Returns the value of the 'volumeUnits' attribute of this Model.
8510
8511        @return the volumeUnits of this Model.
8512
8513        @note The 'volumeUnits' attribute is available in
8514        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8515
8516        """
8517        return _libsbml.Model_getVolumeUnits(self)
8518
8519    def getAreaUnits(self):
8520        r"""
8521        getAreaUnits(Model self) -> string
8522
8523        Returns the value of the 'areaUnits' attribute of this Model.
8524
8525        @return the areaUnits of this Model.
8526
8527        @note The 'areaUnits' attribute is available in
8528        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8529
8530        """
8531        return _libsbml.Model_getAreaUnits(self)
8532
8533    def getLengthUnits(self):
8534        r"""
8535        getLengthUnits(Model self) -> string
8536
8537        Returns the value of the 'lengthUnits' attribute of this Model.
8538
8539        @return the lengthUnits of this Model.
8540
8541        @note The 'lengthUnits' attribute is available in
8542        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8543
8544        """
8545        return _libsbml.Model_getLengthUnits(self)
8546
8547    def getExtentUnits(self):
8548        r"""
8549        getExtentUnits(Model self) -> string
8550
8551        Returns the value of the 'extentUnits' attribute of this Model.
8552
8553        @return the extentUnits of this Model.
8554
8555        @note The 'extentUnits' attribute is available in
8556        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8557
8558        """
8559        return _libsbml.Model_getExtentUnits(self)
8560
8561    def getConversionFactor(self):
8562        r"""
8563        getConversionFactor(Model self) -> string
8564
8565        Returns the value of the 'conversionFactor' attribute of this Model.
8566
8567        @return the conversionFactor of this Model.
8568
8569        @note The 'conversionFactor' attribute is available in
8570        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8571
8572        """
8573        return _libsbml.Model_getConversionFactor(self)
8574
8575    def isSetId(self):
8576        r"""
8577        isSetId(Model self) -> bool
8578
8579        Predicate returning @c True if this
8580        Model's 'id' attribute is set.
8581
8582        @par
8583        The identifier given by an object's 'id' attribute value
8584        is used to identify the object within the SBML model definition.
8585        Other objects can refer to the component using this identifier.  The
8586        data type of 'id' is always <code>SId</code> or a type derived
8587        from that, such as <code>UnitSId</code>, depending on the object in
8588        question.  All data types are defined as follows:
8589        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
8590        letter ::= 'a'..'z','A'..'Z'
8591        digit  ::= '0'..'9'
8592        idChar ::= letter | digit | '_'
8593        SId    ::= ( letter | '_' ) idChar*
8594        </pre>
8595        The characters <code>(</code> and <code>)</code> are used for grouping,
8596        the character <code>*</code> 'zero or more times', and the character
8597        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
8598        is determined by an exact character sequence match; i.e., comparisons must
8599        be performed in a case-sensitive manner.  This applies to all uses of
8600        <code>SId</code>, <code>SIdRef</code>, and derived types.
8601
8602        Users need to be aware of some important API issues that are the result of
8603        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
8604        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
8605        of SBML objects.  To simplify the work of programmers, libSBML's API
8606        provided get, set, check, and unset on the SBase object class itself
8607        instead of on individual subobject classes. This made the
8608        get/set/etc. methods uniformly available on all objects in the libSBML
8609        API.  LibSBML simply returned empty strings or otherwise did not act when
8610        the methods were applied to SBML objects that were not defined by the SBML
8611        specification to have 'id' or 'name' attributes.  Additional complications
8612        arose with the rule and assignment objects: InitialAssignment,
8613        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
8614        the rule object hierarchy was different, and in addition, then as now,
8615        they possess different attributes: 'variable' (for the rules and event
8616        assignments), 'symbol' (for initial assignments), or neither (for
8617        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
8618        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
8619
8620        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
8621        Version&nbsp;2, it became necessary to introduce a new way to interact
8622        with the attributes more consistently in libSBML to avoid breaking
8623        backward compatibility in the behavior of the original 'id' methods.  For
8624        this reason, libSBML provides four functions (getIdAttribute(),
8625        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
8626        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
8627        from SBase, regardless of the object's type.  <strong>These new methods
8628        should be used instead of the older getId()/setId()/etc. methods</strong>
8629        unless the old behavior is somehow necessary.  Regardless of the Level and
8630        Version of the SBML, these functions allow client applications to use more
8631        generalized code in some situations (for instance, when manipulating
8632        objects that are all known to have identifiers).  If the object in
8633        question does not posess an 'id' attribute according to the SBML
8634        specification for the Level and Version in use, libSBML will not allow the
8635        identifier to be set, nor will it read or write 'id' attributes for those
8636        objects.
8637
8638        @return @c True if the 'id' attribute of this SBML object is
8639        set, @c False otherwise.
8640
8641        @note Because of the inconsistent behavior of this function with
8642        respect to assignments and rules, it is recommended that callers
8643        use isSetIdAttribute() instead.
8644
8645        @see getIdAttribute()
8646        @see setIdAttribute()
8647        @see unsetIdAttribute()
8648        @see isSetIdAttribute()
8649
8650        """
8651        return _libsbml.Model_isSetId(self)
8652
8653    def isSetName(self):
8654        r"""
8655        isSetName(Model self) -> bool
8656
8657        Predicate returning @c True if this
8658        Model's 'name' attribute is set.
8659
8660        @par
8661        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
8662        moved to SBase directly, instead of being defined individually for many
8663        (but not all) objects.  LibSBML has for a long time provided functions
8664        defined on SBase itself to get, set, and unset those attributes, which
8665        would fail or otherwise return empty strings if executed on any object
8666        for which those attributes were not defined.  Now that all SBase objects
8667        define those attributes, those functions now succeed for any object with
8668        the appropriate level and version.
8669
8670        The 'name' attribute is
8671        optional and is not intended to be used for cross-referencing purposes
8672        within a model.  Its purpose instead is to provide a human-readable
8673        label for the component.  The data type of 'name' is the type
8674        <code>string</code> defined in XML Schema.  SBML imposes no
8675        restrictions as to the content of 'name' attributes beyond those
8676        restrictions defined by the <code>string</code> type in XML Schema.
8677
8678        The recommended practice for handling 'name' is as follows.  If a
8679        software tool has the capability for displaying the content of 'name'
8680        attributes, it should display this content to the user as a
8681        component's label instead of the component's 'id'.  If the user
8682        interface does not have this capability (e.g., because it cannot
8683        display or use special characters in symbol names), or if the 'name'
8684        attribute is missing on a given component, then the user interface
8685        should display the value of the 'id' attribute instead.  (Script
8686        language interpreters are especially likely to display 'id' instead of
8687        'name'.)
8688
8689        As a consequence of the above, authors of systems that automatically
8690        generate the values of 'id' attributes should be aware some systems
8691        may display the 'id''s to the user.  Authors therefore may wish to
8692        take some care to have their software create 'id' values that are: (a)
8693        reasonably easy for humans to type and read; and (b) likely to be
8694        meaningful, for example by making the 'id' attribute be an abbreviated
8695        form of the name attribute value.
8696
8697        An additional point worth mentioning is although there are
8698        restrictions on the uniqueness of 'id' values, there are no
8699        restrictions on the uniqueness of 'name' values in a model.  This
8700        allows software applications leeway in assigning component identifiers.
8701
8702        Regardless of the level and version of the SBML, these functions allow
8703        client applications to use more generalized code in some situations
8704        (for instance, when manipulating objects that are all known to have
8705        names).  If the object in question does not posess a 'name' attribute
8706        according to the SBML specification for the Level and Version in use,
8707        libSBML will not allow the name to be set, nor will it read or
8708        write 'name' attributes for those objects.
8709
8710        @return @c True if the 'name' attribute of this SBML object is
8711        set, @c False otherwise.
8712
8713        @see getName()
8714        @see setName()
8715        @see unsetName()
8716
8717        """
8718        return _libsbml.Model_isSetName(self)
8719
8720    def isSetSubstanceUnits(self):
8721        r"""
8722        isSetSubstanceUnits(Model self) -> bool
8723
8724        Predicate returning @c True if this
8725        Model's 'substanceUnits' attribute is set.
8726
8727        @return @c True if the 'substanceUnits' attribute of this Model is
8728        set, @c False otherwise.
8729
8730        @note The 'substanceUnits' attribute is available in
8731        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8732
8733        """
8734        return _libsbml.Model_isSetSubstanceUnits(self)
8735
8736    def isSetTimeUnits(self):
8737        r"""
8738        isSetTimeUnits(Model self) -> bool
8739
8740        Predicate returning @c True if this
8741        Model's 'timeUnits' attribute is set.
8742
8743        @return @c True if the 'timeUnits' attribute of this Model is
8744        set, @c False otherwise.
8745
8746        @note The 'substanceUnits' attribute is available in
8747        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8748
8749        """
8750        return _libsbml.Model_isSetTimeUnits(self)
8751
8752    def isSetVolumeUnits(self):
8753        r"""
8754        isSetVolumeUnits(Model self) -> bool
8755
8756        Predicate returning @c True if this
8757        Model's 'volumeUnits' attribute is set.
8758
8759        @return @c True if the 'volumeUnits' attribute of this Model is
8760        set, @c False otherwise.
8761
8762        @note The 'volumeUnits' attribute is available in
8763        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8764
8765        """
8766        return _libsbml.Model_isSetVolumeUnits(self)
8767
8768    def isSetAreaUnits(self):
8769        r"""
8770        isSetAreaUnits(Model self) -> bool
8771
8772        Predicate returning @c True if this
8773        Model's 'areaUnits' attribute is set.
8774
8775        @return @c True if the 'areaUnits' attribute of this Model is
8776        set, @c False otherwise.
8777
8778        @note The 'areaUnits' attribute is available in
8779        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8780
8781        """
8782        return _libsbml.Model_isSetAreaUnits(self)
8783
8784    def isSetLengthUnits(self):
8785        r"""
8786        isSetLengthUnits(Model self) -> bool
8787
8788        Predicate returning @c True if this
8789        Model's 'lengthUnits' attribute is set.
8790
8791        @return @c True if the 'lengthUnits' attribute of this Model is
8792        set, @c False otherwise.
8793
8794        @note The 'lengthUnits' attribute is available in
8795        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8796
8797        """
8798        return _libsbml.Model_isSetLengthUnits(self)
8799
8800    def isSetExtentUnits(self):
8801        r"""
8802        isSetExtentUnits(Model self) -> bool
8803
8804        Predicate returning @c True if this
8805        Model's 'extentUnits' attribute is set.
8806
8807        @return @c True if the 'extentUnits' attribute of this Model is
8808        set, @c False otherwise.
8809
8810        @note The 'extentUnits' attribute is available in
8811        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8812
8813        """
8814        return _libsbml.Model_isSetExtentUnits(self)
8815
8816    def isSetConversionFactor(self):
8817        r"""
8818        isSetConversionFactor(Model self) -> bool
8819
8820        Predicate returning @c True if this
8821        Model's 'conversionFactor' attribute is set.
8822
8823        @return @c True if the 'conversionFactor' attribute of this Model is
8824        set, @c False otherwise.
8825
8826        @note The 'conversionFactor' attribute is available in
8827        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8828
8829        """
8830        return _libsbml.Model_isSetConversionFactor(self)
8831
8832    def setId(self, sid):
8833        r"""
8834        setId(Model self, string sid) -> int
8835
8836        Sets the value of the 'id' attribute of this Model.
8837
8838        @par
8839        The string @p sid is copied.
8840
8841        @par
8842        The identifier given by an object's 'id' attribute value
8843        is used to identify the object within the SBML model definition.
8844        Other objects can refer to the component using this identifier.  The
8845        data type of 'id' is always <code>SId</code> or a type derived
8846        from that, such as <code>UnitSId</code>, depending on the object in
8847        question.  All data types are defined as follows:
8848        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
8849        letter ::= 'a'..'z','A'..'Z'
8850        digit  ::= '0'..'9'
8851        idChar ::= letter | digit | '_'
8852        SId    ::= ( letter | '_' ) idChar*
8853        </pre>
8854        The characters <code>(</code> and <code>)</code> are used for grouping,
8855        the character <code>*</code> 'zero or more times', and the character
8856        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
8857        is determined by an exact character sequence match; i.e., comparisons must
8858        be performed in a case-sensitive manner.  This applies to all uses of
8859        <code>SId</code>, <code>SIdRef</code>, and derived types.
8860
8861        Users need to be aware of some important API issues that are the result of
8862        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
8863        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
8864        of SBML objects.  To simplify the work of programmers, libSBML's API
8865        provided get, set, check, and unset on the SBase object class itself
8866        instead of on individual subobject classes. This made the
8867        get/set/etc. methods uniformly available on all objects in the libSBML
8868        API.  LibSBML simply returned empty strings or otherwise did not act when
8869        the methods were applied to SBML objects that were not defined by the SBML
8870        specification to have 'id' or 'name' attributes.  Additional complications
8871        arose with the rule and assignment objects: InitialAssignment,
8872        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
8873        the rule object hierarchy was different, and in addition, then as now,
8874        they possess different attributes: 'variable' (for the rules and event
8875        assignments), 'symbol' (for initial assignments), or neither (for
8876        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
8877        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
8878
8879        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
8880        Version&nbsp;2, it became necessary to introduce a new way to interact
8881        with the attributes more consistently in libSBML to avoid breaking
8882        backward compatibility in the behavior of the original 'id' methods.  For
8883        this reason, libSBML provides four functions (getIdAttribute(),
8884        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
8885        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
8886        from SBase, regardless of the object's type.  <strong>These new methods
8887        should be used instead of the older getId()/setId()/etc. methods</strong>
8888        unless the old behavior is somehow necessary.  Regardless of the Level and
8889        Version of the SBML, these functions allow client applications to use more
8890        generalized code in some situations (for instance, when manipulating
8891        objects that are all known to have identifiers).  If the object in
8892        question does not posess an 'id' attribute according to the SBML
8893        specification for the Level and Version in use, libSBML will not allow the
8894        identifier to be set, nor will it read or write 'id' attributes for those
8895        objects.
8896
8897        @param sid the string to use as the identifier of this object.
8898
8899        @return integer value indicating success/failure of the
8900        function.  @if clike The value is drawn from the
8901        enumeration #OperationReturnValues_t. @endif@~ The possible values
8902        returned by this function are:
8903        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
8904        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
8905        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
8906
8907        @see getIdAttribute()
8908        @see setIdAttribute()
8909        @see isSetIdAttribute()
8910        @see unsetIdAttribute()
8911
8912        """
8913        return _libsbml.Model_setId(self, sid)
8914
8915    def setName(self, name):
8916        r"""
8917        setName(Model self, string name) -> int
8918
8919        Sets the value of the 'name' attribute of this Model.
8920
8921        @par
8922
8923        The string in @p name is copied.
8924
8925        @param name the new name for the SBML object.
8926
8927        @return integer value indicating success/failure of the
8928        function.  @if clike The value is drawn from the
8929        enumeration #OperationReturnValues_t. @endif@~ The possible values
8930        returned by this function are:
8931        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
8932        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
8933
8934        """
8935        return _libsbml.Model_setName(self, name)
8936
8937    def setSubstanceUnits(self, units):
8938        r"""
8939        setSubstanceUnits(Model self, string units) -> int
8940
8941        Sets the value of the 'substanceUnits' attribute of this Model.
8942
8943        The string in @p units is copied.
8944
8945        @param units the new substanceUnits for the Model.
8946
8947        @return integer value indicating success/failure of the
8948        function.  @if clike The value is drawn from the
8949        enumeration #OperationReturnValues_t. @endif@~ The possible values
8950        returned by this function are:
8951        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
8952        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
8953        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
8954
8955        @note The 'substanceUnits' attribute is available in
8956        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8957
8958        """
8959        return _libsbml.Model_setSubstanceUnits(self, units)
8960
8961    def setTimeUnits(self, units):
8962        r"""
8963        setTimeUnits(Model self, string units) -> int
8964
8965        Sets the value of the 'timeUnits' attribute of this Model.
8966
8967        The string in @p units is copied.
8968
8969        @param units the new timeUnits for the Model.
8970
8971        @return integer value indicating success/failure of the
8972        function.  @if clike The value is drawn from the
8973        enumeration #OperationReturnValues_t. @endif@~ The possible values
8974        returned by this function are:
8975        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
8976        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
8977        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
8978
8979        @note The 'timeUnits' attribute is available in
8980        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
8981
8982        """
8983        return _libsbml.Model_setTimeUnits(self, units)
8984
8985    def setVolumeUnits(self, units):
8986        r"""
8987        setVolumeUnits(Model self, string units) -> int
8988
8989        Sets the value of the 'volumeUnits' attribute of this Model.
8990
8991        The string in @p units is copied.
8992
8993        @param units the new volumeUnits for the Model.
8994
8995        @return integer value indicating success/failure of the
8996        function.  @if clike The value is drawn from the
8997        enumeration #OperationReturnValues_t. @endif@~ The possible values
8998        returned by this function are:
8999        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9000        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9001        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
9002
9003        @note The 'volumeUnits' attribute is available in
9004        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9005
9006        """
9007        return _libsbml.Model_setVolumeUnits(self, units)
9008
9009    def setAreaUnits(self, units):
9010        r"""
9011        setAreaUnits(Model self, string units) -> int
9012
9013        Sets the value of the 'areaUnits' attribute of this Model.
9014
9015        The string in @p units is copied.
9016
9017        @param units the new areaUnits for the Model.
9018
9019        @return integer value indicating success/failure of the
9020        function.  @if clike The value is drawn from the
9021        enumeration #OperationReturnValues_t. @endif@~ The possible values
9022        returned by this function are:
9023        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9024        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9025        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
9026
9027        @note The 'areaUnits' attribute is available in
9028        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9029
9030        """
9031        return _libsbml.Model_setAreaUnits(self, units)
9032
9033    def setLengthUnits(self, units):
9034        r"""
9035        setLengthUnits(Model self, string units) -> int
9036
9037        Sets the value of the 'lengthUnits' attribute of this Model.
9038
9039        The string in @p units is copied.
9040
9041        @param units the new lengthUnits for the Model.
9042
9043        @return integer value indicating success/failure of the
9044        function.  @if clike The value is drawn from the
9045        enumeration #OperationReturnValues_t. @endif@~ The possible values
9046        returned by this function are:
9047        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9048        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9049        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
9050
9051        @note The 'lengthUnits' attribute is available in
9052        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9053
9054        """
9055        return _libsbml.Model_setLengthUnits(self, units)
9056
9057    def setExtentUnits(self, units):
9058        r"""
9059        setExtentUnits(Model self, string units) -> int
9060
9061        Sets the value of the 'extentUnits' attribute of this Model.
9062
9063        The string in @p units is copied.
9064
9065        @param units the new extentUnits for the Model.
9066
9067        @return integer value indicating success/failure of the
9068        function.  @if clike The value is drawn from the
9069        enumeration #OperationReturnValues_t. @endif@~ The possible values
9070        returned by this function are:
9071        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9072        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9073        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
9074
9075        @note The 'extentUnits' attribute is available in
9076        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9077
9078        """
9079        return _libsbml.Model_setExtentUnits(self, units)
9080
9081    def setConversionFactor(self, units):
9082        r"""
9083        setConversionFactor(Model self, string units) -> int
9084
9085        Sets the value of the 'conversionFactor' attribute of this Model.
9086
9087        The string in @p units is copied.
9088
9089        @param units the new conversionFactor for the Model.
9090
9091        @return integer value indicating success/failure of the
9092        function.  @if clike The value is drawn from the
9093        enumeration #OperationReturnValues_t. @endif@~ The possible values
9094        returned by this function are:
9095        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9096        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9097        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
9098
9099        @note The 'conversionFactor' attribute is available in
9100        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9101
9102        """
9103        return _libsbml.Model_setConversionFactor(self, units)
9104
9105    def unsetId(self):
9106        r"""
9107        unsetId(Model self) -> int
9108
9109        Unsets the value of the 'id' attribute of this Model.
9110
9111        @par
9112        The identifier given by an object's 'id' attribute value
9113        is used to identify the object within the SBML model definition.
9114        Other objects can refer to the component using this identifier.  The
9115        data type of 'id' is always <code>SId</code> or a type derived
9116        from that, such as <code>UnitSId</code>, depending on the object in
9117        question.  All data types are defined as follows:
9118        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
9119        letter ::= 'a'..'z','A'..'Z'
9120        digit  ::= '0'..'9'
9121        idChar ::= letter | digit | '_'
9122        SId    ::= ( letter | '_' ) idChar*
9123        </pre>
9124        The characters <code>(</code> and <code>)</code> are used for grouping,
9125        the character <code>*</code> 'zero or more times', and the character
9126        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
9127        is determined by an exact character sequence match; i.e., comparisons must
9128        be performed in a case-sensitive manner.  This applies to all uses of
9129        <code>SId</code>, <code>SIdRef</code>, and derived types.
9130
9131        Users need to be aware of some important API issues that are the result of
9132        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
9133        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
9134        of SBML objects.  To simplify the work of programmers, libSBML's API
9135        provided get, set, check, and unset on the SBase object class itself
9136        instead of on individual subobject classes. This made the
9137        get/set/etc. methods uniformly available on all objects in the libSBML
9138        API.  LibSBML simply returned empty strings or otherwise did not act when
9139        the methods were applied to SBML objects that were not defined by the SBML
9140        specification to have 'id' or 'name' attributes.  Additional complications
9141        arose with the rule and assignment objects: InitialAssignment,
9142        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
9143        the rule object hierarchy was different, and in addition, then as now,
9144        they possess different attributes: 'variable' (for the rules and event
9145        assignments), 'symbol' (for initial assignments), or neither (for
9146        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
9147        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
9148
9149        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
9150        Version&nbsp;2, it became necessary to introduce a new way to interact
9151        with the attributes more consistently in libSBML to avoid breaking
9152        backward compatibility in the behavior of the original 'id' methods.  For
9153        this reason, libSBML provides four functions (getIdAttribute(),
9154        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
9155        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
9156        from SBase, regardless of the object's type.  <strong>These new methods
9157        should be used instead of the older getId()/setId()/etc. methods</strong>
9158        unless the old behavior is somehow necessary.  Regardless of the Level and
9159        Version of the SBML, these functions allow client applications to use more
9160        generalized code in some situations (for instance, when manipulating
9161        objects that are all known to have identifiers).  If the object in
9162        question does not posess an 'id' attribute according to the SBML
9163        specification for the Level and Version in use, libSBML will not allow the
9164        identifier to be set, nor will it read or write 'id' attributes for those
9165        objects.
9166
9167        @return integer value indicating success/failure of the
9168        function.  @if clike The value is drawn from the
9169        enumeration #OperationReturnValues_t. @endif@~ The possible values
9170        returned by this function are:
9171        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9172        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9173
9174        @see getIdAttribute()
9175        @see setIdAttribute()
9176        @see isSetIdAttribute()
9177        @see unsetIdAttribute()
9178
9179        """
9180        return _libsbml.Model_unsetId(self)
9181
9182    def unsetName(self):
9183        r"""
9184        unsetName(Model self) -> int
9185
9186        Unsets the value of the 'name' attribute of this Model.
9187
9188        @par
9189        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
9190        moved to SBase directly, instead of being defined individually for many
9191        (but not all) objects.  LibSBML has for a long time provided functions
9192        defined on SBase itself to get, set, and unset those attributes, which
9193        would fail or otherwise return empty strings if executed on any object
9194        for which those attributes were not defined.  Now that all SBase objects
9195        define those attributes, those functions now succeed for any object with
9196        the appropriate level and version.
9197
9198        The 'name' attribute is
9199        optional and is not intended to be used for cross-referencing purposes
9200        within a model.  Its purpose instead is to provide a human-readable
9201        label for the component.  The data type of 'name' is the type
9202        <code>string</code> defined in XML Schema.  SBML imposes no
9203        restrictions as to the content of 'name' attributes beyond those
9204        restrictions defined by the <code>string</code> type in XML Schema.
9205
9206        The recommended practice for handling 'name' is as follows.  If a
9207        software tool has the capability for displaying the content of 'name'
9208        attributes, it should display this content to the user as a
9209        component's label instead of the component's 'id'.  If the user
9210        interface does not have this capability (e.g., because it cannot
9211        display or use special characters in symbol names), or if the 'name'
9212        attribute is missing on a given component, then the user interface
9213        should display the value of the 'id' attribute instead.  (Script
9214        language interpreters are especially likely to display 'id' instead of
9215        'name'.)
9216
9217        As a consequence of the above, authors of systems that automatically
9218        generate the values of 'id' attributes should be aware some systems
9219        may display the 'id''s to the user.  Authors therefore may wish to
9220        take some care to have their software create 'id' values that are: (a)
9221        reasonably easy for humans to type and read; and (b) likely to be
9222        meaningful, for example by making the 'id' attribute be an abbreviated
9223        form of the name attribute value.
9224
9225        An additional point worth mentioning is although there are
9226        restrictions on the uniqueness of 'id' values, there are no
9227        restrictions on the uniqueness of 'name' values in a model.  This
9228        allows software applications leeway in assigning component identifiers.
9229
9230        Regardless of the level and version of the SBML, these functions allow
9231        client applications to use more generalized code in some situations
9232        (for instance, when manipulating objects that are all known to have
9233        names).  If the object in question does not posess a 'name' attribute
9234        according to the SBML specification for the Level and Version in use,
9235        libSBML will not allow the name to be set, nor will it read or
9236        write 'name' attributes for those objects.
9237
9238        @return integer value indicating success/failure of the
9239        function.  @if clike The value is drawn from the
9240        enumeration #OperationReturnValues_t. @endif@~ The possible values
9241        returned by this function are:
9242        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9243        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9244
9245        @see getName()
9246        @see setName()
9247        @see isSetName()
9248
9249        """
9250        return _libsbml.Model_unsetName(self)
9251
9252    def unsetSubstanceUnits(self):
9253        r"""
9254        unsetSubstanceUnits(Model self) -> int
9255
9256        Unsets the value of the 'substanceUnits' attribute of this Model.
9257
9258        @return integer value indicating success/failure of the
9259        function.  @if clike The value is drawn from the
9260        enumeration #OperationReturnValues_t. @endif@~ The possible values
9261        returned by this function are:
9262        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9263        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9264
9265        @note The 'substanceUnits' attribute is available in
9266        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9267
9268        """
9269        return _libsbml.Model_unsetSubstanceUnits(self)
9270
9271    def unsetTimeUnits(self):
9272        r"""
9273        unsetTimeUnits(Model self) -> int
9274
9275        Unsets the value of the 'timeUnits' attribute of this Model.
9276
9277        @return integer value indicating success/failure of the
9278        function.  @if clike The value is drawn from the
9279        enumeration #OperationReturnValues_t. @endif@~ The possible values
9280        returned by this function are:
9281        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9282        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9283
9284        @note The 'timeUnits' attribute is available in
9285        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9286
9287        """
9288        return _libsbml.Model_unsetTimeUnits(self)
9289
9290    def unsetVolumeUnits(self):
9291        r"""
9292        unsetVolumeUnits(Model self) -> int
9293
9294        Unsets the value of the 'volumeUnits' attribute of this Model.
9295
9296        @return integer value indicating success/failure of the
9297        function.  @if clike The value is drawn from the
9298        enumeration #OperationReturnValues_t. @endif@~ The possible values
9299        returned by this function are:
9300        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9301        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9302
9303        @note The 'volumeUnits' attribute is available in
9304        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9305
9306        """
9307        return _libsbml.Model_unsetVolumeUnits(self)
9308
9309    def unsetAreaUnits(self):
9310        r"""
9311        unsetAreaUnits(Model self) -> int
9312
9313        Unsets the value of the 'areaUnits' attribute of this Model.
9314
9315        @return integer value indicating success/failure of the
9316        function.  @if clike The value is drawn from the
9317        enumeration #OperationReturnValues_t. @endif@~ The possible values
9318        returned by this function are:
9319        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9320        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9321        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9322
9323        @note The 'areaUnits' attribute is available in
9324        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9325
9326        """
9327        return _libsbml.Model_unsetAreaUnits(self)
9328
9329    def unsetLengthUnits(self):
9330        r"""
9331        unsetLengthUnits(Model self) -> int
9332
9333        Unsets the value of the 'lengthUnits' attribute of this Model.
9334
9335        @return integer value indicating success/failure of the
9336        function.  @if clike The value is drawn from the
9337        enumeration #OperationReturnValues_t. @endif@~ The possible values
9338        returned by this function are:
9339        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9340        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9341        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9342
9343        @note The 'lengthUnits' attribute is available in
9344        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9345
9346        """
9347        return _libsbml.Model_unsetLengthUnits(self)
9348
9349    def unsetExtentUnits(self):
9350        r"""
9351        unsetExtentUnits(Model self) -> int
9352
9353        Unsets the value of the 'extentUnits' attribute of this Model.
9354
9355        @return integer value indicating success/failure of the
9356        function.  @if clike The value is drawn from the
9357        enumeration #OperationReturnValues_t. @endif@~ The possible values
9358        returned by this function are:
9359        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9360        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9361        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9362
9363        @note The 'extentUnits' attribute is available in
9364        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9365
9366        """
9367        return _libsbml.Model_unsetExtentUnits(self)
9368
9369    def unsetConversionFactor(self):
9370        r"""
9371        unsetConversionFactor(Model self) -> int
9372
9373        Unsets the value of the 'conversionFactor' attribute of this Model.
9374
9375        @return integer value indicating success/failure of the
9376        function.  @if clike The value is drawn from the
9377        enumeration #OperationReturnValues_t. @endif@~ The possible values
9378        returned by this function are:
9379        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9380        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
9381        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9382
9383        @note The 'conversionFactor' attribute is available in
9384        SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
9385
9386        """
9387        return _libsbml.Model_unsetConversionFactor(self)
9388
9389    def addFunctionDefinition(self, fd):
9390        r"""
9391        addFunctionDefinition(Model self, FunctionDefinition fd) -> int
9392
9393        Adds a copy of the given FunctionDefinition object to this Model.
9394
9395        @param fd the FunctionDefinition to add.
9396
9397        @return integer value indicating success/failure of the
9398        function.  @if clike The value is drawn from the
9399        enumeration #OperationReturnValues_t. @endif@~ The possible values
9400        returned by this function are:
9401        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9402        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9403        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9404        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9405        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9406        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9407
9408        @note This method should be used with some caution.  The fact that this
9409        method @em copies the object passed to it means that the caller will be
9410        left holding a physically different object instance than the one contained
9411        inside this object.  Changes made to the original object instance (such as
9412        resetting attribute values) will <em>not affect the instance in this
9413        object</em>.  In addition, the caller should make sure to free the
9414        original object if it is no longer being used, or else a memory leak will
9415        result.  Please see other methods on this class (particularly a
9416        corresponding method whose name begins with the word <code>create</code>)
9417        for alternatives that do not lead to these issues.
9418
9419        @see createFunctionDefinition()
9420
9421        """
9422        return _libsbml.Model_addFunctionDefinition(self, fd)
9423
9424    def addUnitDefinition(self, ud):
9425        r"""
9426        addUnitDefinition(Model self, UnitDefinition ud) -> int
9427
9428        Adds a copy of the given UnitDefinition object to this Model.
9429
9430        @param ud the UnitDefinition object to add.
9431
9432        @return integer value indicating success/failure of the
9433        function.  @if clike The value is drawn from the
9434        enumeration #OperationReturnValues_t. @endif@~ The possible values
9435        returned by this function are:
9436        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9437        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9438        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9439        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9440        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9441        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9442
9443        @note This method should be used with some caution.  The fact that this
9444        method @em copies the object passed to it means that the caller will be
9445        left holding a physically different object instance than the one contained
9446        inside this object.  Changes made to the original object instance (such as
9447        resetting attribute values) will <em>not affect the instance in this
9448        object</em>.  In addition, the caller should make sure to free the
9449        original object if it is no longer being used, or else a memory leak will
9450        result.  Please see other methods on this class (particularly a
9451        corresponding method whose name begins with the word <code>create</code>)
9452        for alternatives that do not lead to these issues.
9453
9454        @see createUnitDefinition()
9455
9456        """
9457        return _libsbml.Model_addUnitDefinition(self, ud)
9458
9459    def addCompartmentType(self, ct):
9460        r"""
9461        addCompartmentType(Model self, CompartmentType ct) -> int
9462
9463        Adds a copy of the given CompartmentType object to this Model.
9464
9465        @param ct the CompartmentType object to add.
9466
9467        @return integer value indicating success/failure of the
9468        function.  @if clike The value is drawn from the
9469        enumeration #OperationReturnValues_t. @endif@~ The possible values
9470        returned by this function are:
9471        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9472        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9473        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9474        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9475        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9476        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9477
9478        @note This method should be used with some caution.  The fact that this
9479        method @em copies the object passed to it means that the caller will be
9480        left holding a physically different object instance than the one contained
9481        inside this object.  Changes made to the original object instance (such as
9482        resetting attribute values) will <em>not affect the instance in this
9483        object</em>.  In addition, the caller should make sure to free the
9484        original object if it is no longer being used, or else a memory leak will
9485        result.  Please see other methods on this class (particularly a
9486        corresponding method whose name begins with the word <code>create</code>)
9487        for alternatives that do not lead to these issues.
9488
9489        @note The CompartmentType object class is only available in SBML
9490        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
9491        Level&nbsp;1 nor Level&nbsp;3.
9492
9493        @see createCompartmentType()
9494
9495        """
9496        return _libsbml.Model_addCompartmentType(self, ct)
9497
9498    def addSpeciesType(self, st):
9499        r"""
9500        addSpeciesType(Model self, SpeciesType st) -> int
9501
9502        Adds a copy of the given SpeciesType object to this Model.
9503
9504        @param st the SpeciesType object to add.
9505
9506        @return integer value indicating success/failure of the
9507        function.  @if clike The value is drawn from the
9508        enumeration #OperationReturnValues_t. @endif@~ The possible values
9509        returned by this function are:
9510        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9511        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9512        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9513        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9514        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9515        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9516
9517        @note This method should be used with some caution.  The fact that this
9518        method @em copies the object passed to it means that the caller will be
9519        left holding a physically different object instance than the one contained
9520        inside this object.  Changes made to the original object instance (such as
9521        resetting attribute values) will <em>not affect the instance in this
9522        object</em>.  In addition, the caller should make sure to free the
9523        original object if it is no longer being used, or else a memory leak will
9524        result.  Please see other methods on this class (particularly a
9525        corresponding method whose name begins with the word <code>create</code>)
9526        for alternatives that do not lead to these issues.
9527
9528        @note The SpeciesType object class is only available in SBML
9529        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
9530        Level&nbsp;1 nor Level&nbsp;3.
9531
9532        @see createSpeciesType()
9533
9534        """
9535        return _libsbml.Model_addSpeciesType(self, st)
9536
9537    def addCompartment(self, c):
9538        r"""
9539        addCompartment(Model self, Compartment c) -> int
9540
9541        Adds a copy of the given Compartment object to this Model.
9542
9543        @param c the Compartment object to add.
9544
9545        @return integer value indicating success/failure of the
9546        function.  @if clike The value is drawn from the
9547        enumeration #OperationReturnValues_t. @endif@~ The possible values
9548        returned by this function are:
9549        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9550        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9551        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9552        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9553        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9554        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9555
9556        @note This method should be used with some caution.  The fact that this
9557        method @em copies the object passed to it means that the caller will be
9558        left holding a physically different object instance than the one contained
9559        inside this object.  Changes made to the original object instance (such as
9560        resetting attribute values) will <em>not affect the instance in this
9561        object</em>.  In addition, the caller should make sure to free the
9562        original object if it is no longer being used, or else a memory leak will
9563        result.  Please see other methods on this class (particularly a
9564        corresponding method whose name begins with the word <code>create</code>)
9565        for alternatives that do not lead to these issues.
9566
9567        @see createCompartment()
9568
9569        """
9570        return _libsbml.Model_addCompartment(self, c)
9571
9572    def addSpecies(self, s):
9573        r"""
9574        addSpecies(Model self, Species s) -> int
9575
9576        Adds a copy of the given Species object to this Model.
9577
9578        @param s the Species object to add.
9579
9580        @return integer value indicating success/failure of the
9581        function.  @if clike The value is drawn from the
9582        enumeration #OperationReturnValues_t. @endif@~ The possible values
9583        returned by this function are:
9584        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9585        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9586        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9587        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9588        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9589        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9590
9591        @note This method should be used with some caution.  The fact that this
9592        method @em copies the object passed to it means that the caller will be
9593        left holding a physically different object instance than the one contained
9594        inside this object.  Changes made to the original object instance (such as
9595        resetting attribute values) will <em>not affect the instance in this
9596        object</em>.  In addition, the caller should make sure to free the
9597        original object if it is no longer being used, or else a memory leak will
9598        result.  Please see other methods on this class (particularly a
9599        corresponding method whose name begins with the word <code>create</code>)
9600        for alternatives that do not lead to these issues.
9601
9602        @see createSpecies()
9603
9604        """
9605        return _libsbml.Model_addSpecies(self, s)
9606
9607    def addParameter(self, p):
9608        r"""
9609        addParameter(Model self, Parameter p) -> int
9610
9611        Adds a copy of the given Parameter object to this Model.
9612
9613        @param p the Parameter object to add.
9614
9615        @return integer value indicating success/failure of the
9616        function.  @if clike The value is drawn from the
9617        enumeration #OperationReturnValues_t. @endif@~ The possible values
9618        returned by this function are:
9619        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9620        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9621        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9622        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9623        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9624        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9625
9626        @note This method should be used with some caution.  The fact that this
9627        method @em copies the object passed to it means that the caller will be
9628        left holding a physically different object instance than the one contained
9629        inside this object.  Changes made to the original object instance (such as
9630        resetting attribute values) will <em>not affect the instance in this
9631        object</em>.  In addition, the caller should make sure to free the
9632        original object if it is no longer being used, or else a memory leak will
9633        result.  Please see other methods on this class (particularly a
9634        corresponding method whose name begins with the word <code>create</code>)
9635        for alternatives that do not lead to these issues.
9636
9637        @see createParameter()
9638
9639        """
9640        return _libsbml.Model_addParameter(self, p)
9641
9642    def addInitialAssignment(self, ia):
9643        r"""
9644        addInitialAssignment(Model self, InitialAssignment ia) -> int
9645
9646        Adds a copy of the given InitialAssignment object to this Model.
9647
9648        @param ia the InitialAssignment object to add.
9649
9650        @return integer value indicating success/failure of the
9651        function.  @if clike The value is drawn from the
9652        enumeration #OperationReturnValues_t. @endif@~ The possible values
9653        returned by this function are:
9654        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9655        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9656        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9657        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9658        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9659        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9660
9661        @note This method should be used with some caution.  The fact that this
9662        method @em copies the object passed to it means that the caller will be
9663        left holding a physically different object instance than the one contained
9664        inside this object.  Changes made to the original object instance (such as
9665        resetting attribute values) will <em>not affect the instance in this
9666        object</em>.  In addition, the caller should make sure to free the
9667        original object if it is no longer being used, or else a memory leak will
9668        result.  Please see other methods on this class (particularly a
9669        corresponding method whose name begins with the word <code>create</code>)
9670        for alternatives that do not lead to these issues.
9671
9672        @see createInitialAssignment()
9673
9674        """
9675        return _libsbml.Model_addInitialAssignment(self, ia)
9676
9677    def addRule(self, r):
9678        r"""
9679        addRule(Model self, Rule r) -> int
9680
9681        Adds a copy of the given Rule object to this Model.
9682
9683        @param r the Rule object to add.
9684
9685        @return integer value indicating success/failure of the
9686        function.  @if clike The value is drawn from the
9687        enumeration #OperationReturnValues_t. @endif@~ The possible values
9688        returned by this function are:
9689        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9690        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9691        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9692        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9693        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9694        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9695
9696        @note This method should be used with some caution.  The fact that this
9697        method @em copies the object passed to it means that the caller will be
9698        left holding a physically different object instance than the one contained
9699        inside this object.  Changes made to the original object instance (such as
9700        resetting attribute values) will <em>not affect the instance in this
9701        object</em>.  In addition, the caller should make sure to free the
9702        original object if it is no longer being used, or else a memory leak will
9703        result.  Please see other methods on this class (particularly a
9704        corresponding method whose name begins with the word <code>create</code>)
9705        for alternatives that do not lead to these issues.
9706
9707        @see createAlgebraicRule()
9708        @see createAssignmentRule()
9709        @see createRateRule()
9710
9711        """
9712        return _libsbml.Model_addRule(self, r)
9713
9714    def addConstraint(self, c):
9715        r"""
9716        addConstraint(Model self, Constraint c) -> int
9717
9718        Adds a copy of the given Constraint object to this Model.
9719
9720        @param c the Constraint object to add.
9721
9722        @return integer value indicating success/failure of the
9723        function.  @if clike The value is drawn from the
9724        enumeration #OperationReturnValues_t. @endif@~ The possible values
9725        returned by this function are:
9726        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9727        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9728        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9729        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9730        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9731
9732        @note This method should be used with some caution.  The fact that this
9733        method @em copies the object passed to it means that the caller will be
9734        left holding a physically different object instance than the one contained
9735        inside this object.  Changes made to the original object instance (such as
9736        resetting attribute values) will <em>not affect the instance in this
9737        object</em>.  In addition, the caller should make sure to free the
9738        original object if it is no longer being used, or else a memory leak will
9739        result.  Please see other methods on this class (particularly a
9740        corresponding method whose name begins with the word <code>create</code>)
9741        for alternatives that do not lead to these issues.
9742
9743        @see createConstraint()
9744
9745        """
9746        return _libsbml.Model_addConstraint(self, c)
9747
9748    def addReaction(self, r):
9749        r"""
9750        addReaction(Model self, Reaction r) -> int
9751
9752        Adds a copy of the given Reaction object to this Model.
9753
9754        @param r the Reaction object to add.
9755
9756        @return integer value indicating success/failure of the
9757        function.  @if clike The value is drawn from the
9758        enumeration #OperationReturnValues_t. @endif@~ The possible values
9759        returned by this function are:
9760        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9761        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9762        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9763        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9764        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9765        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9766
9767        @note This method should be used with some caution.  The fact that this
9768        method @em copies the object passed to it means that the caller will be
9769        left holding a physically different object instance than the one contained
9770        inside this object.  Changes made to the original object instance (such as
9771        resetting attribute values) will <em>not affect the instance in this
9772        object</em>.  In addition, the caller should make sure to free the
9773        original object if it is no longer being used, or else a memory leak will
9774        result.  Please see other methods on this class (particularly a
9775        corresponding method whose name begins with the word <code>create</code>)
9776        for alternatives that do not lead to these issues.
9777
9778        @see createReaction()
9779
9780        """
9781        return _libsbml.Model_addReaction(self, r)
9782
9783    def addEvent(self, e):
9784        r"""
9785        addEvent(Model self, Event e) -> int
9786
9787        Adds a copy of the given Event object to this Model.
9788
9789        @param e the Event object to add.
9790
9791        @return integer value indicating success/failure of the
9792        function.  @if clike The value is drawn from the
9793        enumeration #OperationReturnValues_t. @endif@~ The possible values
9794        returned by this function are:
9795        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
9796        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
9797        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
9798        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
9799        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
9800        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
9801
9802        @note This method should be used with some caution.  The fact that this
9803        method @em copies the object passed to it means that the caller will be
9804        left holding a physically different object instance than the one contained
9805        inside this object.  Changes made to the original object instance (such as
9806        resetting attribute values) will <em>not affect the instance in this
9807        object</em>.  In addition, the caller should make sure to free the
9808        original object if it is no longer being used, or else a memory leak will
9809        result.  Please see other methods on this class (particularly a
9810        corresponding method whose name begins with the word <code>create</code>)
9811        for alternatives that do not lead to these issues.
9812
9813        @see createEvent()
9814
9815        """
9816        return _libsbml.Model_addEvent(self, e)
9817
9818    def createFunctionDefinition(self):
9819        r"""
9820        createFunctionDefinition(Model self) -> FunctionDefinition
9821
9822        Creates a new FunctionDefinition inside this Model and returns it.
9823
9824        The SBML Level and Version of the enclosing Model object, as well as
9825        any SBML package namespaces, are used to initialize this
9826        object's corresponding attributes.
9827
9828        @return the FunctionDefinition object created.
9829
9830        @see addFunctionDefinition()
9831
9832        """
9833        return _libsbml.Model_createFunctionDefinition(self)
9834
9835    def createUnitDefinition(self):
9836        r"""
9837        createUnitDefinition(Model self) -> UnitDefinition
9838
9839        Creates a new UnitDefinition inside this Model and returns it.
9840
9841        The SBML Level and Version of the enclosing Model object, as well as
9842        any SBML package namespaces, are used to initialize this
9843        object's corresponding attributes.
9844
9845        @return the UnitDefinition object created.
9846
9847        @see addUnitDefinition()
9848
9849        """
9850        return _libsbml.Model_createUnitDefinition(self)
9851
9852    def createUnit(self):
9853        r"""
9854        createUnit(Model self) -> Unit
9855
9856        Creates a new Unit object within the last UnitDefinition object
9857        created in this model and returns a pointer to it.
9858
9859        The SBML Level and Version of the enclosing Model object, as well as
9860        any SBML package namespaces, are used to initialize this
9861        object's corresponding attributes.
9862
9863        The mechanism by which the UnitDefinition was created is not
9864        significant.  If a UnitDefinition object does not exist in this model,
9865        a new Unit is @em not created and @c None is returned instead.
9866
9867        @return the Unit object created.
9868
9869        @see addUnitDefinition()
9870
9871        """
9872        return _libsbml.Model_createUnit(self)
9873
9874    def createCompartmentType(self):
9875        r"""
9876        createCompartmentType(Model self) -> CompartmentType
9877
9878        Creates a new CompartmentType inside this Model and returns it.
9879
9880        The SBML Level and Version of the enclosing Model object, as well as
9881        any SBML package namespaces, are used to initialize this
9882        object's corresponding attributes.
9883
9884        @return the CompartmentType object created.
9885
9886        @note The CompartmentType object class is only available in SBML
9887        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
9888        Level&nbsp;1 nor Level&nbsp;3.
9889
9890        @see addCompartmentType()
9891
9892        """
9893        return _libsbml.Model_createCompartmentType(self)
9894
9895    def createSpeciesType(self):
9896        r"""
9897        createSpeciesType(Model self) -> SpeciesType
9898
9899        Creates a new SpeciesType inside this Model and returns it.
9900
9901        The SBML Level and Version of the enclosing Model object, as well as
9902        any SBML package namespaces, are used to initialize this
9903        object's corresponding attributes.
9904
9905        @return the SpeciesType object created.
9906
9907        @note The SpeciesType object class is only available in SBML
9908        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
9909        Level&nbsp;1 nor Level&nbsp;3.
9910
9911        @see addSpeciesType()
9912
9913        """
9914        return _libsbml.Model_createSpeciesType(self)
9915
9916    def createCompartment(self):
9917        r"""
9918        createCompartment(Model self) -> Compartment
9919
9920        Creates a new Compartment inside this Model and returns it.
9921
9922        The SBML Level and Version of the enclosing Model object, as well as
9923        any SBML package namespaces, are used to initialize this
9924        object's corresponding attributes.
9925
9926        @return the Compartment object created.
9927
9928        @see addCompartment()
9929
9930        """
9931        return _libsbml.Model_createCompartment(self)
9932
9933    def createSpecies(self):
9934        r"""
9935        createSpecies(Model self) -> Species
9936
9937        Creates a new Species inside this Model and returns it.
9938
9939        The SBML Level and Version of the enclosing Model object, as well as
9940        any SBML package namespaces, are used to initialize this
9941        object's corresponding attributes.
9942
9943        @return the Species object created.
9944
9945        @see addSpecies()
9946
9947        """
9948        return _libsbml.Model_createSpecies(self)
9949
9950    def createParameter(self):
9951        r"""
9952        createParameter(Model self) -> Parameter
9953
9954        Creates a new Parameter inside this Model and returns it.
9955
9956        The SBML Level and Version of the enclosing Model object, as well as
9957        any SBML package namespaces, are used to initialize this
9958        object's corresponding attributes.
9959
9960        @return the Parameter object created.
9961
9962        @see addParameter()
9963
9964        """
9965        return _libsbml.Model_createParameter(self)
9966
9967    def createInitialAssignment(self):
9968        r"""
9969        createInitialAssignment(Model self) -> InitialAssignment
9970
9971        Creates a new InitialAssignment inside this Model and returns it.
9972
9973        The SBML Level and Version of the enclosing Model object, as well as
9974        any SBML package namespaces, are used to initialize this
9975        object's corresponding attributes.
9976
9977        @return the InitialAssignment object created.
9978
9979        @see addInitialAssignment()
9980
9981        """
9982        return _libsbml.Model_createInitialAssignment(self)
9983
9984    def createAlgebraicRule(self):
9985        r"""
9986        createAlgebraicRule(Model self) -> AlgebraicRule
9987
9988        Creates a new AlgebraicRule inside this Model and returns it.
9989
9990        The SBML Level and Version of the enclosing Model object, as well as
9991        any SBML package namespaces, are used to initialize this
9992        object's corresponding attributes.
9993
9994        @return the AlgebraicRule object created.
9995
9996        @see addRule()
9997
9998        """
9999        return _libsbml.Model_createAlgebraicRule(self)
10000
10001    def createAssignmentRule(self):
10002        r"""
10003        createAssignmentRule(Model self) -> AssignmentRule
10004
10005        Creates a new AssignmentRule inside this Model and returns it.
10006
10007        The SBML Level and Version of the enclosing Model object, as well as
10008        any SBML package namespaces, are used to initialize this
10009        object's corresponding attributes.
10010
10011        @return the AssignmentRule object created.
10012
10013        @see addRule()
10014
10015        """
10016        return _libsbml.Model_createAssignmentRule(self)
10017
10018    def createRateRule(self):
10019        r"""
10020        createRateRule(Model self) -> RateRule
10021
10022        Creates a new RateRule inside this Model and returns it.
10023
10024        The SBML Level and Version of the enclosing Model object, as well as
10025        any SBML package namespaces, are used to initialize this
10026        object's corresponding attributes.
10027
10028        @return the RateRule object created.
10029
10030        @see addRule()
10031
10032        """
10033        return _libsbml.Model_createRateRule(self)
10034
10035    def createConstraint(self):
10036        r"""
10037        createConstraint(Model self) -> Constraint
10038
10039        Creates a new Constraint inside this Model and returns it.
10040
10041        The SBML Level and Version of the enclosing Model object, as well as
10042        any SBML package namespaces, are used to initialize this
10043        object's corresponding attributes.
10044
10045        @return the Constraint object created.
10046
10047        @see addConstraint()
10048
10049        """
10050        return _libsbml.Model_createConstraint(self)
10051
10052    def createReaction(self):
10053        r"""
10054        createReaction(Model self) -> Reaction
10055
10056        Creates a new Reaction inside this Model and returns it.
10057
10058        The SBML Level and Version of the enclosing Model object, as well as
10059        any SBML package namespaces, are used to initialize this
10060        object's corresponding attributes.
10061
10062        @return the Reaction object created.
10063
10064        @see addReaction()
10065
10066        """
10067        return _libsbml.Model_createReaction(self)
10068
10069    def createReactant(self):
10070        r"""
10071        createReactant(Model self) -> SpeciesReference
10072
10073        Creates a new SpeciesReference object for a reactant inside the last
10074        Reaction object in this Model, and returns a pointer to it.
10075
10076        The SBML Level and Version of the enclosing Model object, as well as
10077        any SBML package namespaces, are used to initialize this
10078        object's corresponding attributes.
10079
10080        @par
10081        The mechanism by which the last Reaction object was created and added
10082        to this Model is not significant.  It could have been created in a
10083        variety of ways, for example using createReaction().  If a Reaction
10084        does not exist for this model, a new SpeciesReference is @em not
10085        created and @c None is returned instead.
10086
10087        @return the SpeciesReference object created.  If a Reaction does not
10088        exist for this model, a new SpeciesReference is @em not created and
10089        @c None is returned.
10090
10091        """
10092        return _libsbml.Model_createReactant(self)
10093
10094    def createProduct(self):
10095        r"""
10096        createProduct(Model self) -> SpeciesReference
10097
10098        Creates a new SpeciesReference object for a product inside the last
10099        Reaction object in this Model, and returns a pointer to it.
10100
10101        The SBML Level and Version of the enclosing Model object, as well as
10102        any SBML package namespaces, are used to initialize this
10103        object's corresponding attributes.
10104
10105        @par
10106        The mechanism by which the last Reaction object was created and added
10107        to this Model is not significant.  It could have been created in a
10108        variety of ways, for example using createReaction().  If a Reaction
10109        does not exist for this model, a new SpeciesReference is @em not
10110        created and @c None is returned instead.
10111
10112        @return the SpeciesReference object created. If a Reaction does not
10113        exist for this model, a new SpeciesReference is @em not created and
10114        @c None is returned.
10115
10116        """
10117        return _libsbml.Model_createProduct(self)
10118
10119    def createModifier(self):
10120        r"""
10121        createModifier(Model self) -> ModifierSpeciesReference
10122
10123        Creates a new ModifierSpeciesReference object for a modifier species
10124        inside the last Reaction object in this Model, and returns a pointer
10125        to it.
10126
10127        The SBML Level and Version of the enclosing Model object, as well as
10128        any SBML package namespaces, are used to initialize this
10129        object's corresponding attributes.
10130
10131        @par
10132        The mechanism by which the last Reaction object was created and added
10133        to this Model is not significant.  It could have been created in a
10134        variety of ways, for example using createReaction().  If a Reaction
10135        does not exist for this model, a new SpeciesReference is @em not
10136        created and @c None is returned instead.
10137
10138        @return the SpeciesReference object created.  If a Reaction does not
10139        exist for this model, a new SpeciesReference is @em not created and
10140        @c None is returned.
10141
10142        """
10143        return _libsbml.Model_createModifier(self)
10144
10145    def createKineticLaw(self):
10146        r"""
10147        createKineticLaw(Model self) -> KineticLaw
10148
10149        Creates a new KineticLaw inside the last Reaction object created in
10150        this Model, and returns a pointer to it.
10151
10152        The SBML Level and Version of the enclosing Model object, as well as
10153        any SBML package namespaces, are used to initialize this
10154        object's corresponding attributes.
10155
10156        @par
10157        The mechanism by which the last Reaction object was created and added
10158        to this Model is not significant.  It could have been created in a
10159        variety of ways, for example using createReaction().  If a Reaction
10160        does not exist for this model, a new SpeciesReference is @em not
10161        created and @c None is returned instead.
10162
10163        @return the KineticLaw object created.  If a Reaction does not exist for
10164        this model, or a Reaction does exist but already has a KineticLaw, a new
10165        KineticLaw is @em not created and @c None is returned.
10166
10167        """
10168        return _libsbml.Model_createKineticLaw(self)
10169
10170    def createKineticLawParameter(self):
10171        r"""
10172        createKineticLawParameter(Model self) -> Parameter
10173
10174        Creates a new local Parameter inside the KineticLaw object of the last
10175        Reaction created inside this Model, and returns a pointer to it.
10176
10177        The SBML Level and Version of the enclosing Model object, as well as
10178        any SBML package namespaces, are used to initialize this
10179        object's corresponding attributes.
10180
10181        @par
10182        The last KineticLaw object in this Model could have been created in a
10183        variety of ways.  For example, it could have been added using
10184        createKineticLaw(), or it could be the result of using
10185        Reaction.createKineticLaw() on the Reaction object created by a
10186        createReaction().  If a Reaction does not exist for this model, or the
10187        last Reaction does not contain a KineticLaw object, a new Parameter is
10188        @em not created and @c None is returned instead.
10189
10190        @return the Parameter object created.  If a Reaction does not exist for
10191        this model, or a KineticLaw for the Reaction does not exist, a new
10192        Parameter is @em not created and @c None is returned.
10193
10194        """
10195        return _libsbml.Model_createKineticLawParameter(self)
10196
10197    def createKineticLawLocalParameter(self):
10198        r"""
10199        createKineticLawLocalParameter(Model self) -> LocalParameter
10200
10201        Creates a new LocalParameter inside the KineticLaw object of the last
10202        Reaction created inside this Model, and returns a pointer to it.
10203
10204        The SBML Level and Version of the enclosing Model object, as well as
10205        any SBML package namespaces, are used to initialize this
10206        object's corresponding attributes.
10207
10208        @par
10209        The last KineticLaw object in this Model could have been created in a
10210        variety of ways.  For example, it could have been added using
10211        createKineticLaw(), or it could be the result of using
10212        Reaction.createKineticLaw() on the Reaction object created by a
10213        createReaction().  If a Reaction does not exist for this model, or the
10214        last Reaction does not contain a KineticLaw object, a new Parameter is
10215        @em not created and @c None is returned instead.
10216
10217        @return the Parameter object created.  If a Reaction does not exist for
10218        this model, or a KineticLaw for the Reaction does not exist, a new
10219        Parameter is @em not created and @c None is returned.
10220
10221        """
10222        return _libsbml.Model_createKineticLawLocalParameter(self)
10223
10224    def createEvent(self):
10225        r"""
10226        createEvent(Model self) -> Event
10227
10228        Creates a new Event inside this Model and returns it.
10229
10230        The SBML Level and Version of the enclosing Model object, as well as
10231        any SBML package namespaces, are used to initialize this
10232        object's corresponding attributes.
10233
10234        @return the Event object created.
10235
10236        """
10237        return _libsbml.Model_createEvent(self)
10238
10239    def createEventAssignment(self):
10240        r"""
10241        createEventAssignment(Model self) -> EventAssignment
10242
10243        Creates a new EventAssignment inside the last Event object created in
10244        this Model, and returns a pointer to it.
10245
10246        The SBML Level and Version of the enclosing Model object, as well as
10247        any SBML package namespaces, are used to initialize this
10248        object's corresponding attributes.
10249
10250        @par
10251        The mechanism by which the last Event object in this model was created
10252        is not significant.  It could have been created in a variety of ways,
10253        for example by using createEvent().  If no Event object exists in this
10254        Model object, a new EventAssignment is @em not created and @c None is
10255        returned instead.
10256
10257        @return the EventAssignment object created.
10258
10259        """
10260        return _libsbml.Model_createEventAssignment(self)
10261
10262    def createTrigger(self):
10263        r"""
10264        createTrigger(Model self) -> Trigger
10265
10266        Creates a new Trigger inside the last Event object created in
10267        this Model, and returns a pointer to it.
10268
10269        The SBML Level and Version of the enclosing Model object, as well as
10270        any SBML package namespaces, are used to initialize this
10271        object's corresponding attributes.
10272
10273        @par
10274        The mechanism by which the last Event object in this model was created
10275        is not significant.  It could have been created in a variety of ways,
10276        for example by using createEvent().  If no Event object exists in this
10277        Model object, a new EventAssignment is @em not created and @c None is
10278        returned instead.
10279
10280        @return the Trigger object created.
10281
10282        """
10283        return _libsbml.Model_createTrigger(self)
10284
10285    def createDelay(self):
10286        r"""
10287        createDelay(Model self) -> Delay
10288
10289        Creates a new Delay inside the last Event object created in
10290        this Model, and returns a pointer to it.
10291
10292        The SBML Level and Version of the enclosing Model object, as well as
10293        any SBML package namespaces, are used to initialize this
10294        object's corresponding attributes.
10295
10296        @par
10297        The mechanism by which the last Event object in this model was created
10298        is not significant.  It could have been created in a variety of ways,
10299        for example by using createEvent().  If no Event object exists in this
10300        Model object, a new EventAssignment is @em not created and @c None is
10301        returned instead.
10302
10303        @return the Delay object created.
10304
10305        """
10306        return _libsbml.Model_createDelay(self)
10307
10308    def setAnnotation(self, *args):
10309        r"""
10310        setAnnotation(Model self, XMLNode annotation) -> int
10311        setAnnotation(Model self, string annotation) -> int
10312
10313        This method has multiple variants; they differ in the arguments
10314         they accept.  Each variant is described separately below.
10315
10316        @par
10317        <hr>
10318        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10319         <pre class='signature'>setAnnotation(XMLNode annotation)</pre>
10320
10321        Sets the value of the 'annotation' subelement of this SBML object to a
10322        copy of @p annotation.
10323
10324        Any existing content of the 'annotation' subelement is discarded.
10325        Unless you have taken steps to first copy and reconstitute any
10326        existing annotations into the @p annotation that is about to be
10327        assigned, it is likely that performing such wholesale replacement is
10328        unfriendly towards other software applications whose annotations are
10329        discarded.  An alternative may be to use appendAnnotation().
10330
10331        @param annotation an XML structure that is to be used as the content
10332        of the 'annotation' subelement of this object.
10333
10334        @return integer value indicating success/failure of the
10335        function.  @if clike The value is drawn from the
10336        enumeration #OperationReturnValues_t. @endif@~ This particular
10337        function only does one thing irrespective of user input or
10338        object state, and thus will only return a single value:
10339        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
10340
10341        @see appendAnnotation()
10342
10343
10344        @par
10345        <hr>
10346        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10347         <pre class='signature'>setAnnotation(string annotation)</pre>
10348
10349        Sets the value of the 'annotation' subelement of this SBML object to a
10350        copy of @p annotation.
10351
10352        Any existing content of the 'annotation' subelement is discarded.
10353        Unless you have taken steps to first copy and reconstitute any
10354        existing annotations into the @p annotation that is about to be
10355        assigned, it is likely that performing such wholesale replacement is
10356        unfriendly towards other software applications whose annotations are
10357        discarded.  An alternative may be to use appendAnnotation().
10358
10359        @param annotation an XML string that is to be used as the content
10360        of the 'annotation' subelement of this object.
10361
10362        @return integer value indicating success/failure of the
10363        function.  @if clike The value is drawn from the
10364        enumeration #OperationReturnValues_t. @endif@~ The possible values
10365        returned by this function are:
10366        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
10367        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
10368
10369        @see appendAnnotation()
10370
10371        """
10372        return _libsbml.Model_setAnnotation(self, *args)
10373
10374    def appendAnnotation(self, *args):
10375        r"""
10376        appendAnnotation(Model self, XMLNode annotation) -> int
10377        appendAnnotation(Model self, string annotation) -> int
10378
10379        This method has multiple variants; they differ in the arguments
10380         they accept.  Each variant is described separately below.
10381
10382        @par
10383        <hr>
10384        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10385         <pre class='signature'>appendAnnotation(XMLNode annotation)</pre>
10386
10387        Appends annotation content to any existing content in the 'annotation'
10388        subelement of this object.
10389
10390        The content in @p annotation is copied.  Unlike setAnnotation(), this
10391        method allows other annotations to be preserved when an application
10392        adds its own data.
10393
10394        @param annotation an XML structure that is to be copied and appended
10395        to the content of the 'annotation' subelement of this object.
10396
10397        @return integer value indicating success/failure of the
10398        function.  @if clike The value is drawn from the
10399        enumeration #OperationReturnValues_t. @endif@~ The possible values
10400        returned by this function are:
10401        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
10402        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
10403
10404        @see setAnnotation()
10405
10406
10407        @par
10408        <hr>
10409        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10410         <pre class='signature'>appendAnnotation(string annotation)</pre>
10411
10412        Appends annotation content to any existing content in the 'annotation'
10413        subelement of this object.
10414
10415        The content in @p annotation is copied.  Unlike setAnnotation(), this
10416        method allows other annotations to be preserved when an application
10417        adds its own data.
10418
10419        @param annotation an XML string that is to be copied and appended
10420        to the content of the 'annotation' subelement of this object.
10421
10422        @return integer value indicating success/failure of the
10423        function.  @if clike The value is drawn from the
10424        enumeration #OperationReturnValues_t. @endif@~ The possible values
10425        returned by this function are:
10426        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
10427        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
10428
10429        @see setAnnotation()
10430
10431        """
10432        return _libsbml.Model_appendAnnotation(self, *args)
10433
10434    def getListOfFunctionDefinitions(self, *args):
10435        r"""
10436        getListOfFunctionDefinitions(Model self) -> ListOfFunctionDefinitions
10437        getListOfFunctionDefinitions(Model self) -> ListOfFunctionDefinitions
10438
10439        Get the ListOfFunctionDefinitions object in this Model.
10440
10441        @return the list of FunctionDefinitions for this Model.
10442
10443        """
10444        return _libsbml.Model_getListOfFunctionDefinitions(self, *args)
10445
10446    def getListOfUnitDefinitions(self, *args):
10447        r"""
10448        getListOfUnitDefinitions(Model self) -> ListOfUnitDefinitions
10449        getListOfUnitDefinitions(Model self) -> ListOfUnitDefinitions
10450
10451        Get the ListOfUnitDefinitions object in this Model.
10452
10453        @return the list of UnitDefinitions for this Model.
10454
10455        """
10456        return _libsbml.Model_getListOfUnitDefinitions(self, *args)
10457
10458    def getListOfCompartmentTypes(self, *args):
10459        r"""
10460        getListOfCompartmentTypes(Model self) -> ListOfCompartmentTypes
10461        getListOfCompartmentTypes(Model self) -> ListOfCompartmentTypes
10462
10463        Get the ListOfCompartmentTypes object in this Model.
10464
10465        @return the list of CompartmentTypes for this Model.
10466
10467        @note The CompartmentType object class is only available in SBML
10468        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
10469        Level&nbsp;1 nor Level&nbsp;3.
10470
10471        """
10472        return _libsbml.Model_getListOfCompartmentTypes(self, *args)
10473
10474    def getListOfSpeciesTypes(self, *args):
10475        r"""
10476        getListOfSpeciesTypes(Model self) -> ListOfSpeciesTypes
10477        getListOfSpeciesTypes(Model self) -> ListOfSpeciesTypes
10478
10479        Get the ListOfSpeciesTypes object in this Model.
10480
10481        @return the list of SpeciesTypes for this Model.
10482
10483        @note The SpeciesType object class is only available in SBML
10484        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
10485        Level&nbsp;1 nor Level&nbsp;3.
10486
10487        """
10488        return _libsbml.Model_getListOfSpeciesTypes(self, *args)
10489
10490    def getListOfCompartments(self, *args):
10491        r"""
10492        getListOfCompartments(Model self) -> ListOfCompartments
10493        getListOfCompartments(Model self) -> ListOfCompartments
10494
10495        Get the ListOfCompartments object in this Model.
10496
10497        @return the list of Compartments for this Model.
10498
10499        """
10500        return _libsbml.Model_getListOfCompartments(self, *args)
10501
10502    def getListOfSpecies(self, *args):
10503        r"""
10504        getListOfSpecies(Model self) -> ListOfSpecies
10505        getListOfSpecies(Model self) -> ListOfSpecies
10506
10507        Get the ListOfSpecies object in this Model.
10508
10509        @return the list of Species for this Model.
10510
10511        """
10512        return _libsbml.Model_getListOfSpecies(self, *args)
10513
10514    def getListOfParameters(self, *args):
10515        r"""
10516        getListOfParameters(Model self) -> ListOfParameters
10517        getListOfParameters(Model self) -> ListOfParameters
10518
10519        Get the ListOfParameters object in this Model.
10520
10521        @return the list of Parameters for this Model.
10522
10523        """
10524        return _libsbml.Model_getListOfParameters(self, *args)
10525
10526    def getListOfInitialAssignments(self, *args):
10527        r"""
10528        getListOfInitialAssignments(Model self) -> ListOfInitialAssignments
10529        getListOfInitialAssignments(Model self) -> ListOfInitialAssignments
10530
10531        Get the ListOfInitialAssignments object in this Model.
10532
10533        @return the list of InitialAssignments for this Model.
10534
10535        """
10536        return _libsbml.Model_getListOfInitialAssignments(self, *args)
10537
10538    def getListOfRules(self, *args):
10539        r"""
10540        getListOfRules(Model self) -> ListOfRules
10541        getListOfRules(Model self) -> ListOfRules
10542
10543        Get the ListOfRules object in this Model.
10544
10545        @return the list of Rules for this Model.
10546
10547        """
10548        return _libsbml.Model_getListOfRules(self, *args)
10549
10550    def getListOfConstraints(self, *args):
10551        r"""
10552        getListOfConstraints(Model self) -> ListOfConstraints
10553        getListOfConstraints(Model self) -> ListOfConstraints
10554
10555        Get the ListOfConstraints object in this Model.
10556
10557        @return the list of Constraints for this Model.
10558
10559        """
10560        return _libsbml.Model_getListOfConstraints(self, *args)
10561
10562    def getListOfReactions(self, *args):
10563        r"""
10564        getListOfReactions(Model self) -> ListOfReactions
10565        getListOfReactions(Model self) -> ListOfReactions
10566
10567        Get the ListOfReactions object in this Model.
10568
10569        @return the list of Reactions for this Model.
10570
10571        """
10572        return _libsbml.Model_getListOfReactions(self, *args)
10573
10574    def getListOfEvents(self, *args):
10575        r"""
10576        getListOfEvents(Model self) -> ListOfEvents
10577        getListOfEvents(Model self) -> ListOfEvents
10578
10579        Get the ListOfEvents object in this Model.
10580
10581        @return the list of Events for this Model.
10582
10583        """
10584        return _libsbml.Model_getListOfEvents(self, *args)
10585
10586    def getFunctionDefinition(self, *args):
10587        r"""
10588        getFunctionDefinition(Model self, unsigned int n) -> FunctionDefinition
10589        getFunctionDefinition(Model self, unsigned int n) -> FunctionDefinition
10590        getFunctionDefinition(Model self, string sid) -> FunctionDefinition
10591        getFunctionDefinition(Model self, string sid) -> FunctionDefinition
10592
10593        This method has multiple variants; they differ in the arguments
10594         they accept.  Each variant is described separately below.
10595
10596        @par
10597        <hr>
10598        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10599         <pre class='signature'>getFunctionDefinition(long n)</pre>
10600
10601        Get the nth FunctionDefinitions object in this Model.
10602
10603        @param n the index of the object to return.
10604
10605        @return the nth FunctionDefinition of this Model.
10606        If the index @p n is invalid, @c None is returned.
10607
10608
10609        @par
10610        <hr>
10611        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10612         <pre class='signature'>getFunctionDefinition(string sid)</pre>
10613
10614        Get a FunctionDefinition object based on its identifier.
10615
10616        @param sid the identifier to search for.
10617
10618        @return the FunctionDefinition in this Model with the identifier
10619        @p sid or @c None if no such FunctionDefinition exists.
10620
10621        """
10622        return _libsbml.Model_getFunctionDefinition(self, *args)
10623
10624    def getUnitDefinition(self, *args):
10625        r"""
10626        getUnitDefinition(Model self, unsigned int n) -> UnitDefinition
10627        getUnitDefinition(Model self, unsigned int n) -> UnitDefinition
10628        getUnitDefinition(Model self, string sid) -> UnitDefinition
10629        getUnitDefinition(Model self, string sid) -> UnitDefinition
10630
10631        This method has multiple variants; they differ in the arguments
10632         they accept.  Each variant is described separately below.
10633
10634        @par
10635        <hr>
10636        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10637         <pre class='signature'>getUnitDefinition(long n)</pre>
10638
10639        Get the nth UnitDefinition object in this Model.
10640
10641        @param n the index of the object to return.
10642
10643        @return the nth UnitDefinition of this Model.
10644        If the index @p n is invalid, @c None is returned.
10645
10646
10647        @par
10648        <hr>
10649        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10650         <pre class='signature'>getUnitDefinition(string sid)</pre>
10651
10652        Get a UnitDefinition based on its identifier.
10653
10654        @param sid the identifier to search for.
10655
10656        @return the UnitDefinition in this Model with the identifier @p sid or
10657        @c None if no such UnitDefinition exists.
10658
10659        """
10660        return _libsbml.Model_getUnitDefinition(self, *args)
10661
10662    def getCompartmentType(self, *args):
10663        r"""
10664        getCompartmentType(Model self, unsigned int n) -> CompartmentType
10665        getCompartmentType(Model self, unsigned int n) -> CompartmentType
10666        getCompartmentType(Model self, string sid) -> CompartmentType
10667        getCompartmentType(Model self, string sid) -> CompartmentType
10668
10669        This method has multiple variants; they differ in the arguments
10670         they accept.  Each variant is described separately below.
10671
10672        @par
10673        <hr>
10674        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10675         <pre class='signature'>getCompartmentType(long n)</pre>
10676
10677        Get the nth CompartmentType object in this Model.
10678
10679        @param n the index of the object to return.
10680
10681        @return the nth CompartmentType of this Model.
10682        If the index @p n is invalid, @c None is returned.
10683
10684        @note The CompartmentType object class is only available in SBML
10685        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
10686        Level&nbsp;1 nor Level&nbsp;3.
10687
10688
10689        @par
10690        <hr>
10691        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10692         <pre class='signature'>getCompartmentType(string sid)</pre>
10693
10694        Get a CompartmentType object based on its identifier.
10695
10696        @param sid the identifier to search for.
10697
10698        @return the CompartmentType in this Model with the identifier @p sid
10699        or @c None if no such CompartmentType exists.
10700
10701        @note The CompartmentType object class is only available in SBML
10702        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
10703        Level&nbsp;1 nor Level&nbsp;3.
10704
10705        """
10706        return _libsbml.Model_getCompartmentType(self, *args)
10707
10708    def getSpeciesType(self, *args):
10709        r"""
10710        getSpeciesType(Model self, unsigned int n) -> SpeciesType
10711        getSpeciesType(Model self, unsigned int n) -> SpeciesType
10712        getSpeciesType(Model self, string sid) -> SpeciesType
10713        getSpeciesType(Model self, string sid) -> SpeciesType
10714
10715        This method has multiple variants; they differ in the arguments
10716         they accept.  Each variant is described separately below.
10717
10718        @par
10719        <hr>
10720        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10721         <pre class='signature'>getSpeciesType(long n)</pre>
10722
10723        Get the nth SpeciesType object in this Model.
10724
10725        @param n the index of the object to return.
10726
10727        @return the nth SpeciesType of this Model.
10728        If the index @p n is invalid, @c None is returned.
10729
10730        @note The SpeciesType object class is only available in SBML
10731        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
10732        Level&nbsp;1 nor Level&nbsp;3.
10733
10734
10735        @par
10736        <hr>
10737        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10738         <pre class='signature'>getSpeciesType(string sid)</pre>
10739
10740        Get a SpeciesType object based on its identifier.
10741
10742        @param sid the identifier to search for.
10743
10744        @return the SpeciesType in this Model with the identifier @p sid or
10745        @c None if no such SpeciesType exists.
10746
10747        @note The SpeciesType object class is only available in SBML
10748        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
10749        Level&nbsp;1 nor Level&nbsp;3.
10750
10751        """
10752        return _libsbml.Model_getSpeciesType(self, *args)
10753
10754    def getCompartment(self, *args):
10755        r"""
10756        getCompartment(Model self, unsigned int n) -> Compartment
10757        getCompartment(Model self, unsigned int n) -> Compartment
10758        getCompartment(Model self, string sid) -> Compartment
10759        getCompartment(Model self, string sid) -> Compartment
10760
10761        This method has multiple variants; they differ in the arguments
10762         they accept.  Each variant is described separately below.
10763
10764        @par
10765        <hr>
10766        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10767         <pre class='signature'>getCompartment(long n)</pre>
10768
10769        Get the nth Compartment object in this Model.
10770
10771        @param n the index of the object to return.
10772
10773        @return the nth Compartment of this Model.
10774        If the index @p n is invalid, @c None is returned.
10775
10776
10777        @par
10778        <hr>
10779        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10780         <pre class='signature'>getCompartment(string sid)</pre>
10781
10782        Get a Compartment object based on its identifier.
10783
10784        @param sid the identifier to search for.
10785
10786        @return the Compartment in this Model with the identifier @p sid or
10787        @c None if no such Compartment exists.
10788
10789        """
10790        return _libsbml.Model_getCompartment(self, *args)
10791
10792    def getSpecies(self, *args):
10793        r"""
10794        getSpecies(Model self, unsigned int n) -> Species
10795        getSpecies(Model self, unsigned int n) -> Species
10796        getSpecies(Model self, string sid) -> Species
10797        getSpecies(Model self, string sid) -> Species
10798
10799        This method has multiple variants; they differ in the arguments
10800         they accept.  Each variant is described separately below.
10801
10802        @par
10803        <hr>
10804        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10805         <pre class='signature'>getSpecies(long n)</pre>
10806
10807        Get the nth Species object in this Model.
10808
10809        @param n the index of the object to return.
10810
10811        @return the nth Species of this Model.
10812        If the index @p n is invalid, @c None is returned.
10813
10814
10815        @par
10816        <hr>
10817        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10818         <pre class='signature'>getSpecies(string sid)</pre>
10819
10820        Get a Species object based on its identifier.
10821
10822        @param sid the identifier to search for.
10823
10824        @return the Species in this Model with the identifier @p sid or @c None
10825        if no such Species exists.
10826
10827        """
10828        return _libsbml.Model_getSpecies(self, *args)
10829
10830    def getParameter(self, *args):
10831        r"""
10832        getParameter(Model self, unsigned int n) -> Parameter
10833        getParameter(Model self, unsigned int n) -> Parameter
10834        getParameter(Model self, string sid) -> Parameter
10835        getParameter(Model self, string sid) -> Parameter
10836
10837        This method has multiple variants; they differ in the arguments
10838         they accept.  Each variant is described separately below.
10839
10840        @par
10841        <hr>
10842        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10843         <pre class='signature'>getParameter(long n)</pre>
10844
10845        Get the nth Parameter object in this Model.
10846
10847        @param n the index of the object to return.
10848
10849        @return the nth Parameter of this Model.
10850        If the index @p n is invalid, @c None is returned.
10851
10852
10853        @par
10854        <hr>
10855        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10856         <pre class='signature'>getParameter(string sid)</pre>
10857
10858        Get a Parameter object based on its identifier.
10859
10860        @param sid the identifier to search for.
10861
10862        @return the Parameter in this Model with the identifier @p sid or @c None
10863        if no such Parameter exists.
10864
10865        """
10866        return _libsbml.Model_getParameter(self, *args)
10867
10868    def getInitialAssignment(self, *args):
10869        r"""
10870        getInitialAssignment(Model self, unsigned int n) -> InitialAssignment
10871        getInitialAssignment(Model self, unsigned int n) -> InitialAssignment
10872        getInitialAssignment(Model self, string symbol) -> InitialAssignment
10873        getInitialAssignment(Model self, string symbol) -> InitialAssignment
10874
10875        This method has multiple variants; they differ in the arguments
10876         they accept.  Each variant is described separately below.
10877
10878        @par
10879        <hr>
10880        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10881         <pre class='signature'>getInitialAssignment(string symbol)</pre>
10882
10883        Get an InitialAssignment object based on the symbol to which it
10884        assigns a value.
10885
10886        @param symbol the symbol to search for.
10887
10888        @return the InitialAssignment in this Model with the given 'symbol'
10889        attribute value or @c None if no such InitialAssignment exists.
10890
10891
10892        @par
10893        <hr>
10894        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10895         <pre class='signature'>getInitialAssignment(long n)</pre>
10896
10897        Get the nth InitialAssignment object in this Model.
10898
10899        @param n the index of the object to return.
10900
10901        @return the nth InitialAssignment of this Model.
10902        If the index @p n is invalid, @c None is returned.
10903
10904        """
10905        return _libsbml.Model_getInitialAssignment(self, *args)
10906
10907    def getInitialAssignmentBySymbol(self, *args):
10908        r"""
10909        getInitialAssignmentBySymbol(Model self, string symbol) -> InitialAssignment
10910        getInitialAssignmentBySymbol(Model self, string symbol) -> InitialAssignment
10911
10912        Get an InitialAssignment object based on the symbol to which it
10913        assigns a value.
10914
10915        @param symbol the symbol to search for.
10916
10917        @return the InitialAssignment in this Model with the given 'symbol'
10918        attribute value or @c None if no such InitialAssignment exists.
10919
10920        """
10921        return _libsbml.Model_getInitialAssignmentBySymbol(self, *args)
10922
10923    def getRule(self, *args):
10924        r"""
10925        getRule(Model self, unsigned int n) -> Rule
10926        getRule(Model self, unsigned int n) -> Rule
10927        getRule(Model self, string variable) -> Rule
10928        getRule(Model self, string variable) -> Rule
10929
10930        This method has multiple variants; they differ in the arguments
10931         they accept.  Each variant is described separately below.
10932
10933        @par
10934        <hr>
10935        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10936         <pre class='signature'>getRule(string variable)</pre>
10937
10938        Get a Rule object based on the variable to which it assigns a value.
10939
10940        @param variable the variable to search for.
10941
10942        @return the Rule in this Model with the given 'variable' attribute
10943        value or @c None if no such Rule exists.
10944
10945
10946        @par
10947        <hr>
10948        <span class='variant-sig-heading'>Method variant with the following signature</span>:
10949         <pre class='signature'>getRule(long n)</pre>
10950
10951        Get the nth Rule object in this Model.
10952
10953        @param n the index of the object to return.
10954
10955        @return the nth Rule of this Model.
10956        If the index @p n is invalid, @c None is returned.
10957
10958        """
10959        return _libsbml.Model_getRule(self, *args)
10960
10961    def getRuleByVariable(self, *args):
10962        r"""
10963        getRuleByVariable(Model self, string variable) -> Rule
10964        getRuleByVariable(Model self, string variable) -> Rule
10965
10966        Get a Rule object based on the variable to which it assigns a value.
10967
10968        @param variable the variable to search for.
10969
10970        @return the Rule in this Model with the given 'variable' attribute
10971        value or @c None if no such Rule exists.
10972
10973        """
10974        return _libsbml.Model_getRuleByVariable(self, *args)
10975
10976    def getAssignmentRule(self, *args):
10977        r"""
10978        getAssignmentRule(Model self, string variable) -> AssignmentRule
10979        getAssignmentRule(Model self, string variable) -> AssignmentRule
10980
10981        Get a Rule object based on the variable to which it assigns a value.
10982
10983        @param variable the variable to search for.
10984
10985        @return the Rule in this Model with the given 'variable' attribute
10986        value or @c None if no such Rule exists.
10987
10988        """
10989        return _libsbml.Model_getAssignmentRule(self, *args)
10990
10991    def getRateRule(self, *args):
10992        r"""
10993        getRateRule(Model self, string variable) -> RateRule
10994        getRateRule(Model self, string variable) -> RateRule
10995
10996        Get a Rule object based on the variable to which it assigns a value.
10997
10998        @param variable the symbol to search for.
10999
11000        @return the Rule in this Model with the given 'variable' attribute
11001        value or @c None if no such Rule exists.
11002
11003        """
11004        return _libsbml.Model_getRateRule(self, *args)
11005
11006    def getAssignmentRuleByVariable(self, *args):
11007        r"""
11008        getAssignmentRuleByVariable(Model self, string variable) -> AssignmentRule
11009        getAssignmentRuleByVariable(Model self, string variable) -> AssignmentRule
11010
11011        Get a Rule object based on the variable to which it assigns a value.
11012
11013        @param variable the variable to search for.
11014
11015        @return the Rule in this Model with the given 'variable' attribute
11016        value or @c None if no such Rule exists.
11017
11018        """
11019        return _libsbml.Model_getAssignmentRuleByVariable(self, *args)
11020
11021    def getRateRuleByVariable(self, *args):
11022        r"""
11023        getRateRuleByVariable(Model self, string variable) -> RateRule
11024        getRateRuleByVariable(Model self, string variable) -> RateRule
11025
11026        Get a Rule object based on the variable to which it assigns a value.
11027
11028        @param variable the variable to search for.
11029
11030        @return the Rule in this Model with the given 'variable' attribute
11031        value or @c None if no such Rule exists.
11032
11033        """
11034        return _libsbml.Model_getRateRuleByVariable(self, *args)
11035
11036    def getConstraint(self, *args):
11037        r"""
11038        getConstraint(Model self, unsigned int n) -> Constraint
11039        getConstraint(Model self, unsigned int n) -> Constraint
11040
11041        Get the nth Constraint object in this Model.
11042
11043        @param n the index of the object to return.
11044
11045        @return the nth Constraint of this Model.
11046        If the index @p n is invalid, @c None is returned.
11047
11048        """
11049        return _libsbml.Model_getConstraint(self, *args)
11050
11051    def getReaction(self, *args):
11052        r"""
11053        getReaction(Model self, unsigned int n) -> Reaction
11054        getReaction(Model self, unsigned int n) -> Reaction
11055        getReaction(Model self, string sid) -> Reaction
11056        getReaction(Model self, string sid) -> Reaction
11057
11058        This method has multiple variants; they differ in the arguments
11059         they accept.  Each variant is described separately below.
11060
11061        @par
11062        <hr>
11063        <span class='variant-sig-heading'>Method variant with the following signature</span>:
11064         <pre class='signature'>getReaction(long n)</pre>
11065
11066        Get the nth Reaction object in this Model.
11067
11068        @param n the index of the object to return.
11069
11070        @return the nth Reaction of this Model.
11071        If the index @p n is invalid, @c None is returned.
11072
11073
11074        @par
11075        <hr>
11076        <span class='variant-sig-heading'>Method variant with the following signature</span>:
11077         <pre class='signature'>getReaction(string sid)</pre>
11078
11079        Get a Reaction object based on its identifier.
11080
11081        @param sid the identifier to search for.
11082
11083        @return the Reaction in this Model with the identifier @p sid or @c None
11084        if no such Reaction exists.
11085
11086        """
11087        return _libsbml.Model_getReaction(self, *args)
11088
11089    def getSpeciesReference(self, *args):
11090        r"""
11091        getSpeciesReference(Model self, string sid) -> SpeciesReference
11092        getSpeciesReference(Model self, string sid) -> SpeciesReference
11093
11094        Get a SpeciesReference object based on its identifier.
11095
11096        @param sid the identifier to search for.
11097
11098        @return the SpeciesReference in this Model with the identifier @p sid or @c None
11099        if no such SpeciesReference exists.
11100
11101        """
11102        return _libsbml.Model_getSpeciesReference(self, *args)
11103
11104    def getModifierSpeciesReference(self, *args):
11105        r"""
11106        getModifierSpeciesReference(Model self, string sid) -> ModifierSpeciesReference
11107        getModifierSpeciesReference(Model self, string sid) -> ModifierSpeciesReference
11108
11109        Get a ModifierSpeciesReference object based on its identifier.
11110
11111        @param sid the identifier to search for.
11112
11113        @return the ModifierSpeciesReference in this Model with the
11114        identifier @p sid or @c None
11115        if no such ModifierSpeciesReference exists.
11116
11117        """
11118        return _libsbml.Model_getModifierSpeciesReference(self, *args)
11119
11120    def getEvent(self, *args):
11121        r"""
11122        getEvent(Model self, unsigned int n) -> Event
11123        getEvent(Model self, unsigned int n) -> Event
11124        getEvent(Model self, string sid) -> Event
11125        getEvent(Model self, string sid) -> Event
11126
11127        This method has multiple variants; they differ in the arguments
11128         they accept.  Each variant is described separately below.
11129
11130        @par
11131        <hr>
11132        <span class='variant-sig-heading'>Method variant with the following signature</span>:
11133         <pre class='signature'>getEvent(long n)</pre>
11134
11135        Get the nth Event object in this Model.
11136
11137        @param n the index of the object to return.
11138
11139        @return the nth Event of this Model.
11140        If the index @p n is invalid, @c None is returned.
11141
11142
11143        @par
11144        <hr>
11145        <span class='variant-sig-heading'>Method variant with the following signature</span>:
11146         <pre class='signature'>getEvent(string sid)</pre>
11147
11148        Get an Event object based on its identifier.
11149
11150        @param sid the identifier to search for.
11151
11152        @return the Event in this Model with the identifier @p sid or @c None if
11153        no such Event exists.
11154
11155        """
11156        return _libsbml.Model_getEvent(self, *args)
11157
11158    def getNumFunctionDefinitions(self):
11159        r"""
11160        getNumFunctionDefinitions(Model self) -> unsigned int
11161
11162        Get the number of FunctionDefinition objects in this Model.
11163
11164        @return the number of FunctionDefinitions in this Model.
11165
11166        """
11167        return _libsbml.Model_getNumFunctionDefinitions(self)
11168
11169    def getNumUnitDefinitions(self):
11170        r"""
11171        getNumUnitDefinitions(Model self) -> unsigned int
11172
11173        Get the number of UnitDefinition objects in this Model.
11174
11175        @return the number of UnitDefinitions in this Model.
11176
11177        """
11178        return _libsbml.Model_getNumUnitDefinitions(self)
11179
11180    def getNumCompartmentTypes(self):
11181        r"""
11182        getNumCompartmentTypes(Model self) -> unsigned int
11183
11184        Get the number of CompartmentType objects in this Model.
11185
11186        @return the number of CompartmentTypes in this Model.
11187
11188        @note The CompartmentType object class is only available in SBML
11189        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
11190        Level&nbsp;1 nor Level&nbsp;3.
11191
11192        """
11193        return _libsbml.Model_getNumCompartmentTypes(self)
11194
11195    def getNumSpeciesTypes(self):
11196        r"""
11197        getNumSpeciesTypes(Model self) -> unsigned int
11198
11199        Get the number of SpeciesType objects in this Model.
11200
11201        @return the number of SpeciesTypes in this Model.
11202
11203        @note The SpeciesType object class is only available in SBML
11204        Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
11205        Level&nbsp;1 nor Level&nbsp;3.
11206
11207        """
11208        return _libsbml.Model_getNumSpeciesTypes(self)
11209
11210    def getNumCompartments(self):
11211        r"""
11212        getNumCompartments(Model self) -> unsigned int
11213
11214        Get the number of Compartment objects in this Model.
11215
11216        @return the number of Compartments in this Model.
11217
11218        """
11219        return _libsbml.Model_getNumCompartments(self)
11220
11221    def getNumSpecies(self):
11222        r"""
11223        getNumSpecies(Model self) -> unsigned int
11224
11225        Get the number of Species objects in this Model.
11226
11227        @return the number of Species in this Model.
11228
11229        """
11230        return _libsbml.Model_getNumSpecies(self)
11231
11232    def getNumSpeciesWithBoundaryCondition(self):
11233        r"""
11234        getNumSpeciesWithBoundaryCondition(Model self) -> unsigned int
11235
11236        Get the number of Species in this Model having their
11237        'boundaryCondition' attribute value set to @c True.
11238
11239        @return the number of Species in this Model with boundaryCondition set
11240        to true.
11241
11242        """
11243        return _libsbml.Model_getNumSpeciesWithBoundaryCondition(self)
11244
11245    def getNumParameters(self):
11246        r"""
11247        getNumParameters(Model self) -> unsigned int
11248
11249        Get the number of Parameter objects in this Model.
11250
11251        @return the number of Parameters in this Model.  Parameters defined in
11252        KineticLaws are not included.
11253
11254        """
11255        return _libsbml.Model_getNumParameters(self)
11256
11257    def getNumInitialAssignments(self):
11258        r"""
11259        getNumInitialAssignments(Model self) -> unsigned int
11260
11261        Get the number of InitialAssignment objects in this Model.
11262
11263        @return the number of InitialAssignments in this Model.
11264
11265        """
11266        return _libsbml.Model_getNumInitialAssignments(self)
11267
11268    def getNumRules(self):
11269        r"""
11270        getNumRules(Model self) -> unsigned int
11271
11272        Get the number of Rule objects in this Model.
11273
11274        @return the number of Rules in this Model.
11275
11276        """
11277        return _libsbml.Model_getNumRules(self)
11278
11279    def getNumConstraints(self):
11280        r"""
11281        getNumConstraints(Model self) -> unsigned int
11282
11283        Get the number of Constraint objects in this Model.
11284
11285        @return the number of Constraints in this Model.
11286
11287        """
11288        return _libsbml.Model_getNumConstraints(self)
11289
11290    def getNumReactions(self):
11291        r"""
11292        getNumReactions(Model self) -> unsigned int
11293
11294        Get the number of Reaction objects in this Model.
11295
11296        @return the number of Reactions in this Model.
11297
11298        """
11299        return _libsbml.Model_getNumReactions(self)
11300
11301    def getNumEvents(self):
11302        r"""
11303        getNumEvents(Model self) -> unsigned int
11304
11305        Get the number of Event objects in this Model.
11306
11307        @return the number of Events in this Model.
11308
11309        """
11310        return _libsbml.Model_getNumEvents(self)
11311
11312    def removeFromParentAndDelete(self):
11313        r"""
11314        removeFromParentAndDelete(Model self) -> int
11315
11316        Remove this Model from its parent SBMLDocument object.
11317
11318        This works by finding this Model's parent SBMLDocument and then calling
11319        <code>setModel(None)</code> on it, indirectly deleting itself.
11320        Overridden from the SBase function since the parent is not a ListOf.
11321
11322        @return integer value indicating success/failure of the
11323        function.  @if clike The value is drawn from the
11324        enumeration #OperationReturnValues_t. @endif@~ The possible values
11325        returned by this function are:
11326        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
11327        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
11328
11329        """
11330        return _libsbml.Model_removeFromParentAndDelete(self)
11331
11332    def renameAllIds(self, idTransformer, filter=None):
11333        r"""
11334        renameAllIds(Model self, IdentifierTransformer idTransformer, ElementFilter filter=None) -> int
11335
11336        @internal
11337
11338        @internal
11339
11340        """
11341        return _libsbml.Model_renameAllIds(self, idTransformer, filter)
11342
11343    def renameSIdRefs(self, oldid, newid):
11344        r"""
11345        renameSIdRefs(Model self, string oldid, string newid)
11346
11347        Replaces all uses of a given @c SIdRef type attribute value with another
11348        value.
11349
11350        @par
11351        In SBML, object identifiers are of a data type called <code>SId</code>.
11352        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
11353        introduced for attribute values that refer to <code>SId</code> values; in
11354        previous Levels of SBML, this data type did not exist and attributes were
11355        simply described to as 'referring to an identifier', but the effective
11356        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
11357        other methods of libSBML refer to the type <code>SIdRef</code> for all
11358        Levels of SBML, even if the corresponding SBML specification did not
11359        explicitly name the data type.
11360
11361        This method works by looking at all attributes and (if appropriate)
11362        mathematical formulas in MathML content, comparing the referenced
11363        identifiers to the value of @p oldid.  If any matches are found, the
11364        matching values are replaced with @p newid.  The method does @em not
11365        descend into child elements.
11366
11367        @param oldid the old identifier.
11368        @param newid the new identifier.
11369
11370        """
11371        return _libsbml.Model_renameSIdRefs(self, oldid, newid)
11372
11373    def renameUnitSIdRefs(self, oldid, newid):
11374        r"""
11375        renameUnitSIdRefs(Model self, string oldid, string newid)
11376
11377        Replaces all uses of a given @c UnitSIdRef type attribute value with
11378        another value.
11379
11380        @par
11381        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
11382        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
11383        introduced for attribute values that refer to <code>UnitSId</code> values; in
11384        previous Levels of SBML, this data type did not exist and attributes were
11385        simply described to as 'referring to a unit identifier', but the effective
11386        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
11387        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
11388        Levels of SBML, even if the corresponding SBML specification did not
11389        explicitly name the data type.
11390
11391        This method works by looking at all unit identifier attribute values
11392        (including, if appropriate, inside mathematical formulas), comparing the
11393        referenced unit identifiers to the value of @p oldid.  If any matches
11394        are found, the matching values are replaced with @p newid.  The method
11395        does @em not descend into child elements.
11396
11397        @param oldid the old identifier.
11398        @param newid the new identifier.
11399
11400        """
11401        return _libsbml.Model_renameUnitSIdRefs(self, oldid, newid)
11402
11403    def convertL1ToL2(self):
11404        r"""
11405        convertL1ToL2(Model self)
11406
11407        @internal
11408
11409        @internal
11410
11411        """
11412        return _libsbml.Model_convertL1ToL2(self)
11413
11414    def convertL1ToL3(self, addDefaultUnits=True):
11415        r"""
11416        convertL1ToL3(Model self, bool addDefaultUnits=True)
11417
11418        @internal
11419
11420
11421        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11422
11423        @internal
11424
11425        """
11426        return _libsbml.Model_convertL1ToL3(self, addDefaultUnits)
11427
11428    def convertL2ToL3(self, strict=False, addDefaultUnits=True):
11429        r"""
11430        convertL2ToL3(Model self, bool strict=False, bool addDefaultUnits=True)
11431
11432        @internal
11433
11434
11435        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11436
11437        @internal
11438
11439        """
11440        return _libsbml.Model_convertL2ToL3(self, strict, addDefaultUnits)
11441
11442    def convertL2ToL1(self, strict=False):
11443        r"""
11444        convertL2ToL1(Model self, bool strict=False)
11445
11446        @internal
11447
11448
11449        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11450
11451        @internal
11452
11453        """
11454        return _libsbml.Model_convertL2ToL1(self, strict)
11455
11456    def convertL3ToL1(self, strict=False):
11457        r"""
11458        convertL3ToL1(Model self, bool strict=False)
11459
11460        @internal
11461
11462
11463        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11464
11465        @internal
11466
11467        """
11468        return _libsbml.Model_convertL3ToL1(self, strict)
11469
11470    def convertL3ToL2(self, strict=False):
11471        r"""
11472        convertL3ToL2(Model self, bool strict=False)
11473
11474        @internal
11475
11476
11477        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11478
11479        @internal
11480
11481        """
11482        return _libsbml.Model_convertL3ToL2(self, strict)
11483
11484    def convertFromL3V2(self, strict=False):
11485        r"""
11486        convertFromL3V2(Model self, bool strict=False)
11487
11488        @internal
11489
11490
11491        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11492
11493        @internal
11494
11495        """
11496        return _libsbml.Model_convertFromL3V2(self, strict)
11497
11498    def dealWithFast(self):
11499        r"""
11500        dealWithFast(Model self)
11501
11502        @internal
11503
11504        @internal
11505
11506        """
11507        return _libsbml.Model_dealWithFast(self)
11508
11509    def dealWithL3Fast(self, targetVersion):
11510        r"""
11511        dealWithL3Fast(Model self, unsigned int targetVersion)
11512
11513        @internal
11514
11515        @internal
11516
11517        """
11518        return _libsbml.Model_dealWithL3Fast(self, targetVersion)
11519
11520    def addModifiers(self):
11521        r"""
11522        addModifiers(Model self)
11523
11524        @internal
11525
11526        @internal
11527
11528        """
11529        return _libsbml.Model_addModifiers(self)
11530
11531    def addConstantAttribute(self):
11532        r"""
11533        addConstantAttribute(Model self)
11534
11535        @internal
11536
11537        @internal
11538
11539        """
11540        return _libsbml.Model_addConstantAttribute(self)
11541
11542    def setSpatialDimensions(self, dims=3.0):
11543        r"""
11544        setSpatialDimensions(Model self, double dims=3.0)
11545
11546        @internal
11547
11548
11549        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11550
11551        @internal
11552
11553        """
11554        return _libsbml.Model_setSpatialDimensions(self, dims)
11555
11556    def addDefinitionsForDefaultUnits(self):
11557        r"""
11558        addDefinitionsForDefaultUnits(Model self)
11559
11560        @internal
11561
11562        @internal
11563
11564        """
11565        return _libsbml.Model_addDefinitionsForDefaultUnits(self)
11566
11567    def dealWithDefaultValues(self):
11568        r"""
11569        dealWithDefaultValues(Model self)
11570
11571        @internal
11572
11573        @internal
11574
11575        """
11576        return _libsbml.Model_dealWithDefaultValues(self)
11577
11578    def convertParametersToLocals(self, level, version):
11579        r"""
11580        convertParametersToLocals(Model self, unsigned int level, unsigned int version)
11581
11582        @internal
11583
11584        @internal
11585
11586        """
11587        return _libsbml.Model_convertParametersToLocals(self, level, version)
11588
11589    def setSpeciesReferenceConstantValueAndStoichiometry(self):
11590        r"""
11591        setSpeciesReferenceConstantValueAndStoichiometry(Model self)
11592
11593        @internal
11594
11595        @internal
11596
11597        """
11598        return _libsbml.Model_setSpeciesReferenceConstantValueAndStoichiometry(self)
11599
11600    def removeParameterRuleUnits(self, strict):
11601        r"""
11602        removeParameterRuleUnits(Model self, bool strict)
11603
11604        @internal
11605
11606        @internal
11607
11608        """
11609        return _libsbml.Model_removeParameterRuleUnits(self, strict)
11610
11611    def convertStoichiometryMath(self):
11612        r"""
11613        convertStoichiometryMath(Model self)
11614
11615        @internal
11616
11617        @internal
11618
11619        """
11620        return _libsbml.Model_convertStoichiometryMath(self)
11621
11622    def assignRequiredValues(self):
11623        r"""
11624        assignRequiredValues(Model self)
11625
11626        @internal
11627
11628        @internal
11629
11630        """
11631        return _libsbml.Model_assignRequiredValues(self)
11632
11633    def dealWithModelUnits(self, strict=False):
11634        r"""
11635        dealWithModelUnits(Model self, bool strict=False)
11636
11637        @internal
11638
11639
11640        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
11641
11642        @internal
11643
11644        """
11645        return _libsbml.Model_dealWithModelUnits(self, strict)
11646
11647    def dealWithStoichiometry(self):
11648        r"""
11649        dealWithStoichiometry(Model self)
11650
11651        @internal
11652
11653        @internal
11654
11655        """
11656        return _libsbml.Model_dealWithStoichiometry(self)
11657
11658    def dealWithEvents(self, strict):
11659        r"""
11660        dealWithEvents(Model self, bool strict)
11661
11662        @internal
11663
11664        @internal
11665
11666        """
11667        return _libsbml.Model_dealWithEvents(self, strict)
11668
11669    def removeSpeciesTypes(self):
11670        r"""
11671        removeSpeciesTypes(Model self)
11672
11673        @internal
11674
11675        @internal
11676
11677        """
11678        return _libsbml.Model_removeSpeciesTypes(self)
11679
11680    def removeCompartmentTypes(self):
11681        r"""
11682        removeCompartmentTypes(Model self)
11683
11684        @internal
11685
11686        @internal
11687
11688        """
11689        return _libsbml.Model_removeCompartmentTypes(self)
11690
11691    def connectToChild(self):
11692        r"""connectToChild(Model self)"""
11693        return _libsbml.Model_connectToChild(self)
11694
11695    def getTypeCode(self):
11696        r"""
11697        getTypeCode(Model self) -> int
11698
11699        Returns the libSBML type code for this %SBML object.
11700
11701        @par
11702        LibSBML attaches an identifying code to every kind of SBML object.  These
11703        are integer constants known as <em>SBML type codes</em>.  The names of all
11704        the codes begin with the characters <code>SBML_</code>.
11705        @if clike The set of possible type codes for core elements is defined in
11706        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
11707        SBML Level&nbsp;3 packages define their own extra enumerations of type
11708        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
11709        package).@endif@if java In the Java language interface for libSBML, the
11710        type codes are defined as static integer constants in the interface class
11711        {@link libsbmlConstants}.  @endif@if python In the Python language
11712        interface for libSBML, the type codes are defined as static integer
11713        constants in the interface class @link libsbml@endlink.@endif@if csharp In
11714        the C# language interface for libSBML, the type codes are defined as
11715        static integer constants in the interface class
11716        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
11717        package plug-ins may use overlapping type codes; to identify the package
11718        to which a given object belongs, call the
11719        <code>@if conly SBase_getPackageName()
11720        @else SBase.getPackageName()
11721        @endif</code>
11722        method on the object.
11723
11724        The exception to this is lists:  all SBML-style list elements have the type
11725        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
11726        are from.
11727
11728        @return the SBML type code for this object:
11729        @link libsbml#SBML_MODEL SBML_MODEL@endlink (default).
11730
11731        @warning <span class='warning'>The specific integer values of the possible
11732        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
11733        packages,  To fully identify the correct code, <strong>it is necessary to
11734        invoke both getPackageName() and getTypeCode()</strong> (or
11735        ListOf.getItemTypeCode()).</span>
11736
11737        @see getElementName()
11738        @see getPackageName()
11739
11740        """
11741        return _libsbml.Model_getTypeCode(self)
11742
11743    def getElementName(self):
11744        r"""
11745        getElementName(Model self) -> string
11746
11747        Returns the XML element name of this object, which for Model, is
11748        always @c 'model'.
11749
11750        @return the name of this element, i.e., @c 'model'.
11751
11752        """
11753        return _libsbml.Model_getElementName(self)
11754
11755    def populateListFormulaUnitsData(self):
11756        r"""
11757        populateListFormulaUnitsData(Model self)
11758
11759        Populates the internal list of derived units for this Model object.
11760
11761        This method tells libSBML to (re)calculate all units for all components
11762        of the enclosing Model object.  The result is stored in an internal list
11763        of unit data.  Users can access the resulting data by calling the method
11764        SBase.getDerivedUnitDefinition() available on most objects.  (The name
11765        'formula units data' is drawn from the name of the internal objects
11766        libSBML uses to store the data; note that these internal objects are not
11767        exposed to callers, because callers can interact with the results using
11768        the ordinary SBML unit objects.)
11769
11770        This method is used by libSBML itself in the validator concerned with
11771        unit consistency.  The unit consistency validator (like all other
11772        validators in libSBML) is invoked by using
11773        SBMLDocument.checkConsistency(), with the consistency checks for the
11774        category @link libsbml#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink turned on.  The method
11775        populateListFormulaUnitsData() does not need to be called prior to
11776        invoking the validator if unit consistency checking has not been turned
11777        off.  This method is only provided for cases when callers have a special
11778        need to force the unit data to be recalculated.  For instance, during
11779        construction of a model, a caller may want to interrogate libSBML's
11780        inferred units without invoking full-blown model validation; this is a
11781        scenario in which calling populateListFormulaUnitsData() may be useful.
11782
11783        @warning Computing and inferring units is a time-consuming operation.
11784        Callers may want to call isPopulatedListFormulaUnitsData() to determine
11785        whether the units may already have been computed, to save themselves the
11786        need of invoking unit inference unnecessarily.
11787
11788        @see isPopulatedListFormulaUnitsData()
11789
11790        """
11791        return _libsbml.Model_populateListFormulaUnitsData(self)
11792
11793    def isPopulatedListFormulaUnitsData(self):
11794        r"""
11795        isPopulatedListFormulaUnitsData(Model self) -> bool
11796
11797        Predicate returning @c True if libSBML has derived units for the
11798        components of this model.
11799
11800        LibSBML can infer the units of measurement associated with different
11801        elements of a model.  When libSBML does that, it builds a complex
11802        internal structure during a resource-intensive operation.  This is done
11803        automatically only when callers invoke validation (via
11804        SBMLDocument.checkConsistency()) and have not turned off the unit
11805        validation option.
11806
11807        Callers can force units to be recalculated by calling
11808        populateListFormulaUnitsData().  To avoid calling that method
11809        unnecessarily, calling programs may first want to invoke this method
11810        (isPopulatedListFormulaUnitsData()) to determine whether it is even
11811        necessary.
11812
11813        @return @c True if the units have already been computed, @c False
11814        otherwise.
11815
11816        """
11817        return _libsbml.Model_isPopulatedListFormulaUnitsData(self)
11818
11819    def getFormulaUnitsDataForVariable(self, sid):
11820        r"""
11821        getFormulaUnitsDataForVariable(Model self, string sid) -> FormulaUnitsData *
11822
11823        @internal
11824
11825        @internal
11826
11827        """
11828        return _libsbml.Model_getFormulaUnitsDataForVariable(self, sid)
11829
11830    def getFormulaUnitsDataForAssignment(self, sid):
11831        r"""
11832        getFormulaUnitsDataForAssignment(Model self, string sid) -> FormulaUnitsData *
11833
11834        @internal
11835
11836        @internal
11837
11838        """
11839        return _libsbml.Model_getFormulaUnitsDataForAssignment(self, sid)
11840
11841    def populateAllElementIdList(self):
11842        r"""
11843        populateAllElementIdList(Model self)
11844
11845        Populates the internal list of the identifiers of all elements within this Model object.
11846
11847        This method tells libSBML to retrieve the identifiers of all elements
11848        of the enclosing Model object.  The result is stored in an internal list
11849        of ids.  Users can access the resulting data by calling the method
11850        getAllElementIdList().
11851
11852        @warning Retrieving all elements within a model is a time-consuming operation.
11853        Callers may want to call isPopulatedAllElementIdList() to determine
11854        whether the id list may already have been populated.
11855
11856        @see isPopulatedAllElementIdList()
11857
11858        """
11859        return _libsbml.Model_populateAllElementIdList(self)
11860
11861    def isPopulatedAllElementIdList(self):
11862        r"""
11863        isPopulatedAllElementIdList(Model self) -> bool
11864
11865        Predicate returning @c True if libSBML has a list of the ids of all
11866        components of this model.
11867
11868        @return @c True if the id list has already been populated, @c False
11869        otherwise.
11870
11871        """
11872        return _libsbml.Model_isPopulatedAllElementIdList(self)
11873
11874    def getAllElementIdList(self):
11875        r"""
11876        getAllElementIdList(Model self) -> IdList
11877
11878        Returns the internal list of the identifiers of all elements within this Model object.
11879
11880        @return an IdList of all the identifiers in the model.
11881
11882        @see populateAllElementIdList()
11883        @see isPopulatedAllElementIdList()
11884
11885        """
11886        return _libsbml.Model_getAllElementIdList(self)
11887
11888    def clearAllElementIdList(self):
11889        r"""
11890        clearAllElementIdList(Model self)
11891
11892        Clears the internal list of the identifiers of all elements within this Model object.
11893
11894        @see populateAllElementIdList()
11895        @see isPopulatedAllElementIdList()
11896
11897        """
11898        return _libsbml.Model_clearAllElementIdList(self)
11899
11900    def populateAllElementMetaIdList(self):
11901        r"""
11902        populateAllElementMetaIdList(Model self)
11903
11904        Populates the internal list of the metaids of all elements within this Model object.
11905
11906        This method tells libSBML to retrieve the identifiers of all elements
11907        of the enclosing Model object.  The result is stored in an internal list
11908        of metaids.  Users can access the resulting data by calling the method
11909        getAllElementMetaIdList().
11910
11911        @warning Retrieving all elements within a model is a time-consuming operation.
11912        Callers may want to call isPopulatedAllElementMetaIdList() to determine
11913        whether the metaid list may already have been populated.
11914
11915        @see isPopulatedAllElementMetaIdList()
11916
11917        """
11918        return _libsbml.Model_populateAllElementMetaIdList(self)
11919
11920    def isPopulatedAllElementMetaIdList(self):
11921        r"""
11922        isPopulatedAllElementMetaIdList(Model self) -> bool
11923
11924        Predicate returning @c True if libSBML has a list of the metaids of all
11925        components of this model.
11926
11927        @return @c True if the metaid list has already been populated, @c False
11928        otherwise.
11929
11930        """
11931        return _libsbml.Model_isPopulatedAllElementMetaIdList(self)
11932
11933    def getAllElementMetaIdList(self):
11934        r"""
11935        getAllElementMetaIdList(Model self) -> IdList
11936
11937        Returns the internal list of the metaids of all elements within this Model object.
11938
11939        @return an IdList of all the metaids in the model.
11940
11941        @see populateAllElementMetaIdList()
11942        @see isPopulatedAllElementMetaIdList()
11943
11944        """
11945        return _libsbml.Model_getAllElementMetaIdList(self)
11946
11947    def clearAllElementMetaIdList(self):
11948        r"""
11949        clearAllElementMetaIdList(Model self)
11950
11951        Clears the internal list of the metaids of all elements within this Model object.
11952
11953        @see populateAllElementMetaIdList()
11954        @see isPopulatedAllElementMetaIdList()
11955
11956        """
11957        return _libsbml.Model_clearAllElementMetaIdList(self)
11958
11959    def hasRequiredElements(self):
11960        r"""
11961        hasRequiredElements(Model self) -> bool
11962
11963        Predicate returning @c True if all the required elements for this Model
11964        object have been set.
11965
11966        @return a boolean value indicating whether all the required
11967        elements for this object have been defined.
11968
11969        """
11970        return _libsbml.Model_hasRequiredElements(self)
11971
11972    def removeFunctionDefinition(self, *args):
11973        r"""
11974        removeFunctionDefinition(Model self, unsigned int n) -> FunctionDefinition
11975        removeFunctionDefinition(Model self, string sid) -> FunctionDefinition
11976
11977        This method has multiple variants; they differ in the arguments
11978         they accept.  Each variant is described separately below.
11979
11980        @par
11981        <hr>
11982        <span class='variant-sig-heading'>Method variant with the following signature</span>:
11983         <pre class='signature'>removeFunctionDefinition(long n)</pre>
11984
11985        Removes the nth FunctionDefinition object from this Model object and
11986        returns a pointer to it.
11987
11988        The caller owns the returned object and is responsible for deleting it.
11989
11990        @param n the index of the FunctionDefinition object to remove.
11991
11992        @return the FunctionDefinition object removed, or @c None if the given
11993        index is out of range.
11994
11995
11996
11997        @par
11998        <hr>
11999        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12000         <pre class='signature'>removeFunctionDefinition(string sid)</pre>
12001
12002        Removes the FunctionDefinition object with the given identifier from this Model
12003        object and returns a pointer to it.
12004
12005        The caller owns the returned object and is responsible for deleting it.
12006
12007        @param sid the identifier of the FunctionDefinition object to remove.
12008
12009        @return the FunctionDefinition object removed, or @c None if no
12010        FunctionDefinition object with the identifier exists in this Model
12011        object.
12012
12013        """
12014        return _libsbml.Model_removeFunctionDefinition(self, *args)
12015
12016    def removeUnitDefinition(self, *args):
12017        r"""
12018        removeUnitDefinition(Model self, unsigned int n) -> UnitDefinition
12019        removeUnitDefinition(Model self, string sid) -> UnitDefinition
12020
12021        This method has multiple variants; they differ in the arguments
12022         they accept.  Each variant is described separately below.
12023
12024        @par
12025        <hr>
12026        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12027         <pre class='signature'>removeUnitDefinition(long n)</pre>
12028
12029        Removes the nth UnitDefinition object from this Model object and
12030        returns a pointer to it.
12031
12032        The caller owns the returned object and is responsible for deleting it.
12033
12034        @param n the index of the UnitDefinition object to remove.
12035
12036        @return the UnitDefinition object removed., or @c None if the given
12037        index is out of range.
12038
12039
12040
12041        @par
12042        <hr>
12043        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12044         <pre class='signature'>removeUnitDefinition(string sid)</pre>
12045
12046        Removes the UnitDefinition object with the given identifier from this Model
12047        object and returns a pointer to it.
12048
12049        The caller owns the returned object and is responsible for deleting it.
12050
12051        @param sid the identifier of the UnitDefinition object to remove.
12052
12053        @return the UnitDefinition object removed, or @c None if no
12054        UnitDefinition object with the identifier exists in this Model object.
12055
12056        """
12057        return _libsbml.Model_removeUnitDefinition(self, *args)
12058
12059    def removeCompartmentType(self, *args):
12060        r"""
12061        removeCompartmentType(Model self, unsigned int n) -> CompartmentType
12062        removeCompartmentType(Model self, string sid) -> CompartmentType
12063
12064        This method has multiple variants; they differ in the arguments
12065         they accept.  Each variant is described separately below.
12066
12067        @par
12068        <hr>
12069        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12070         <pre class='signature'>removeCompartmentType(long n)</pre>
12071
12072        Removes the nth CompartmentType object from this Model object and
12073        returns a pointer to it.
12074
12075        The caller owns the returned object and is responsible for deleting it.
12076
12077        @param n the index of the CompartmentType object to remove.
12078
12079        @return the ComapartmentType object removed, or @c None if the given
12080        index is out of range.
12081
12082
12083
12084        @par
12085        <hr>
12086        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12087         <pre class='signature'>removeCompartmentType(string sid)</pre>
12088
12089        Removes the CompartmentType object with the given identifier from this Model
12090        object and returns a pointer to it.
12091
12092        The caller owns the returned object and is responsible for deleting it.
12093
12094        @param sid the identifier of the object to remove.
12095
12096        @return the CompartmentType object removed, or @c None if no
12097        CompartmentType object with the identifier exists in this Model object.
12098
12099        """
12100        return _libsbml.Model_removeCompartmentType(self, *args)
12101
12102    def removeSpeciesType(self, *args):
12103        r"""
12104        removeSpeciesType(Model self, unsigned int n) -> SpeciesType
12105        removeSpeciesType(Model self, string sid) -> SpeciesType
12106
12107        This method has multiple variants; they differ in the arguments
12108         they accept.  Each variant is described separately below.
12109
12110        @par
12111        <hr>
12112        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12113         <pre class='signature'>removeSpeciesType(long n)</pre>
12114
12115        Removes the nth SpeciesType object from this Model object and
12116        returns a pointer to it.
12117
12118        The caller owns the returned object and is responsible for deleting it.
12119
12120        @param n the index of the SpeciesType object to remove.
12121
12122        @return the SpeciesType object removed, or @c None if the given index is
12123        out of range.
12124
12125
12126
12127        @par
12128        <hr>
12129        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12130         <pre class='signature'>removeSpeciesType(string sid)</pre>
12131
12132        Removes the SpeciesType object with the given identifier from this Model
12133        object and returns a pointer to it.
12134
12135        The caller owns the returned object and is responsible for deleting it.
12136
12137        @param sid the identifier of the SpeciesType object to remove.
12138
12139        @return the SpeciesType object removed, or @c None if no SpeciesType
12140        object with the identifier exists in this Model object.
12141
12142        """
12143        return _libsbml.Model_removeSpeciesType(self, *args)
12144
12145    def removeCompartment(self, *args):
12146        r"""
12147        removeCompartment(Model self, unsigned int n) -> Compartment
12148        removeCompartment(Model self, string sid) -> Compartment
12149
12150        This method has multiple variants; they differ in the arguments
12151         they accept.  Each variant is described separately below.
12152
12153        @par
12154        <hr>
12155        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12156         <pre class='signature'>removeCompartment(long n)</pre>
12157
12158        Removes the nth Compartment object from this Model object and
12159        returns a pointer to it.
12160
12161        The caller owns the returned object and is responsible for deleting it.
12162
12163        @param n the index of the Compartment object to remove.
12164
12165        @return the Compartment object removed, or @c None if the given index is
12166        out of range.
12167
12168
12169
12170        @par
12171        <hr>
12172        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12173         <pre class='signature'>removeCompartment(string sid)</pre>
12174
12175        Removes the Compartment object with the given identifier from this Model
12176        object and returns a pointer to it.
12177
12178        The caller owns the returned object and is responsible for deleting it.
12179
12180        @param sid the identifier of the Compartment object to remove.
12181
12182        @return the Compartment object removed, or @c None if no Compartment
12183        object with the identifier exists in this Model object.
12184
12185        """
12186        return _libsbml.Model_removeCompartment(self, *args)
12187
12188    def removeSpecies(self, *args):
12189        r"""
12190        removeSpecies(Model self, unsigned int n) -> Species
12191        removeSpecies(Model self, string sid) -> Species
12192
12193        This method has multiple variants; they differ in the arguments
12194         they accept.  Each variant is described separately below.
12195
12196        @par
12197        <hr>
12198        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12199         <pre class='signature'>removeSpecies(long n)</pre>
12200
12201        Removes the nth Species object from this Model object and
12202        returns a pointer to it.
12203
12204        The caller owns the returned object and is responsible for deleting it.
12205
12206        @param n the index of the Species object to remove.
12207
12208        @return the Species object removed, or @c None if the given index is out
12209        of range.
12210
12211
12212
12213        @par
12214        <hr>
12215        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12216         <pre class='signature'>removeSpecies(string sid)</pre>
12217
12218        Removes the Species object with the given identifier from this Model
12219        object and returns a pointer to it.
12220
12221        The caller owns the returned object and is responsible for deleting it.
12222
12223        @param sid the identifier of the Species object to remove.
12224
12225        @return the Species object removed, or @c None if no Species object with
12226        the identifier exists in this Model object.
12227
12228        """
12229        return _libsbml.Model_removeSpecies(self, *args)
12230
12231    def removeParameter(self, *args):
12232        r"""
12233        removeParameter(Model self, unsigned int n) -> Parameter
12234        removeParameter(Model self, string sid) -> Parameter
12235
12236        This method has multiple variants; they differ in the arguments
12237         they accept.  Each variant is described separately below.
12238
12239        @par
12240        <hr>
12241        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12242         <pre class='signature'>removeParameter(long n)</pre>
12243
12244        Removes the nth Parameter object from this Model object and
12245        returns a pointer to it.
12246
12247        The caller owns the returned object and is responsible for deleting it.
12248
12249        @param n the index of the Parameter object to remove.
12250
12251        @return the Parameter object removed, or @c None if the given index is
12252        out of range.
12253
12254
12255
12256        @par
12257        <hr>
12258        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12259         <pre class='signature'>removeParameter(string sid)</pre>
12260
12261        Removes the Parameter object with the given identifier from this Model
12262        object and returns a pointer to it.
12263
12264        The caller owns the returned object and is responsible for deleting it.
12265
12266        @param sid the identifier of the Parameter object to remove.
12267
12268        @return the Parameter object removed, or @c None if no Parameter object
12269        with the identifier exists in this Model object.
12270
12271        """
12272        return _libsbml.Model_removeParameter(self, *args)
12273
12274    def removeInitialAssignment(self, *args):
12275        r"""
12276        removeInitialAssignment(Model self, unsigned int n) -> InitialAssignment
12277        removeInitialAssignment(Model self, string symbol) -> InitialAssignment
12278
12279        This method has multiple variants; they differ in the arguments
12280         they accept.  Each variant is described separately below.
12281
12282        @par
12283        <hr>
12284        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12285         <pre class='signature'>removeInitialAssignment(string symbol)</pre>
12286
12287        Removes the InitialAssignment object with the given 'symbol' attribute
12288        from this Model object and returns a pointer to it.
12289
12290        The caller owns the returned object and is responsible for deleting it.
12291
12292        @param symbol the 'symbol' attribute of the InitialAssignment object to remove.
12293
12294        @return the InitialAssignment object removed, or @c None if no
12295        InitialAssignment object with the 'symbol' attribute exists in this
12296        Model object.
12297
12298
12299        @par
12300        <hr>
12301        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12302         <pre class='signature'>removeInitialAssignment(long n)</pre>
12303
12304        Removes the nth InitialAssignment object from this Model object and
12305        returns a pointer to it.
12306
12307        The caller owns the returned object and is responsible for deleting it.
12308
12309        @param n the index of the InitialAssignment object to remove.
12310
12311        @return the InitialAssignment object removed, or @c None if the given
12312        index is out of range.
12313
12314        """
12315        return _libsbml.Model_removeInitialAssignment(self, *args)
12316
12317    def removeRule(self, *args):
12318        r"""
12319        removeRule(Model self, unsigned int n) -> Rule
12320        removeRule(Model self, string variable) -> Rule
12321
12322        This method has multiple variants; they differ in the arguments
12323         they accept.  Each variant is described separately below.
12324
12325        @par
12326        <hr>
12327        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12328         <pre class='signature'>removeRule(string variable)</pre>
12329
12330        Removes the Rule object with the given 'variable' attribute from this Model
12331        object and returns a pointer to it.
12332
12333        The caller owns the returned object and is responsible for deleting it.
12334
12335        @param variable the 'variable' attribute of the Rule object to remove.
12336
12337        @return the Rule object removed, or @c None if no Rule object with the
12338        'variable' attribute exists in this Model object.
12339
12340
12341        @par
12342        <hr>
12343        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12344         <pre class='signature'>removeRule(long n)</pre>
12345
12346        Removes the nth Rule object from this Model object and
12347        returns a pointer to it.
12348
12349        The caller owns the returned object and is responsible for deleting it.
12350
12351        @param n the index of the Rule object to remove.
12352
12353        @return the Rule object removed, or @c None if the given index is out of
12354        range.
12355
12356        """
12357        return _libsbml.Model_removeRule(self, *args)
12358
12359    def removeRuleByVariable(self, variable):
12360        r"""
12361        removeRuleByVariable(Model self, string variable) -> Rule
12362
12363        Removes the Rule object with the given 'variable' attribute from this Model
12364        object and returns a pointer to it.
12365
12366        The caller owns the returned object and is responsible for deleting it.
12367
12368        @param variable the 'variable' attribute of the Rule object to remove.
12369
12370        @return the Rule object removed, or @c None if no Rule object with the
12371        'variable' attribute exists in this Model object.
12372
12373        """
12374        return _libsbml.Model_removeRuleByVariable(self, variable)
12375
12376    def removeConstraint(self, n):
12377        r"""
12378        removeConstraint(Model self, unsigned int n) -> Constraint
12379
12380        Removes the nth Constraint object from this Model object and
12381        returns a pointer to it.
12382
12383        The caller owns the returned object and is responsible for deleting it.
12384
12385        @param n the index of the Constraint object to remove.
12386
12387        @return the Constraint object removed, or @c None if the given index is
12388        out of range.
12389
12390        """
12391        return _libsbml.Model_removeConstraint(self, n)
12392
12393    def removeReaction(self, *args):
12394        r"""
12395        removeReaction(Model self, unsigned int n) -> Reaction
12396        removeReaction(Model self, string sid) -> Reaction
12397
12398        This method has multiple variants; they differ in the arguments
12399         they accept.  Each variant is described separately below.
12400
12401        @par
12402        <hr>
12403        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12404         <pre class='signature'>removeReaction(long n)</pre>
12405
12406        Removes the nth Reaction object from this Model object and
12407        returns a pointer to it.
12408
12409        The caller owns the returned object and is responsible for deleting it.
12410
12411        @param n the index of the Reaction object to remove.
12412
12413        @return the Reaction object removed, or @c None if the given index is
12414        out of range.
12415
12416
12417
12418        @par
12419        <hr>
12420        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12421         <pre class='signature'>removeReaction(string sid)</pre>
12422
12423        Removes the Reaction object with the given identifier from this Model
12424        object and returns a pointer to it.
12425
12426        The caller owns the returned object and is responsible for deleting it.
12427
12428        @param sid the identifier of the Reaction object to remove.
12429
12430        @return the Reaction object removed, or @c None if no Reaction object
12431        with the identifier exists in this Model object.
12432
12433        """
12434        return _libsbml.Model_removeReaction(self, *args)
12435
12436    def removeEvent(self, *args):
12437        r"""
12438        removeEvent(Model self, unsigned int n) -> Event
12439        removeEvent(Model self, string sid) -> Event
12440
12441        This method has multiple variants; they differ in the arguments
12442         they accept.  Each variant is described separately below.
12443
12444        @par
12445        <hr>
12446        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12447         <pre class='signature'>removeEvent(long n)</pre>
12448
12449        Removes the nth Event object from this Model object and
12450        returns a pointer to it.
12451
12452        The caller owns the returned object and is responsible for deleting it.
12453
12454        @param n the index of the Event object to remove.
12455
12456        @return the Event object removed, or @c None if the given index is out
12457        of range.
12458
12459
12460
12461        @par
12462        <hr>
12463        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12464         <pre class='signature'>removeEvent(string sid)</pre>
12465
12466        Removes the Event object with the given identifier from this Model
12467        object and returns a pointer to it.
12468
12469        The caller owns the returned object and is responsible for deleting it.
12470
12471        @param sid the identifier of the Event object to remove.
12472
12473        @return the Event object removed, or @c None if no Event object with the
12474        identifier exists in this Model object.
12475
12476        """
12477        return _libsbml.Model_removeEvent(self, *args)
12478
12479    def appendFrom(self, model):
12480        r"""
12481        appendFrom(Model self, Model model) -> int
12482
12483        Copies a given Model object's subcomponents and appends the copies to
12484        the appropriate places in this Model.
12485
12486        This method also calls the <code>appendFrom</code> method on all libSBML
12487        plug-in objects.
12488
12489        @par
12490        SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
12491        via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
12492        that it uses one or more SBML packages, and likewise, a software tool may be
12493        able to support one or more packages.  LibSBML does not come preconfigured
12494        with all possible packages included and enabled, in part because not all
12495        package specifications have been finalized.  To support the ability for
12496        software systems to enable support for the Level&nbsp;3 packages they choose,
12497        libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
12498        package is implemented in a separate code plug-in that can be enabled by the
12499        application to support working with that SBML package.  A given SBML model
12500        may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
12501        objects created by libSBML plug-ins supporting additional Level&nbsp;3
12502        packages.
12503
12504        @param model the Model to merge with this one.
12505
12506        """
12507        return _libsbml.Model_appendFrom(self, model)
12508
12509    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
12510        r"""
12511        enablePackageInternal(Model self, string pkgURI, string pkgPrefix, bool flag)
12512
12513        @internal
12514
12515        @internal
12516
12517        """
12518        return _libsbml.Model_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
12519
12520    def updateSBMLNamespace(self, package, level, version):
12521        r"""
12522        updateSBMLNamespace(Model self, string package, unsigned int level, unsigned int version)
12523
12524        @internal
12525
12526        @internal
12527
12528        """
12529        return _libsbml.Model_updateSBMLNamespace(self, package, level, version)
12530
12531    def renameIDs(self, elements, idTransformer):
12532        r"""
12533        renameIDs(Model self, SBaseList elements, IdentifierTransformer idTransformer)
12534
12535        @internal
12536
12537        @internal
12538
12539        """
12540        return _libsbml.Model_renameIDs(self, elements, idTransformer)
12541
12542# Register Model in _libsbml:
12543_libsbml.Model_swigregister(Model)
12544
12545IdCheckON = _libsbml.IdCheckON
12546
12547IdCheckOFF = _libsbml.IdCheckOFF
12548
12549SBMLCheckON = _libsbml.SBMLCheckON
12550
12551SBMLCheckOFF = _libsbml.SBMLCheckOFF
12552
12553SBOCheckON = _libsbml.SBOCheckON
12554
12555SBOCheckOFF = _libsbml.SBOCheckOFF
12556
12557MathCheckON = _libsbml.MathCheckON
12558
12559MathCheckOFF = _libsbml.MathCheckOFF
12560
12561UnitsCheckON = _libsbml.UnitsCheckON
12562
12563UnitsCheckOFF = _libsbml.UnitsCheckOFF
12564
12565OverdeterCheckON = _libsbml.OverdeterCheckON
12566
12567OverdeterCheckOFF = _libsbml.OverdeterCheckOFF
12568
12569PracticeCheckON = _libsbml.PracticeCheckON
12570
12571PracticeCheckOFF = _libsbml.PracticeCheckOFF
12572
12573AllChecksON = _libsbml.AllChecksON
12574
12575class SBMLDocument(SBase):
12576    r"""
12577
12578    @sbmlpackage{core}
12579
12580    @htmlinclude pkg-marker-core.html Overall SBML container object.
12581
12582    @if clike LibSBML uses the class SBMLDocument as a
12583    top-level container for storing SBML content and data associated with it
12584    (such as warnings and error messages).  The two primary means of reading
12585    an SBML model, SBMLReader.readSBML() and
12586    SBMLReader.readSBMLFromString(), both return a pointer to an
12587    SBMLDocument object.  From there, callers can inquire about any errors
12588    encountered (e.g., using SBMLDocument.getNumErrors()), access the Model
12589    object, and perform other actions such as consistency-checking and model
12590    translation.
12591    @endif@if python LibSBML uses the class SBMLDocument as a
12592    top-level container for storing SBML content and data associated with it
12593    (such as warnings and error messages).  The two primary means of reading
12594    an SBML model, SBMLReader.readSBML() and
12595    SBMLReader.readSBMLFromString(), both return a pointer to an
12596    SBMLDocument object.  From there, callers can inquire about any errors
12597    encountered (e.g., using SBMLDocument.getNumErrors()), access the Model
12598    object, and perform other actions such as consistency-checking and model
12599    translation.
12600    @endif@if java LibSBML uses the class SBMLDocument as a top-level
12601    container for storing SBML content and data associated with it (such as
12602    warnings and error messages).  The two primary means of reading an SBML
12603    model, SBMLReader.readSBML() and
12604    SBMLReader.readSBMLFromString(), both return an SBMLDocument
12605    object.  From there, callers can inquire about any errors encountered
12606    (e.g., using SBMLDocument.getNumErrors()), access the Model object, and
12607    perform other actions such as consistency-checking and model
12608    translation.
12609    @endif@~
12610
12611    When creating fresh models programmatically, the starting point is
12612    typically the creation of an SBMLDocument object instance.  The
12613    SBMLDocument constructor accepts arguments for the SBML Level and
12614    Version of the model to be created.  After creating the SBMLDocument
12615    object, calling programs then typically call SBMLDocument.createModel()
12616    almost immediately, and then proceed to call the methods on the Model
12617    object to fill out the model's contents.
12618
12619    SBMLDocument corresponds roughly to the class <i>Sbml</i> defined in the
12620    SBML Level&nbsp;2 specification and <i>SBML</i> in the Level&nbsp;3
12621    specification.  It does not have a direct correspondence in SBML
12622    Level&nbsp;1.  (However, to make matters simpler for applications,
12623    libSBML creates an SBMLDocument no matter whether the model is
12624    Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)  In its barest form, when written out in
12625    XML format for (e.g.) SBML Level&nbsp;2 Version&nbsp;4, the corresponding
12626    structure is the following:
12627    @verbatim
12628    <sbml xmlns='http://www.sbml.org/sbml/level2/version4' level='2' version='4'>
12629      ...
12630    </sbml>@endverbatim
12631
12632    SBMLDocument is derived from SBase, and therefore contains the usual SBase
12633    attributes (in SBML Level&nbsp;2 and Level&nbsp;3) of 'metaid' and 'sboTerm', as
12634    well as the subelements 'notes' and 'annotation'.  It also contains the
12635    attributes 'level' and 'version' indicating the Level and Version of the
12636    SBML data structure.  These can be accessed using the methods defined by
12637    the SBase class for that purpose.
12638
12639    @section checking Checking consistency and adherence to SBML specifications
12640
12641    One of the most important features of libSBML is its ability to perform
12642    SBML validation to ensure that a model adheres to the SBML specification
12643    for whatever Level+Version combination the model uses.  SBMLDocument
12644    provides the methods for running consistency-checking and validation
12645    rules on the SBML content.
12646
12647    First, a brief explanation of the rationale is in order.  In libSBML
12648    versions up to and including the version&nbsp;3.3.x series, the
12649    individual methods for creating and setting attributes and other
12650    components were quite lenient, and allowed a caller to compose SBML
12651    entities that might not, in the end, represent valid SBML.  This allowed
12652    applications the freedom to do things such as save incomplete models
12653    (which is useful when models are being developed over long periods of
12654    time).  In the version&nbsp;4.x series, libSBML is somewhat stricter,
12655    but still permits structures to be created independently and the results
12656    to be combined in a separate step.  In all these cases, it means that a
12657    separate validation step is necessary when a calling program finally
12658    wants to finish a complete SBML document.
12659
12660    The primary interface to this validation facility is SBMLDocument's
12661    SBMLDocument.checkInternalConsistency() and
12662    SBMLDocument.checkConsistency().  The former verifies the basic
12663    internal consistency and syntax of an SBML document, and the latter
12664    implements more elaborate validation rules (both those defined by the
12665    SBML specifications, as well as additional rules offered by libSBML).
12666
12667    @if clike The checks performed by SBMLDocument.checkInternalConsistency() are
12668    hardwired and cannot be changed by calling programs, but the validation
12669    performed by SBMLDocument.checkConsistency() is under program control
12670    using the method SBMLDocument.setConsistencyChecks().  Applications can
12671    selectively disable specific kinds of checks that they may not be
12672    interested in, by calling SBMLDocument.setConsistencyChecks() with
12673    appropriate parameters.
12674    @endif@if python The checks performed by SBMLDocument.checkInternalConsistency() are
12675    hardwired and cannot be changed by calling programs, but the validation
12676    performed by SBMLDocument.checkConsistency() is under program control
12677    using the method SBMLDocument.setConsistencyChecks().  Applications can
12678    selectively disable specific kinds of checks that they may not be
12679    interested in, by calling SBMLDocument.setConsistencyChecks() with
12680    appropriate parameters.
12681    @endif@if java The checks performed by SBMLDocument.checkInternalConsistency() are
12682    hardwired and cannot be changed by calling programs, but the validation
12683    performed by SBMLDocument.checkConsistency() is under program control
12684    using the method SBMLDocument.setConsistencyChecks().  Applications can selectively disable specific kinds of checks
12685    that they may not be interested by calling
12686    SBMLDocument.setConsistencyChecks() with
12687    appropriate parameters.
12688    @endif@~
12689
12690    These methods have slightly different relevance depending on whether a
12691    model is created programmaticaly from scratch, or whether it is read in
12692    from a file or data stream.  The following list summarizes the possible
12693    scenarios.
12694
12695    <em>Scenario 1: Creating a model from scratch</em>.  Before writing out
12696    the model,
12697
12698    @li Call SBMLDocument.checkInternalConsistency(), then inquire about
12699    the results by calling SBMLDocument.getNumErrors()
12700
12701    @li Call @if java SBMLDocument.setConsistencyChecks() @else SBMLDocument.setConsistencyChecks() @endif@~ to configure
12702    which checks will be performed by SBMLDocument.checkConsistency()
12703
12704    @li Call SBMLDocument.checkConsistency(), then inquire about the results by
12705    calling SBMLDocument.getNumErrors()
12706
12707    <em>Scenario 2: Reading a model from a file or data stream.</em> After
12708    reading the model,
12709
12710    @li Basic consistency checks will have been performed automatically by
12711    libSBML upon reading the content, so you only need to inquire about the
12712    results by using SBMLDocument.getNumErrors()
12713
12714    @li Call @if java SBMLDocument.setConsistencyChecks() @else SBMLDocument.setConsistencyChecks() @endif@~ to configure
12715    which checks are performed by SBMLDocument.checkConsistency()
12716
12717    @li Call SBMLDocument.checkConsistency(), then inquire about the results
12718    by calling SBMLDocument.getNumErrors()
12719
12720    @if clike An example of using the consistency-checking
12721    and validation facilities is provided in this manual in the
12722    section @ref libsbml-example. @endif@~
12723
12724    It should be noted that as of SBML Level&nbsp;3 Version&nbsp;2, the Model
12725    became an optional child of SBMLDocument, instead of being required.  This
12726    means that one can no longer use SBMLDocument.getModel() as a cheap method
12727    of checking if an SBML document was read in properly: the more robust
12728    getError methods detailed above must be used instead.
12729
12730    @section converting Converting documents between Levels and Versions of SBML
12731
12732    LibSBML provides facilities for limited translation of SBML between
12733    Levels and Versions of the SBML specifications.  The method for doing is
12734    is @if java SBMLDocument.setLevelAndVersion() @else setLevelAndVersion() @endif.  In
12735    general, models can be converted upward without difficulty (e.g., from
12736    SBML Level&nbsp;1 to Level&nbsp;2, or from an earlier Version of
12737    Level&nbsp;2 to the latest Version of Level&nbsp;2).  Sometimes models
12738    can be translated downward as well, if they do not use constructs
12739    specific to more advanced Levels of SBML.
12740
12741    Calling @if java SBMLDocument.setLevelAndVersion() @else SBMLDocument.setLevelAndVersion() @endif@~ will not @em necessarily lead
12742    to a successful conversion.  The method will return a boolean value
12743    to indicate success or failure.  Callers must check the error log (see
12744    next section) attached to the SBMLDocument object after calling
12745    @if java SBMLDocument.setLevelAndVersion() @else SBMLDocument.setLevelAndVersion() @endif@~ in order to assess whether any
12746    problems arose.
12747
12748    If an application is interested in translating to a lower Level and/or
12749    Version of SBML within a Level, the following methods allow for prior
12750    assessment of whether there is sufficient compatibility to make a
12751    translation possible:
12752
12753    @li SBMLDocument.checkL1Compatibility(),
12754    @li SBMLDocument.checkL2v1Compatibility(),
12755    @li SBMLDocument.checkL2v2Compatibility(),
12756    @li SBMLDocument.checkL2v3Compatibility(),
12757    @li SBMLDocument.checkL2v4Compatibility(),
12758    @li SBMLDocument.checkL2v5Compatibility(), and
12759    @li SBMLDocument.checkL3v1Compatibility().
12760
12761    Some changes between Versions of SBML Level&nbsp;2 may lead to
12762    unexpected behaviors when attempting conversions in either direction.
12763    For example, SBML Level&nbsp;2 Version&nbsp;4 relaxed the requirement
12764    for consistency in units of measurement between expressions annd
12765    quantities in a model.  As a result, a model written in Version&nbsp;4,
12766    if converted to Version&nbsp;3 with no other changes, may fail
12767    validation as a Version&nbsp;3 model because Version&nbsp;3 imposed
12768    stricter requirements on unit consistency.
12769
12770    Other changes between SBML Level 2 and Level 3 make downward conversions
12771    challenging.  In some cases, it means that a model converted to
12772    Level&nbsp;2 from Level&nbsp;3 will contain attributes that were not
12773    explicitly given in the Level&nbsp;3 model, because in Level&nbsp;2
12774    these attributes may have been optional or have default values.
12775
12776    @section errors Error handling
12777
12778    Upon reading a model, SBMLDocument logs any problems encountered while
12779    reading the model from the file or data stream.  The log contains
12780    objects that record diagnostic information about any notable issues that
12781    arose.  Whether the problems are warnings or errors, they are both
12782    reported through a single common interface involving the object class
12783    SBMLError.
12784
12785    The methods SBMLDocument.getNumErrors(), @if java SBMLDocument.getError() @else SBMLDocument.getError() @endif@~ and
12786    SBMLDocument.printErrors() allow callers to interact with the warnings
12787    or errors logged.  Alternatively, callers may retrieve the entire log as
12788    an SBMLErrorLog object using the method SBMLDocument.getErrorLog().
12789    The SBMLErrorLog object provides some alternative methods for
12790    interacting with the set of errors and warnings.  In either case,
12791    applications typically should first call SBMLDocument.getNumErrors() to
12792    find out if any issues have been logged after specific libSBML
12793    operations such as the ones discussed in the sections above.  If they
12794    have, then an application will should proceed to inspect the individual
12795    reports using either the direct interfaces on SBMLDocument or using the
12796    methods on the SBMLErrorLog object.
12797
12798    @if clike An example of using the error facility is
12799    provided in this manual in the
12800    section @ref libsbml-example. @endif@~
12801
12802    """
12803
12804    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12805    __repr__ = _swig_repr
12806
12807    @staticmethod
12808    def getDefaultLevel():
12809        r"""
12810        getDefaultLevel() -> unsigned int
12811
12812        The default SBML Level of new SBMLDocument objects.
12813
12814        @par
12815        This 'default Level' corresponds to the most recent SBML specification
12816        Level available at the time libSBML version @htmlinclude
12817        libsbml-version.html was released.  The default Level is used by
12818        SBMLDocument if no Level is explicitly specified at the time of the
12819        construction of an SBMLDocument instance.
12820
12821        @return an integer indicating the most recent SBML specification Level.
12822
12823        @if python @note Because this is a static method on a class, the Python
12824        language interface for libSBML will contain two variants.  One will be the
12825        expected, normal static method on the class (i.e., a regular
12826        <em>methodName</em>), and the other will be a standalone top-level
12827        function with the name <em>ClassName_methodName()</em>. This is merely an
12828        artifact of how the language interfaces are created in libSBML.  The
12829        methods are functionally identical. @endif@~
12830
12831        @see @if clike getDefaultVersion() @else SBMLDocument.getDefaultVersion() @endif@~
12832
12833        """
12834        return _libsbml.SBMLDocument_getDefaultLevel()
12835
12836    @staticmethod
12837    def getDefaultVersion():
12838        r"""
12839        getDefaultVersion() -> unsigned int
12840
12841        The default Version of new SBMLDocument objects.
12842
12843        @par
12844        This 'default Version' corresponds to the most recent Version within the
12845        most recent Level of SBML available at the time libSBML version
12846        @htmlinclude libsbml-version.html was released.  The default Version is
12847        used by SBMLDocument if no Version is explicitly specified at the time of
12848        the construction of an SBMLDocument instance.
12849
12850        @return an integer indicating the most recent SBML specification
12851        Version.
12852
12853        @if python @note Because this is a static method on a class, the Python
12854        language interface for libSBML will contain two variants.  One will be the
12855        expected, normal static method on the class (i.e., a regular
12856        <em>methodName</em>), and the other will be a standalone top-level
12857        function with the name <em>ClassName_methodName()</em>. This is merely an
12858        artifact of how the language interfaces are created in libSBML.  The
12859        methods are functionally identical. @endif@~
12860
12861        @see @if clike getDefaultLevel() @else SBMLDocument.getDefaultLevel() @endif@~
12862
12863        """
12864        return _libsbml.SBMLDocument_getDefaultVersion()
12865    __swig_destroy__ = _libsbml.delete_SBMLDocument
12866
12867    def __init__(self, *args):
12868        r"""
12869        __init__(SBMLDocument self, unsigned int level=0, unsigned int version=0) -> SBMLDocument
12870        __init__(SBMLDocument self, SBMLNamespaces sbmlns) -> SBMLDocument
12871        __init__(SBMLDocument self, SBMLDocument orig) -> SBMLDocument
12872
12873        This method has multiple variants; they differ in the arguments
12874         they accept.  Each variant is described separately below.
12875
12876        @par
12877        <hr>
12878        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12879         <pre class='signature'>SBMLDocument(SBMLNamespaces sbmlns)</pre>
12880
12881        Creates a new SBMLDocument using the given SBMLNamespaces object
12882        @p sbmlns.
12883
12884        @par
12885        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
12886        information.  It is used to communicate the SBML Level, Version, and (in
12887        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
12888        common approach to using libSBML's SBMLNamespaces facilities is to create an
12889        SBMLNamespaces object somewhere in a program once, then hand that object
12890        as needed to object constructors that accept SBMLNamespaces as arguments.
12891
12892        @param sbmlns an SBMLNamespaces object.
12893
12894        @throws SBMLConstructorException
12895        Thrown if the given @p sbmlns is inconsistent or incompatible
12896        with this object.
12897
12898
12899        @par
12900        <hr>
12901        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12902         <pre class='signature'>SBMLDocument(long level = 0, long version = 0)</pre>
12903
12904        Creates a new SBMLDocument, optionally with given values for the SBML
12905        Level and Version.
12906
12907        If <em>both</em> the SBML Level and Version attributes are not
12908        specified, the SBML document is treated as having the latest Level and
12909        Version of SBML as determined by SBMLDocument.getDefaultLevel() and
12910        SBMLDocument.getDefaultVersion(); <em>however</em>, the SBMLDocument
12911        object is otherwise left blank.  In particular, the blank SBMLDocument
12912        object has no associated XML attributes, including (but not limited
12913        to) an XML namespace declaration.  The XML namespace declaration is
12914        not added until the model is written out, <em>or</em> the method
12915        SBMLDocument.setLevelAndVersion()
12916        is called.  This may be important to keep in mind
12917        if an application needs to add additional XML namespace declarations
12918        on the <code>&lt;sbml&gt;</code> element.  Application writers should
12919        either provide values for @p level and @p version on the call to this
12920        constructor, or else call
12921        SBMLDocument.setLevelAndVersion()
12922        shortly after creating the SBMLDocument object.
12923
12924        @param level an integer for the SBML Level.
12925
12926        @param version an integer for the Version within the SBML Level.
12927
12928        @throws SBMLConstructorException
12929        Thrown if the given @p level and @p version combination are invalid
12930        or if this object is incompatible with the given level and version.
12931
12932        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
12933
12934        @see SBMLDocument.setLevelAndVersion()
12935        @see getDefaultLevel()
12936        @see getDefaultVersion()
12937
12938
12939
12940        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
12941
12942
12943        @par
12944        <hr>
12945        <span class='variant-sig-heading'>Method variant with the following signature</span>:
12946         <pre class='signature'>SBMLDocument(SBMLDocument orig)</pre>
12947
12948        Copy constructor; creates a copy of this SBMLDocument.
12949
12950        @param orig the object to copy.
12951
12952        """
12953        _libsbml.SBMLDocument_swiginit(self, _libsbml.new_SBMLDocument(*args))
12954
12955    def clone(self):
12956        r"""
12957        clone(SBMLDocument self) -> SBMLDocument
12958
12959        Creates and returns a deep copy of this SBMLDocument object.
12960
12961        @return the (deep) copy of this SBMLDocument object.
12962
12963        """
12964        return _libsbml.SBMLDocument_clone(self)
12965
12966    def isSetModel(self):
12967        r"""
12968        isSetModel(SBMLDocument self) -> bool
12969
12970        Returns @c True if the Model object has been set, otherwise
12971        returns @c False.
12972
12973        @return @c True if the Model object has been set
12974
12975        """
12976        return _libsbml.SBMLDocument_isSetModel(self)
12977
12978    def getModel(self, *args):
12979        r"""
12980        getModel(SBMLDocument self) -> Model
12981        getModel(SBMLDocument self) -> Model
12982
12983        Returns the Model object stored in this SBMLDocument.
12984
12985        It is important to note that this method <em>does not create</em> a
12986        Model instance.  The model in the SBMLDocument must have been created
12987        at some prior time, for example using SBMLDocument.createModel()
12988        or SBMLDocument.setModel().
12989        This method returns @c None if a model does not yet exist.
12990
12991        @return the Model contained in this SBMLDocument, or @c None if no such model exists.
12992
12993        @see createModel()
12994
12995        """
12996        return _libsbml.SBMLDocument_getModel(self, *args)
12997
12998    def getElementBySId(self, id):
12999        r"""
13000        getElementBySId(SBMLDocument self, string id) -> SBase
13001
13002        Returns the first child element found that has the given @p id in the
13003        model-wide SId namespace, or @c None if no such object is found.
13004
13005        @param id string representing the id of the object to find.
13006
13007        @return pointer to the first element found with the given @p id.
13008
13009        """
13010        return _libsbml.SBMLDocument_getElementBySId(self, id)
13011
13012    def getElementByMetaId(self, metaid):
13013        r"""
13014        getElementByMetaId(SBMLDocument self, string metaid) -> SBase
13015
13016        Returns the first child element it can find with the given @p metaid, or
13017        itself if it has the given @p metaid, or @c None if no such object is
13018        found.
13019
13020        @param metaid string representing the metaid of the object to find.
13021
13022        @return pointer to the first element found with the given @p metaid.
13023
13024        """
13025        return _libsbml.SBMLDocument_getElementByMetaId(self, metaid)
13026
13027    def expandFunctionDefinitions(self):
13028        r"""
13029        expandFunctionDefinitions(SBMLDocument self) -> bool
13030
13031        Removes FunctionDefinition constructs from the document and expands
13032        any instances of their use within <code>&lt;math&gt;</code> elements.
13033
13034        For example, suppose a Model contains a FunctionDefinition with
13035        identifier @c 'f' representing the math expression: <em>f(x, y) = x *
13036        y</em>.  Suppose further that there is a reaction in which the
13037        <code>&lt;math&gt;</code> element of the KineticLaw object contains
13038        <code>f(s, p)</code>, where @c s and @c p are other identifiers
13039        defined in the model.  The outcome of invoking this method is that the
13040        <code>&lt;math&gt;</code> of the KineticLaw now represents the
13041        expression <em>s * p</em> and the model no longer contains any
13042        FunctionDefinition objects.
13043
13044        @return bool @c True if the transformation was successful,
13045        @c False, otherwise.
13046
13047        @note This function will check the consistency of a model before
13048        attemptimg the transformation.  If the model is not valid SBML, the
13049        transformation will not be performed and the function will return
13050        @c False.
13051
13052        """
13053        return _libsbml.SBMLDocument_expandFunctionDefinitions(self)
13054
13055    def expandInitialAssignments(self):
13056        r"""
13057        expandInitialAssignments(SBMLDocument self) -> bool
13058
13059        Removes InitialAssignment constructs from the document and
13060        replaces them with appropriate values.
13061
13062        For example, suppose a Model contains a InitialAssignment to a symbol
13063        @c 'k' where @c 'k' is the identifier of a Parameter.  The outcome of
13064        invoking this method is that the 'value' attribute of the Parameter
13065        definition is set to the result calculated using the InitialAssignment
13066        object's <code>&lt;math&gt;</code> formula, and the corresponding
13067        InitialAssignment is then removed from the Model.
13068
13069        @return bool @c True if the transformation was successful,
13070        @c False, otherwise.
13071
13072        @note This function will check the consistency of a model before
13073        attemptimg the transformation.  If the model is not valid SBML, the
13074        transformation will not be performed and the function will return
13075        @c False.  As part of that process, this method will check that it has
13076        values for any components referred to by the <code>&lt;math&gt;</code>
13077        elements of InitialAssignment objects.  In cases where not all of the
13078        values have been declared (e.g., if the mathematical expression refers
13079        to model entities that have no declared values), the InitialAssignment
13080        in question will @em not be removed and this method will return
13081        @c False.
13082
13083        """
13084        return _libsbml.SBMLDocument_expandInitialAssignments(self)
13085
13086    def setLevelAndVersion(self, level, version, strict=True, ignorePackages=False):
13087        r"""
13088        setLevelAndVersion(SBMLDocument self, unsigned int level, unsigned int version, bool strict=True, bool ignorePackages=False) -> bool
13089
13090        Sets the SBML Level and Version of this SBMLDocument instance,
13091        attempting to convert the model as needed.
13092
13093        This method is the principal way in libSBML to convert models between
13094        Levels and Versions of SBML.  Generally, models can be converted
13095        upward without difficulty (e.g., from SBML Level&nbsp;1 to
13096        Level&nbsp;2, or from an earlier Version of Level&nbsp;2 to the latest
13097        Version of Level&nbsp;2).  Sometimes models can be translated downward
13098        as well, if they do not use constructs specific to more advanced
13099        Levels of SBML.
13100
13101        Before calling this method, callers may check compatibility directly
13102        using the methods SBMLDocument.checkL1Compatibility(),
13103        SBMLDocument.checkL2v1Compatibility(),
13104        SBMLDocument.checkL2v2Compatibility(),
13105        SBMLDocument.checkL2v3Compatibility(),
13106        SBMLDocument.checkL2v4Compatibility(),
13107        SBMLDocument.checkL2v5Compatibility(),
13108        SBMLDocument.checkL3v1Compatibility(), and
13109        SBMLDocument.checkL3v2Compatibility().
13110
13111        The valid combinations of SBML Level and Version as of this release
13112        of libSBML are the following:
13113        <ul>
13114        <li> Level&nbsp;1 Version&nbsp;2
13115        <li> Level&nbsp;2 Version&nbsp;1
13116        <li> Level&nbsp;2 Version&nbsp;2
13117        <li> Level&nbsp;2 Version&nbsp;3
13118        <li> Level&nbsp;2 Version&nbsp;4
13119        <li> Level&nbsp;2 Version&nbsp;5
13120        <li> Level&nbsp;3 Version&nbsp;1
13121        <li> Level&nbsp;3 Version&nbsp;2
13122        </ul>
13123
13124        Strict conversion applies the additional criteria that both the
13125        source and the target model must be consistent SBML.  Users can
13126        control the consistency checks that are applied using the
13127        SBMLDocument.setConsistencyChecksForConversion() method.  If either
13128        the source or the potential target model have validation errors, the
13129        conversion is not performed.  When a strict conversion is successful,
13130        the underlying SBML object model is altered to reflect the new level
13131        and version.  Thus, information that cannot be converted
13132        (e.g. sboTerms) will be lost.
13133
13134        @param level the desired SBML Level.
13135
13136        @param version the desired Version within the SBML Level.
13137
13138        @param strict boolean indicating whether to check consistency
13139        of both the source and target model when performing
13140        conversion (defaults to <code> true </code>).
13141
13142        @param ignorePackages boolean indicating whether the presence of
13143        packages should be ignored by the conversion routine
13144        (defaults to <code> false </code>).
13145
13146        @return @c True if the level and version of the document were
13147        successfully set to the requested values (which may have required
13148        conversion of the model), @c False otherwise.
13149
13150        @note Calling this method will not @em necessarily lead to a successful
13151        conversion.  If the conversion fails, it will be logged in the error
13152        list associated with this SBMLDocument.  Callers should consult
13153        getNumErrors() to find out if the conversion succeeded without
13154        problems.  For conversions from Level&nbsp;2 to Level&nbsp;1, callers
13155        can also check the Level of the model after calling this method to
13156        find out whether it is Level&nbsp;1.  (If the conversion to
13157        Level&nbsp;1 failed, the Level of this model will be left unchanged.)
13158
13159        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
13160
13161        @see checkL1Compatibility()
13162        @see checkL2v1Compatibility()
13163        @see checkL2v2Compatibility()
13164        @see checkL2v3Compatibility()
13165        @see checkL2v4Compatibility()
13166        @see checkL2v5Compatibility()
13167        @see checkL3v1Compatibility()
13168
13169
13170
13171        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
13172
13173        """
13174        return _libsbml.SBMLDocument_setLevelAndVersion(self, level, version, strict, ignorePackages)
13175
13176    def updateSBMLNamespace(self, package, level, version):
13177        r"""
13178        updateSBMLNamespace(SBMLDocument self, string package, unsigned int level, unsigned int version)
13179
13180        @internal
13181
13182        @internal
13183
13184        """
13185        return _libsbml.SBMLDocument_updateSBMLNamespace(self, package, level, version)
13186
13187    def setModel(self, m):
13188        r"""
13189        setModel(SBMLDocument self, Model m) -> int
13190
13191        Sets the Model for this SBMLDocument to a copy of the given Model.
13192
13193        @param m the new Model to use.
13194
13195        @return integer value indicating success/failure of the
13196        function.  @if clike The value is drawn from the
13197        enumeration #OperationReturnValues_t. @endif@~ The possible values
13198        returned by this function are:
13199        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
13200        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
13201        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
13202
13203        @see createModel()
13204        @see getModel()
13205
13206        """
13207        return _libsbml.SBMLDocument_setModel(self, m)
13208
13209    def createModel(self, *args):
13210        r"""
13211        createModel(SBMLDocument self, string sid="") -> Model
13212
13213        Creates a new Model inside this SBMLDocument, and returns a pointer to
13214        it.
13215
13216        In SBML Level&nbsp;2, the use of an identifier on a Model object is
13217        optional.  This method takes an optional argument, @p sid, for setting
13218        the identifier.  If not supplied, the identifier attribute on the
13219        Model instance is not set.
13220
13221        @param sid the identifier of the new Model to create.
13222
13223        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
13224
13225        @see getModel()
13226        @see SBMLDocument.setModel()
13227
13228
13229
13230        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
13231
13232        """
13233        return _libsbml.SBMLDocument_createModel(self, *args)
13234
13235    def setLocationURI(self, uri):
13236        r"""
13237        setLocationURI(SBMLDocument self, string uri)
13238
13239        Sets the location of this SBMLDocument.
13240
13241        Called automatically when readSBMLFromFile is used, but may be set
13242        manually as well.
13243
13244        """
13245        return _libsbml.SBMLDocument_setLocationURI(self, uri)
13246
13247    def getLocationURI(self, *args):
13248        r"""
13249        getLocationURI(SBMLDocument self) -> string
13250        getLocationURI(SBMLDocument self) -> string
13251
13252        Get the location of this SBMLDocument.
13253
13254        If this document was read from a file or had its location set manually,
13255        that filename or set location will be returned, otherwise, an empty
13256        string is returned.
13257
13258        """
13259        return _libsbml.SBMLDocument_getLocationURI(self, *args)
13260
13261    def setConsistencyChecks(self, category, apply):
13262        r"""
13263        setConsistencyChecks(SBMLDocument self, SBMLErrorCategory_t category, bool apply)
13264
13265        Controls the consistency checks that are performed when
13266        SBMLDocument.checkConsistency() is called.
13267
13268        This method works by adding or subtracting consistency checks from the
13269        set of all possible checks that SBMLDocument.checkConsistency() knows
13270        how to perform.  This method may need to be called multiple times in
13271        order to achieve the desired combination of checks.  The first
13272        argument (@p category) in a call to this method indicates the category
13273        of consistency/error checks that are to be turned on or off, and the
13274        second argument (@p apply, a boolean) indicates whether to turn it on
13275        (value of @c True) or off (value of @c False).
13276
13277        @if clike
13278        The possible categories (values to the argument @p category) are the
13279        set of values from the enumeration #SBMLErrorCategory_t.
13280        The following are the possible choices:
13281        @endif@if java
13282        The possible categories (values to the argument @p category) are the
13283        set of constants whose names begin with the characters <code>LIBSBML_CAT_</code>
13284        in the interface class {@link libsbmlConstants}.
13285        The following are the possible choices:
13286        @endif@if python
13287        The possible categories (values to the argument @p category) are the
13288        set of constants whose names begin with the characters <code>LIBSBML_CAT_</code>
13289        in the interface class @link libsbml libsbml@endlink.
13290        The following are the possible choices:
13291        @endif@~
13292        <ul>
13293        <li> @link libsbml#LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink:
13294        Correctness and consistency of specific SBML language constructs.
13295        Performing this set of checks is highly recommended.  With respect to
13296        the SBML specification, these concern failures in applying the
13297        validation rules numbered 2xxxx in the Level&nbsp;2
13298        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13299
13300        <li> @link libsbml#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink:
13301        Correctness and consistency of identifiers used for model entities.  An
13302        example of inconsistency would be using a species identifier in a
13303        reaction rate formula without first having declared the species.  With
13304        respect to the SBML specification, these concern failures in applying
13305        the validation rules numbered 103xx in the Level&nbsp;2
13306        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13307
13308        <li> @link libsbml#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink:
13309        Consistency of measurement units associated with quantities in a model.
13310        With respect to the SBML specification, these concern failures in
13311        applying the validation rules numbered 105xx in the Level&nbsp;2
13312        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13313
13314        <li> @link libsbml#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink:
13315        Syntax of MathML constructs.  With respect to the SBML specification,
13316        these concern failures in applying the validation rules numbered 102xx
13317        in the Level&nbsp;2 Versions&nbsp;2&ndash;4 and Level&nbsp;3
13318        Versions&nbsp;1&ndash;2 specifications.
13319
13320        <li> @link libsbml#LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink:
13321        Consistency and validity of %SBO identifiers (if any) used in the model.
13322        With respect to the SBML specification, these concern failures in
13323        applying the validation rules numbered 107xx in the Level&nbsp;2
13324        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13325
13326        <li> @link libsbml#LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink:
13327        Static analysis of whether the system of equations implied by a model is
13328        mathematically overdetermined.  With respect to the SBML specification,
13329        this is validation rule #10601 in the Level&nbsp;2
13330        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13331
13332        <li> @link libsbml#LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink:
13333        Additional checks for recommended good modeling practice. (These are
13334        tests performed by libSBML and do not have equivalent SBML validation
13335        rules.)  </ul>
13336
13337        <em>By default, all validation checks are applied</em> to the model in
13338        an SBMLDocument object @em unless
13339        SBMLDocument.setConsistencyChecks()
13340        is called to indicate that only a subset should be applied.  Further,
13341        this default (i.e., performing all checks) applies separately to
13342        <em>each new SBMLDocument object</em> created.  In other words, each
13343        time a model is read using SBMLReader.readSBML(),
13344        SBMLReader.readSBMLFromString(),
13345        or the global functions readSBML() and readSBMLFromString(), a new
13346        SBMLDocument is created and for that document, a call to
13347        SBMLDocument.checkConsistency() will default to applying all possible checks.
13348        Calling programs must invoke
13349        SBMLDocument.setConsistencyChecks()
13350        for each such new model if they wish to change the consistency checks
13351        applied.
13352
13353        @param category a value drawn from @if clike #SBMLErrorCategory_t@else
13354        the set of SBML error categories@endif@~ indicating the
13355        consistency checking/validation to be turned on or off.
13356
13357        @param apply a boolean indicating whether the checks indicated by
13358        @p category should be applied or not.
13359
13360        @see SBMLDocument.checkConsistency()
13361
13362        """
13363        return _libsbml.SBMLDocument_setConsistencyChecks(self, category, apply)
13364
13365    def setConsistencyChecksForConversion(self, category, apply):
13366        r"""
13367        setConsistencyChecksForConversion(SBMLDocument self, SBMLErrorCategory_t category, bool apply)
13368
13369        Controls the consistency checks that are performed when
13370        SBMLDocument.setLevelAndVersion() is called.
13371
13372        This method works by adding or subtracting consistency checks from the
13373        set of all possible checks that may be performed to avoid conversion
13374        to or from an invalid document.  This method may need to be called
13375        multiple times in
13376        order to achieve the desired combination of checks.  The first
13377        argument (@p category) in a call to this method indicates the category
13378        of consistency/error checks that are to be turned on or off, and the
13379        second argument (@p apply, a boolean) indicates whether to turn it on
13380        (value of @c True) or off (value of @c False).
13381
13382        @if clike
13383        The possible categories (values to the argument @p category) are the
13384        set of values from the enumeration #SBMLErrorCategory_t.
13385        The following are the possible choices:
13386        @endif@if java
13387        The possible categories (values to the argument @p category) are the
13388        set of constants whose names begin with the characters <code>LIBSBML_CAT_</code>
13389        in the interface class {@link libsbmlConstants}.
13390        The following are the possible choices:
13391        @endif@if python
13392        The possible categories (values to the argument @p category) are the
13393        set of constants whose names begin with the characters <code>LIBSBML_CAT_</code>
13394        in the interface class @link libsbml libsbml@endlink.
13395        The following are the possible choices:
13396        @endif@~
13397        <ul>
13398        <li> @link libsbml#LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink:
13399        Correctness and consistency of specific SBML language constructs.
13400        Performing this set of checks is highly recommended.  With respect to
13401        the SBML specification, these concern failures in applying the
13402        validation rules numbered 2xxxx in the Level&nbsp;2
13403        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13404
13405        <li> @link libsbml#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink:
13406        Correctness and consistency of identifiers used for model entities.  An
13407        example of inconsistency would be using a species identifier in a
13408        reaction rate formula without first having declared the species.  With
13409        respect to the SBML specification, these concern failures in applying
13410        the validation rules numbered 103xx in the Level&nbsp;2
13411        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13412
13413        <li> @link libsbml#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink:
13414        Consistency of measurement units associated with quantities in a model.
13415        With respect to the SBML specification, these concern failures in
13416        applying the validation rules numbered 105xx in the Level&nbsp;2
13417        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13418
13419        <li> @link libsbml#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink:
13420        Syntax of MathML constructs.  With respect to the SBML specification,
13421        these concern failures in applying the validation rules numbered 102xx
13422        in the Level&nbsp;2 Versions&nbsp;2&ndash;4 and Level&nbsp;3
13423        Versions&nbsp;1&ndash;2 specifications.
13424
13425        <li> @link libsbml#LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink:
13426        Consistency and validity of %SBO identifiers (if any) used in the model.
13427        With respect to the SBML specification, these concern failures in
13428        applying the validation rules numbered 107xx in the Level&nbsp;2
13429        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13430
13431        <li> @link libsbml#LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink:
13432        Static analysis of whether the system of equations implied by a model is
13433        mathematically overdetermined.  With respect to the SBML specification,
13434        this is validation rule #10601 in the Level&nbsp;2
13435        Versions&nbsp;2&ndash;4 and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.
13436
13437        <li> @link libsbml#LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink:
13438        Additional checks for recommended good modeling practice. (These are
13439        tests performed by libSBML and do not have equivalent SBML validation
13440        rules.)
13441        </ul>
13442
13443        <em>By default, all validation checks are applied</em> to the model in
13444        an SBMLDocument object @em unless
13445        SBMLDocument.setConsistencyChecks()
13446        is called to indicate that only a subset should be applied.  Further,
13447        this default (i.e., performing all checks) applies separately to
13448        <em>each new SBMLDocument object</em> created.  In other words, each
13449        time a model is read using SBMLReader.readSBML(),
13450        SBMLReader.readSBMLFromString(),
13451        or the global functions readSBML() and readSBMLFromString(), a new
13452        SBMLDocument is created and for that document, a call to
13453        SBMLDocument.checkConsistency() will default to applying all possible checks.
13454        Calling programs must invoke
13455        SBMLDocument.setConsistencyChecks()
13456        for each such new model if they wish to change the consistency checks
13457        applied.
13458
13459        @param category a value drawn from @if clike #SBMLErrorCategory_t@else
13460        the set of SBML error categories@endif@~ indicating the consistency
13461        checking/validation to be turned on or off.
13462
13463        @param apply a boolean indicating whether the checks indicated by
13464        @p category should be applied or not.
13465
13466        @see SBMLDocument.setLevelAndVersion()
13467
13468        """
13469        return _libsbml.SBMLDocument_setConsistencyChecksForConversion(self, category, apply)
13470
13471    def checkConsistency(self):
13472        r"""
13473        checkConsistency(SBMLDocument self) -> unsigned int
13474
13475        Performs consistency checking and validation on this SBML document.
13476
13477        If this method returns a nonzero value (meaning, one or more
13478        consistency checks have failed for SBML document), the failures may be
13479        due to warnings @em or errors.  Callers should inspect the severity
13480        flag in the individual SBMLError objects returned by
13481        SBMLDocument.getError() to determine the nature of the failures.
13482
13483        @return the number of failed checks (errors) encountered.
13484
13485        @see SBMLDocument.checkInternalConsistency()
13486
13487        """
13488        return _libsbml.SBMLDocument_checkConsistency(self)
13489
13490    def checkConsistencyWithStrictUnits(self):
13491        r"""
13492        checkConsistencyWithStrictUnits(SBMLDocument self) -> unsigned int
13493
13494        Performs consistency checking and validation on this SBML document
13495        using the ultra strict units validator that assumes that there
13496        are no hidden numerical conversion factors.
13497
13498        If this method returns a nonzero value (meaning, one or more
13499        consistency checks have failed for SBML document), the failures may be
13500        due to warnings @em or errors.  Callers should inspect the severity
13501        flag in the individual SBMLError objects returned by
13502        SBMLDocument.getError() to determine the nature of the failures.
13503
13504        @return the number of failed checks (errors) encountered.
13505
13506        @see SBMLDocument.checkInternalConsistency()
13507
13508        """
13509        return _libsbml.SBMLDocument_checkConsistencyWithStrictUnits(self)
13510
13511    def validateSBML(self):
13512        r"""
13513        validateSBML(SBMLDocument self) -> unsigned int
13514
13515        Performs consistency checking and validation on this SBML document.
13516
13517        If this method returns a nonzero value (meaning, one or more
13518        consistency checks have failed for SBML document), the failures may be
13519        due to warnings @em or errors.  Callers should inspect the severity
13520        flag in the individual SBMLError objects returned by
13521        SBMLDocument.getError() to determine the nature of the failures.
13522
13523        @note unlike checkConsistency this method will write the document
13524        in order to determine all errors for the document. This will
13525        also clear the error log.
13526
13527        @return the number of failed checks (errors) encountered.
13528
13529        @see SBMLDocument.checkConsistency()
13530
13531        """
13532        return _libsbml.SBMLDocument_validateSBML(self)
13533
13534    def checkInternalConsistency(self):
13535        r"""
13536        checkInternalConsistency(SBMLDocument self) -> unsigned int
13537
13538        Performs consistency checking on libSBML's internal representation of
13539        an SBML Model.
13540
13541        Callers should query the results of the consistency check by calling
13542        SBMLDocument.getError().
13543
13544        @return the number of failed checks (errors) encountered.
13545
13546        The distinction between this method and
13547        SBMLDocument.checkConsistency() is that this method reports on
13548        fundamental syntactic and structural errors that violate the XML
13549        Schema for SBML; by contrast, SBMLDocument.checkConsistency()
13550        performs more elaborate model verifications and also validation
13551        according to the validation rules written in the appendices of the
13552        SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 specification documents.
13553
13554        @see SBMLDocument.checkConsistency()
13555
13556        """
13557        return _libsbml.SBMLDocument_checkInternalConsistency(self)
13558
13559    def checkL1Compatibility(self, inConversion=False):
13560        r"""
13561        checkL1Compatibility(SBMLDocument self, bool inConversion=False) -> unsigned int
13562
13563        Performs a set of consistency checks on the document to establish
13564        whether it is compatible with SBML Level&nbsp;1 and can be converted
13565        to Level&nbsp;1.
13566
13567        Callers should query the results of the consistency check by calling
13568        SBMLDocument.getError().
13569
13570        @return the number of failed checks (errors) encountered.
13571
13572
13573
13574        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
13575
13576        """
13577        return _libsbml.SBMLDocument_checkL1Compatibility(self, inConversion)
13578
13579    def checkL2v1Compatibility(self, inConversion=False):
13580        r"""
13581        checkL2v1Compatibility(SBMLDocument self, bool inConversion=False) -> unsigned int
13582
13583        Performs a set of consistency checks on the document to establish
13584        whether it is compatible with SBML Level&nbsp;2 Version&nbsp;1 and can
13585        be converted to Level&nbsp;2 Version&nbsp;1.
13586
13587        Callers should query the results of the consistency check by calling
13588        SBMLDocument.getError().
13589
13590        @return the number of failed checks (errors) encountered.
13591
13592
13593
13594        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
13595
13596        """
13597        return _libsbml.SBMLDocument_checkL2v1Compatibility(self, inConversion)
13598
13599    def checkL2v2Compatibility(self, inConversion=False):
13600        r"""
13601        checkL2v2Compatibility(SBMLDocument self, bool inConversion=False) -> unsigned int
13602
13603        Performs a set of consistency checks on the document to establish
13604        whether it is compatible with SBML Level&nbsp;2 Version&nbsp;2 and can
13605        be converted to Level&nbsp;2 Version&nbsp;2.
13606
13607        Callers should query the results of the consistency check by calling
13608        SBMLDocument.getError().
13609
13610        @return the number of failed checks (errors) encountered.
13611
13612
13613
13614        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
13615
13616        """
13617        return _libsbml.SBMLDocument_checkL2v2Compatibility(self, inConversion)
13618
13619    def checkL2v3Compatibility(self, inConversion=False):
13620        r"""
13621        checkL2v3Compatibility(SBMLDocument self, bool inConversion=False) -> unsigned int
13622
13623        Performs a set of consistency checks on the document to establish
13624        whether it is compatible with SBML Level&nbsp;2 Version&nbsp;3 and can
13625        be converted to Level&nbsp;2 Version&nbsp;3.
13626
13627        Callers should query the results of the consistency check by calling
13628        SBMLDocument.getError().
13629
13630        @return the number of failed checks (errors) encountered.
13631
13632
13633
13634        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
13635
13636        """
13637        return _libsbml.SBMLDocument_checkL2v3Compatibility(self, inConversion)
13638
13639    def checkL2v4Compatibility(self):
13640        r"""
13641        checkL2v4Compatibility(SBMLDocument self) -> unsigned int
13642
13643        Performs a set of consistency checks on the document to establish
13644        whether it is compatible with SBML Level&nbsp;2 Version&nbsp;4 and can
13645        be converted to Level&nbsp;2 Version&nbsp;4.
13646
13647        Callers should query the results of the consistency check by calling
13648        SBMLDocument.getError().
13649
13650        @return the number of failed checks (errors) encountered.
13651
13652        """
13653        return _libsbml.SBMLDocument_checkL2v4Compatibility(self)
13654
13655    def checkL2v5Compatibility(self):
13656        r"""
13657        checkL2v5Compatibility(SBMLDocument self) -> unsigned int
13658
13659        Performs a set of consistency checks on the document to establish
13660        whether it is compatible with SBML Level&nbsp;2 Version&nbsp;5 and can
13661        be converted to Level&nbsp;2 Version&nbsp;5.
13662
13663        Callers should query the results of the consistency check by calling
13664        SBMLDocument.getError().
13665
13666        @return the number of failed checks (errors) encountered.
13667
13668        """
13669        return _libsbml.SBMLDocument_checkL2v5Compatibility(self)
13670
13671    def checkL3v1Compatibility(self):
13672        r"""
13673        checkL3v1Compatibility(SBMLDocument self) -> unsigned int
13674
13675        Performs a set of consistency checks on the document to establish
13676        whether it is compatible with SBML Level&nbsp;3 Version&nbsp;1 and can
13677        be converted to Level&nbsp;3 Version&nbsp;1.
13678
13679        Callers should query the results of the consistency check by calling
13680        SBMLDocument.getError().
13681
13682        @return the number of failed checks (errors) encountered.
13683
13684        """
13685        return _libsbml.SBMLDocument_checkL3v1Compatibility(self)
13686
13687    def checkL3v2Compatibility(self):
13688        r"""
13689        checkL3v2Compatibility(SBMLDocument self) -> unsigned int
13690
13691        Performs a set of consistency checks on the document to establish
13692        whether it is compatible with SBML Level&nbsp;3 Version&nbsp;2 and can
13693        be converted to Level&nbsp;3 Version&nbsp;2.
13694
13695        Callers should query the results of the consistency check by calling
13696        SBMLDocument.getError().
13697
13698        @return the number of failed checks (errors) encountered.
13699
13700        """
13701        return _libsbml.SBMLDocument_checkL3v2Compatibility(self)
13702
13703    def getError(self, n):
13704        r"""
13705        getError(SBMLDocument self, unsigned int n) -> SBMLError
13706
13707        Returns the nth error or warning encountered during parsing,
13708        consistency checking, or attempted translation of this model.
13709
13710        Callers can use method XMLError.getSeverity() on the result to assess
13711        the severity of the problem.  The possible severity levels range from
13712        informational messages to fatal errors.
13713
13714        @return the error or warning indexed by integer @p n, or return
13715        @c None if <code>n &gt; (getNumErrors() - 1)</code>.
13716
13717        @param n the integer index of the error sought.
13718
13719        @see SBMLDocument.getNumErrors()
13720
13721        """
13722        return _libsbml.SBMLDocument_getError(self, n)
13723
13724    def getErrorWithSeverity(self, n, severity):
13725        r"""
13726        getErrorWithSeverity(SBMLDocument self, unsigned int n, unsigned int severity) -> SBMLError
13727
13728        Returns the nth error or warning with the given severity
13729        encountered during parsing, consistency checking, or attempted
13730        translation of this model.
13731
13732        @return the error or warning indexed by integer @p n, or return
13733        @c None if <code>n &gt; (getNumErrors(severity) - 1)</code>.
13734
13735        @param n the integer index of the error sought.
13736        @param severity the severity of the error sought.
13737
13738        @see SBMLDocument.getNumErrors()
13739
13740        """
13741        return _libsbml.SBMLDocument_getErrorWithSeverity(self, n, severity)
13742
13743    def getNumErrors(self, *args):
13744        r"""
13745        getNumErrors(SBMLDocument self) -> unsigned int
13746        getNumErrors(SBMLDocument self, unsigned int severity) -> unsigned int
13747
13748        This method has multiple variants; they differ in the arguments
13749         they accept.  Each variant is described separately below.
13750
13751        @par
13752        <hr>
13753        <span class='variant-sig-heading'>Method variant with the following signature</span>:
13754         <pre class='signature'>getNumErrors(long severity)</pre>
13755
13756        Returns the number of errors or warnings encountered with the given
13757        severity during parsing,
13758        consistency checking, or attempted translation of this model.
13759
13760        @param severity the severity of the error sought.
13761
13762        @return the number of errors or warnings encountered.
13763
13764        @see SBMLDocument.getError()
13765
13766
13767        @par
13768        <hr>
13769        <span class='variant-sig-heading'>Method variant with the following signature</span>:
13770         <pre class='signature'>getNumErrors()</pre>
13771
13772        Returns the number of errors or warnings encountered during parsing,
13773        consistency checking, or attempted translation of this model.
13774
13775        @return the number of errors or warnings encountered.
13776
13777        @see SBMLDocument.getError()
13778
13779        """
13780        return _libsbml.SBMLDocument_getNumErrors(self, *args)
13781
13782    def printErrors(self, *args):
13783        r"""
13784        printErrors(SBMLDocument self, ostream stream=cerr)
13785        printErrors(SBMLDocument self, ostream stream, unsigned int severity)
13786
13787        This method has multiple variants; they differ in the arguments
13788         they accept.  Each variant is described separately below.
13789
13790        @par
13791        <hr>
13792        <span class='variant-sig-heading'>Method variant with the following signature</span>:
13793         <pre class='signature'>printErrors(std::ostream stream, long severity)</pre>
13794
13795        Prints all the errors or warnings with the given severity encountered
13796        trying to parse, check, or translate this SBML document.
13797
13798        It prints the text to the stream given by the parameter @p
13799        stream.
13800
13801        If no errors have occurred, i.e., <code>getNumErrors(severity) == 0</code>, no
13802        output will be sent to the stream.
13803
13804        The format of the output is:
13805        @verbatim
13806            N error(s):
13807              line NNN: (id) message
13808        @endverbatim
13809
13810        @param stream the ostream or ostringstream object indicating where
13811        the output should be printed.
13812        @param severity of the errors sought.
13813
13814        @see getNumErrors()
13815        @see getErrorLog()
13816        @see SBMLDocument.getErrorWithSeverity()
13817
13818
13819        @par
13820        <hr>
13821        <span class='variant-sig-heading'>Method variant with the following signature</span>:
13822         <pre class='signature'>printErrors(std::ostream stream = std::cerr)</pre>
13823
13824        Prints all the errors or warnings encountered trying to parse,
13825        check, or translate this SBML document.
13826
13827        It prints the text to the stream given by the optional parameter @p
13828        stream.  If no parameter is given, it prints the output to the
13829        standard error stream.
13830
13831        If no errors have occurred, i.e., <code>getNumErrors() == 0</code>, no
13832        output will be sent to the stream.
13833
13834        The format of the output is:
13835        @verbatim
13836           N error(s):
13837             line NNN: (id) message
13838         @endverbatim
13839
13840        @param stream the ostream or ostringstream object indicating where
13841        the output should be printed.
13842
13843        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
13844
13845        @see getNumErrors()
13846        @see getErrorLog()
13847        @see SBMLDocument.getError()
13848
13849
13850
13851        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
13852
13853        """
13854        return _libsbml.SBMLDocument_printErrors(self, *args)
13855
13856    def connectToChild(self):
13857        r"""connectToChild(SBMLDocument self)"""
13858        return _libsbml.SBMLDocument_connectToChild(self)
13859
13860    def convert(self, props):
13861        r"""
13862        convert(SBMLDocument self, ConversionProperties props) -> int
13863
13864        Converts this document using the converter that best matches
13865        the given conversion properties.
13866
13867        @param props the conversion properties to use.
13868
13869        @return integer value indicating success/failure of the
13870        function.  @if clike The value is drawn from the
13871        enumeration #OperationReturnValues_t. @endif@~ The possible values
13872        returned by this function are:
13873        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
13874        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
13875        @li @link libsbml#LIBSBML_CONV_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_CONVERSION_NOT_AVAILABLE@endlink
13876
13877        """
13878        return _libsbml.SBMLDocument_convert(self, props)
13879
13880    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
13881        r"""
13882        enablePackageInternal(SBMLDocument self, string pkgURI, string pkgPrefix, bool flag)
13883
13884        @internal
13885
13886        @internal
13887
13888        """
13889        return _libsbml.SBMLDocument_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
13890
13891    def getTypeCode(self):
13892        r"""
13893        getTypeCode(SBMLDocument self) -> int
13894
13895        Returns the libSBML type code for this %SBML object.
13896
13897        @par
13898        LibSBML attaches an identifying code to every kind of SBML object.  These
13899        are integer constants known as <em>SBML type codes</em>.  The names of all
13900        the codes begin with the characters <code>SBML_</code>.
13901        @if clike The set of possible type codes for core elements is defined in
13902        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
13903        SBML Level&nbsp;3 packages define their own extra enumerations of type
13904        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
13905        package).@endif@if java In the Java language interface for libSBML, the
13906        type codes are defined as static integer constants in the interface class
13907        {@link libsbmlConstants}.  @endif@if python In the Python language
13908        interface for libSBML, the type codes are defined as static integer
13909        constants in the interface class @link libsbml@endlink.@endif@if csharp In
13910        the C# language interface for libSBML, the type codes are defined as
13911        static integer constants in the interface class
13912        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
13913        package plug-ins may use overlapping type codes; to identify the package
13914        to which a given object belongs, call the
13915        <code>@if conly SBase_getPackageName()
13916        @else SBase.getPackageName()
13917        @endif</code>
13918        method on the object.
13919
13920        The exception to this is lists:  all SBML-style list elements have the type
13921        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
13922        are from.
13923
13924        @return the SBML type code for this object:
13925        @link libsbml#SBML_DOCUMENT SBML_DOCUMENT@endlink (default).
13926
13927        @warning <span class='warning'>The specific integer values of the possible
13928        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
13929        packages,  To fully identify the correct code, <strong>it is necessary to
13930        invoke both getPackageName() and getTypeCode()</strong> (or
13931        ListOf.getItemTypeCode()).</span>
13932
13933        @see SBMLDocument.getElementName()
13934        @see getPackageName()
13935
13936        """
13937        return _libsbml.SBMLDocument_getTypeCode(self)
13938
13939    def getElementName(self):
13940        r"""
13941        getElementName(SBMLDocument self) -> string
13942
13943        Returns the XML element name of this object, which for SBMLDocument,
13944        is always @c 'sbml'.
13945
13946        @return the name of this element, i.e., @c 'sbml'.
13947
13948        """
13949        return _libsbml.SBMLDocument_getElementName(self)
13950
13951    def getErrorLog(self, *args):
13952        r"""
13953        getErrorLog(SBMLDocument self) -> SBMLErrorLog
13954        getErrorLog(SBMLDocument self) -> SBMLErrorLog
13955
13956        Returns the list of errors or warnings logged during parsing,
13957        consistency checking, or attempted translation of this model.
13958
13959        @return the SBMLErrorLog used for this SBMLDocument.
13960
13961        @see SBMLDocument.getNumErrors()
13962
13963        """
13964        return _libsbml.SBMLDocument_getErrorLog(self, *args)
13965
13966    def getNamespaces(self):
13967        r"""
13968        getNamespaces(SBMLDocument self) -> XMLNamespaces
13969
13970        Returns a list of XML Namespaces associated with the XML content
13971        of this SBML document.
13972
13973        @return the XML Namespaces associated with this SBML object.
13974
13975        """
13976        return _libsbml.SBMLDocument_getNamespaces(self)
13977
13978    def enableDefaultNS(self, package, flag):
13979        r"""
13980        enableDefaultNS(SBMLDocument self, string package, bool flag) -> int
13981
13982        Set/unset default namespace to each top-level element defined in the
13983        given package extension.
13984
13985        This works by adding a <code>xmlns=&quot;...&quot;</code> attribute.  No
13986        prefix will be written when writing elements defined in the given
13987        package extension if @c True is given as second argument.
13988
13989        @param package the name or URI of the package extension.
13990        @param flag boolean value to indicate whether to write a namespace
13991        prefix.
13992
13993        @return integer value indicating success/failure of the
13994        function.  @if clike The value is drawn from the
13995        enumeration #OperationReturnValues_t. @endif@~ The possible values
13996        returned by this function are:
13997        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
13998        @li @link libsbml#LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION@endlink
13999
14000        """
14001        return _libsbml.SBMLDocument_enableDefaultNS(self, package, flag)
14002
14003    def isEnabledDefaultNS(self, package):
14004        r"""
14005        isEnabledDefaultNS(SBMLDocument self, string package) -> bool
14006
14007        Returns @c True if a default namespace is added to each top-level
14008        element defined in the given package extension, otherwise returns
14009        @c False.
14010
14011        This basically checks if the attribute
14012        <code>xmlns=&quot;...&quot;</code> is present.
14013
14014        @param package the name or URI of the package extension.
14015
14016        @return a boolean indicating whether the given package's default namespace is enabled.
14017
14018        """
14019        return _libsbml.SBMLDocument_isEnabledDefaultNS(self, package)
14020
14021    def setPackageRequired(self, package, flag):
14022        r"""
14023        setPackageRequired(SBMLDocument self, string package, bool flag) -> int
14024
14025        Sets the <code>required</code> attribute value of the given package
14026        extension.
14027
14028        @param package the name or URI of the package extension.
14029        @param flag Boolean value indicating whether the package is required.
14030
14031        @return integer value indicating success/failure of the
14032        function.  @if clike The value is drawn from the
14033        enumeration #OperationReturnValues_t. @endif@~ The possible values
14034        returned by this function are:
14035        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
14036        @li @link libsbml#LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION@endlink
14037
14038        """
14039        return _libsbml.SBMLDocument_setPackageRequired(self, package, flag)
14040
14041    def getPackageRequired(self, package):
14042        r"""
14043        getPackageRequired(SBMLDocument self, string package) -> bool
14044
14045        Returns the <code>required</code> attribute of the given package
14046        extension.
14047
14048        @param package the name or URI of the package extension.
14049
14050        @return Boolean flag indicating whether the package is flagged as
14051        being required.
14052
14053        """
14054        return _libsbml.SBMLDocument_getPackageRequired(self, package)
14055
14056    def isSetPackageRequired(self, package):
14057        r"""
14058        isSetPackageRequired(SBMLDocument self, string package) -> bool
14059
14060        Returns @c True if the required attribute of the given package extension
14061        is defined, otherwise returns @c False.
14062
14063        @param package the name or URI of the package extension.
14064
14065        @return a Boolean indicating whether the package's 'required' flag is set.
14066
14067        """
14068        return _libsbml.SBMLDocument_isSetPackageRequired(self, package)
14069
14070    def isIgnoredPackage(self, pkgURI):
14071        r"""
14072        isIgnoredPackage(SBMLDocument self, string pkgURI) -> bool
14073
14074        Returns @c True if the given package extension is one of an ignored
14075        packages, otherwise returns @c False.
14076
14077        An ignored package is one that is defined to be used in this SBML
14078        document, but the package is not enabled in this copy of libSBML.
14079
14080        @param pkgURI the URI of the package extension.
14081
14082        @return a Boolean, @c True if the package is being ignored and
14083        @c False otherwise.
14084
14085        """
14086        return _libsbml.SBMLDocument_isIgnoredPackage(self, pkgURI)
14087
14088    def isDisabledIgnoredPackage(self, pkgURI):
14089        r"""
14090        isDisabledIgnoredPackage(SBMLDocument self, string pkgURI) -> bool
14091
14092        Returns @c True if the given package extension is one of an ignored
14093        packages that has been disabled, otherwise returns @c False.
14094
14095        An ignored package is one that is defined to be used in this SBML
14096        document, but the package is not enabled in this copy of libSBML.
14097        It may have been disabled to avoid reproducing the package
14098        information when writing out the file.
14099
14100        @param pkgURI the URI of the package extension.
14101
14102        @return a Boolean, @c True if the package is being ignored and
14103        @c False otherwise.
14104
14105        """
14106        return _libsbml.SBMLDocument_isDisabledIgnoredPackage(self, pkgURI)
14107
14108    def setPkgRequired(self, package, flag):
14109        r"""
14110        setPkgRequired(SBMLDocument self, string package, bool flag) -> int
14111
14112        Sets the value of the <code>required</code> attribute for the given
14113        package.
14114
14115        @param package the name or URI of the package extension.
14116        @param flag a Boolean value.
14117
14118        @return integer value indicating success/failure of the
14119        function.  @if clike The value is drawn from the
14120        enumeration #OperationReturnValues_t. @endif@~ The possible values
14121        returned by this function are:
14122        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
14123        @li @link libsbml#LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION@endlink
14124
14125        @deprecated Replaced in libSBML 5.2.0 by
14126        setPackageRequired(@if java String, boolean@endif)
14127
14128        """
14129        return _libsbml.SBMLDocument_setPkgRequired(self, package, flag)
14130
14131    def getPkgRequired(self, package):
14132        r"""
14133        getPkgRequired(SBMLDocument self, string package) -> bool
14134
14135        Returns the <code>required</code> attribute of the given package
14136        extension.
14137
14138        @param package the name or URI of the package extension.
14139
14140        @return a Boolean value indicating whether the package is flagged as
14141        being required in this SBML document.
14142
14143        @deprecated Replaced in libSBML 5.2.0 by
14144        getPackageRequired(@if java String@endif)
14145
14146        """
14147        return _libsbml.SBMLDocument_getPkgRequired(self, package)
14148
14149    def isSetPkgRequired(self, package):
14150        r"""
14151        isSetPkgRequired(SBMLDocument self, string package) -> bool
14152
14153        Returns @c True if the required attribute of the given package extension
14154        is defined, otherwise returns @c False.
14155
14156        @param package the name or URI of the package extension.
14157
14158        @return a Boolean value.
14159
14160        @deprecated Replaced in libSBML 5.2.0 by
14161        isSetPackageRequired(@if java String@endif)
14162
14163        """
14164        return _libsbml.SBMLDocument_isSetPkgRequired(self, package)
14165
14166    def isIgnoredPkg(self, pkgURI):
14167        r"""
14168        isIgnoredPkg(SBMLDocument self, string pkgURI) -> bool
14169
14170        Returns @c True if the given package extension is one of ignored
14171        packages, otherwise returns @c False.
14172
14173        An ignored package is one that is defined to be used in this SBML
14174        document, but the package is not enabled in this copy of libSBML.
14175
14176        @param pkgURI the URI of the package extension.
14177
14178        @return a boolean indicating whether the given package is being ignored.
14179
14180        @deprecated Replaced in libSBML 5.2.0 by
14181        isIgnoredPackage(@if java String@endif)
14182
14183        """
14184        return _libsbml.SBMLDocument_isIgnoredPkg(self, pkgURI)
14185
14186    def getApplicableValidators(self):
14187        r"""
14188        getApplicableValidators(SBMLDocument self) -> unsigned char
14189
14190        @internal
14191
14192        @internal
14193
14194        """
14195        return _libsbml.SBMLDocument_getApplicableValidators(self)
14196
14197    def getConversionValidators(self):
14198        r"""
14199        getConversionValidators(SBMLDocument self) -> unsigned char
14200
14201        @internal
14202
14203        @internal
14204
14205        """
14206        return _libsbml.SBMLDocument_getConversionValidators(self)
14207
14208    def setApplicableValidators(self, appl):
14209        r"""
14210        setApplicableValidators(SBMLDocument self, unsigned char appl)
14211
14212        @internal
14213
14214        @internal
14215
14216        """
14217        return _libsbml.SBMLDocument_setApplicableValidators(self, appl)
14218
14219    def setConversionValidators(self, appl):
14220        r"""
14221        setConversionValidators(SBMLDocument self, unsigned char appl)
14222
14223        @internal
14224
14225        @internal
14226
14227        """
14228        return _libsbml.SBMLDocument_setConversionValidators(self, appl)
14229
14230    def getNumValidators(self):
14231        r"""
14232        getNumValidators(SBMLDocument self) -> unsigned int
14233
14234        @internal
14235
14236        @internal
14237
14238        """
14239        return _libsbml.SBMLDocument_getNumValidators(self)
14240
14241    def clearValidators(self):
14242        r"""
14243        clearValidators(SBMLDocument self) -> int
14244
14245        @internal
14246
14247        @internal
14248
14249        """
14250        return _libsbml.SBMLDocument_clearValidators(self)
14251
14252    def addValidator(self, validator):
14253        r"""
14254        addValidator(SBMLDocument self, SBMLValidator validator) -> int
14255
14256        @internal
14257
14258        @internal
14259
14260        """
14261        return _libsbml.SBMLDocument_addValidator(self, validator)
14262
14263    def getValidator(self, index):
14264        r"""
14265        getValidator(SBMLDocument self, unsigned int index) -> SBMLValidator
14266
14267        @internal
14268
14269        @internal
14270
14271        """
14272        return _libsbml.SBMLDocument_getValidator(self, index)
14273
14274    def addUnknownPackageRequired(self, pkgURI, prefix, flag):
14275        r"""
14276        addUnknownPackageRequired(SBMLDocument self, string pkgURI, string prefix, bool flag) -> int
14277
14278        @internal
14279
14280        @internal
14281
14282        """
14283        return _libsbml.SBMLDocument_addUnknownPackageRequired(self, pkgURI, prefix, flag)
14284
14285    def hasUnknownPackage(self, pkgURI):
14286        r"""
14287        hasUnknownPackage(SBMLDocument self, string pkgURI) -> bool
14288
14289        @internal
14290
14291        @internal
14292
14293        """
14294        return _libsbml.SBMLDocument_hasUnknownPackage(self, pkgURI)
14295
14296    def getNumUnknownPackages(self):
14297        r"""
14298        getNumUnknownPackages(SBMLDocument self) -> int
14299
14300        @internal
14301
14302        @internal
14303
14304        """
14305        return _libsbml.SBMLDocument_getNumUnknownPackages(self)
14306
14307    def getUnknownPackageURI(self, index):
14308        r"""
14309        getUnknownPackageURI(SBMLDocument self, int index) -> string
14310
14311        @internal
14312
14313        @internal
14314
14315        """
14316        return _libsbml.SBMLDocument_getUnknownPackageURI(self, index)
14317
14318    def getUnknownPackagePrefix(self, index):
14319        r"""
14320        getUnknownPackagePrefix(SBMLDocument self, int index) -> string
14321
14322        @internal
14323
14324        @internal
14325
14326        """
14327        return _libsbml.SBMLDocument_getUnknownPackagePrefix(self, index)
14328
14329# Register SBMLDocument in _libsbml:
14330_libsbml.SBMLDocument_swigregister(SBMLDocument)
14331
14332def SBMLDocument_getDefaultLevel():
14333    r"""
14334    SBMLDocument_getDefaultLevel() -> unsigned int
14335
14336    The default SBML Level of new SBMLDocument objects.
14337
14338    @par
14339    This 'default Level' corresponds to the most recent SBML specification
14340    Level available at the time libSBML version @htmlinclude
14341    libsbml-version.html was released.  The default Level is used by
14342    SBMLDocument if no Level is explicitly specified at the time of the
14343    construction of an SBMLDocument instance.
14344
14345    @return an integer indicating the most recent SBML specification Level.
14346
14347    @if python @note Because this is a static method on a class, the Python
14348    language interface for libSBML will contain two variants.  One will be the
14349    expected, normal static method on the class (i.e., a regular
14350    <em>methodName</em>), and the other will be a standalone top-level
14351    function with the name <em>ClassName_methodName()</em>. This is merely an
14352    artifact of how the language interfaces are created in libSBML.  The
14353    methods are functionally identical. @endif@~
14354
14355    @see @if clike getDefaultVersion() @else SBMLDocument.getDefaultVersion() @endif@~
14356
14357    """
14358    return _libsbml.SBMLDocument_getDefaultLevel()
14359
14360def SBMLDocument_getDefaultVersion():
14361    r"""
14362    SBMLDocument_getDefaultVersion() -> unsigned int
14363
14364    The default Version of new SBMLDocument objects.
14365
14366    @par
14367    This 'default Version' corresponds to the most recent Version within the
14368    most recent Level of SBML available at the time libSBML version
14369    @htmlinclude libsbml-version.html was released.  The default Version is
14370    used by SBMLDocument if no Version is explicitly specified at the time of
14371    the construction of an SBMLDocument instance.
14372
14373    @return an integer indicating the most recent SBML specification
14374    Version.
14375
14376    @if python @note Because this is a static method on a class, the Python
14377    language interface for libSBML will contain two variants.  One will be the
14378    expected, normal static method on the class (i.e., a regular
14379    <em>methodName</em>), and the other will be a standalone top-level
14380    function with the name <em>ClassName_methodName()</em>. This is merely an
14381    artifact of how the language interfaces are created in libSBML.  The
14382    methods are functionally identical. @endif@~
14383
14384    @see @if clike getDefaultLevel() @else SBMLDocument.getDefaultLevel() @endif@~
14385
14386    """
14387    return _libsbml.SBMLDocument_getDefaultVersion()
14388
14389class FunctionDefinition(SBase):
14390    r"""
14391
14392    @sbmlpackage{core}
14393
14394    @htmlinclude pkg-marker-core.html A user-defined function in an SBML model.
14395
14396    The FunctionDefinition structure associates an identifier with a
14397    function definition.  This identifier can then be used as the function
14398    called in subsequent MathML content elsewhere in an SBML model.
14399
14400    FunctionDefinition has one required attribute, 'id', to give the
14401    function a unique identifier by which other parts of an SBML model
14402    definition can refer to it.  A FunctionDefinition instance can also have
14403    an optional 'name' attribute of type @c string.  Identifiers and names
14404    must be used according to the guidelines described in the %SBML
14405    specification (e.g., Section 3.3 in the Level 2 Version 4
14406    specification).
14407
14408    FunctionDefinition has a 'math' subelement containing a MathML
14409    expression defining the function body.  In SBML Level&nbsp;2 and SBML
14410    Level&nbsp;3 Version&nbsp;1, that 'math' subelement is required;
14411    in SBML Level&nbsp;3 Version&nbsp;2, this restriction was relaxed,
14412    making the 'math' subelement optional.  The content of this element can
14413    only be a MathML 'lambda' element.  The 'lambda' element must begin with
14414    zero or more 'bvar' elements, followed by any other of the elements in
14415    the MathML subset allowed in SBML Level 2 @em except 'lambda' (i.e., a
14416    'lambda' element cannot contain another 'lambda' element).  This is the
14417    only place in SBML where a 'lambda' element can be used.  The function
14418    defined by a FunctionDefinition is only available for use in other
14419    MathML elements that @em follow the FunctionDefinition definition in the
14420    model.  (These restrictions prevent recursive and mutually-recursive
14421    functions from being expressed.)
14422
14423    A further restriction on the content of 'math' is that it cannot contain
14424    references to variables other than the variables declared to the
14425    'lambda' itself.  That is, the contents of MathML 'ci' elements inside
14426    the body of the 'lambda' can only be the variables declared by its
14427    'bvar' elements, or the identifiers of other FunctionDefinition
14428    instances in the model.  This means must be written so that all
14429    variables or parameters used in the MathML content are passed to them
14430    via their function parameters.  In SBML Level&nbsp;2, this restriction
14431    applies also to the MathML @c csymbol elements for @em time and @em
14432    delay; in SBML Level&nbsp;3, it additionally applies to the @c csymbol
14433    element for @em avogadro.
14434
14435    In SBML Level&nbsp;3 Version&nbsp;2, if no math element is present in
14436    the FunctionDefinition, the function has no mathematical meaning
14437    defined in SBML Level&nbsp;3 Core. This situation may arise when models
14438    are incomplete, or when additional meanings are provided by an SBML
14439    Level&nbsp;3 package.
14440
14441    @note Function definitions (also informally known as user-defined
14442    functions) were introduced in SBML Level 2.  They have purposefully
14443    limited capabilities.  A function cannot reference parameters or other
14444    model quantities outside of itself; values must be passed as parameters
14445    to the function.  Moreover, recursive and mutually-recursive functions
14446    are not permitted.  The purpose of these limitations is to balance power
14447    against complexity of implementation.  With the restrictions as they
14448    are, function definitions could be implemented as textual
14449    substitutions---they are simply macros.  Software implementations
14450    therefore do not need the full function-definition machinery typically
14451    associated with programming languages.
14452    <br><br>
14453    Another important point to note is FunctionDefinition does not
14454    have a separate attribute for defining the units of the value returned
14455    by the function.  The units associated with the function's return value,
14456    when the function is called from within MathML expressions elsewhere in
14457    SBML, are simply the overall units of the expression in
14458    FunctionDefinition's 'math' subelement when applied to the arguments
14459    supplied in the call to the function.  Ascertaining these units requires
14460    performing dimensional analysis on the expression.  (Readers may wonder
14461    why there is no attribute.  The reason is that having a separate
14462    attribute for declaring the units would not only be redundant, but also
14463    lead to the potential for having conflicting information.  In the case
14464    of a conflict between the declared units and those of the value actually
14465    returned by the function, the only logical resolution rule would be to
14466    assume that the correct units are those of the expression anyway.)
14467
14468    """
14469
14470    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14471    __repr__ = _swig_repr
14472    __swig_destroy__ = _libsbml.delete_FunctionDefinition
14473
14474    def __init__(self, *args):
14475        r"""
14476        __init__(FunctionDefinition self, unsigned int level, unsigned int version) -> FunctionDefinition
14477        __init__(FunctionDefinition self, SBMLNamespaces sbmlns) -> FunctionDefinition
14478        __init__(FunctionDefinition self, FunctionDefinition orig) -> FunctionDefinition
14479
14480        This method has multiple variants; they differ in the arguments
14481         they accept.  Each variant is described separately below.
14482
14483        @par
14484        <hr>
14485        <span class='variant-sig-heading'>Method variant with the following signature</span>:
14486         <pre class='signature'>FunctionDefinition(SBMLNamespaces sbmlns)</pre>
14487
14488        Creates a new FunctionDefinition using the given SBMLNamespaces object
14489        @p sbmlns.
14490
14491        @par
14492        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
14493        information.  It is used to communicate the SBML Level, Version, and (in
14494        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
14495        common approach to using libSBML's SBMLNamespaces facilities is to create an
14496        SBMLNamespaces object somewhere in a program once, then hand that object
14497        as needed to object constructors that accept SBMLNamespaces as arguments.
14498
14499        @param sbmlns an SBMLNamespaces object.
14500
14501        @throws SBMLConstructorException
14502        Thrown if the given @p sbmlns is inconsistent or incompatible
14503        with this object.
14504
14505        @note Attempting to add an object to an SBMLDocument having a different
14506        combination of SBML Level, Version and XML namespaces than the object
14507        itself will result in an error at the time a caller attempts to make the
14508        addition.  A parent object must have compatible Level, Version and XML
14509        namespaces.  (Strictly speaking, a parent may also have more XML
14510        namespaces than a child, but the reverse is not permitted.)  The
14511        restriction is necessary to ensure that an SBML model has a consistent
14512        overall structure.  This requires callers to manage their objects
14513        carefully, but the benefit is increased flexibility in how models can be
14514        created by permitting callers to create objects bottom-up if desired.  In
14515        situations where objects are not yet attached to parents (e.g.,
14516        SBMLDocument), knowledge of the intented SBML Level and Version help
14517        libSBML determine such things as whether it is valid to assign a
14518        particular value to an attribute.
14519
14520
14521        @par
14522        <hr>
14523        <span class='variant-sig-heading'>Method variant with the following signature</span>:
14524         <pre class='signature'>FunctionDefinition(long level, long version)</pre>
14525
14526        Creates a new FunctionDefinition using the given SBML @p level and @p version
14527        values.
14528
14529        @param level a long integer, the SBML Level to assign to this FunctionDefinition.
14530
14531        @param version a long integer, the SBML Version to assign to this
14532        FunctionDefinition.
14533
14534        @throws SBMLConstructorException
14535        Thrown if the given @p level and @p version combination are invalid
14536        or if this object is incompatible with the given level and version.
14537
14538        @note Attempting to add an object to an SBMLDocument having a different
14539        combination of SBML Level, Version and XML namespaces than the object
14540        itself will result in an error at the time a caller attempts to make the
14541        addition.  A parent object must have compatible Level, Version and XML
14542        namespaces.  (Strictly speaking, a parent may also have more XML
14543        namespaces than a child, but the reverse is not permitted.)  The
14544        restriction is necessary to ensure that an SBML model has a consistent
14545        overall structure.  This requires callers to manage their objects
14546        carefully, but the benefit is increased flexibility in how models can be
14547        created by permitting callers to create objects bottom-up if desired.  In
14548        situations where objects are not yet attached to parents (e.g.,
14549        SBMLDocument), knowledge of the intented SBML Level and Version help
14550        libSBML determine such things as whether it is valid to assign a
14551        particular value to an attribute.
14552
14553
14554        @par
14555        <hr>
14556        <span class='variant-sig-heading'>Method variant with the following signature</span>:
14557         <pre class='signature'>FunctionDefinition(FunctionDefinition orig)</pre>
14558
14559        Copy constructor; creates a copy of this FunctionDefinition.
14560
14561        @param orig the object to copy.
14562
14563        """
14564        _libsbml.FunctionDefinition_swiginit(self, _libsbml.new_FunctionDefinition(*args))
14565
14566    def clone(self):
14567        r"""
14568        clone(FunctionDefinition self) -> FunctionDefinition
14569
14570        Creates and returns a deep copy of this FunctionDefinition object.
14571
14572        @return the (deep) copy of this FunctionDefinition object.
14573
14574        """
14575        return _libsbml.FunctionDefinition_clone(self)
14576
14577    def getId(self):
14578        r"""
14579        getId(FunctionDefinition self) -> string
14580
14581        Returns the value of the 'id' attribute of this FunctionDefinition.
14582
14583        @note Because of the inconsistent behavior of this function with
14584        respect to assignments and rules, it is now recommended to
14585        use the getIdAttribute() function instead.
14586
14587        @par
14588        The identifier given by an object's 'id' attribute value
14589        is used to identify the object within the SBML model definition.
14590        Other objects can refer to the component using this identifier.  The
14591        data type of 'id' is always <code>SId</code> or a type derived
14592        from that, such as <code>UnitSId</code>, depending on the object in
14593        question.  All data types are defined as follows:
14594        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
14595        letter ::= 'a'..'z','A'..'Z'
14596        digit  ::= '0'..'9'
14597        idChar ::= letter | digit | '_'
14598        SId    ::= ( letter | '_' ) idChar*
14599        </pre>
14600        The characters <code>(</code> and <code>)</code> are used for grouping,
14601        the character <code>*</code> 'zero or more times', and the character
14602        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
14603        is determined by an exact character sequence match; i.e., comparisons must
14604        be performed in a case-sensitive manner.  This applies to all uses of
14605        <code>SId</code>, <code>SIdRef</code>, and derived types.
14606
14607        Users need to be aware of some important API issues that are the result of
14608        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
14609        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
14610        of SBML objects.  To simplify the work of programmers, libSBML's API
14611        provided get, set, check, and unset on the SBase object class itself
14612        instead of on individual subobject classes. This made the
14613        get/set/etc. methods uniformly available on all objects in the libSBML
14614        API.  LibSBML simply returned empty strings or otherwise did not act when
14615        the methods were applied to SBML objects that were not defined by the SBML
14616        specification to have 'id' or 'name' attributes.  Additional complications
14617        arose with the rule and assignment objects: InitialAssignment,
14618        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
14619        the rule object hierarchy was different, and in addition, then as now,
14620        they possess different attributes: 'variable' (for the rules and event
14621        assignments), 'symbol' (for initial assignments), or neither (for
14622        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
14623        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
14624
14625        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
14626        Version&nbsp;2, it became necessary to introduce a new way to interact
14627        with the attributes more consistently in libSBML to avoid breaking
14628        backward compatibility in the behavior of the original 'id' methods.  For
14629        this reason, libSBML provides four functions (getIdAttribute(),
14630        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
14631        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
14632        from SBase, regardless of the object's type.  <strong>These new methods
14633        should be used instead of the older getId()/setId()/etc. methods</strong>
14634        unless the old behavior is somehow necessary.  Regardless of the Level and
14635        Version of the SBML, these functions allow client applications to use more
14636        generalized code in some situations (for instance, when manipulating
14637        objects that are all known to have identifiers).  If the object in
14638        question does not posess an 'id' attribute according to the SBML
14639        specification for the Level and Version in use, libSBML will not allow the
14640        identifier to be set, nor will it read or write 'id' attributes for those
14641        objects.
14642
14643        @return the id of this FunctionDefinition.
14644
14645        @see getIdAttribute()
14646        @see setIdAttribute()
14647        @see isSetIdAttribute()
14648        @see unsetIdAttribute()
14649
14650        """
14651        return _libsbml.FunctionDefinition_getId(self)
14652
14653    def getName(self):
14654        r"""
14655        getName(FunctionDefinition self) -> string
14656
14657        Returns the value of the 'name' attribute of this FunctionDefinition object.
14658
14659        @par
14660        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
14661        moved to SBase directly, instead of being defined individually for many
14662        (but not all) objects.  LibSBML has for a long time provided functions
14663        defined on SBase itself to get, set, and unset those attributes, which
14664        would fail or otherwise return empty strings if executed on any object
14665        for which those attributes were not defined.  Now that all SBase objects
14666        define those attributes, those functions now succeed for any object with
14667        the appropriate level and version.
14668
14669        The 'name' attribute is
14670        optional and is not intended to be used for cross-referencing purposes
14671        within a model.  Its purpose instead is to provide a human-readable
14672        label for the component.  The data type of 'name' is the type
14673        <code>string</code> defined in XML Schema.  SBML imposes no
14674        restrictions as to the content of 'name' attributes beyond those
14675        restrictions defined by the <code>string</code> type in XML Schema.
14676
14677        The recommended practice for handling 'name' is as follows.  If a
14678        software tool has the capability for displaying the content of 'name'
14679        attributes, it should display this content to the user as a
14680        component's label instead of the component's 'id'.  If the user
14681        interface does not have this capability (e.g., because it cannot
14682        display or use special characters in symbol names), or if the 'name'
14683        attribute is missing on a given component, then the user interface
14684        should display the value of the 'id' attribute instead.  (Script
14685        language interpreters are especially likely to display 'id' instead of
14686        'name'.)
14687
14688        As a consequence of the above, authors of systems that automatically
14689        generate the values of 'id' attributes should be aware some systems
14690        may display the 'id''s to the user.  Authors therefore may wish to
14691        take some care to have their software create 'id' values that are: (a)
14692        reasonably easy for humans to type and read; and (b) likely to be
14693        meaningful, for example by making the 'id' attribute be an abbreviated
14694        form of the name attribute value.
14695
14696        An additional point worth mentioning is although there are
14697        restrictions on the uniqueness of 'id' values, there are no
14698        restrictions on the uniqueness of 'name' values in a model.  This
14699        allows software applications leeway in assigning component identifiers.
14700
14701        Regardless of the level and version of the SBML, these functions allow
14702        client applications to use more generalized code in some situations
14703        (for instance, when manipulating objects that are all known to have
14704        names).  If the object in question does not posess a 'name' attribute
14705        according to the SBML specification for the Level and Version in use,
14706        libSBML will not allow the name to be set, nor will it read or
14707        write 'name' attributes for those objects.
14708
14709        @return the name of this SBML object, or the empty string if not set or unsettable.
14710
14711        @see getIdAttribute()
14712        @see isSetName()
14713        @see setName()
14714        @see unsetName()
14715
14716        """
14717        return _libsbml.FunctionDefinition_getName(self)
14718
14719    def getMath(self):
14720        r"""
14721        getMath(FunctionDefinition self) -> ASTNode
14722
14723        Get the mathematical formula of this FunctionDefinition.
14724
14725        @return an ASTNode, the value of the 'math' subelement of this
14726        FunctionDefinition, or @c None if the math is not set.
14727
14728        """
14729        return _libsbml.FunctionDefinition_getMath(self)
14730
14731    def isSetId(self):
14732        r"""
14733        isSetId(FunctionDefinition self) -> bool
14734
14735        Predicate returning @c True if this
14736        FunctionDefinition's 'id' attribute is set.
14737
14738        @par
14739        The identifier given by an object's 'id' attribute value
14740        is used to identify the object within the SBML model definition.
14741        Other objects can refer to the component using this identifier.  The
14742        data type of 'id' is always <code>SId</code> or a type derived
14743        from that, such as <code>UnitSId</code>, depending on the object in
14744        question.  All data types are defined as follows:
14745        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
14746        letter ::= 'a'..'z','A'..'Z'
14747        digit  ::= '0'..'9'
14748        idChar ::= letter | digit | '_'
14749        SId    ::= ( letter | '_' ) idChar*
14750        </pre>
14751        The characters <code>(</code> and <code>)</code> are used for grouping,
14752        the character <code>*</code> 'zero or more times', and the character
14753        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
14754        is determined by an exact character sequence match; i.e., comparisons must
14755        be performed in a case-sensitive manner.  This applies to all uses of
14756        <code>SId</code>, <code>SIdRef</code>, and derived types.
14757
14758        Users need to be aware of some important API issues that are the result of
14759        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
14760        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
14761        of SBML objects.  To simplify the work of programmers, libSBML's API
14762        provided get, set, check, and unset on the SBase object class itself
14763        instead of on individual subobject classes. This made the
14764        get/set/etc. methods uniformly available on all objects in the libSBML
14765        API.  LibSBML simply returned empty strings or otherwise did not act when
14766        the methods were applied to SBML objects that were not defined by the SBML
14767        specification to have 'id' or 'name' attributes.  Additional complications
14768        arose with the rule and assignment objects: InitialAssignment,
14769        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
14770        the rule object hierarchy was different, and in addition, then as now,
14771        they possess different attributes: 'variable' (for the rules and event
14772        assignments), 'symbol' (for initial assignments), or neither (for
14773        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
14774        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
14775
14776        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
14777        Version&nbsp;2, it became necessary to introduce a new way to interact
14778        with the attributes more consistently in libSBML to avoid breaking
14779        backward compatibility in the behavior of the original 'id' methods.  For
14780        this reason, libSBML provides four functions (getIdAttribute(),
14781        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
14782        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
14783        from SBase, regardless of the object's type.  <strong>These new methods
14784        should be used instead of the older getId()/setId()/etc. methods</strong>
14785        unless the old behavior is somehow necessary.  Regardless of the Level and
14786        Version of the SBML, these functions allow client applications to use more
14787        generalized code in some situations (for instance, when manipulating
14788        objects that are all known to have identifiers).  If the object in
14789        question does not posess an 'id' attribute according to the SBML
14790        specification for the Level and Version in use, libSBML will not allow the
14791        identifier to be set, nor will it read or write 'id' attributes for those
14792        objects.
14793
14794        @return @c True if the 'id' attribute of this SBML object is
14795        set, @c False otherwise.
14796
14797        @note Because of the inconsistent behavior of this function with
14798        respect to assignments and rules, it is recommended that callers
14799        use isSetIdAttribute() instead.
14800
14801        @see getIdAttribute()
14802        @see setIdAttribute()
14803        @see unsetIdAttribute()
14804        @see isSetIdAttribute()
14805
14806        """
14807        return _libsbml.FunctionDefinition_isSetId(self)
14808
14809    def isSetName(self):
14810        r"""
14811        isSetName(FunctionDefinition self) -> bool
14812
14813        Predicate returning @c True if this
14814        FunctionDefinition's 'name' attribute is set.
14815
14816        @par
14817        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
14818        moved to SBase directly, instead of being defined individually for many
14819        (but not all) objects.  LibSBML has for a long time provided functions
14820        defined on SBase itself to get, set, and unset those attributes, which
14821        would fail or otherwise return empty strings if executed on any object
14822        for which those attributes were not defined.  Now that all SBase objects
14823        define those attributes, those functions now succeed for any object with
14824        the appropriate level and version.
14825
14826        The 'name' attribute is
14827        optional and is not intended to be used for cross-referencing purposes
14828        within a model.  Its purpose instead is to provide a human-readable
14829        label for the component.  The data type of 'name' is the type
14830        <code>string</code> defined in XML Schema.  SBML imposes no
14831        restrictions as to the content of 'name' attributes beyond those
14832        restrictions defined by the <code>string</code> type in XML Schema.
14833
14834        The recommended practice for handling 'name' is as follows.  If a
14835        software tool has the capability for displaying the content of 'name'
14836        attributes, it should display this content to the user as a
14837        component's label instead of the component's 'id'.  If the user
14838        interface does not have this capability (e.g., because it cannot
14839        display or use special characters in symbol names), or if the 'name'
14840        attribute is missing on a given component, then the user interface
14841        should display the value of the 'id' attribute instead.  (Script
14842        language interpreters are especially likely to display 'id' instead of
14843        'name'.)
14844
14845        As a consequence of the above, authors of systems that automatically
14846        generate the values of 'id' attributes should be aware some systems
14847        may display the 'id''s to the user.  Authors therefore may wish to
14848        take some care to have their software create 'id' values that are: (a)
14849        reasonably easy for humans to type and read; and (b) likely to be
14850        meaningful, for example by making the 'id' attribute be an abbreviated
14851        form of the name attribute value.
14852
14853        An additional point worth mentioning is although there are
14854        restrictions on the uniqueness of 'id' values, there are no
14855        restrictions on the uniqueness of 'name' values in a model.  This
14856        allows software applications leeway in assigning component identifiers.
14857
14858        Regardless of the level and version of the SBML, these functions allow
14859        client applications to use more generalized code in some situations
14860        (for instance, when manipulating objects that are all known to have
14861        names).  If the object in question does not posess a 'name' attribute
14862        according to the SBML specification for the Level and Version in use,
14863        libSBML will not allow the name to be set, nor will it read or
14864        write 'name' attributes for those objects.
14865
14866        @return @c True if the 'name' attribute of this SBML object is
14867        set, @c False otherwise.
14868
14869        @see getName()
14870        @see setName()
14871        @see unsetName()
14872
14873        """
14874        return _libsbml.FunctionDefinition_isSetName(self)
14875
14876    def isSetMath(self):
14877        r"""
14878        isSetMath(FunctionDefinition self) -> bool
14879
14880        Predicate returning @c True if this
14881        FunctionDefinition's 'math' subelement contains a value.
14882
14883        @return @c True if the 'math' for this FunctionDefinition is set,
14884        @c False otherwise.
14885
14886        """
14887        return _libsbml.FunctionDefinition_isSetMath(self)
14888
14889    def setId(self, sid):
14890        r"""
14891        setId(FunctionDefinition self, string sid) -> int
14892
14893        Sets the value of the 'id' attribute of this FunctionDefinition.
14894
14895        @par
14896        The string @p sid is copied.
14897
14898        @par
14899        The identifier given by an object's 'id' attribute value
14900        is used to identify the object within the SBML model definition.
14901        Other objects can refer to the component using this identifier.  The
14902        data type of 'id' is always <code>SId</code> or a type derived
14903        from that, such as <code>UnitSId</code>, depending on the object in
14904        question.  All data types are defined as follows:
14905        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
14906        letter ::= 'a'..'z','A'..'Z'
14907        digit  ::= '0'..'9'
14908        idChar ::= letter | digit | '_'
14909        SId    ::= ( letter | '_' ) idChar*
14910        </pre>
14911        The characters <code>(</code> and <code>)</code> are used for grouping,
14912        the character <code>*</code> 'zero or more times', and the character
14913        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
14914        is determined by an exact character sequence match; i.e., comparisons must
14915        be performed in a case-sensitive manner.  This applies to all uses of
14916        <code>SId</code>, <code>SIdRef</code>, and derived types.
14917
14918        Users need to be aware of some important API issues that are the result of
14919        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
14920        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
14921        of SBML objects.  To simplify the work of programmers, libSBML's API
14922        provided get, set, check, and unset on the SBase object class itself
14923        instead of on individual subobject classes. This made the
14924        get/set/etc. methods uniformly available on all objects in the libSBML
14925        API.  LibSBML simply returned empty strings or otherwise did not act when
14926        the methods were applied to SBML objects that were not defined by the SBML
14927        specification to have 'id' or 'name' attributes.  Additional complications
14928        arose with the rule and assignment objects: InitialAssignment,
14929        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
14930        the rule object hierarchy was different, and in addition, then as now,
14931        they possess different attributes: 'variable' (for the rules and event
14932        assignments), 'symbol' (for initial assignments), or neither (for
14933        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
14934        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
14935
14936        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
14937        Version&nbsp;2, it became necessary to introduce a new way to interact
14938        with the attributes more consistently in libSBML to avoid breaking
14939        backward compatibility in the behavior of the original 'id' methods.  For
14940        this reason, libSBML provides four functions (getIdAttribute(),
14941        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
14942        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
14943        from SBase, regardless of the object's type.  <strong>These new methods
14944        should be used instead of the older getId()/setId()/etc. methods</strong>
14945        unless the old behavior is somehow necessary.  Regardless of the Level and
14946        Version of the SBML, these functions allow client applications to use more
14947        generalized code in some situations (for instance, when manipulating
14948        objects that are all known to have identifiers).  If the object in
14949        question does not posess an 'id' attribute according to the SBML
14950        specification for the Level and Version in use, libSBML will not allow the
14951        identifier to be set, nor will it read or write 'id' attributes for those
14952        objects.
14953
14954        @param sid the string to use as the identifier of this object.
14955
14956        @return integer value indicating success/failure of the
14957        function.  @if clike The value is drawn from the
14958        enumeration #OperationReturnValues_t. @endif@~ The possible values
14959        returned by this function are:
14960        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
14961        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
14962        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
14963
14964        @see getIdAttribute()
14965        @see setIdAttribute()
14966        @see isSetIdAttribute()
14967        @see unsetIdAttribute()
14968
14969        """
14970        return _libsbml.FunctionDefinition_setId(self, sid)
14971
14972    def setName(self, name):
14973        r"""
14974        setName(FunctionDefinition self, string name) -> int
14975
14976        Sets the value of the 'name' attribute of this FunctionDefinition.
14977
14978        @par
14979
14980        The string in @p name is copied.
14981
14982        @param name the new name for the SBML object.
14983
14984        @return integer value indicating success/failure of the
14985        function.  @if clike The value is drawn from the
14986        enumeration #OperationReturnValues_t. @endif@~ The possible values
14987        returned by this function are:
14988        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
14989        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
14990
14991        """
14992        return _libsbml.FunctionDefinition_setName(self, name)
14993
14994    def setMath(self, math):
14995        r"""
14996        setMath(FunctionDefinition self, ASTNode math) -> int
14997
14998        Sets the 'math' subelement of this FunctionDefinition to the Abstract
14999        Syntax Tree given in @p math.
15000
15001        @param math an AST containing the mathematical expression to
15002        be used as the formula for this FunctionDefinition.
15003
15004        @return integer value indicating success/failure of the
15005        function.  @if clike The value is drawn from the
15006        enumeration #OperationReturnValues_t. @endif@~ The possible values
15007        returned by this function are:
15008        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
15009        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
15010
15011        """
15012        return _libsbml.FunctionDefinition_setMath(self, math)
15013
15014    def unsetName(self):
15015        r"""
15016        unsetName(FunctionDefinition self) -> int
15017
15018        Unsets the value of the 'name' attribute of this FunctionDefinition.
15019
15020        @par
15021        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
15022        moved to SBase directly, instead of being defined individually for many
15023        (but not all) objects.  LibSBML has for a long time provided functions
15024        defined on SBase itself to get, set, and unset those attributes, which
15025        would fail or otherwise return empty strings if executed on any object
15026        for which those attributes were not defined.  Now that all SBase objects
15027        define those attributes, those functions now succeed for any object with
15028        the appropriate level and version.
15029
15030        The 'name' attribute is
15031        optional and is not intended to be used for cross-referencing purposes
15032        within a model.  Its purpose instead is to provide a human-readable
15033        label for the component.  The data type of 'name' is the type
15034        <code>string</code> defined in XML Schema.  SBML imposes no
15035        restrictions as to the content of 'name' attributes beyond those
15036        restrictions defined by the <code>string</code> type in XML Schema.
15037
15038        The recommended practice for handling 'name' is as follows.  If a
15039        software tool has the capability for displaying the content of 'name'
15040        attributes, it should display this content to the user as a
15041        component's label instead of the component's 'id'.  If the user
15042        interface does not have this capability (e.g., because it cannot
15043        display or use special characters in symbol names), or if the 'name'
15044        attribute is missing on a given component, then the user interface
15045        should display the value of the 'id' attribute instead.  (Script
15046        language interpreters are especially likely to display 'id' instead of
15047        'name'.)
15048
15049        As a consequence of the above, authors of systems that automatically
15050        generate the values of 'id' attributes should be aware some systems
15051        may display the 'id''s to the user.  Authors therefore may wish to
15052        take some care to have their software create 'id' values that are: (a)
15053        reasonably easy for humans to type and read; and (b) likely to be
15054        meaningful, for example by making the 'id' attribute be an abbreviated
15055        form of the name attribute value.
15056
15057        An additional point worth mentioning is although there are
15058        restrictions on the uniqueness of 'id' values, there are no
15059        restrictions on the uniqueness of 'name' values in a model.  This
15060        allows software applications leeway in assigning component identifiers.
15061
15062        Regardless of the level and version of the SBML, these functions allow
15063        client applications to use more generalized code in some situations
15064        (for instance, when manipulating objects that are all known to have
15065        names).  If the object in question does not posess a 'name' attribute
15066        according to the SBML specification for the Level and Version in use,
15067        libSBML will not allow the name to be set, nor will it read or
15068        write 'name' attributes for those objects.
15069
15070        @return integer value indicating success/failure of the
15071        function.  @if clike The value is drawn from the
15072        enumeration #OperationReturnValues_t. @endif@~ The possible values
15073        returned by this function are:
15074        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
15075        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
15076
15077        @see getName()
15078        @see setName()
15079        @see isSetName()
15080
15081        """
15082        return _libsbml.FunctionDefinition_unsetName(self)
15083
15084    def getArgument(self, *args):
15085        r"""
15086        getArgument(FunctionDefinition self, unsigned int n) -> ASTNode
15087        getArgument(FunctionDefinition self, string name) -> ASTNode
15088
15089        This method has multiple variants; they differ in the arguments
15090         they accept.  Each variant is described separately below.
15091
15092        @par
15093        <hr>
15094        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15095         <pre class='signature'>getArgument(long n)</pre>
15096
15097        Get the <code>n</code>th argument to this function.
15098
15099        Callers should first find out the number of arguments to the function
15100        by calling getNumArguments().
15101
15102        @param n an integer index for the argument sought.
15103
15104        @return the nth argument (bound variable) passed to this
15105        FunctionDefinition.
15106        If the index @p n is invalid, @c None is returned.
15107
15108        @see getNumArguments()
15109
15110
15111        @par
15112        <hr>
15113        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15114         <pre class='signature'>getArgument(string name)</pre>
15115
15116        Get the argument named @p name to this FunctionDefinition.
15117
15118        @param name the exact name (case-sensitive) of the sought-after
15119        argument.
15120
15121        @return the argument (bound variable) having the given name, or @c None if
15122        no such argument exists.
15123
15124        """
15125        return _libsbml.FunctionDefinition_getArgument(self, *args)
15126
15127    def getBody(self, *args):
15128        r"""
15129        getBody(FunctionDefinition self) -> ASTNode
15130        getBody(FunctionDefinition self) -> ASTNode
15131
15132        Get the mathematical expression that is the body of this
15133        FunctionDefinition object.
15134
15135        @return the body of this FunctionDefinition as an Abstract Syntax
15136        Tree, or @c None if no body is defined.
15137
15138        """
15139        return _libsbml.FunctionDefinition_getBody(self, *args)
15140
15141    def isSetBody(self):
15142        r"""
15143        isSetBody(FunctionDefinition self) -> bool
15144
15145        Predicate returning @c True if the body of this
15146        FunctionDefinition has set.
15147
15148        @return @c True if the body of this FunctionDefinition is
15149        set, @c False otherwise.
15150
15151        """
15152        return _libsbml.FunctionDefinition_isSetBody(self)
15153
15154    def getNumArguments(self):
15155        r"""
15156        getNumArguments(FunctionDefinition self) -> unsigned int
15157
15158        Get the number of arguments (bound variables) taken by this
15159        FunctionDefinition.
15160
15161        @return the number of arguments (bound variables) that must be passed
15162        to this FunctionDefinition.
15163
15164        """
15165        return _libsbml.FunctionDefinition_getNumArguments(self)
15166
15167    def getTypeCode(self):
15168        r"""
15169        getTypeCode(FunctionDefinition self) -> int
15170
15171        Returns the libSBML type code for this %SBML object.
15172
15173        @par
15174        LibSBML attaches an identifying code to every kind of SBML object.  These
15175        are integer constants known as <em>SBML type codes</em>.  The names of all
15176        the codes begin with the characters <code>SBML_</code>.
15177        @if clike The set of possible type codes for core elements is defined in
15178        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
15179        SBML Level&nbsp;3 packages define their own extra enumerations of type
15180        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
15181        package).@endif@if java In the Java language interface for libSBML, the
15182        type codes are defined as static integer constants in the interface class
15183        {@link libsbmlConstants}.  @endif@if python In the Python language
15184        interface for libSBML, the type codes are defined as static integer
15185        constants in the interface class @link libsbml@endlink.@endif@if csharp In
15186        the C# language interface for libSBML, the type codes are defined as
15187        static integer constants in the interface class
15188        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
15189        package plug-ins may use overlapping type codes; to identify the package
15190        to which a given object belongs, call the
15191        <code>@if conly SBase_getPackageName()
15192        @else SBase.getPackageName()
15193        @endif</code>
15194        method on the object.
15195
15196        The exception to this is lists:  all SBML-style list elements have the type
15197        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
15198        are from.
15199
15200        @return the SBML type code for this object:
15201        @link libsbml#SBML_FUNCTION_DEFINITION SBML_FUNCTION_DEFINITION@endlink (default).
15202
15203        @warning <span class='warning'>The specific integer values of the possible
15204        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
15205        packages,  To fully identify the correct code, <strong>it is necessary to
15206        invoke both getPackageName() and getTypeCode()</strong> (or
15207        ListOf.getItemTypeCode()).</span>
15208
15209        @see getElementName()
15210        @see getPackageName()
15211
15212        """
15213        return _libsbml.FunctionDefinition_getTypeCode(self)
15214
15215    def getElementName(self):
15216        r"""
15217        getElementName(FunctionDefinition self) -> string
15218
15219        Returns the XML element name of this object, which for
15220        FunctionDefinition, is always @c 'functionDefinition'.
15221
15222        @return the name of this element, i.e., @c 'functionDefinition'.
15223
15224        """
15225        return _libsbml.FunctionDefinition_getElementName(self)
15226
15227    def hasRequiredAttributes(self):
15228        r"""
15229        hasRequiredAttributes(FunctionDefinition self) -> bool
15230
15231        Predicate returning @c True if
15232        all the required attributes for this FunctionDefinition object
15233        have been set.
15234
15235        The required attributes for a FunctionDefinition object are:
15236        @li 'id'
15237
15238        @return @c True if the required attributes have been set, @c False
15239        otherwise.
15240
15241        """
15242        return _libsbml.FunctionDefinition_hasRequiredAttributes(self)
15243
15244    def hasRequiredElements(self):
15245        r"""
15246        hasRequiredElements(FunctionDefinition self) -> bool
15247
15248        Predicate returning @c True if
15249        all the required elements for this FunctionDefinition object
15250        have been set.
15251
15252        @note The required elements for a FunctionDefinition object are:
15253        @li 'math' inSBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
15254        (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
15255
15256        @return a boolean value indicating whether all the required
15257        elements for this object have been defined.
15258
15259        """
15260        return _libsbml.FunctionDefinition_hasRequiredElements(self)
15261
15262    def renameUnitSIdRefs(self, oldid, newid):
15263        r"""
15264        renameUnitSIdRefs(FunctionDefinition self, string oldid, string newid)
15265
15266        Renames all the @c UnitSIdRef attributes on this element.
15267
15268        @par
15269        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
15270        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
15271        introduced for attribute values that refer to <code>UnitSId</code> values; in
15272        previous Levels of SBML, this data type did not exist and attributes were
15273        simply described to as 'referring to a unit identifier', but the effective
15274        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
15275        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
15276        Levels of SBML, even if the corresponding SBML specification did not
15277        explicitly name the data type.
15278
15279        This method works by looking at all unit identifier attribute values
15280        (including, if appropriate, inside mathematical formulas), comparing the
15281        unit identifiers to the value of @p oldid.  If any matches are found,
15282        the matching identifiers are replaced with @p newid.  The method does
15283        @em not descend into child elements.
15284
15285        @param oldid the old identifier.
15286        @param newid the new identifier.
15287
15288        """
15289        return _libsbml.FunctionDefinition_renameUnitSIdRefs(self, oldid, newid)
15290
15291# Register FunctionDefinition in _libsbml:
15292_libsbml.FunctionDefinition_swigregister(FunctionDefinition)
15293
15294class ListOfFunctionDefinitions(ListOf):
15295    r"""
15296
15297    @sbmlpackage{core}
15298
15299    @htmlinclude pkg-marker-core.html A list of FunctionDefinition objects.
15300
15301    @par
15302    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
15303    are merely containers used for organizing the main components of an SBML
15304    model.  In libSBML's implementation, ListOf___
15305    @if conly data structures @else classes@endif@~ are derived from the
15306    intermediate utility @if conly structure @else class@endif@~ ListOf, which
15307    is not defined by the SBML specifications but serves as a useful
15308    programmatic construct.  ListOf is itself is in turn derived from SBase,
15309    which provides all of the various ListOf___
15310    @if conly data structures @else classes@endif@~ with common features
15311    defined by the SBML specification, such as 'metaid' attributes and
15312    annotations.
15313
15314    The relationship between the lists and the rest of an SBML model is
15315    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
15316
15317    @htmlinclude listof-illustration.html
15318
15319    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
15320    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
15321    Version&nbsp;2 allows
15322    containers to contain zero or more of the relevant object, instead of
15323    requiring at least one.  As such, libsbml will write out an
15324    otherwise-empty ListOf___ element that has any optional attribute set
15325    (such as 'id' or 'metaid'), that has an optional child (such
15326    as a 'notes' or 'annotation'), or that has attributes or children set
15327    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
15328    any other children.
15329
15330    Readers may wonder about the motivations for using the ListOf___
15331    containers in SBML.  A simpler approach in XML might be to place the
15332    components all directly at the top level of the model definition.  The
15333    choice made in SBML is to group them within XML elements named after
15334    %ListOf<em>Classname</em>, in part because it helps organize the
15335    components.  More importantly, the fact that the container classes are
15336    derived from SBase means that software tools can add information @em about
15337    the lists themselves into each list container's 'annotation'.
15338
15339    @see ListOfFunctionDefinitions
15340    @see ListOfUnitDefinitions
15341    @see ListOfCompartmentTypes
15342    @see ListOfSpeciesTypes
15343    @see ListOfCompartments
15344    @see ListOfSpecies
15345    @see ListOfParameters
15346    @see ListOfInitialAssignments
15347    @see ListOfRules
15348    @see ListOfConstraints
15349    @see ListOfReactions
15350    @see ListOfEvents
15351
15352    @if conly
15353    @note In the C API for libSBML, functions that in other language APIs
15354    would be inherited by the various ListOf___ structures not shown in the
15355    pages for the individual ListOf___'s.  Instead, the functions are defined
15356    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
15357    the many common functions available for manipulating ListOf___
15358    structures</strong>.  The documentation for the individual ListOf___
15359    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
15360    all of the functionality available. @endif@~
15361
15362    """
15363
15364    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15365    __repr__ = _swig_repr
15366
15367    def __init__(self, *args):
15368        r"""
15369        __init__(ListOfFunctionDefinitions self, unsigned int level, unsigned int version) -> ListOfFunctionDefinitions
15370        __init__(ListOfFunctionDefinitions self, SBMLNamespaces sbmlns) -> ListOfFunctionDefinitions
15371
15372        This method has multiple variants; they differ in the arguments
15373         they accept.  Each variant is described separately below.
15374
15375        @par
15376        <hr>
15377        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15378         <pre class='signature'>ListOfFunctionDefinitions(SBMLNamespaces sbmlns)</pre>
15379
15380        Creates a new ListOfFunctionDefinitions object.
15381
15382        The object is constructed such that it is valid for the SBML Level and
15383        Version combination determined by the SBMLNamespaces object in @p
15384        sbmlns.
15385
15386        @param sbmlns an SBMLNamespaces object that is used to determine the
15387        characteristics of the ListOfFunctionDefinitions object to be created.
15388
15389        @throws SBMLConstructorException
15390        Thrown if the given @p sbmlns is inconsistent or incompatible
15391        with this object.
15392
15393        @note Attempting to add an object to an SBMLDocument having a different
15394        combination of SBML Level, Version and XML namespaces than the object
15395        itself will result in an error at the time a caller attempts to make the
15396        addition.  A parent object must have compatible Level, Version and XML
15397        namespaces.  (Strictly speaking, a parent may also have more XML
15398        namespaces than a child, but the reverse is not permitted.)  The
15399        restriction is necessary to ensure that an SBML model has a consistent
15400        overall structure.  This requires callers to manage their objects
15401        carefully, but the benefit is increased flexibility in how models can be
15402        created by permitting callers to create objects bottom-up if desired.  In
15403        situations where objects are not yet attached to parents (e.g.,
15404        SBMLDocument), knowledge of the intented SBML Level and Version help
15405        libSBML determine such things as whether it is valid to assign a
15406        particular value to an attribute.
15407
15408
15409        @par
15410        <hr>
15411        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15412         <pre class='signature'>ListOfFunctionDefinitions(long level, long version)</pre>
15413
15414        Creates a new ListOfFunctionDefinitions object.
15415
15416        The object is constructed such that it is valid for the given SBML
15417        Level and Version combination.
15418
15419        @param level the SBML Level.
15420
15421        @param version the Version within the SBML Level.
15422
15423        @throws SBMLConstructorException
15424        Thrown if the given @p level and @p version combination are invalid
15425        or if this object is incompatible with the given level and version.
15426
15427        @note Attempting to add an object to an SBMLDocument having a different
15428        combination of SBML Level, Version and XML namespaces than the object
15429        itself will result in an error at the time a caller attempts to make the
15430        addition.  A parent object must have compatible Level, Version and XML
15431        namespaces.  (Strictly speaking, a parent may also have more XML
15432        namespaces than a child, but the reverse is not permitted.)  The
15433        restriction is necessary to ensure that an SBML model has a consistent
15434        overall structure.  This requires callers to manage their objects
15435        carefully, but the benefit is increased flexibility in how models can be
15436        created by permitting callers to create objects bottom-up if desired.  In
15437        situations where objects are not yet attached to parents (e.g.,
15438        SBMLDocument), knowledge of the intented SBML Level and Version help
15439        libSBML determine such things as whether it is valid to assign a
15440        particular value to an attribute.
15441
15442        """
15443        _libsbml.ListOfFunctionDefinitions_swiginit(self, _libsbml.new_ListOfFunctionDefinitions(*args))
15444
15445    def clone(self):
15446        r"""
15447        clone(ListOfFunctionDefinitions self) -> ListOfFunctionDefinitions
15448
15449        Creates and returns a deep copy of this ListOfFunctionDefinitions object.
15450
15451        @return the (deep) copy of this ListOfFunctionDefinitions object.
15452
15453        """
15454        return _libsbml.ListOfFunctionDefinitions_clone(self)
15455
15456    def getItemTypeCode(self):
15457        r"""
15458        getItemTypeCode(ListOfFunctionDefinitions self) -> int
15459
15460        Returns the libSBML type code for the objects contained in this ListOf
15461        (i.e., FunctionDefinition objects, if the list is non-empty).
15462
15463        @par
15464        LibSBML attaches an identifying code to every kind of SBML object.  These
15465        are integer constants known as <em>SBML type codes</em>.  The names of all
15466        the codes begin with the characters <code>SBML_</code>.
15467        @if clike The set of possible type codes for core elements is defined in
15468        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
15469        SBML Level&nbsp;3 packages define their own extra enumerations of type
15470        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
15471        package).@endif@if java In the Java language interface for libSBML, the
15472        type codes are defined as static integer constants in the interface class
15473        {@link libsbmlConstants}.  @endif@if python In the Python language
15474        interface for libSBML, the type codes are defined as static integer
15475        constants in the interface class @link libsbml@endlink.@endif@if csharp In
15476        the C# language interface for libSBML, the type codes are defined as
15477        static integer constants in the interface class
15478        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
15479        package plug-ins may use overlapping type codes; to identify the package
15480        to which a given object belongs, call the
15481        <code>@if conly SBase_getPackageName()
15482        @else SBase.getPackageName()
15483        @endif</code>
15484        method on the object.
15485
15486        The exception to this is lists:  all SBML-style list elements have the type
15487        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
15488        are from.
15489
15490        @return the SBML type code for the objects contained in this ListOf:
15491        @link libsbml#SBML_FUNCTION_DEFINITION SBML_FUNCTION_DEFINITION@endlink (default).
15492
15493        @see getElementName()
15494        @see getPackageName()
15495
15496        """
15497        return _libsbml.ListOfFunctionDefinitions_getItemTypeCode(self)
15498
15499    def getElementName(self):
15500        r"""
15501        getElementName(ListOfFunctionDefinitions self) -> string
15502
15503        Returns the XML element name of this object.
15504
15505        For ListOfFunctionDefinitions, the XML element name is
15506        @c 'listOfFunctionDefinitions'.
15507
15508        @return the name of this element, i.e., @c 'listOfFunctionDefinitions'.
15509
15510        """
15511        return _libsbml.ListOfFunctionDefinitions_getElementName(self)
15512
15513    def get(self, *args):
15514        r"""
15515        get(ListOfFunctionDefinitions self, unsigned int n) -> FunctionDefinition
15516        get(ListOfFunctionDefinitions self, unsigned int n) -> FunctionDefinition
15517        get(ListOfFunctionDefinitions self, string sid) -> FunctionDefinition
15518        get(ListOfFunctionDefinitions self, string sid) -> FunctionDefinition
15519
15520        This method has multiple variants; they differ in the arguments
15521         they accept.  Each variant is described separately below.
15522
15523        @par
15524        <hr>
15525        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15526         <pre class='signature'>get(long n)</pre>
15527
15528        Get a FunctionDefinition from the ListOfFunctionDefinitions.
15529
15530        @param n the index number of the FunctionDefinition to get.
15531
15532        @return the nth FunctionDefinition in this ListOfFunctionDefinitions.
15533        If the index @p n is invalid, @c None is returned.
15534
15535        @see size()
15536
15537
15538        @par
15539        <hr>
15540        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15541         <pre class='signature'>get(string sid)</pre>
15542
15543        Get a FunctionDefinition from the ListOfFunctionDefinitions
15544        based on its identifier.
15545
15546        @param sid a string representing the identifier
15547        of the FunctionDefinition to get.
15548
15549        @return FunctionDefinition in this ListOfFunctionDefinitions
15550        with the given @p sid or @c None if no such
15551        FunctionDefinition exists.
15552
15553        @see get()
15554        @see size()
15555
15556        """
15557        return _libsbml.ListOfFunctionDefinitions_get(self, *args)
15558
15559    def remove(self, *args):
15560        r"""
15561        remove(ListOfFunctionDefinitions self, unsigned int n) -> FunctionDefinition
15562        remove(ListOfFunctionDefinitions self, string sid) -> FunctionDefinition
15563
15564        This method has multiple variants; they differ in the arguments
15565         they accept.  Each variant is described separately below.
15566
15567        @par
15568        <hr>
15569        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15570         <pre class='signature'>remove(long n)</pre>
15571
15572        Removes the nth item from this ListOfFunctionDefinitions items and returns a pointer to
15573        it.
15574
15575        The caller owns the returned item and is responsible for deleting it.
15576
15577        @param n the index of the item to remove.
15578
15579        @see size()
15580
15581
15582        @par
15583        <hr>
15584        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15585         <pre class='signature'>remove(string sid)</pre>
15586
15587        Removes item in this ListOfFunctionDefinitions items with the given identifier.
15588
15589        The caller owns the returned item and is responsible for deleting it.
15590        If none of the items in this list have the identifier @p sid, then
15591        @c None is returned.
15592
15593        @param sid the identifier of the item to remove.
15594
15595        @return the item removed.  As mentioned above, the caller owns the
15596        returned item.
15597
15598        """
15599        return _libsbml.ListOfFunctionDefinitions_remove(self, *args)
15600    __swig_destroy__ = _libsbml.delete_ListOfFunctionDefinitions
15601
15602# Register ListOfFunctionDefinitions in _libsbml:
15603_libsbml.ListOfFunctionDefinitions_swigregister(ListOfFunctionDefinitions)
15604
15605UNIT_KIND_AMPERE = _libsbml.UNIT_KIND_AMPERE
15606
15607UNIT_KIND_AVOGADRO = _libsbml.UNIT_KIND_AVOGADRO
15608
15609UNIT_KIND_BECQUEREL = _libsbml.UNIT_KIND_BECQUEREL
15610
15611UNIT_KIND_CANDELA = _libsbml.UNIT_KIND_CANDELA
15612
15613UNIT_KIND_CELSIUS = _libsbml.UNIT_KIND_CELSIUS
15614
15615UNIT_KIND_COULOMB = _libsbml.UNIT_KIND_COULOMB
15616
15617UNIT_KIND_DIMENSIONLESS = _libsbml.UNIT_KIND_DIMENSIONLESS
15618
15619UNIT_KIND_FARAD = _libsbml.UNIT_KIND_FARAD
15620
15621UNIT_KIND_GRAM = _libsbml.UNIT_KIND_GRAM
15622
15623UNIT_KIND_GRAY = _libsbml.UNIT_KIND_GRAY
15624
15625UNIT_KIND_HENRY = _libsbml.UNIT_KIND_HENRY
15626
15627UNIT_KIND_HERTZ = _libsbml.UNIT_KIND_HERTZ
15628
15629UNIT_KIND_ITEM = _libsbml.UNIT_KIND_ITEM
15630
15631UNIT_KIND_JOULE = _libsbml.UNIT_KIND_JOULE
15632
15633UNIT_KIND_KATAL = _libsbml.UNIT_KIND_KATAL
15634
15635UNIT_KIND_KELVIN = _libsbml.UNIT_KIND_KELVIN
15636
15637UNIT_KIND_KILOGRAM = _libsbml.UNIT_KIND_KILOGRAM
15638
15639UNIT_KIND_LITER = _libsbml.UNIT_KIND_LITER
15640
15641UNIT_KIND_LITRE = _libsbml.UNIT_KIND_LITRE
15642
15643UNIT_KIND_LUMEN = _libsbml.UNIT_KIND_LUMEN
15644
15645UNIT_KIND_LUX = _libsbml.UNIT_KIND_LUX
15646
15647UNIT_KIND_METER = _libsbml.UNIT_KIND_METER
15648
15649UNIT_KIND_METRE = _libsbml.UNIT_KIND_METRE
15650
15651UNIT_KIND_MOLE = _libsbml.UNIT_KIND_MOLE
15652
15653UNIT_KIND_NEWTON = _libsbml.UNIT_KIND_NEWTON
15654
15655UNIT_KIND_OHM = _libsbml.UNIT_KIND_OHM
15656
15657UNIT_KIND_PASCAL = _libsbml.UNIT_KIND_PASCAL
15658
15659UNIT_KIND_RADIAN = _libsbml.UNIT_KIND_RADIAN
15660
15661UNIT_KIND_SECOND = _libsbml.UNIT_KIND_SECOND
15662
15663UNIT_KIND_SIEMENS = _libsbml.UNIT_KIND_SIEMENS
15664
15665UNIT_KIND_SIEVERT = _libsbml.UNIT_KIND_SIEVERT
15666
15667UNIT_KIND_STERADIAN = _libsbml.UNIT_KIND_STERADIAN
15668
15669UNIT_KIND_TESLA = _libsbml.UNIT_KIND_TESLA
15670
15671UNIT_KIND_VOLT = _libsbml.UNIT_KIND_VOLT
15672
15673UNIT_KIND_WATT = _libsbml.UNIT_KIND_WATT
15674
15675UNIT_KIND_WEBER = _libsbml.UNIT_KIND_WEBER
15676
15677UNIT_KIND_INVALID = _libsbml.UNIT_KIND_INVALID
15678
15679
15680def UnitKind_equals(uk1, uk2):
15681    r"""
15682    UnitKind_equals(UnitKind_t uk1, UnitKind_t uk2) -> int
15683
15684    Tests for logical equality between two given <code>UNIT_KIND_</code>
15685    code values.
15686
15687    This function behaves exactly like C's <code>==</code> operator, except
15688    for the following two cases:
15689    <ul>
15690    <li>@link libsbml#UNIT_KIND_LITER UNIT_KIND_LITER@endlink <code>==</code> @link libsbml#UNIT_KIND_LITRE UNIT_KIND_LITRE@endlink
15691    <li>@link libsbml#UNIT_KIND_METER UNIT_KIND_METER@endlink <code>==</code> @link libsbml#UNIT_KIND_METRE UNIT_KIND_METRE@endlink
15692    </ul>
15693
15694    In the two cases above, C equality comparison would yield @c 0 (false)
15695    (because each of the above is a distinct enumeration value), but
15696    this function returns @c True.
15697
15698    @param uk1 a <code>UNIT_KIND_</code> value.
15699    @param uk2 a second <code>UNIT_KIND_</code> value to compare to @p uk1.
15700
15701    @return @c 1 (true) if @p uk1 is logically equivalent to @p
15702    uk2, @c 0 (false) otherwise.
15703
15704    @note For more information about the libSBML unit codes, please refer to
15705    the class documentation for Unit.
15706
15707    @if conly
15708    @memberof Unit_t
15709    @endif
15710
15711    """
15712    return _libsbml.UnitKind_equals(uk1, uk2)
15713
15714def UnitKind_forName(name):
15715    r"""
15716    UnitKind_forName(char const * name) -> UnitKind_t
15717
15718    Converts a text string naming a kind of unit to its corresponding
15719    libSBML <code>UNIT_KIND_</code> constant/enumeration value.
15720
15721    @param name a string, the name of a predefined base unit in SBML.
15722
15723    @return @if clike a value from UnitKind_t corresponding to the given
15724    string @p name (determined in a case-insensitive manner).
15725    @endif@if python a value the set of <code>UNIT_KIND_</code> codes
15726    defined in class @link libsbml libsbml@endlink, corresponding to the
15727    string @p name (determined in a case-insensitive
15728    manner).@endif@if java a value the set of <code>UNIT_KIND_</code> codes
15729    defined in class {@link libsbmlConstants}, corresponding to the string
15730    @p name (determined in a case-insensitive manner).@endif@~
15731
15732    @note For more information about the libSBML unit codes, please refer to
15733    the class documentation for Unit.
15734
15735    @if conly
15736    @memberof Unit_t
15737    @endif
15738
15739    """
15740    return _libsbml.UnitKind_forName(name)
15741
15742def UnitKind_toString(uk):
15743    r"""
15744    UnitKind_toString(UnitKind_t uk) -> char const *
15745
15746    Converts a unit code to a text string equivalent.
15747
15748    @param uk @if clike a value from the UnitKind_t enumeration
15749    @endif@if python a value from the set of <code>UNIT_KIND_</code> codes
15750    defined in the class @link libsbml libsbml@endlink
15751    @endif@if java a value from the set of <code>UNIT_KIND_</code> codes
15752    defined in the class {@link libsbmlConstants}
15753    @endif@~
15754
15755    @return the name corresponding to the given unit code.
15756
15757    @note For more information about the libSBML unit codes, please refer to
15758    the class documentation for Unit.
15759
15760    @warning The string returned is a static data value.  The caller does not
15761    own the returned string and is therefore not allowed to modify it.
15762
15763    @if conly
15764    @memberof Unit_t
15765    @endif
15766
15767    """
15768    return _libsbml.UnitKind_toString(uk)
15769
15770def UnitKind_isValidUnitKindString(str, level, version):
15771    r"""
15772    UnitKind_isValidUnitKindString(char const * str, unsigned int level, unsigned int version) -> int
15773
15774    Predicate for testing whether a given string corresponds to a
15775    predefined libSBML unit code.
15776
15777    @param str a text string naming a base unit defined by SBML.
15778    @param level the Level of SBML.
15779    @param version the Version within the Level of SBML.
15780
15781    @return 1 (true) if string is the name of a valid
15782    <code>UNIT_KIND_</code> value, @c 0 (false) otherwise.
15783
15784    @note For more information about the libSBML unit codes, please refer to
15785    the class documentation for Unit.
15786
15787    @if conly
15788    @memberof Unit_t
15789    @endif
15790
15791    """
15792    return _libsbml.UnitKind_isValidUnitKindString(str, level, version)
15793class Unit(SBase):
15794    r"""
15795
15796    @sbmlpackage{core}
15797
15798    @htmlinclude pkg-marker-core.html A single unit referenced in an SBML <em>unit definition</em>.
15799
15800    The SBML unit definition facility uses two classes of objects,
15801    UnitDefinition and Unit.  The approach to defining units in %SBML is
15802    compositional; for example, <em>meter second<sup> &ndash;2</sup></em> is
15803    constructed by combining a Unit object representing <em>meter</em> with
15804    another Unit object representing <em>second<sup> &ndash;2</sup></em>.
15805    The combination is wrapped inside a UnitDefinition, which provides for
15806    assigning an identifier and optional name to the combination.  The
15807    identifier can then be referenced from elsewhere in a model.  Thus, the
15808    UnitDefinition class is the container, and Unit instances are placed
15809    inside UnitDefinition instances.
15810
15811    A Unit has four attributes named 'kind', 'exponent', 'scale'
15812    and 'multiplier'.  It represents a (possibly transformed) reference to a
15813    base unit.  The attribute 'kind' on Unit indicates the chosen base unit.
15814    Its value must be one of the text strings listed below; this list
15815    corresponds to SBML Level&nbsp;3:
15816
15817    @par
15818    <table border='0' class='centered text-table width80 normal-font code'
15819           style='border: none !important'>
15820    <tr>
15821    <td>ampere</td><td>farad</td><td>joule</td><td>lux</td><td>radian</td><td>volt</td>
15822    </tr>
15823    <tr>
15824    <td>avogadro</td><td>gram</td><td>katal</td><td>metre</td><td>second</td><td>watt</td>
15825    </tr>
15826    <tr>
15827    <td>becquerel</td><td>gray</td><td>kelvin</td><td>mole</td><td>siemens</td><td>weber</td>
15828    </tr>
15829    <tr>
15830    <td>candela</td><td>henry</td><td>kilogram</td><td>newton</td><td>sievert</td>
15831    </tr>
15832    <tr>
15833    <td>coulomb</td><td>hertz</td><td>litre</td><td>ohm</td><td>steradian</td>
15834    </tr>
15835    <tr>
15836    <td>dimensionless</td><td>item</td><td>lumen</td><td>pascal</td><td>tesla</td>
15837    </tr>
15838    </table>
15839
15840    A few small differences exist between the Level&nbsp;3 list of base
15841    units and the list defined in other Level/Version combinations of SBML.
15842    Specifically, Levels of SBML before Level&nbsp;3 do not define
15843    @c avogadro; conversely, Level&nbsp;2 Version&nbsp;1 defines @c Celsius,
15844    and Level&nbsp;1 defines @c celsius, @c meter, and @c liter, none of
15845    which are available in Level&nbsp;3.  In libSBML, each of the predefined
15846    base unit names is represented by an enumeration value @if clike in
15847    #UnitKind_t@else whose name begins with the characters
15848    <code>UNIT_KIND_</code>@endif, discussed in a separate section below.
15849
15850    The attribute named 'exponent' on Unit represents an exponent on the
15851    unit.  In SBML Level&nbsp;2, the attribute is optional and has a default
15852    value of @c 1 (one); in SBML Level&nbsp;3, the attribute is mandatory
15853    and there is no default value.  A Unit also has an attribute
15854    called 'scale'; its value must be an integer exponent for a power-of-ten
15855    multiplier used to set the scale of the unit.  For example, a unit
15856    having a 'kind' value of @c gram and a 'scale' value of @c -3 signifies
15857    10<sup>&nbsp;&ndash;3</sup> * gram, or milligrams.  In SBML
15858    Level&nbsp;2, the attribute is optional and has a default value of @c 0
15859    (zero), because 10<sup> 0</sup> = 1; in SBML Level&nbsp;3, the attribute
15860    is mandatory and has no default value.  Lastly, the attribute named
15861    'multiplier' can be used to multiply the unit by a real-numbered factor;
15862    this enables the definition of units that are not power-of-ten multiples
15863    of SI units.  For instance, a multiplier of 0.3048 could be used to
15864    define @c foot as a measure of length in terms of a @c metre.  The
15865    'multiplier' attribute is optional in SBML Level&nbsp;2, where it has a
15866    default value of @c 1 (one); in SBML Level&nbsp;3, the attribute is
15867    mandatory and has no default value.
15868
15869    @if clike
15870    <h3><a class='anchor' name='UnitKind_t'>UnitKind_t</a></h3>
15871    @else
15872    <h3><a class='anchor' name='UnitKind_t'>%Unit identification codes</a></h3>
15873    @endif@~
15874
15875    As discussed above, SBML defines a set of base units which serves as the
15876    starting point for new unit definitions.  This set of base units
15877    consists of the SI units and a small number of additional convenience
15878    units.
15879
15880    @if clike Until SBML Level&nbsp;2 Version&nbsp;3, there
15881    existed a data type in the SBML specifications called @c UnitKind,
15882    enumerating the possible SBML base units.  Although SBML Level&nbsp;2
15883    Version&nbsp;3 removed this type from the language specification,
15884    libSBML maintains the corresponding enumeration type #UnitKind_t as a
15885    convenience and as a way to provide backward compatibility to previous
15886    SBML Level/Version specifications.  (The removal in SBML Level&nbsp;2
15887    Version&nbsp;3 of the enumeration @c UnitKind was also accompanied by
15888    the redefinition of the data type @c UnitSId to include the previous
15889    @c UnitKind values as reserved symbols in the @c UnitSId space.  This
15890    change has no net effect on permissible models, their representation or
15891    their syntax.  The purpose of the change in the SBML specification was
15892    simply to clean up an inconsistency about the contexts in which these
15893    values were usable.)
15894    @endif@if java In SBML Level&nbsp;2 Versions before
15895    Version&nbsp;3, there existed an enumeration of units called
15896    @c UnitKind.  In Version&nbsp;3, this enumeration was removed and the
15897    identifier class @c UnitSId redefined to include the previous
15898    @c UnitKind values as reserved symbols.  This change has no net effect on
15899    permissible models, their representation or their syntax.  The purpose
15900    of the change in the SBML specification was simply to clean up an
15901    inconsistency about the contexts in which these values were usable.
15902    However, libSBML maintains UnitKind in the form of of a set of static
15903    integer constants whose names begin with the characters
15904    <code>UNIT_KIND_</code>.  These constants are defined in the class
15905    <code><a href='libsbmlConstants.html'>libsbmlConstants</a></code>.
15906    @endif@if python In SBML Level&nbsp;2 Versions before
15907    Version&nbsp;3, there existed an enumeration of units called
15908    @c UnitKind.  In Version&nbsp;3, this enumeration was removed and the
15909    identifier class @c UnitSId redefined to include the previous
15910    @c UnitKind values as reserved symbols.  This change has no net effect on
15911    permissible models, their representation or their syntax.  The purpose
15912    of the change in the SBML specification was simply to clean up an
15913    inconsistency about the contexts in which these values were usable.
15914    However, libSBML maintains UnitKind in the form of of a set of static
15915    integer constants whose names begin with the characters
15916    <code>UNIT_KIND_</code>.  These constants are defined in the class
15917    @link libsbml libsbml@endlink.
15918    @endif@~
15919
15920    As a consequence of the fact that libSBML supports models in all Levels
15921    and Versions of SBML, libSBML's set of @c UNIT_KIND_ values is a union
15922    of all the possible base unit names defined in the different SBML
15923    specifications.  However, not every base unit is allowed in every
15924    Level+Version combination of SBML.  Note in particular the following
15925    exceptions:
15926    <ul>
15927    <li> The alternate spelling @c 'meter' is included in
15928    addition to the official SI spelling @c 'metre'.  This spelling is only
15929    permitted in SBML Level&nbsp;1 models.
15930
15931    <li> The alternate spelling @c 'liter' is included in addition to the
15932    official SI spelling @c 'litre'.  This spelling is only permitted in
15933    SBML Level&nbsp;1 models.
15934
15935    <li> The unit @c 'Celsius' is included because of its presence in
15936    specifications of SBML prior to SBML Level&nbsp;2 Version&nbsp;2.
15937
15938    <li> The unit @c avogadro was introduced in SBML Level&nbsp;3, and
15939    is only permitted for use in SBML Level&nbsp;3 models.
15940    </ul>
15941
15942    @if clike The table below lists the symbols defined in the
15943    @c UnitKind_t enumeration, and their
15944    meanings. @else The table below lists the unit
15945    constants defined in libSBML, and their meanings. @endif@~
15946
15947    @htmlinclude unitkind-table.html
15948
15949    """
15950
15951    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15952    __repr__ = _swig_repr
15953    __swig_destroy__ = _libsbml.delete_Unit
15954
15955    def __init__(self, *args):
15956        r"""
15957        __init__(Unit self, unsigned int level, unsigned int version) -> Unit
15958        __init__(Unit self, SBMLNamespaces sbmlns) -> Unit
15959        __init__(Unit self, Unit orig) -> Unit
15960
15961        This method has multiple variants; they differ in the arguments
15962         they accept.  Each variant is described separately below.
15963
15964        @par
15965        <hr>
15966        <span class='variant-sig-heading'>Method variant with the following signature</span>:
15967         <pre class='signature'>Unit(SBMLNamespaces sbmlns)</pre>
15968
15969        Creates a new Unit using the given SBMLNamespaces object
15970        @p sbmlns.
15971
15972        @par
15973        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
15974        information.  It is used to communicate the SBML Level, Version, and (in
15975        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
15976        common approach to using libSBML's SBMLNamespaces facilities is to create an
15977        SBMLNamespaces object somewhere in a program once, then hand that object
15978        as needed to object constructors that accept SBMLNamespaces as arguments.
15979
15980        @param sbmlns an SBMLNamespaces object.
15981
15982        @throws SBMLConstructorException
15983        Thrown if the given @p sbmlns is inconsistent or incompatible
15984        with this object.
15985
15986        @note Attempting to add an object to an SBMLDocument having a different
15987        combination of SBML Level, Version and XML namespaces than the object
15988        itself will result in an error at the time a caller attempts to make the
15989        addition.  A parent object must have compatible Level, Version and XML
15990        namespaces.  (Strictly speaking, a parent may also have more XML
15991        namespaces than a child, but the reverse is not permitted.)  The
15992        restriction is necessary to ensure that an SBML model has a consistent
15993        overall structure.  This requires callers to manage their objects
15994        carefully, but the benefit is increased flexibility in how models can be
15995        created by permitting callers to create objects bottom-up if desired.  In
15996        situations where objects are not yet attached to parents (e.g.,
15997        SBMLDocument), knowledge of the intented SBML Level and Version help
15998        libSBML determine such things as whether it is valid to assign a
15999        particular value to an attribute.
16000
16001
16002        @par
16003        <hr>
16004        <span class='variant-sig-heading'>Method variant with the following signature</span>:
16005         <pre class='signature'>Unit(long level, long version)</pre>
16006
16007        Creates a new Unit using the given SBML @p level and @p version
16008        values.
16009
16010        @param level a long integer, the SBML Level to assign to this Unit.
16011
16012        @param version a long integer, the SBML Version to assign to this
16013        Unit.
16014
16015        @throws SBMLConstructorException
16016        Thrown if the given @p level and @p version combination are invalid
16017        or if this object is incompatible with the given level and version.
16018
16019        @note Attempting to add an object to an SBMLDocument having a different
16020        combination of SBML Level, Version and XML namespaces than the object
16021        itself will result in an error at the time a caller attempts to make the
16022        addition.  A parent object must have compatible Level, Version and XML
16023        namespaces.  (Strictly speaking, a parent may also have more XML
16024        namespaces than a child, but the reverse is not permitted.)  The
16025        restriction is necessary to ensure that an SBML model has a consistent
16026        overall structure.  This requires callers to manage their objects
16027        carefully, but the benefit is increased flexibility in how models can be
16028        created by permitting callers to create objects bottom-up if desired.  In
16029        situations where objects are not yet attached to parents (e.g.,
16030        SBMLDocument), knowledge of the intented SBML Level and Version help
16031        libSBML determine such things as whether it is valid to assign a
16032        particular value to an attribute.
16033
16034
16035        @par
16036        <hr>
16037        <span class='variant-sig-heading'>Method variant with the following signature</span>:
16038         <pre class='signature'>Unit(Unit orig)</pre>
16039
16040        Copy constructor; creates a copy of this Unit.
16041
16042        @param orig the object to copy.
16043
16044        """
16045        _libsbml.Unit_swiginit(self, _libsbml.new_Unit(*args))
16046
16047    def clone(self):
16048        r"""
16049        clone(Unit self) -> Unit
16050
16051        Creates and returns a deep copy of this Unit object.
16052
16053        @return the (deep) copy of this Unit object.
16054
16055        """
16056        return _libsbml.Unit_clone(self)
16057
16058    def initDefaults(self):
16059        r"""
16060        initDefaults(Unit self)
16061
16062        Initializes the fields of this Unit object to 'typical' default
16063        values.
16064
16065        The SBML Unit component has slightly different aspects and default
16066        attribute values in different SBML Levels and Versions.  This method
16067        sets the values to certain common defaults, based mostly on what they
16068        are in SBML Level&nbsp;2.  Specifically:
16069        <ul>
16070        <li> Sets attribute 'exponent' to @c 1
16071        <li> Sets attribute 'scale' to @c 0
16072        <li> Sets attribute 'multiplier' to @c 1.0
16073        </ul>
16074
16075        The 'kind' attribute is left unchanged.
16076
16077        """
16078        return _libsbml.Unit_initDefaults(self)
16079
16080    def getKind(self):
16081        r"""
16082        getKind(Unit self) -> UnitKind_t
16083
16084        Returns the 'kind' of Unit this is.
16085
16086        @if clike
16087        @return the value of the 'kind' attribute of this Unit as a
16088        value from the <a class='el' href='#UnitKind_t'>UnitKind_t</a> enumeration.
16089        @endif@if java
16090        @return the value of the 'kind' attribute of this Unit as a
16091        value from the set of constants whose names begin
16092        with <code>UNIT_KIND_</code> defined in the class
16093        <code><a href='libsbmlConstants.html'>libsbmlConstants</a></code>.
16094        @endif@if python
16095        @return the value of the 'kind' attribute of this Unit as a
16096        value from the set of constants whose names begin
16097        with <code>UNIT_KIND_</code> defined in the class
16098        @link libsbml libsbml@endlink.
16099        @endif@~
16100
16101        """
16102        return _libsbml.Unit_getKind(self)
16103
16104    def getExponent(self):
16105        r"""
16106        getExponent(Unit self) -> int
16107
16108        Returns the value of the 'exponent' attribute of this unit.
16109
16110        @return the 'exponent' value of this Unit, as an integer.
16111
16112        """
16113        return _libsbml.Unit_getExponent(self)
16114
16115    def getExponentAsDouble(self):
16116        r"""
16117        getExponentAsDouble(Unit self) -> double
16118
16119        Returns the value of the 'exponent' attribute of this unit.
16120
16121        @return the 'exponent' value of this Unit, as a double.
16122
16123        """
16124        return _libsbml.Unit_getExponentAsDouble(self)
16125
16126    def getScale(self):
16127        r"""
16128        getScale(Unit self) -> int
16129
16130        Returns the value of the 'scale' attribute of this unit.
16131
16132        @return the 'scale' value of this Unit, as an integer.
16133
16134        """
16135        return _libsbml.Unit_getScale(self)
16136
16137    def getMultiplier(self):
16138        r"""
16139        getMultiplier(Unit self) -> double
16140
16141        Returns the value of the 'multiplier' attribute of this Unit.
16142
16143        @return the 'multiplier' value of this Unit, as a double.
16144
16145        """
16146        return _libsbml.Unit_getMultiplier(self)
16147
16148    def getOffset(self):
16149        r"""
16150        getOffset(Unit self) -> double
16151
16152        Returns the value of the 'offset' attribute of this Unit.
16153
16154        @return the 'offset' value of this Unit, as a double.
16155
16156        @warning <span class='warning'>The 'offset' attribute is only available in
16157        SBML Level&nbsp;2 Version&nbsp;1.  This attribute is not present in SBML
16158        Level&nbsp;2 Version&nbsp;2 or above.  When producing SBML models using
16159        these later specifications, modelers and software tools need to account
16160        for units with offsets explicitly.  The %SBML specification document
16161        offers a number of suggestions for how to achieve this.  LibSBML methods
16162        such as this one related to 'offset' are retained for compatibility with
16163        earlier versions of SBML Level&nbsp;2, but their use is strongly
16164        discouraged.</span>
16165
16166        """
16167        return _libsbml.Unit_getOffset(self)
16168
16169    def isAmpere(self):
16170        r"""
16171        isAmpere(Unit self) -> bool
16172
16173        Predicate for testing whether this Unit is of the kind @c ampere.
16174
16175        @return @c True if the kind of this Unit is @c ampere, @c False
16176        otherwise.
16177
16178        """
16179        return _libsbml.Unit_isAmpere(self)
16180
16181    def isAvogadro(self):
16182        r"""
16183        isAvogadro(Unit self) -> bool
16184
16185        Predicate for testing whether this Unit is of the kind @c avogadro.
16186
16187        @return @c True if the kind of this Unit is @c avogadro, @c False
16188        otherwise.
16189
16190        @note The unit @c avogadro was introduced in SBML Level&nbsp;3, and
16191        is only permitted for use in SBML Level&nbsp;3 models.
16192
16193        """
16194        return _libsbml.Unit_isAvogadro(self)
16195
16196    def isBecquerel(self):
16197        r"""
16198        isBecquerel(Unit self) -> bool
16199
16200        Predicate for testing whether this Unit is of the kind @c becquerel
16201
16202        @return @c True if the kind of this Unit is @c becquerel, @c False
16203        otherwise.
16204
16205        """
16206        return _libsbml.Unit_isBecquerel(self)
16207
16208    def isCandela(self):
16209        r"""
16210        isCandela(Unit self) -> bool
16211
16212        Predicate for testing whether this Unit is of the kind @c candela
16213
16214        @return @c True if the kind of this Unit is @c candela, @c False
16215        otherwise.
16216
16217        """
16218        return _libsbml.Unit_isCandela(self)
16219
16220    def isCelsius(self):
16221        r"""
16222        isCelsius(Unit self) -> bool
16223
16224        Predicate for testing whether this Unit is of the kind @c Celsius
16225
16226        @return @c True if the kind of this Unit is @c Celsius, @c False
16227        otherwise.
16228
16229        @warning <span class='warning'>The predefined unit @c Celsius was
16230        removed from the list of predefined units in SBML Level&nbsp;2
16231        Version&nbsp;2 at the same time that the 'offset' attribute was removed
16232        from Unit definitions.  LibSBML methods such as this one related to
16233        @c Celsius are retained in order to support SBML Level&nbsp;2
16234        Version&nbsp;1, but their use is strongly discouraged.</span>
16235
16236        """
16237        return _libsbml.Unit_isCelsius(self)
16238
16239    def isCoulomb(self):
16240        r"""
16241        isCoulomb(Unit self) -> bool
16242
16243        Predicate for testing whether this Unit is of the kind @c coulomb
16244
16245        @return @c True if the kind of this Unit is @c coulomb, @c False
16246        otherwise.
16247
16248        """
16249        return _libsbml.Unit_isCoulomb(self)
16250
16251    def isDimensionless(self):
16252        r"""
16253        isDimensionless(Unit self) -> bool
16254
16255        Predicate for testing whether this Unit is of the kind
16256        @c dimensionless.
16257
16258        @return @c True if the kind of this Unit is @c dimensionless, @c False
16259        otherwise.
16260
16261        """
16262        return _libsbml.Unit_isDimensionless(self)
16263
16264    def isFarad(self):
16265        r"""
16266        isFarad(Unit self) -> bool
16267
16268        Predicate for testing whether this Unit is of the kind @c farad
16269
16270        @return @c True if the kind of this Unit is @c farad, @c False
16271        otherwise.
16272
16273        """
16274        return _libsbml.Unit_isFarad(self)
16275
16276    def isGram(self):
16277        r"""
16278        isGram(Unit self) -> bool
16279
16280        Predicate for testing whether this Unit is of the kind @c gram
16281
16282        @return @c True if the kind of this Unit is @c gram, @c False
16283        otherwise.
16284
16285        """
16286        return _libsbml.Unit_isGram(self)
16287
16288    def isGray(self):
16289        r"""
16290        isGray(Unit self) -> bool
16291
16292        Predicate for testing whether this Unit is of the kind @c gray
16293
16294        @return @c True if the kind of this Unit is @c gray, @c False
16295        otherwise.
16296
16297        """
16298        return _libsbml.Unit_isGray(self)
16299
16300    def isHenry(self):
16301        r"""
16302        isHenry(Unit self) -> bool
16303
16304        Predicate for testing whether this Unit is of the kind @c henry
16305
16306        @return @c True if the kind of this Unit is @c henry, @c False
16307        otherwise.
16308
16309        """
16310        return _libsbml.Unit_isHenry(self)
16311
16312    def isHertz(self):
16313        r"""
16314        isHertz(Unit self) -> bool
16315
16316        Predicate for testing whether this Unit is of the kind @c hertz
16317
16318        @return @c True if the kind of this Unit is @c hertz, @c False
16319        otherwise.
16320
16321        """
16322        return _libsbml.Unit_isHertz(self)
16323
16324    def isItem(self):
16325        r"""
16326        isItem(Unit self) -> bool
16327
16328        Predicate for testing whether this Unit is of the kind @c item
16329
16330        @return @c True if the kind of this Unit is @c item, @c False
16331        otherwise.
16332
16333        """
16334        return _libsbml.Unit_isItem(self)
16335
16336    def isJoule(self):
16337        r"""
16338        isJoule(Unit self) -> bool
16339
16340        Predicate for testing whether this Unit is of the kind @c joule
16341
16342        @return @c True if the kind of this Unit is @c joule, @c False
16343        otherwise.
16344
16345        """
16346        return _libsbml.Unit_isJoule(self)
16347
16348    def isKatal(self):
16349        r"""
16350        isKatal(Unit self) -> bool
16351
16352        Predicate for testing whether this Unit is of the kind @c katal
16353
16354        @return @c True if the kind of this Unit is @c katal, @c False
16355        otherwise.
16356
16357        """
16358        return _libsbml.Unit_isKatal(self)
16359
16360    def isKelvin(self):
16361        r"""
16362        isKelvin(Unit self) -> bool
16363
16364        Predicate for testing whether this Unit is of the kind @c kelvin
16365
16366        @return @c True if the kind of this Unit is @c kelvin, @c False
16367        otherwise.
16368
16369        """
16370        return _libsbml.Unit_isKelvin(self)
16371
16372    def isKilogram(self):
16373        r"""
16374        isKilogram(Unit self) -> bool
16375
16376        Predicate for testing whether this Unit is of the kind @c kilogram
16377
16378        @return @c True if the kind of this Unit is @c kilogram, @c False
16379        otherwise.
16380
16381        """
16382        return _libsbml.Unit_isKilogram(self)
16383
16384    def isLitre(self):
16385        r"""
16386        isLitre(Unit self) -> bool
16387
16388        Predicate for testing whether this Unit is of the kind @c litre
16389
16390        @return @c True if the kind of this Unit is @c litre or 'liter',
16391        @c False otherwise.
16392
16393        """
16394        return _libsbml.Unit_isLitre(self)
16395
16396    def isLumen(self):
16397        r"""
16398        isLumen(Unit self) -> bool
16399
16400        Predicate for testing whether this Unit is of the kind @c lumen
16401
16402        @return @c True if the kind of this Unit is @c lumen, @c False
16403        otherwise.
16404
16405        """
16406        return _libsbml.Unit_isLumen(self)
16407
16408    def isLux(self):
16409        r"""
16410        isLux(Unit self) -> bool
16411
16412        Predicate for testing whether this Unit is of the kind @c lux
16413
16414        @return @c True if the kind of this Unit is @c lux, @c False
16415        otherwise.
16416
16417        """
16418        return _libsbml.Unit_isLux(self)
16419
16420    def isMetre(self):
16421        r"""
16422        isMetre(Unit self) -> bool
16423
16424        Predicate for testing whether this Unit is of the kind @c metre
16425
16426        @return @c True if the kind of this Unit is @c metre or 'meter',
16427        @c False
16428        otherwise.
16429
16430        """
16431        return _libsbml.Unit_isMetre(self)
16432
16433    def isMole(self):
16434        r"""
16435        isMole(Unit self) -> bool
16436
16437        Predicate for testing whether this Unit is of the kind @c mole
16438
16439        @return @c True if the kind of this Unit is @c mole, @c False
16440        otherwise.
16441
16442        """
16443        return _libsbml.Unit_isMole(self)
16444
16445    def isNewton(self):
16446        r"""
16447        isNewton(Unit self) -> bool
16448
16449        Predicate for testing whether this Unit is of the kind @c newton
16450
16451        @return @c True if the kind of this Unit is @c newton, @c False
16452        otherwise.
16453
16454        """
16455        return _libsbml.Unit_isNewton(self)
16456
16457    def isOhm(self):
16458        r"""
16459        isOhm(Unit self) -> bool
16460
16461        Predicate for testing whether this Unit is of the kind @c ohm
16462
16463        @return @c True if the kind of this Unit is @c ohm, @c False
16464        otherwise.
16465
16466        """
16467        return _libsbml.Unit_isOhm(self)
16468
16469    def isPascal(self):
16470        r"""
16471        isPascal(Unit self) -> bool
16472
16473        Predicate for testing whether this Unit is of the kind @c pascal
16474
16475        @return @c True if the kind of this Unit is @c pascal, @c False
16476        otherwise.
16477
16478        """
16479        return _libsbml.Unit_isPascal(self)
16480
16481    def isRadian(self):
16482        r"""
16483        isRadian(Unit self) -> bool
16484
16485        Predicate for testing whether this Unit is of the kind @c radian
16486
16487        @return @c True if the kind of this Unit is @c radian, @c False
16488        otherwise.
16489
16490        """
16491        return _libsbml.Unit_isRadian(self)
16492
16493    def isSecond(self):
16494        r"""
16495        isSecond(Unit self) -> bool
16496
16497        Predicate for testing whether this Unit is of the kind @c second
16498
16499        @return @c True if the kind of this Unit is @c second, @c False
16500        otherwise.
16501
16502        """
16503        return _libsbml.Unit_isSecond(self)
16504
16505    def isSiemens(self):
16506        r"""
16507        isSiemens(Unit self) -> bool
16508
16509        Predicate for testing whether this Unit is of the kind @c siemens
16510
16511        @return @c True if the kind of this Unit is @c siemens, @c False
16512        otherwise.
16513
16514        """
16515        return _libsbml.Unit_isSiemens(self)
16516
16517    def isSievert(self):
16518        r"""
16519        isSievert(Unit self) -> bool
16520
16521        Predicate for testing whether this Unit is of the kind @c sievert
16522
16523        @return @c True if the kind of this Unit is @c sievert, @c False
16524        otherwise.
16525
16526        """
16527        return _libsbml.Unit_isSievert(self)
16528
16529    def isSteradian(self):
16530        r"""
16531        isSteradian(Unit self) -> bool
16532
16533        Predicate for testing whether this Unit is of the kind @c steradian
16534
16535        @return @c True if the kind of this Unit is @c steradian, @c False
16536        otherwise.
16537
16538        """
16539        return _libsbml.Unit_isSteradian(self)
16540
16541    def isTesla(self):
16542        r"""
16543        isTesla(Unit self) -> bool
16544
16545        Predicate for testing whether this Unit is of the kind @c tesla
16546
16547        @return @c True if the kind of this Unit is @c tesla, @c False
16548        otherwise.
16549
16550        """
16551        return _libsbml.Unit_isTesla(self)
16552
16553    def isVolt(self):
16554        r"""
16555        isVolt(Unit self) -> bool
16556
16557        Predicate for testing whether this Unit is of the kind @c volt
16558
16559        @return @c True if the kind of this Unit is @c volt, @c False
16560        otherwise.
16561
16562        """
16563        return _libsbml.Unit_isVolt(self)
16564
16565    def isWatt(self):
16566        r"""
16567        isWatt(Unit self) -> bool
16568
16569        Predicate for testing whether this Unit is of the kind @c watt
16570
16571        @return @c True if the kind of this Unit is @c watt, @c False
16572        otherwise.
16573
16574        """
16575        return _libsbml.Unit_isWatt(self)
16576
16577    def isWeber(self):
16578        r"""
16579        isWeber(Unit self) -> bool
16580
16581        Predicate for testing whether this Unit is of the kind @c weber
16582
16583        @return @c True if the kind of this Unit is @c weber, @c False
16584        otherwise.
16585
16586        """
16587        return _libsbml.Unit_isWeber(self)
16588
16589    def isSetKind(self):
16590        r"""
16591        isSetKind(Unit self) -> bool
16592
16593        Predicate to test whether the 'kind' attribute of this Unit is set.
16594
16595        @return @c True if the 'kind' attribute of this Unit is set,
16596        @c False otherwise.
16597
16598        """
16599        return _libsbml.Unit_isSetKind(self)
16600
16601    def isSetExponent(self):
16602        r"""
16603        isSetExponent(Unit self) -> bool
16604
16605        Predicate to test whether the 'exponent' attribute of this Unit
16606        is set.
16607
16608        @return @c True if the 'exponent' attribute of this Unit is set,
16609        @c False otherwise.
16610
16611        """
16612        return _libsbml.Unit_isSetExponent(self)
16613
16614    def isSetScale(self):
16615        r"""
16616        isSetScale(Unit self) -> bool
16617
16618        Predicate to test whether the 'scale' attribute of this Unit
16619        is set.
16620
16621        @return @c True if the 'scale' attribute of this Unit is set,
16622        @c False otherwise.
16623
16624        """
16625        return _libsbml.Unit_isSetScale(self)
16626
16627    def isSetMultiplier(self):
16628        r"""
16629        isSetMultiplier(Unit self) -> bool
16630
16631        Predicate to test whether the 'multiplier' attribute of this Unit
16632        is set.
16633
16634        @return @c True if the 'multiplier' attribute of this Unit is set,
16635        @c False otherwise.
16636
16637        """
16638        return _libsbml.Unit_isSetMultiplier(self)
16639
16640    def isSetOffset(self):
16641        r"""
16642        isSetOffset(Unit self) -> bool
16643
16644        Predicate to test whether the 'offset' attribute of this Unit
16645        is set.
16646
16647        @return @c True if the 'offset' attribute of this Unit is set,
16648        @c False otherwise.
16649
16650        @warning <span class='warning'>The 'offset' attribute is only available in
16651        SBML Level&nbsp;2 Version&nbsp;1.  This attribute is not present in SBML
16652        Level&nbsp;2 Version&nbsp;2 or above.  When producing SBML models using
16653        these later specifications, modelers and software tools need to account
16654        for units with offsets explicitly.  The %SBML specification document
16655        offers a number of suggestions for how to achieve this.  LibSBML methods
16656        such as this one related to 'offset' are retained for compatibility with
16657        earlier versions of SBML Level&nbsp;2, but their use is strongly
16658        discouraged.</span>
16659
16660        """
16661        return _libsbml.Unit_isSetOffset(self)
16662
16663    def setKind(self, kind):
16664        r"""
16665        setKind(Unit self, UnitKind_t kind) -> int
16666
16667        Sets the 'kind' attribute value of this Unit.
16668
16669        @if clike
16670        @param kind a value from the <a class='el'
16671        href='#UnitKind_t'>UnitKind_t</a> enumeration.
16672        @endif@if java
16673        @param kind a unit identifier chosen from the set of constants whose
16674        names begin with <code>UNIT_KIND_</code> in <code><a
16675        href='libsbmlConstants.html'>libsbmlConstants</a></code>.
16676        @endif@if python
16677        @param kind a unit identifier chosen from the set of constants whose
16678        names begin with <code>UNIT_KIND_</code> in @link libsbml libsbml@endlink.
16679        @endif@~
16680
16681        @return integer value indicating success/failure of the
16682        function.  @if clike The value is drawn from the
16683        enumeration #OperationReturnValues_t. @endif@~ The possible values
16684        returned by this function are:
16685        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16686        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
16687
16688        """
16689        return _libsbml.Unit_setKind(self, kind)
16690
16691    def setExponent(self, *args):
16692        r"""
16693        setExponent(Unit self, int value) -> int
16694        setExponent(Unit self, double value) -> int
16695
16696        This method has multiple variants; they differ in the arguments
16697         they accept.  Each variant is described separately below.
16698
16699        @par
16700        <hr>
16701        <span class='variant-sig-heading'>Method variant with the following signature</span>:
16702         <pre class='signature'>setExponent(int value)</pre>
16703
16704        Sets the 'exponent' attribute value of this Unit.
16705
16706        @param value the integer to which the attribute 'exponent' should be set.
16707
16708        @return integer value indicating success/failure of the
16709        function.  @if clike The value is drawn from the
16710        enumeration #OperationReturnValues_t. @endif@~ The possible values
16711        returned by this function are:
16712        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16713        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
16714
16715
16716        @par
16717        <hr>
16718        <span class='variant-sig-heading'>Method variant with the following signature</span>:
16719         <pre class='signature'>setExponent(double value)</pre>
16720
16721        Sets the 'exponent' attribute value of this Unit.
16722
16723        @param value the double to which the attribute 'exponent' should be set.
16724
16725        @return integer value indicating success/failure of the
16726        function.  @if clike The value is drawn from the
16727        enumeration #OperationReturnValues_t. @endif@~ The possible values
16728        returned by this function are:
16729        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16730
16731        """
16732        return _libsbml.Unit_setExponent(self, *args)
16733
16734    def setScale(self, value):
16735        r"""
16736        setScale(Unit self, int value) -> int
16737
16738        Sets the 'scale' attribute value of this Unit.
16739
16740        @param value the integer to which the attribute 'scale' should be set.
16741
16742        @return integer value indicating success/failure of the
16743        function.  @if clike The value is drawn from the
16744        enumeration #OperationReturnValues_t. @endif@~ The possible values
16745        returned by this function are:
16746        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16747
16748        """
16749        return _libsbml.Unit_setScale(self, value)
16750
16751    def setMultiplier(self, value):
16752        r"""
16753        setMultiplier(Unit self, double value) -> int
16754
16755        Sets the 'multipler' attribute value of this Unit.
16756
16757        @param value the floating-point value to which the attribute
16758        'multiplier' should be set.
16759
16760        @return integer value indicating success/failure of the
16761        function.  @if clike The value is drawn from the
16762        enumeration #OperationReturnValues_t. @endif@~ The possible values
16763        returned by this function are:
16764        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16765        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
16766
16767        """
16768        return _libsbml.Unit_setMultiplier(self, value)
16769
16770    def setOffset(self, value):
16771        r"""
16772        setOffset(Unit self, double value) -> int
16773
16774        Sets the 'offset' attribute value of this Unit.
16775
16776        @param value the floating point value to which the attribute 'offset'
16777        should set.
16778
16779        @return integer value indicating success/failure of the
16780        function.  @if clike The value is drawn from the
16781        enumeration #OperationReturnValues_t. @endif@~ The possible values
16782        returned by this function are:
16783        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16784        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
16785
16786        @warning <span class='warning'>The 'offset' attribute is only available in
16787        SBML Level&nbsp;2 Version&nbsp;1.  This attribute is not present in SBML
16788        Level&nbsp;2 Version&nbsp;2 or above.  When producing SBML models using
16789        these later specifications, modelers and software tools need to account
16790        for units with offsets explicitly.  The %SBML specification document
16791        offers a number of suggestions for how to achieve this.  LibSBML methods
16792        such as this one related to 'offset' are retained for compatibility with
16793        earlier versions of SBML Level&nbsp;2, but their use is strongly
16794        discouraged.</span>
16795
16796        """
16797        return _libsbml.Unit_setOffset(self, value)
16798
16799    def unsetKind(self):
16800        r"""
16801        unsetKind(Unit self) -> int
16802
16803        Unsets the 'kind' attribute value of this Unit.
16804
16805        @return integer value indicating success/failure of the
16806        function.  @if clike The value is drawn from the
16807        enumeration #OperationReturnValues_t. @endif@~ The possible values
16808        returned by this function are:
16809        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16810        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
16811
16812        """
16813        return _libsbml.Unit_unsetKind(self)
16814
16815    def unsetExponent(self):
16816        r"""
16817        unsetExponent(Unit self) -> int
16818
16819        Unsets the 'exponent' attribute value of this Unit.
16820
16821        @return integer value indicating success/failure of the
16822        function.  @if clike The value is drawn from the
16823        enumeration #OperationReturnValues_t. @endif@~ The possible values
16824        returned by this function are:
16825        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16826        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
16827
16828        """
16829        return _libsbml.Unit_unsetExponent(self)
16830
16831    def unsetScale(self):
16832        r"""
16833        unsetScale(Unit self) -> int
16834
16835        Unsets the 'scale' attribute value of this Unit.
16836
16837        @return integer value indicating success/failure of the
16838        function.  @if clike The value is drawn from the
16839        enumeration #OperationReturnValues_t. @endif@~ The possible values
16840        returned by this function are:
16841        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16842
16843        """
16844        return _libsbml.Unit_unsetScale(self)
16845
16846    def unsetMultiplier(self):
16847        r"""
16848        unsetMultiplier(Unit self) -> int
16849
16850        Unsets the 'multipler' attribute value of this Unit.
16851
16852        @return integer value indicating success/failure of the
16853        function.  @if clike The value is drawn from the
16854        enumeration #OperationReturnValues_t. @endif@~ The possible values
16855        returned by this function are:
16856        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16857        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
16858
16859        """
16860        return _libsbml.Unit_unsetMultiplier(self)
16861
16862    def unsetOffset(self):
16863        r"""
16864        unsetOffset(Unit self) -> int
16865
16866        Unsets the 'offset' attribute value of this Unit.
16867
16868        @return integer value indicating success/failure of the
16869        function.  @if clike The value is drawn from the
16870        enumeration #OperationReturnValues_t. @endif@~ The possible values
16871        returned by this function are:
16872        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
16873        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
16874
16875        @warning <span class='warning'>The 'offset' attribute is only available in
16876        SBML Level&nbsp;2 Version&nbsp;1.  This attribute is not present in SBML
16877        Level&nbsp;2 Version&nbsp;2 or above.  When producing SBML models using
16878        these later specifications, modelers and software tools need to account
16879        for units with offsets explicitly.  The %SBML specification document
16880        offers a number of suggestions for how to achieve this.  LibSBML methods
16881        such as this one related to 'offset' are retained for compatibility with
16882        earlier versions of SBML Level&nbsp;2, but their use is strongly
16883        discouraged.</span>
16884
16885        """
16886        return _libsbml.Unit_unsetOffset(self)
16887
16888    def getTypeCode(self):
16889        r"""
16890        getTypeCode(Unit self) -> int
16891
16892        Returns the libSBML type code of this object instance.
16893
16894        @par
16895        LibSBML attaches an identifying code to every kind of SBML object.  These
16896        are integer constants known as <em>SBML type codes</em>.  The names of all
16897        the codes begin with the characters <code>SBML_</code>.
16898        @if clike The set of possible type codes for core elements is defined in
16899        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
16900        SBML Level&nbsp;3 packages define their own extra enumerations of type
16901        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
16902        package).@endif@if java In the Java language interface for libSBML, the
16903        type codes are defined as static integer constants in the interface class
16904        {@link libsbmlConstants}.  @endif@if python In the Python language
16905        interface for libSBML, the type codes are defined as static integer
16906        constants in the interface class @link libsbml@endlink.@endif@if csharp In
16907        the C# language interface for libSBML, the type codes are defined as
16908        static integer constants in the interface class
16909        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
16910        package plug-ins may use overlapping type codes; to identify the package
16911        to which a given object belongs, call the
16912        <code>@if conly SBase_getPackageName()
16913        @else SBase.getPackageName()
16914        @endif</code>
16915        method on the object.
16916
16917        The exception to this is lists:  all SBML-style list elements have the type
16918        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
16919        are from.
16920
16921        @return the SBML type code for this object:
16922        @link libsbml#SBML_UNIT SBML_UNIT@endlink (default).
16923
16924        @warning <span class='warning'>The specific integer values of the possible
16925        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
16926        packages,  To fully identify the correct code, <strong>it is necessary to
16927        invoke both getPackageName() and getTypeCode()</strong> (or
16928        ListOf.getItemTypeCode()).</span>
16929
16930        @see getPackageName()
16931        @see getElementName()
16932
16933        """
16934        return _libsbml.Unit_getTypeCode(self)
16935
16936    def getElementName(self):
16937        r"""
16938        getElementName(Unit self) -> string
16939
16940        Returns the XML element name of this object, which for Unit, is
16941        always @c 'unit'.
16942
16943        @return the name of this element, i.e., @c 'unit'.
16944
16945        """
16946        return _libsbml.Unit_getElementName(self)
16947
16948    @staticmethod
16949    def isBuiltIn(name, level):
16950        r"""
16951        isBuiltIn(string name, unsigned int level) -> bool
16952
16953        Predicate to test whether a given string is the name of a built-in SBML
16954        unit, depending on the SBML level, since new predefined units were added
16955        between level 2 versions 1 and 2, and then all predefined units were removed
16956        again in SBML Level 3.
16957
16958        @param name a string to be tested against the built-in unit names.
16959        @param level the level of SBML one is checking.
16960
16961        @return @c True if @p name is one of @c 'substance', @c 'volume',
16962        or @c 'time' and the @p level is @c 1; or if @p name is one of
16963        @c 'substance', @c 'volume', @c 'area', @c 'length', or @c 'time' and
16964        the @p level is @c 2; @c False otherwise (including all values when
16965        @p level is @c 3).
16966
16967
16968        @if python @note Because this is a static method on a class, the Python
16969        language interface for libSBML will contain two variants.  One will be the
16970        expected, normal static method on the class (i.e., a regular
16971        <em>methodName</em>), and the other will be a standalone top-level
16972        function with the name <em>ClassName_methodName()</em>. This is merely an
16973        artifact of how the language interfaces are created in libSBML.  The
16974        methods are functionally identical. @endif@~
16975
16976        """
16977        return _libsbml.Unit_isBuiltIn(name, level)
16978
16979    @staticmethod
16980    def isUnitKind(name, level, version):
16981        r"""
16982        isUnitKind(string name, unsigned int level, unsigned int version) -> bool
16983
16984        Predicate to test whether a given string is the name of a valid
16985        base unit in SBML (such as @c 'gram' or @c 'mole').
16986
16987        This method exists because prior to SBML Level&nbsp;2 Version&nbsp;3,
16988        an enumeration called @c UnitKind was defined by SBML.  This enumeration
16989        was removed in SBML Level&nbsp;2 Version&nbsp;3 and its values were
16990        folded into the space of values of a type called @c UnitSId.  This method
16991        therefore has less significance in SBML Level&nbsp;2 Version&nbsp;3
16992        and Level&nbsp;2 Version&nbsp;4, but remains for backward
16993        compatibility and support for reading models in older Versions of
16994        Level&nbsp;2.
16995
16996        @param name a string to be tested.
16997
16998        @param level a long integer representing the SBML specification
16999        Level.
17000
17001        @param version a long integer representing the SBML specification
17002        Version.
17003
17004        @return @c True if name is a valid SBML UnitKind, @c False otherwise.
17005
17006        @note The allowed unit names differ between SBML Levels&nbsp;1
17007        and&nbsp;2 and again slightly between Level&nbsp;2 Versions&nbsp;1
17008        and&nbsp;2.
17009
17010        @if python @note Because this is a static method on a class, the Python
17011        language interface for libSBML will contain two variants.  One will be the
17012        expected, normal static method on the class (i.e., a regular
17013        <em>methodName</em>), and the other will be a standalone top-level
17014        function with the name <em>ClassName_methodName()</em>. This is merely an
17015        artifact of how the language interfaces are created in libSBML.  The
17016        methods are functionally identical. @endif@~
17017
17018        """
17019        return _libsbml.Unit_isUnitKind(name, level, version)
17020
17021    @staticmethod
17022    def areIdentical(unit1, unit2):
17023        r"""
17024        areIdentical(Unit unit1, Unit unit2) -> bool
17025
17026        Predicate returning @c True if two
17027        Unit objects are identical.
17028
17029        Two Unit objects are considered to be @em identical if they match in
17030        all attributes.  (Contrast this to the method areEquivalent(@if java
17031        Unit u1, %Unit u2@endif), which compares Unit objects only with respect
17032        to certain attributes.)
17033
17034        @param unit1 the first Unit object to compare.
17035        @param unit2 the second Unit object to compare.
17036
17037        @return @c True if all the attributes of unit1 are identical
17038        to the attributes of unit2, @c False otherwise.
17039
17040        @if python @note Because this is a static method on a class, the Python
17041        language interface for libSBML will contain two variants.  One will be the
17042        expected, normal static method on the class (i.e., a regular
17043        <em>methodName</em>), and the other will be a standalone top-level
17044        function with the name <em>ClassName_methodName()</em>. This is merely an
17045        artifact of how the language interfaces are created in libSBML.  The
17046        methods are functionally identical. @endif@~
17047
17048        @see @if clike areEquivalent() @else Unit.areEquivalent() @endif@~
17049
17050        """
17051        return _libsbml.Unit_areIdentical(unit1, unit2)
17052
17053    @staticmethod
17054    def areEquivalent(unit1, unit2):
17055        r"""
17056        areEquivalent(Unit unit1, Unit unit2) -> bool
17057
17058        Predicate returning @c True if
17059        Unit objects are equivalent.
17060
17061        Two Unit objects are considered to be @em equivalent either if (1) both
17062        have a 'kind' attribute value of @c dimensionless, or (2) their 'kind',
17063        'exponent' and (for SBML Level&nbsp;2 Version&nbsp;1) 'offset'
17064        attribute values are equal. (Contrast this to the method
17065        areIdentical(@if java Unit, %Unit@endif), which compares Unit objects with respect to all
17066        attributes, not just the 'kind' and 'exponent'.)
17067
17068        @param unit1 the first Unit object to compare.
17069        @param unit2 the second Unit object to compare.
17070
17071        @return @c True if the 'kind' and 'exponent' attributes of unit1 are
17072        identical to the kind and exponent attributes of unit2, or if the kind
17073        attributes of both are @c dimensionless; @c False otherwise.
17074
17075        @if python @note Because this is a static method on a class, the Python
17076        language interface for libSBML will contain two variants.  One will be the
17077        expected, normal static method on the class (i.e., a regular
17078        <em>methodName</em>), and the other will be a standalone top-level
17079        function with the name <em>ClassName_methodName()</em>. This is merely an
17080        artifact of how the language interfaces are created in libSBML.  The
17081        methods are functionally identical. @endif@~
17082
17083        @see @if clike areIdentical() @else Unit.areIdentical() @endif@~
17084
17085        """
17086        return _libsbml.Unit_areEquivalent(unit1, unit2)
17087
17088    @staticmethod
17089    def removeScale(unit):
17090        r"""
17091        removeScale(Unit unit) -> int
17092
17093        Manipulates the attributes of the Unit to express the unit with the
17094        value of the scale attribute reduced to zero.
17095
17096        For example, 1 millimetre can be expressed as a Unit with kind=
17097        @c 'metre' multiplier=@c '1' scale=@c '-3' exponent=@c '1'. It can also be
17098        expressed as a Unit with kind=@c 'metre'
17099        multiplier=<code>'0.001'</code> scale=@c '0' exponent=@c '1'.
17100
17101        @param unit the Unit object to manipulate.
17102
17103        @return integer value indicating success/failure of the
17104        function.  @if clike The value is drawn from the
17105        enumeration #OperationReturnValues_t. @endif@~ This particular
17106        function only does one thing irrespective of user input or
17107        object state, and thus will only return a single value:
17108        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
17109
17110        @if python @note Because this is a static method on a class, the Python
17111        language interface for libSBML will contain two variants.  One will be the
17112        expected, normal static method on the class (i.e., a regular
17113        <em>methodName</em>), and the other will be a standalone top-level
17114        function with the name <em>ClassName_methodName()</em>. This is merely an
17115        artifact of how the language interfaces are created in libSBML.  The
17116        methods are functionally identical. @endif@~
17117
17118        @see @if clike convertToSI() @else Unit.convertToSI() @endif@~
17119        @see @if clike merge() @else Unit.merge() @endif@~
17120
17121        """
17122        return _libsbml.Unit_removeScale(unit)
17123
17124    @staticmethod
17125    def merge(unit1, unit2):
17126        r"""
17127        merge(Unit unit1, Unit unit2)
17128
17129        Merges two Unit objects with the same 'kind' attribute value into a
17130        single Unit.
17131
17132        For example, the following,
17133        @verbatim
17134         <unit kind='metre' exponent='2'/>
17135         <unit kind='metre' exponent='1'/>
17136         @endverbatim
17137        would be merged to become
17138        @verbatim
17139         <unit kind='metre' exponent='3'/>
17140         @endverbatim
17141
17142        @param unit1 the first Unit object; the result of the operation is
17143        left as a new version of this unit, modified in-place.  Not modified if
17144        the two units have different kinds.
17145
17146        @param unit2 the second Unit object to merge with the first.
17147
17148        @if python @note Because this is a static method on a class, the Python
17149        language interface for libSBML will contain two variants.  One will be the
17150        expected, normal static method on the class (i.e., a regular
17151        <em>methodName</em>), and the other will be a standalone top-level
17152        function with the name <em>ClassName_methodName()</em>. This is merely an
17153        artifact of how the language interfaces are created in libSBML.  The
17154        methods are functionally identical. @endif@~
17155
17156        @see @if clike convertToSI() @else Unit.convertToSI() @endif@~
17157        @see @if clike removeScale() @else Unit.removeScale() @endif@~
17158
17159        """
17160        return _libsbml.Unit_merge(unit1, unit2)
17161
17162    @staticmethod
17163    def convertToSI(unit):
17164        r"""
17165        convertToSI(Unit unit) -> UnitDefinition
17166
17167        Returns a UnitDefinition object containing the given @p unit converted
17168        to the appropriate SI unit.
17169
17170        This method exists because some units can be expressed in terms of
17171        others when the same physical dimension is involved.  For example, one
17172        hertz is identical to 1&nbsp;sec<sup>-1</sup>, one litre is equivalent
17173        to 1 cubic decametre, and so on.
17174
17175        @param unit the Unit object to convert to SI.
17176
17177        @return a UnitDefinition object containing the SI unit.
17178
17179        @if python @note Because this is a static method on a class, the Python
17180        language interface for libSBML will contain two variants.  One will be the
17181        expected, normal static method on the class (i.e., a regular
17182        <em>methodName</em>), and the other will be a standalone top-level
17183        function with the name <em>ClassName_methodName()</em>. This is merely an
17184        artifact of how the language interfaces are created in libSBML.  The
17185        methods are functionally identical. @endif@~
17186
17187        @see @if clike merge() @else Unit.merge() @endif@~
17188
17189        """
17190        return _libsbml.Unit_convertToSI(unit)
17191
17192    def hasRequiredAttributes(self):
17193        r"""
17194        hasRequiredAttributes(Unit self) -> bool
17195
17196        Predicate returning @c True if
17197        all the required attributes for this Unit object
17198        have been set.
17199
17200        The required attributes for a Unit object are:
17201        @li 'kind'
17202        @li 'exponent' (required in SBML Level&nbsp;3; optional in Level&nbsp;2)
17203        @li 'multiplier' (required in SBML Level&nbsp;3; optional in Level&nbsp;2)
17204        @li 'scale' (required in SBML Level&nbsp;3; optional in Level&nbsp;2)
17205
17206        @return @c True if the required attributes have been set, @c False
17207        otherwise.
17208
17209        """
17210        return _libsbml.Unit_hasRequiredAttributes(self)
17211
17212    def setExponentUnitChecking(self, value):
17213        r"""
17214        setExponentUnitChecking(Unit self, double value)
17215
17216        @internal
17217
17218        @internal
17219
17220        """
17221        return _libsbml.Unit_setExponentUnitChecking(self, value)
17222
17223    def getExponentUnitChecking(self, *args):
17224        r"""
17225        getExponentUnitChecking(Unit self) -> double
17226        getExponentUnitChecking(Unit self) -> double
17227
17228        @internal
17229
17230        @internal
17231
17232        """
17233        return _libsbml.Unit_getExponentUnitChecking(self, *args)
17234
17235    def isUnitChecking(self, *args):
17236        r"""
17237        isUnitChecking(Unit self) -> bool
17238        isUnitChecking(Unit self) -> bool
17239
17240        @internal
17241
17242        @internal
17243
17244        """
17245        return _libsbml.Unit_isUnitChecking(self, *args)
17246
17247# Register Unit in _libsbml:
17248_libsbml.Unit_swigregister(Unit)
17249
17250def Unit_isBuiltIn(name, level):
17251    r"""
17252    Unit_isBuiltIn(string name, unsigned int level) -> bool
17253
17254    Predicate to test whether a given string is the name of a built-in SBML
17255    unit, depending on the SBML level, since new predefined units were added
17256    between level 2 versions 1 and 2, and then all predefined units were removed
17257    again in SBML Level 3.
17258
17259    @param name a string to be tested against the built-in unit names.
17260    @param level the level of SBML one is checking.
17261
17262    @return @c True if @p name is one of @c 'substance', @c 'volume',
17263    or @c 'time' and the @p level is @c 1; or if @p name is one of
17264    @c 'substance', @c 'volume', @c 'area', @c 'length', or @c 'time' and
17265    the @p level is @c 2; @c False otherwise (including all values when
17266    @p level is @c 3).
17267
17268
17269    @if python @note Because this is a static method on a class, the Python
17270    language interface for libSBML will contain two variants.  One will be the
17271    expected, normal static method on the class (i.e., a regular
17272    <em>methodName</em>), and the other will be a standalone top-level
17273    function with the name <em>ClassName_methodName()</em>. This is merely an
17274    artifact of how the language interfaces are created in libSBML.  The
17275    methods are functionally identical. @endif@~
17276
17277    """
17278    return _libsbml.Unit_isBuiltIn(name, level)
17279
17280def Unit_isUnitKind(name, level, version):
17281    r"""
17282    Unit_isUnitKind(string name, unsigned int level, unsigned int version) -> bool
17283
17284    Predicate to test whether a given string is the name of a valid
17285    base unit in SBML (such as @c 'gram' or @c 'mole').
17286
17287    This method exists because prior to SBML Level&nbsp;2 Version&nbsp;3,
17288    an enumeration called @c UnitKind was defined by SBML.  This enumeration
17289    was removed in SBML Level&nbsp;2 Version&nbsp;3 and its values were
17290    folded into the space of values of a type called @c UnitSId.  This method
17291    therefore has less significance in SBML Level&nbsp;2 Version&nbsp;3
17292    and Level&nbsp;2 Version&nbsp;4, but remains for backward
17293    compatibility and support for reading models in older Versions of
17294    Level&nbsp;2.
17295
17296    @param name a string to be tested.
17297
17298    @param level a long integer representing the SBML specification
17299    Level.
17300
17301    @param version a long integer representing the SBML specification
17302    Version.
17303
17304    @return @c True if name is a valid SBML UnitKind, @c False otherwise.
17305
17306    @note The allowed unit names differ between SBML Levels&nbsp;1
17307    and&nbsp;2 and again slightly between Level&nbsp;2 Versions&nbsp;1
17308    and&nbsp;2.
17309
17310    @if python @note Because this is a static method on a class, the Python
17311    language interface for libSBML will contain two variants.  One will be the
17312    expected, normal static method on the class (i.e., a regular
17313    <em>methodName</em>), and the other will be a standalone top-level
17314    function with the name <em>ClassName_methodName()</em>. This is merely an
17315    artifact of how the language interfaces are created in libSBML.  The
17316    methods are functionally identical. @endif@~
17317
17318    """
17319    return _libsbml.Unit_isUnitKind(name, level, version)
17320
17321def Unit_areIdentical(unit1, unit2):
17322    r"""
17323    Unit_areIdentical(Unit unit1, Unit unit2) -> bool
17324
17325    Predicate returning @c True if two
17326    Unit objects are identical.
17327
17328    Two Unit objects are considered to be @em identical if they match in
17329    all attributes.  (Contrast this to the method areEquivalent(@if java
17330    Unit u1, %Unit u2@endif), which compares Unit objects only with respect
17331    to certain attributes.)
17332
17333    @param unit1 the first Unit object to compare.
17334    @param unit2 the second Unit object to compare.
17335
17336    @return @c True if all the attributes of unit1 are identical
17337    to the attributes of unit2, @c False otherwise.
17338
17339    @if python @note Because this is a static method on a class, the Python
17340    language interface for libSBML will contain two variants.  One will be the
17341    expected, normal static method on the class (i.e., a regular
17342    <em>methodName</em>), and the other will be a standalone top-level
17343    function with the name <em>ClassName_methodName()</em>. This is merely an
17344    artifact of how the language interfaces are created in libSBML.  The
17345    methods are functionally identical. @endif@~
17346
17347    @see @if clike areEquivalent() @else Unit.areEquivalent() @endif@~
17348
17349    """
17350    return _libsbml.Unit_areIdentical(unit1, unit2)
17351
17352def Unit_areEquivalent(unit1, unit2):
17353    r"""
17354    Unit_areEquivalent(Unit unit1, Unit unit2) -> bool
17355
17356    Predicate returning @c True if
17357    Unit objects are equivalent.
17358
17359    Two Unit objects are considered to be @em equivalent either if (1) both
17360    have a 'kind' attribute value of @c dimensionless, or (2) their 'kind',
17361    'exponent' and (for SBML Level&nbsp;2 Version&nbsp;1) 'offset'
17362    attribute values are equal. (Contrast this to the method
17363    areIdentical(@if java Unit, %Unit@endif), which compares Unit objects with respect to all
17364    attributes, not just the 'kind' and 'exponent'.)
17365
17366    @param unit1 the first Unit object to compare.
17367    @param unit2 the second Unit object to compare.
17368
17369    @return @c True if the 'kind' and 'exponent' attributes of unit1 are
17370    identical to the kind and exponent attributes of unit2, or if the kind
17371    attributes of both are @c dimensionless; @c False otherwise.
17372
17373    @if python @note Because this is a static method on a class, the Python
17374    language interface for libSBML will contain two variants.  One will be the
17375    expected, normal static method on the class (i.e., a regular
17376    <em>methodName</em>), and the other will be a standalone top-level
17377    function with the name <em>ClassName_methodName()</em>. This is merely an
17378    artifact of how the language interfaces are created in libSBML.  The
17379    methods are functionally identical. @endif@~
17380
17381    @see @if clike areIdentical() @else Unit.areIdentical() @endif@~
17382
17383    """
17384    return _libsbml.Unit_areEquivalent(unit1, unit2)
17385
17386def Unit_removeScale(unit):
17387    r"""
17388    Unit_removeScale(Unit unit) -> int
17389
17390    Manipulates the attributes of the Unit to express the unit with the
17391    value of the scale attribute reduced to zero.
17392
17393    For example, 1 millimetre can be expressed as a Unit with kind=
17394    @c 'metre' multiplier=@c '1' scale=@c '-3' exponent=@c '1'. It can also be
17395    expressed as a Unit with kind=@c 'metre'
17396    multiplier=<code>'0.001'</code> scale=@c '0' exponent=@c '1'.
17397
17398    @param unit the Unit object to manipulate.
17399
17400    @return integer value indicating success/failure of the
17401    function.  @if clike The value is drawn from the
17402    enumeration #OperationReturnValues_t. @endif@~ This particular
17403    function only does one thing irrespective of user input or
17404    object state, and thus will only return a single value:
17405    @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
17406
17407    @if python @note Because this is a static method on a class, the Python
17408    language interface for libSBML will contain two variants.  One will be the
17409    expected, normal static method on the class (i.e., a regular
17410    <em>methodName</em>), and the other will be a standalone top-level
17411    function with the name <em>ClassName_methodName()</em>. This is merely an
17412    artifact of how the language interfaces are created in libSBML.  The
17413    methods are functionally identical. @endif@~
17414
17415    @see @if clike convertToSI() @else Unit.convertToSI() @endif@~
17416    @see @if clike merge() @else Unit.merge() @endif@~
17417
17418    """
17419    return _libsbml.Unit_removeScale(unit)
17420
17421def Unit_merge(unit1, unit2):
17422    r"""
17423    Unit_merge(Unit unit1, Unit unit2)
17424
17425    Merges two Unit objects with the same 'kind' attribute value into a
17426    single Unit.
17427
17428    For example, the following,
17429    @verbatim
17430     <unit kind='metre' exponent='2'/>
17431     <unit kind='metre' exponent='1'/>
17432     @endverbatim
17433    would be merged to become
17434    @verbatim
17435     <unit kind='metre' exponent='3'/>
17436     @endverbatim
17437
17438    @param unit1 the first Unit object; the result of the operation is
17439    left as a new version of this unit, modified in-place.  Not modified if
17440    the two units have different kinds.
17441
17442    @param unit2 the second Unit object to merge with the first.
17443
17444    @if python @note Because this is a static method on a class, the Python
17445    language interface for libSBML will contain two variants.  One will be the
17446    expected, normal static method on the class (i.e., a regular
17447    <em>methodName</em>), and the other will be a standalone top-level
17448    function with the name <em>ClassName_methodName()</em>. This is merely an
17449    artifact of how the language interfaces are created in libSBML.  The
17450    methods are functionally identical. @endif@~
17451
17452    @see @if clike convertToSI() @else Unit.convertToSI() @endif@~
17453    @see @if clike removeScale() @else Unit.removeScale() @endif@~
17454
17455    """
17456    return _libsbml.Unit_merge(unit1, unit2)
17457
17458def Unit_convertToSI(unit):
17459    r"""
17460    Unit_convertToSI(Unit unit) -> UnitDefinition
17461
17462    Returns a UnitDefinition object containing the given @p unit converted
17463    to the appropriate SI unit.
17464
17465    This method exists because some units can be expressed in terms of
17466    others when the same physical dimension is involved.  For example, one
17467    hertz is identical to 1&nbsp;sec<sup>-1</sup>, one litre is equivalent
17468    to 1 cubic decametre, and so on.
17469
17470    @param unit the Unit object to convert to SI.
17471
17472    @return a UnitDefinition object containing the SI unit.
17473
17474    @if python @note Because this is a static method on a class, the Python
17475    language interface for libSBML will contain two variants.  One will be the
17476    expected, normal static method on the class (i.e., a regular
17477    <em>methodName</em>), and the other will be a standalone top-level
17478    function with the name <em>ClassName_methodName()</em>. This is merely an
17479    artifact of how the language interfaces are created in libSBML.  The
17480    methods are functionally identical. @endif@~
17481
17482    @see @if clike merge() @else Unit.merge() @endif@~
17483
17484    """
17485    return _libsbml.Unit_convertToSI(unit)
17486
17487class ListOfUnits(ListOf):
17488    r"""
17489
17490    @sbmlpackage{core}
17491
17492    @htmlinclude pkg-marker-core.html A list of Unit objects.
17493
17494    ListOfUnits is entirely contained within UnitDefinition.
17495
17496    @par
17497    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
17498    are merely containers used for organizing the main components of an SBML
17499    model.  In libSBML's implementation, ListOf___
17500    @if conly data structures @else classes@endif@~ are derived from the
17501    intermediate utility @if conly structure @else class@endif@~ ListOf, which
17502    is not defined by the SBML specifications but serves as a useful
17503    programmatic construct.  ListOf is itself is in turn derived from SBase,
17504    which provides all of the various ListOf___
17505    @if conly data structures @else classes@endif@~ with common features
17506    defined by the SBML specification, such as 'metaid' attributes and
17507    annotations.
17508
17509    The relationship between the lists and the rest of an SBML model is
17510    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
17511
17512    @htmlinclude listof-illustration.html
17513
17514    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
17515    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
17516    Version&nbsp;2 allows
17517    containers to contain zero or more of the relevant object, instead of
17518    requiring at least one.  As such, libsbml will write out an
17519    otherwise-empty ListOf___ element that has any optional attribute set
17520    (such as 'id' or 'metaid'), that has an optional child (such
17521    as a 'notes' or 'annotation'), or that has attributes or children set
17522    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
17523    any other children.
17524
17525    Readers may wonder about the motivations for using the ListOf___
17526    containers in SBML.  A simpler approach in XML might be to place the
17527    components all directly at the top level of the model definition.  The
17528    choice made in SBML is to group them within XML elements named after
17529    %ListOf<em>Classname</em>, in part because it helps organize the
17530    components.  More importantly, the fact that the container classes are
17531    derived from SBase means that software tools can add information @em about
17532    the lists themselves into each list container's 'annotation'.
17533
17534    @see ListOfFunctionDefinitions
17535    @see ListOfUnitDefinitions
17536    @see ListOfCompartmentTypes
17537    @see ListOfSpeciesTypes
17538    @see ListOfCompartments
17539    @see ListOfSpecies
17540    @see ListOfParameters
17541    @see ListOfInitialAssignments
17542    @see ListOfRules
17543    @see ListOfConstraints
17544    @see ListOfReactions
17545    @see ListOfEvents
17546
17547    @if conly
17548    @note In the C API for libSBML, functions that in other language APIs
17549    would be inherited by the various ListOf___ structures not shown in the
17550    pages for the individual ListOf___'s.  Instead, the functions are defined
17551    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
17552    the many common functions available for manipulating ListOf___
17553    structures</strong>.  The documentation for the individual ListOf___
17554    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
17555    all of the functionality available. @endif@~
17556
17557    """
17558
17559    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17560    __repr__ = _swig_repr
17561
17562    def __init__(self, *args):
17563        r"""
17564        __init__(ListOfUnits self, unsigned int level, unsigned int version) -> ListOfUnits
17565        __init__(ListOfUnits self, SBMLNamespaces sbmlns) -> ListOfUnits
17566
17567        This method has multiple variants; they differ in the arguments
17568         they accept.  Each variant is described separately below.
17569
17570        @par
17571        <hr>
17572        <span class='variant-sig-heading'>Method variant with the following signature</span>:
17573         <pre class='signature'>ListOfUnits(SBMLNamespaces sbmlns)</pre>
17574
17575        Creates a new ListOfUnits object.
17576
17577        The object is constructed such that it is valid for the SBML Level and
17578        Version combination determined by the SBMLNamespaces object in @p
17579        sbmlns.
17580
17581        @param sbmlns an SBMLNamespaces object that is used to determine the
17582        characteristics of the ListOfUnits object to be created.
17583
17584        @throws SBMLConstructorException
17585        Thrown if the given @p sbmlns is inconsistent or incompatible
17586        with this object.
17587
17588        @note Attempting to add an object to an SBMLDocument having a different
17589        combination of SBML Level, Version and XML namespaces than the object
17590        itself will result in an error at the time a caller attempts to make the
17591        addition.  A parent object must have compatible Level, Version and XML
17592        namespaces.  (Strictly speaking, a parent may also have more XML
17593        namespaces than a child, but the reverse is not permitted.)  The
17594        restriction is necessary to ensure that an SBML model has a consistent
17595        overall structure.  This requires callers to manage their objects
17596        carefully, but the benefit is increased flexibility in how models can be
17597        created by permitting callers to create objects bottom-up if desired.  In
17598        situations where objects are not yet attached to parents (e.g.,
17599        SBMLDocument), knowledge of the intented SBML Level and Version help
17600        libSBML determine such things as whether it is valid to assign a
17601        particular value to an attribute.
17602
17603
17604        @par
17605        <hr>
17606        <span class='variant-sig-heading'>Method variant with the following signature</span>:
17607         <pre class='signature'>ListOfUnits(long level, long version)</pre>
17608
17609        Creates a new ListOfUnits object.
17610
17611        The object is constructed such that it is valid for the given SBML
17612        Level and Version combination.
17613
17614        @param level the SBML Level.
17615
17616        @param version the Version within the SBML Level.
17617
17618        @throws SBMLConstructorException
17619        Thrown if the given @p level and @p version combination are invalid
17620        or if this object is incompatible with the given level and version.
17621
17622        @note Attempting to add an object to an SBMLDocument having a different
17623        combination of SBML Level, Version and XML namespaces than the object
17624        itself will result in an error at the time a caller attempts to make the
17625        addition.  A parent object must have compatible Level, Version and XML
17626        namespaces.  (Strictly speaking, a parent may also have more XML
17627        namespaces than a child, but the reverse is not permitted.)  The
17628        restriction is necessary to ensure that an SBML model has a consistent
17629        overall structure.  This requires callers to manage their objects
17630        carefully, but the benefit is increased flexibility in how models can be
17631        created by permitting callers to create objects bottom-up if desired.  In
17632        situations where objects are not yet attached to parents (e.g.,
17633        SBMLDocument), knowledge of the intented SBML Level and Version help
17634        libSBML determine such things as whether it is valid to assign a
17635        particular value to an attribute.
17636
17637        """
17638        _libsbml.ListOfUnits_swiginit(self, _libsbml.new_ListOfUnits(*args))
17639
17640    def clone(self):
17641        r"""
17642        clone(ListOfUnits self) -> ListOfUnits
17643
17644        Creates and returns a deep copy of this ListOfUnits object.
17645
17646        @return the (deep) copy of this ListOfUnits object.
17647
17648        """
17649        return _libsbml.ListOfUnits_clone(self)
17650
17651    def getItemTypeCode(self):
17652        r"""
17653        getItemTypeCode(ListOfUnits self) -> int
17654
17655        Returns the libSBML type code for the objects contained in this ListOf
17656        (i.e., Unit objects, if the list is non-empty).
17657
17658        @par
17659        LibSBML attaches an identifying code to every kind of SBML object.  These
17660        are integer constants known as <em>SBML type codes</em>.  The names of all
17661        the codes begin with the characters <code>SBML_</code>.
17662        @if clike The set of possible type codes for core elements is defined in
17663        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
17664        SBML Level&nbsp;3 packages define their own extra enumerations of type
17665        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
17666        package).@endif@if java In the Java language interface for libSBML, the
17667        type codes are defined as static integer constants in the interface class
17668        {@link libsbmlConstants}.  @endif@if python In the Python language
17669        interface for libSBML, the type codes are defined as static integer
17670        constants in the interface class @link libsbml@endlink.@endif@if csharp In
17671        the C# language interface for libSBML, the type codes are defined as
17672        static integer constants in the interface class
17673        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
17674        package plug-ins may use overlapping type codes; to identify the package
17675        to which a given object belongs, call the
17676        <code>@if conly SBase_getPackageName()
17677        @else SBase.getPackageName()
17678        @endif</code>
17679        method on the object.
17680
17681        The exception to this is lists:  all SBML-style list elements have the type
17682        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
17683        are from.
17684
17685        @return the SBML type code for objects contained in this list:
17686        @link libsbml#SBML_UNIT SBML_UNIT@endlink (default).
17687
17688        @see getElementName()
17689        @see getPackageName()
17690
17691        """
17692        return _libsbml.ListOfUnits_getItemTypeCode(self)
17693
17694    def getElementName(self):
17695        r"""
17696        getElementName(ListOfUnits self) -> string
17697
17698        Returns the XML element name of this object.
17699
17700        For ListOfUnits, the XML element name is @c 'listOfUnits'.
17701
17702        @return the name of this element, i.e., @c 'listOfUnits'.
17703
17704        """
17705        return _libsbml.ListOfUnits_getElementName(self)
17706
17707    def get(self, *args):
17708        r"""
17709        get(ListOfUnits self, unsigned int n) -> Unit
17710        get(ListOfUnits self, unsigned int n) -> Unit
17711
17712        Get a Unit from the ListOfUnits.
17713
17714        @param n the index number of the Unit to get.
17715
17716        @return the nth Unit in this ListOfUnits.
17717        If the index @p n is invalid, @c None is returned.
17718
17719        @see size()
17720
17721        """
17722        return _libsbml.ListOfUnits_get(self, *args)
17723
17724    def remove(self, n):
17725        r"""
17726        remove(ListOfUnits self, unsigned int n) -> Unit
17727
17728        Removes the nth item from this ListOfUnits items and returns a pointer to
17729        it.
17730
17731        The caller owns the returned item and is responsible for deleting it.
17732
17733        @param n the index of the item to remove.
17734
17735        @see size()
17736
17737        """
17738        return _libsbml.ListOfUnits_remove(self, n)
17739    __swig_destroy__ = _libsbml.delete_ListOfUnits
17740
17741# Register ListOfUnits in _libsbml:
17742_libsbml.ListOfUnits_swigregister(ListOfUnits)
17743
17744class UnitDefinition(SBase):
17745    r"""
17746
17747    @sbmlpackage{core}
17748
17749    @htmlinclude pkg-marker-core.html A definition of a unit used in an SBML model.
17750
17751    Units of measurement may be supplied in a number of contexts in an SBML
17752    model.  The SBML unit definition facility uses two classes of objects,
17753    UnitDefinition and Unit.  The approach to defining units in SBML is
17754    compositional; for example, <em>meter second<sup> &ndash;2</sup></em> is
17755    constructed by combining a Unit object representing <em>meter</em> with
17756    another Unit object representing <em>second<sup> &ndash;2</sup></em>.
17757    The combination is wrapped inside a UnitDefinition, which provides for
17758    assigning an identifier and optional name to the combination.  The
17759    identifier can then be referenced from elsewhere in a model.  Thus, the
17760    UnitDefinition class is the container, and Unit instances are placed
17761    inside UnitDefinition instances.
17762
17763    Two points are worth discussing in the context of SBML units.  First,
17764    unit declarations in SBML models are @em optional.  The consequence of
17765    this is that a model must be numerically self-consistent independently
17766    of unit declarations, for the benefit of software tools that cannot
17767    interpret or manipulate units.  Unit declarations in SBML are thus more
17768    akin to a type of annotation; they can indicate intentions, and can be
17769    used by model readers for checking the consistency of the model,
17770    labeling simulation output, etc., but any transformations of values
17771    implied by different units must be incorporated @em explicitly into a
17772    model.
17773
17774    Second, the vast majority of situations that require new SBML unit
17775    definitions involve simple multiplicative combinations of base units and
17776    factors.  An example is <em>moles per litre per second</em>.  What
17777    distinguishes these sorts of unit definitions from more complex ones is
17778    that they may be expressed without the use of an additive offset from a
17779    zero point.  The use of offsets complicates all unit definition systems,
17780    yet in the domain of SBML, the real-life cases requiring offsets are few
17781    (and in fact, to the best of our knowledge, only involve temperature).
17782    Consequently, the SBML unit system has been consciously designed to
17783    simplify implementation of unit support for the most common cases in
17784    systems biology.  The cost of this simplification is to require units
17785    with offsets to be handled explicitly by the modeler.
17786
17787    @section unitdef-summary Summary of the UnitDefinition construct
17788
17789    UnitDefinition has two attributes and one subelement.  The two
17790    attributes are 'id' and 'name', and the subelement is ListOfUnits.
17791
17792    The required attribute 'id' and optional attribute 'name' are both
17793    strings.  The 'id' attribute is used to give the defined unit a unique
17794    identifier by which other parts of an SBML model definition can refer to
17795    it.  The 'name' attribute is intended to be used for giving the unit
17796    definition an optional human-readable name.  Please see the <a
17797    href='#unitdef-id'>next section</a> for information about the values
17798    permitted for 'id'.
17799
17800    A UnitDefinition may contain exactly one ListOfUnits, and this list
17801    may contain one or more Unit definitions; see the definitions of these
17802    other object classes for more information about them.  In SBML
17803    Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1, if the ListOfUnits
17804    was present, it must have one or more Unit definitions.  In SBML
17805    Level&nbsp;3 Version&nbsp;2, this restriction was relaxed, and
17806    a ListOfUnits was allowed to be empty.  In either case, if a
17807    UnitDefinition had no child Unit elements, the unit was considered
17808    to be undefined.
17809
17810    The following
17811    example illustrates a complete unit definition (when written in XML)
17812    when all the pieces are combined together.  This defines 'mmls'
17813    to be millimoles per litre per second.
17814    @verbatim
17815     <listOfUnitDefinitions>
17816         <unitDefinition id='mmls'>
17817             <listOfUnits>
17818                 <unit kind='mole'   scale='-3'/>
17819                 <unit kind='litre'  exponent='-1'/>
17820                 <unit kind='second' exponent='-1'/>
17821             </listOfUnits>
17822         </unitDefinition>
17823     </listOfUnitDefinitions>
17824     @endverbatim
17825
17826    @section unitdef-id Special considerations for Unit object identifiers
17827
17828    The attribute 'id' in UnitDefinition cannot be given simply any value,
17829    and the precise details of the values permitted differ slightly between
17830    Levels of SBML:
17831    <ul>
17832
17833    <li> The 'id' of a UnitDefinition must @em not contain a value from the
17834    list of SBML's predefined base unit names (i.e., the strings @c gram,
17835    @c litre, etc.).  In SBML Level&nbsp;3, this list consists of the
17836    following:
17837
17838    @par
17839    <table border='0' class='centered text-table width80 normal-font code'
17840           style='border: none !important'>
17841    <tr>
17842    <td>ampere</td><td>farad</td><td>joule</td><td>lux</td><td>radian</td><td>volt</td>
17843    </tr>
17844    <tr>
17845    <td>avogadro</td><td>gram</td><td>katal</td><td>metre</td><td>second</td><td>watt</td>
17846    </tr>
17847    <tr>
17848    <td>becquerel</td><td>gray</td><td>kelvin</td><td>mole</td><td>siemens</td><td>weber</td>
17849    </tr>
17850    <tr>
17851    <td>candela</td><td>henry</td><td>kilogram</td><td>newton</td><td>sievert</td>
17852    </tr>
17853    <tr>
17854    <td>coulomb</td><td>hertz</td><td>litre</td><td>ohm</td><td>steradian</td>
17855    </tr>
17856    <tr>
17857    <td>dimensionless</td><td>item</td><td>lumen</td><td>pascal</td><td>tesla</td>
17858    </tr>
17859    </table>
17860
17861    This list of predefined base units is nearly identical in SBML
17862    Level&nbsp;2 Version&nbsp;4, the exception being that Level&nbsp;2 does
17863    not define @c avogadro.  SBML Level&nbsp;2 Version&nbsp;1 (and @em only
17864    this Level+Version combination) provides an additional predefined unit
17865    name, @c Celsius, not available in Level&nbsp;3.  Finally, SBML
17866    Level&nbsp;1 Versions&nbsp;2&ndash;3 provide two more additional
17867    predefined unit names, @c meter and @c liter.  This is explained in
17868    somewhat greater detail in the description of the Unit class.
17869
17870    <ul>
17871    <li> In SBML Level&nbsp;2 (all Versions), there is an additional set of
17872    reserved identifiers: @c substance, @c volume, @c area, @c length, and
17873    @c time.  Using one of these values for the attribute 'id' of a
17874    UnitDefinition has the effect of redefining the model-wide default units
17875    for the corresponding quantities.  The list of special unit names in
17876    SBML Level&nbsp;2 is given in the table below:
17877    </ul>
17878
17879    @htmlinclude predefined-units.html
17880
17881    Also, SBML Level&nbsp;2 imposes two limitations on redefining the
17882    predefined unit @c substance, @c volume, @c area, @c length, and
17883    @c time: (1) The UnitDefinition of a predefined SBML unit can only contain
17884    a single Unit object within it.  (2) The value of the 'kind' attribute
17885    in a Unit instance must be drawn from one of the values in the second
17886    column of the table above.
17887
17888    The special unit names @c substance, @c volume, @c area, @c length, and
17889    @c time are not defined by SBML Level&nbsp;3, which uses a different
17890    approach to setting model-wide inherited units.
17891
17892
17893    @section sbml-units-limits Further comments about SBML's unit definition system
17894
17895    The vast majority of modeling situations requiring new SBML unit
17896    definitions involve simple multiplicative combinations of base units and
17897    factors.  An example of this might be <em>moles per litre per
17898    second</em>.  What distinguishes these sorts of simpler unit definitions
17899    from more complex ones is that they may be expressed without the use of
17900    an additive offset from a zero point.  The use of offsets complicates
17901    all unit definition systems, yet in the domain of SBML the real-life
17902    cases requiring offsets are few (and in fact, to the best of our
17903    knowledge, only involve temperature).  Consequently, the SBML unit
17904    system has been consciously designed in a way that attempts to simplify
17905    implementation of unit support for the most common cases in systems
17906    biology.
17907
17908    As of SBML Level&nbsp;2 Version&nbsp;2, Unit no longer has the
17909    attribute called 'offset' introduced in SBML Level&nbsp;2
17910    Version&nbsp;1.  It turned out that the general case involving units
17911    with offsets was incorrectly defined, and few (if any) developers even
17912    attempted to support offset-based units in their software.  In the
17913    development of Level&nbsp;2 Version&nbsp;2, a consensus among SBML
17914    developers emerged that a fully generalized unit scheme is @em so
17915    confusing and complicated that it actually @em impedes interoperability.
17916    SBML Level&nbsp;2 Version&nbsp;2, Version&nbsp;3 and Version&nbsp;4 acknowledge this
17917    reality by reducing and simplifying the unit system, specifically by
17918    removing the 'offset' attribute on Unit and @c Celsius as a pre-defined
17919    unit.
17920
17921    The following guidelines suggest methods for handling units that do
17922    require the use of zero offsets for their definitions:
17923    <ul>
17924    <li> <em>Handling Celsius</em>.  A model in which certain quantities are
17925    temperatures measured in degrees Celsius can be converted
17926    straightforwardly to a model in which those temperatures are in
17927    kelvin.  A software tool could do this by performing a straightforward
17928    substitution using the following relationship: <em>T<sub> kelvin</sub> =
17929    T<sub>Celsius</sub> + 273.15</em>.  In every mathematical formula of the
17930    model where a quantity (call it @em x) in degrees Celsius appears,
17931    replace @em x with <em>x<sub>k</sub>+ 273.15</em>, where
17932    <em>x<sub>k</sub></em> is now in kelvin.  An alternative approach would
17933    be to use a FunctionDefinition object to define a function encapsulating this
17934    relationship above and then using that in the rest of the model as
17935    needed.  Since Celsius is a commonly-used unit, software tools could
17936    help users by providing users with the ability to express temperatures
17937    in Celsius in the tools' interfaces, and making substitutions
17938    automatically when writing out the SBML.
17939
17940    <li> <em>Other units requiring offsets</em>.  One approach to handling
17941    other kinds of units is to use a FunctionDefinition to define a function
17942    encapsulating the necessary mathematical relationship, then
17943    substituting a call to this function wherever the original quantity
17944    appeared in the model.  For example, here is a possible definition for
17945    converting Fahrenheit to Celsius degrees:
17946    @verbatim
17947     <functionDefinition id='Fahrenheit_to_kelvin'>
17948         <math xmlns='http://www.w3.org/1998/Math/MathML'>
17949             <lambda>
17950                 <bvar><ci> temp_in_fahrenheit </ci></bvar>
17951                 <apply>
17952                     <divide/>
17953                     <apply>
17954                         <plus/>
17955                         <ci> temp_in_fahrenheit </ci>
17956                         <cn> 459.67 </cn>
17957                     </apply>
17958                     <cn> 1.8 </cn>
17959                 </apply>
17960             </lambda>
17961         </math>
17962     </functionDefinition>
17963     @endverbatim
17964
17965    <li> An alternative approach not requiring the use of function definitions
17966    is to use an AssignmentRule for each variable in Fahrenheit units.
17967    The AssignmentRule could compute the conversion from Fahrenheit to
17968    (say) kelvin, assign its value to a variable (in Kelvin units), and
17969    then that variable could be used elsewhere in the model.
17970
17971    <li> Still another approach is to rewrite the mathematical formulas of a
17972    model to directly incorporate the conversion formula wherever the
17973    original quantity appeared.
17974    </ul>
17975
17976    Please consult the SBML specifications for more information about this
17977    and other issues involving units.
17978
17979    """
17980
17981    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17982    __repr__ = _swig_repr
17983    __swig_destroy__ = _libsbml.delete_UnitDefinition
17984
17985    def __init__(self, *args):
17986        r"""
17987        __init__(UnitDefinition self, unsigned int level, unsigned int version) -> UnitDefinition
17988        __init__(UnitDefinition self, SBMLNamespaces sbmlns) -> UnitDefinition
17989        __init__(UnitDefinition self, UnitDefinition orig) -> UnitDefinition
17990
17991        This method has multiple variants; they differ in the arguments
17992         they accept.  Each variant is described separately below.
17993
17994        @par
17995        <hr>
17996        <span class='variant-sig-heading'>Method variant with the following signature</span>:
17997         <pre class='signature'>UnitDefinition(SBMLNamespaces sbmlns)</pre>
17998
17999        Creates a new UnitDefinition using the given SBMLNamespaces object
18000        @p sbmlns.
18001
18002        @par
18003        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
18004        information.  It is used to communicate the SBML Level, Version, and (in
18005        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
18006        common approach to using libSBML's SBMLNamespaces facilities is to create an
18007        SBMLNamespaces object somewhere in a program once, then hand that object
18008        as needed to object constructors that accept SBMLNamespaces as arguments.
18009
18010        @param sbmlns an SBMLNamespaces object.
18011
18012        @throws SBMLConstructorException
18013        Thrown if the given @p sbmlns is inconsistent or incompatible
18014        with this object.
18015
18016        @note Attempting to add an object to an SBMLDocument having a different
18017        combination of SBML Level, Version and XML namespaces than the object
18018        itself will result in an error at the time a caller attempts to make the
18019        addition.  A parent object must have compatible Level, Version and XML
18020        namespaces.  (Strictly speaking, a parent may also have more XML
18021        namespaces than a child, but the reverse is not permitted.)  The
18022        restriction is necessary to ensure that an SBML model has a consistent
18023        overall structure.  This requires callers to manage their objects
18024        carefully, but the benefit is increased flexibility in how models can be
18025        created by permitting callers to create objects bottom-up if desired.  In
18026        situations where objects are not yet attached to parents (e.g.,
18027        SBMLDocument), knowledge of the intented SBML Level and Version help
18028        libSBML determine such things as whether it is valid to assign a
18029        particular value to an attribute.
18030
18031
18032        @par
18033        <hr>
18034        <span class='variant-sig-heading'>Method variant with the following signature</span>:
18035         <pre class='signature'>UnitDefinition(long level, long version)</pre>
18036
18037        Creates a new UnitDefinition using the given SBML @p level and @p version
18038        values.
18039
18040        @param level a long integer, the SBML Level to assign to this UnitDefinition.
18041
18042        @param version a long integer, the SBML Version to assign to this
18043        UnitDefinition.
18044
18045        @throws SBMLConstructorException
18046        Thrown if the given @p level and @p version combination are invalid
18047        or if this object is incompatible with the given level and version.
18048
18049        @note Attempting to add an object to an SBMLDocument having a different
18050        combination of SBML Level, Version and XML namespaces than the object
18051        itself will result in an error at the time a caller attempts to make the
18052        addition.  A parent object must have compatible Level, Version and XML
18053        namespaces.  (Strictly speaking, a parent may also have more XML
18054        namespaces than a child, but the reverse is not permitted.)  The
18055        restriction is necessary to ensure that an SBML model has a consistent
18056        overall structure.  This requires callers to manage their objects
18057        carefully, but the benefit is increased flexibility in how models can be
18058        created by permitting callers to create objects bottom-up if desired.  In
18059        situations where objects are not yet attached to parents (e.g.,
18060        SBMLDocument), knowledge of the intented SBML Level and Version help
18061        libSBML determine such things as whether it is valid to assign a
18062        particular value to an attribute.
18063
18064
18065        @par
18066        <hr>
18067        <span class='variant-sig-heading'>Method variant with the following signature</span>:
18068         <pre class='signature'>UnitDefinition(UnitDefinition orig)</pre>
18069
18070        Copy constructor; creates a copy of this UnitDefinition.
18071
18072        @param orig the object to copy.
18073
18074        """
18075        _libsbml.UnitDefinition_swiginit(self, _libsbml.new_UnitDefinition(*args))
18076
18077    def clone(self):
18078        r"""
18079        clone(UnitDefinition self) -> UnitDefinition
18080
18081        Creates and returns a deep copy of this UnitDefinition object.
18082
18083        @return the (deep) copy of this UnitDefinition object.
18084
18085        """
18086        return _libsbml.UnitDefinition_clone(self)
18087
18088    def getElementBySId(self, id):
18089        r"""
18090        getElementBySId(UnitDefinition self, string id) -> SBase
18091
18092        Returns the first child element found that has the given @p id in the
18093        model-wide SId namespace, or @c None if no such object is found.
18094
18095        @param id string representing the id of the object to find.
18096
18097        @return pointer to the first element found with the given @p id.
18098
18099        """
18100        return _libsbml.UnitDefinition_getElementBySId(self, id)
18101
18102    def getElementByMetaId(self, metaid):
18103        r"""
18104        getElementByMetaId(UnitDefinition self, string metaid) -> SBase
18105
18106        Returns the first child element it can find with the given @p metaid, or
18107        @c None if no such object is found.
18108
18109        @param metaid string representing the metaid of the object to find.
18110
18111        @return pointer to the first element found with the given @p metaid.
18112
18113        """
18114        return _libsbml.UnitDefinition_getElementByMetaId(self, metaid)
18115
18116    def getId(self):
18117        r"""
18118        getId(UnitDefinition self) -> string
18119
18120        Returns the value of the 'id' attribute of this UnitDefinition.
18121
18122        @note Because of the inconsistent behavior of this function with
18123        respect to assignments and rules, it is now recommended to
18124        use the getIdAttribute() function instead.
18125
18126        @par
18127        The identifier given by an object's 'id' attribute value
18128        is used to identify the object within the SBML model definition.
18129        Other objects can refer to the component using this identifier.  The
18130        data type of 'id' is always <code>SId</code> or a type derived
18131        from that, such as <code>UnitSId</code>, depending on the object in
18132        question.  All data types are defined as follows:
18133        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
18134        letter ::= 'a'..'z','A'..'Z'
18135        digit  ::= '0'..'9'
18136        idChar ::= letter | digit | '_'
18137        SId    ::= ( letter | '_' ) idChar*
18138        </pre>
18139        The characters <code>(</code> and <code>)</code> are used for grouping,
18140        the character <code>*</code> 'zero or more times', and the character
18141        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
18142        is determined by an exact character sequence match; i.e., comparisons must
18143        be performed in a case-sensitive manner.  This applies to all uses of
18144        <code>SId</code>, <code>SIdRef</code>, and derived types.
18145
18146        Users need to be aware of some important API issues that are the result of
18147        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
18148        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
18149        of SBML objects.  To simplify the work of programmers, libSBML's API
18150        provided get, set, check, and unset on the SBase object class itself
18151        instead of on individual subobject classes. This made the
18152        get/set/etc. methods uniformly available on all objects in the libSBML
18153        API.  LibSBML simply returned empty strings or otherwise did not act when
18154        the methods were applied to SBML objects that were not defined by the SBML
18155        specification to have 'id' or 'name' attributes.  Additional complications
18156        arose with the rule and assignment objects: InitialAssignment,
18157        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
18158        the rule object hierarchy was different, and in addition, then as now,
18159        they possess different attributes: 'variable' (for the rules and event
18160        assignments), 'symbol' (for initial assignments), or neither (for
18161        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
18162        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
18163
18164        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
18165        Version&nbsp;2, it became necessary to introduce a new way to interact
18166        with the attributes more consistently in libSBML to avoid breaking
18167        backward compatibility in the behavior of the original 'id' methods.  For
18168        this reason, libSBML provides four functions (getIdAttribute(),
18169        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
18170        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
18171        from SBase, regardless of the object's type.  <strong>These new methods
18172        should be used instead of the older getId()/setId()/etc. methods</strong>
18173        unless the old behavior is somehow necessary.  Regardless of the Level and
18174        Version of the SBML, these functions allow client applications to use more
18175        generalized code in some situations (for instance, when manipulating
18176        objects that are all known to have identifiers).  If the object in
18177        question does not posess an 'id' attribute according to the SBML
18178        specification for the Level and Version in use, libSBML will not allow the
18179        identifier to be set, nor will it read or write 'id' attributes for those
18180        objects.
18181
18182        @return the id of this UnitDefinition.
18183
18184        @see getIdAttribute()
18185        @see setIdAttribute()
18186        @see isSetIdAttribute()
18187        @see unsetIdAttribute()
18188
18189        """
18190        return _libsbml.UnitDefinition_getId(self)
18191
18192    def getName(self):
18193        r"""
18194        getName(UnitDefinition self) -> string
18195
18196        Returns the value of the 'name' attribute of this UnitDefinition object.
18197
18198        @par
18199        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
18200        moved to SBase directly, instead of being defined individually for many
18201        (but not all) objects.  LibSBML has for a long time provided functions
18202        defined on SBase itself to get, set, and unset those attributes, which
18203        would fail or otherwise return empty strings if executed on any object
18204        for which those attributes were not defined.  Now that all SBase objects
18205        define those attributes, those functions now succeed for any object with
18206        the appropriate level and version.
18207
18208        The 'name' attribute is
18209        optional and is not intended to be used for cross-referencing purposes
18210        within a model.  Its purpose instead is to provide a human-readable
18211        label for the component.  The data type of 'name' is the type
18212        <code>string</code> defined in XML Schema.  SBML imposes no
18213        restrictions as to the content of 'name' attributes beyond those
18214        restrictions defined by the <code>string</code> type in XML Schema.
18215
18216        The recommended practice for handling 'name' is as follows.  If a
18217        software tool has the capability for displaying the content of 'name'
18218        attributes, it should display this content to the user as a
18219        component's label instead of the component's 'id'.  If the user
18220        interface does not have this capability (e.g., because it cannot
18221        display or use special characters in symbol names), or if the 'name'
18222        attribute is missing on a given component, then the user interface
18223        should display the value of the 'id' attribute instead.  (Script
18224        language interpreters are especially likely to display 'id' instead of
18225        'name'.)
18226
18227        As a consequence of the above, authors of systems that automatically
18228        generate the values of 'id' attributes should be aware some systems
18229        may display the 'id''s to the user.  Authors therefore may wish to
18230        take some care to have their software create 'id' values that are: (a)
18231        reasonably easy for humans to type and read; and (b) likely to be
18232        meaningful, for example by making the 'id' attribute be an abbreviated
18233        form of the name attribute value.
18234
18235        An additional point worth mentioning is although there are
18236        restrictions on the uniqueness of 'id' values, there are no
18237        restrictions on the uniqueness of 'name' values in a model.  This
18238        allows software applications leeway in assigning component identifiers.
18239
18240        Regardless of the level and version of the SBML, these functions allow
18241        client applications to use more generalized code in some situations
18242        (for instance, when manipulating objects that are all known to have
18243        names).  If the object in question does not posess a 'name' attribute
18244        according to the SBML specification for the Level and Version in use,
18245        libSBML will not allow the name to be set, nor will it read or
18246        write 'name' attributes for those objects.
18247
18248        @return the name of this SBML object, or the empty string if not set or unsettable.
18249
18250        @see getIdAttribute()
18251        @see isSetName()
18252        @see setName()
18253        @see unsetName()
18254
18255        """
18256        return _libsbml.UnitDefinition_getName(self)
18257
18258    def isSetId(self):
18259        r"""
18260        isSetId(UnitDefinition self) -> bool
18261
18262        Predicate returning @c True if this
18263        UnitDefinition's 'id' attribute is set.
18264
18265        @par
18266        The identifier given by an object's 'id' attribute value
18267        is used to identify the object within the SBML model definition.
18268        Other objects can refer to the component using this identifier.  The
18269        data type of 'id' is always <code>SId</code> or a type derived
18270        from that, such as <code>UnitSId</code>, depending on the object in
18271        question.  All data types are defined as follows:
18272        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
18273        letter ::= 'a'..'z','A'..'Z'
18274        digit  ::= '0'..'9'
18275        idChar ::= letter | digit | '_'
18276        SId    ::= ( letter | '_' ) idChar*
18277        </pre>
18278        The characters <code>(</code> and <code>)</code> are used for grouping,
18279        the character <code>*</code> 'zero or more times', and the character
18280        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
18281        is determined by an exact character sequence match; i.e., comparisons must
18282        be performed in a case-sensitive manner.  This applies to all uses of
18283        <code>SId</code>, <code>SIdRef</code>, and derived types.
18284
18285        Users need to be aware of some important API issues that are the result of
18286        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
18287        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
18288        of SBML objects.  To simplify the work of programmers, libSBML's API
18289        provided get, set, check, and unset on the SBase object class itself
18290        instead of on individual subobject classes. This made the
18291        get/set/etc. methods uniformly available on all objects in the libSBML
18292        API.  LibSBML simply returned empty strings or otherwise did not act when
18293        the methods were applied to SBML objects that were not defined by the SBML
18294        specification to have 'id' or 'name' attributes.  Additional complications
18295        arose with the rule and assignment objects: InitialAssignment,
18296        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
18297        the rule object hierarchy was different, and in addition, then as now,
18298        they possess different attributes: 'variable' (for the rules and event
18299        assignments), 'symbol' (for initial assignments), or neither (for
18300        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
18301        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
18302
18303        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
18304        Version&nbsp;2, it became necessary to introduce a new way to interact
18305        with the attributes more consistently in libSBML to avoid breaking
18306        backward compatibility in the behavior of the original 'id' methods.  For
18307        this reason, libSBML provides four functions (getIdAttribute(),
18308        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
18309        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
18310        from SBase, regardless of the object's type.  <strong>These new methods
18311        should be used instead of the older getId()/setId()/etc. methods</strong>
18312        unless the old behavior is somehow necessary.  Regardless of the Level and
18313        Version of the SBML, these functions allow client applications to use more
18314        generalized code in some situations (for instance, when manipulating
18315        objects that are all known to have identifiers).  If the object in
18316        question does not posess an 'id' attribute according to the SBML
18317        specification for the Level and Version in use, libSBML will not allow the
18318        identifier to be set, nor will it read or write 'id' attributes for those
18319        objects.
18320
18321        @return @c True if the 'id' attribute of this SBML object is
18322        set, @c False otherwise.
18323
18324        @note Because of the inconsistent behavior of this function with
18325        respect to assignments and rules, it is recommended that callers
18326        use isSetIdAttribute() instead.
18327
18328        @see getIdAttribute()
18329        @see setIdAttribute()
18330        @see unsetIdAttribute()
18331        @see isSetIdAttribute()
18332
18333        """
18334        return _libsbml.UnitDefinition_isSetId(self)
18335
18336    def isSetName(self):
18337        r"""
18338        isSetName(UnitDefinition self) -> bool
18339
18340        Predicate returning @c True if this
18341        UnitDefinition's 'name' attribute is set.
18342
18343        @par
18344        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
18345        moved to SBase directly, instead of being defined individually for many
18346        (but not all) objects.  LibSBML has for a long time provided functions
18347        defined on SBase itself to get, set, and unset those attributes, which
18348        would fail or otherwise return empty strings if executed on any object
18349        for which those attributes were not defined.  Now that all SBase objects
18350        define those attributes, those functions now succeed for any object with
18351        the appropriate level and version.
18352
18353        The 'name' attribute is
18354        optional and is not intended to be used for cross-referencing purposes
18355        within a model.  Its purpose instead is to provide a human-readable
18356        label for the component.  The data type of 'name' is the type
18357        <code>string</code> defined in XML Schema.  SBML imposes no
18358        restrictions as to the content of 'name' attributes beyond those
18359        restrictions defined by the <code>string</code> type in XML Schema.
18360
18361        The recommended practice for handling 'name' is as follows.  If a
18362        software tool has the capability for displaying the content of 'name'
18363        attributes, it should display this content to the user as a
18364        component's label instead of the component's 'id'.  If the user
18365        interface does not have this capability (e.g., because it cannot
18366        display or use special characters in symbol names), or if the 'name'
18367        attribute is missing on a given component, then the user interface
18368        should display the value of the 'id' attribute instead.  (Script
18369        language interpreters are especially likely to display 'id' instead of
18370        'name'.)
18371
18372        As a consequence of the above, authors of systems that automatically
18373        generate the values of 'id' attributes should be aware some systems
18374        may display the 'id''s to the user.  Authors therefore may wish to
18375        take some care to have their software create 'id' values that are: (a)
18376        reasonably easy for humans to type and read; and (b) likely to be
18377        meaningful, for example by making the 'id' attribute be an abbreviated
18378        form of the name attribute value.
18379
18380        An additional point worth mentioning is although there are
18381        restrictions on the uniqueness of 'id' values, there are no
18382        restrictions on the uniqueness of 'name' values in a model.  This
18383        allows software applications leeway in assigning component identifiers.
18384
18385        Regardless of the level and version of the SBML, these functions allow
18386        client applications to use more generalized code in some situations
18387        (for instance, when manipulating objects that are all known to have
18388        names).  If the object in question does not posess a 'name' attribute
18389        according to the SBML specification for the Level and Version in use,
18390        libSBML will not allow the name to be set, nor will it read or
18391        write 'name' attributes for those objects.
18392
18393        @return @c True if the 'name' attribute of this SBML object is
18394        set, @c False otherwise.
18395
18396        @see getName()
18397        @see setName()
18398        @see unsetName()
18399
18400        """
18401        return _libsbml.UnitDefinition_isSetName(self)
18402
18403    def setId(self, sid):
18404        r"""
18405        setId(UnitDefinition self, string sid) -> int
18406
18407        Sets the value of the 'id' attribute of this UnitDefinition.
18408
18409        @par
18410        The string @p sid is copied.
18411
18412        @par
18413        The identifier given by an object's 'id' attribute value
18414        is used to identify the object within the SBML model definition.
18415        Other objects can refer to the component using this identifier.  The
18416        data type of 'id' is always <code>SId</code> or a type derived
18417        from that, such as <code>UnitSId</code>, depending on the object in
18418        question.  All data types are defined as follows:
18419        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
18420        letter ::= 'a'..'z','A'..'Z'
18421        digit  ::= '0'..'9'
18422        idChar ::= letter | digit | '_'
18423        SId    ::= ( letter | '_' ) idChar*
18424        </pre>
18425        The characters <code>(</code> and <code>)</code> are used for grouping,
18426        the character <code>*</code> 'zero or more times', and the character
18427        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
18428        is determined by an exact character sequence match; i.e., comparisons must
18429        be performed in a case-sensitive manner.  This applies to all uses of
18430        <code>SId</code>, <code>SIdRef</code>, and derived types.
18431
18432        Users need to be aware of some important API issues that are the result of
18433        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
18434        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
18435        of SBML objects.  To simplify the work of programmers, libSBML's API
18436        provided get, set, check, and unset on the SBase object class itself
18437        instead of on individual subobject classes. This made the
18438        get/set/etc. methods uniformly available on all objects in the libSBML
18439        API.  LibSBML simply returned empty strings or otherwise did not act when
18440        the methods were applied to SBML objects that were not defined by the SBML
18441        specification to have 'id' or 'name' attributes.  Additional complications
18442        arose with the rule and assignment objects: InitialAssignment,
18443        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
18444        the rule object hierarchy was different, and in addition, then as now,
18445        they possess different attributes: 'variable' (for the rules and event
18446        assignments), 'symbol' (for initial assignments), or neither (for
18447        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
18448        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
18449
18450        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
18451        Version&nbsp;2, it became necessary to introduce a new way to interact
18452        with the attributes more consistently in libSBML to avoid breaking
18453        backward compatibility in the behavior of the original 'id' methods.  For
18454        this reason, libSBML provides four functions (getIdAttribute(),
18455        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
18456        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
18457        from SBase, regardless of the object's type.  <strong>These new methods
18458        should be used instead of the older getId()/setId()/etc. methods</strong>
18459        unless the old behavior is somehow necessary.  Regardless of the Level and
18460        Version of the SBML, these functions allow client applications to use more
18461        generalized code in some situations (for instance, when manipulating
18462        objects that are all known to have identifiers).  If the object in
18463        question does not posess an 'id' attribute according to the SBML
18464        specification for the Level and Version in use, libSBML will not allow the
18465        identifier to be set, nor will it read or write 'id' attributes for those
18466        objects.
18467
18468        @param sid the string to use as the identifier of this object.
18469
18470        @return integer value indicating success/failure of the
18471        function.  @if clike The value is drawn from the
18472        enumeration #OperationReturnValues_t. @endif@~ The possible values
18473        returned by this function are:
18474        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
18475        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
18476        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
18477
18478        @see getIdAttribute()
18479        @see setIdAttribute()
18480        @see isSetIdAttribute()
18481        @see unsetIdAttribute()
18482
18483        """
18484        return _libsbml.UnitDefinition_setId(self, sid)
18485
18486    def setName(self, name):
18487        r"""
18488        setName(UnitDefinition self, string name) -> int
18489
18490        Sets the value of the 'name' attribute of this UnitDefinition.
18491
18492        @par
18493
18494        The string in @p name is copied.
18495
18496        @param name the new name for the SBML object.
18497
18498        @return integer value indicating success/failure of the
18499        function.  @if clike The value is drawn from the
18500        enumeration #OperationReturnValues_t. @endif@~ The possible values
18501        returned by this function are:
18502        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
18503        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
18504
18505        """
18506        return _libsbml.UnitDefinition_setName(self, name)
18507
18508    def unsetName(self):
18509        r"""
18510        unsetName(UnitDefinition self) -> int
18511
18512        Unsets the value of the 'name' attribute of this UnitDefinition.
18513
18514        @par
18515        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
18516        moved to SBase directly, instead of being defined individually for many
18517        (but not all) objects.  LibSBML has for a long time provided functions
18518        defined on SBase itself to get, set, and unset those attributes, which
18519        would fail or otherwise return empty strings if executed on any object
18520        for which those attributes were not defined.  Now that all SBase objects
18521        define those attributes, those functions now succeed for any object with
18522        the appropriate level and version.
18523
18524        The 'name' attribute is
18525        optional and is not intended to be used for cross-referencing purposes
18526        within a model.  Its purpose instead is to provide a human-readable
18527        label for the component.  The data type of 'name' is the type
18528        <code>string</code> defined in XML Schema.  SBML imposes no
18529        restrictions as to the content of 'name' attributes beyond those
18530        restrictions defined by the <code>string</code> type in XML Schema.
18531
18532        The recommended practice for handling 'name' is as follows.  If a
18533        software tool has the capability for displaying the content of 'name'
18534        attributes, it should display this content to the user as a
18535        component's label instead of the component's 'id'.  If the user
18536        interface does not have this capability (e.g., because it cannot
18537        display or use special characters in symbol names), or if the 'name'
18538        attribute is missing on a given component, then the user interface
18539        should display the value of the 'id' attribute instead.  (Script
18540        language interpreters are especially likely to display 'id' instead of
18541        'name'.)
18542
18543        As a consequence of the above, authors of systems that automatically
18544        generate the values of 'id' attributes should be aware some systems
18545        may display the 'id''s to the user.  Authors therefore may wish to
18546        take some care to have their software create 'id' values that are: (a)
18547        reasonably easy for humans to type and read; and (b) likely to be
18548        meaningful, for example by making the 'id' attribute be an abbreviated
18549        form of the name attribute value.
18550
18551        An additional point worth mentioning is although there are
18552        restrictions on the uniqueness of 'id' values, there are no
18553        restrictions on the uniqueness of 'name' values in a model.  This
18554        allows software applications leeway in assigning component identifiers.
18555
18556        Regardless of the level and version of the SBML, these functions allow
18557        client applications to use more generalized code in some situations
18558        (for instance, when manipulating objects that are all known to have
18559        names).  If the object in question does not posess a 'name' attribute
18560        according to the SBML specification for the Level and Version in use,
18561        libSBML will not allow the name to be set, nor will it read or
18562        write 'name' attributes for those objects.
18563
18564        @return integer value indicating success/failure of the
18565        function.  @if clike The value is drawn from the
18566        enumeration #OperationReturnValues_t. @endif@~ The possible values
18567        returned by this function are:
18568        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
18569        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
18570
18571        @see getName()
18572        @see setName()
18573        @see isSetName()
18574
18575        """
18576        return _libsbml.UnitDefinition_unsetName(self)
18577
18578    def isVariantOfArea(self, relaxed=False):
18579        r"""
18580        isVariantOfArea(UnitDefinition self, bool relaxed=False) -> bool
18581
18582        Convenience function for testing if a given unit definition is a
18583        variant of the predefined unit identifier @c 'area'.
18584
18585        @return @c True if this UnitDefinition is a variant of the predefined
18586        unit @c area, meaning square metres with only arbitrary variations
18587        in scale or multiplier values; @c False otherwise.
18588
18589
18590
18591        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18592
18593        """
18594        return _libsbml.UnitDefinition_isVariantOfArea(self, relaxed)
18595
18596    def isVariantOfLength(self, relaxed=False):
18597        r"""
18598        isVariantOfLength(UnitDefinition self, bool relaxed=False) -> bool
18599
18600        Convenience function for testing if a given unit definition is a
18601        variant of the predefined unit identifier @c 'length'.
18602
18603        @return @c True if this UnitDefinition is a variant of the predefined
18604        unit @c length, meaning metres with only arbitrary variations in scale
18605        or multiplier values; @c False otherwise.
18606
18607
18608
18609        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18610
18611        """
18612        return _libsbml.UnitDefinition_isVariantOfLength(self, relaxed)
18613
18614    def isVariantOfSubstance(self, relaxed=False):
18615        r"""
18616        isVariantOfSubstance(UnitDefinition self, bool relaxed=False) -> bool
18617
18618        Convenience function for testing if a given unit definition is a
18619        variant of the predefined unit identifier @c 'substance'.
18620
18621        @return @c True if this UnitDefinition is a variant of the predefined
18622        unit @c substance, meaning moles or items (and grams or kilograms from
18623        SBML Level&nbsp;2 Version&nbsp;2 onwards) with only arbitrary variations
18624        in scale or multiplier values; @c False otherwise.
18625
18626
18627
18628        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18629
18630        """
18631        return _libsbml.UnitDefinition_isVariantOfSubstance(self, relaxed)
18632
18633    def isVariantOfTime(self, relaxed=False):
18634        r"""
18635        isVariantOfTime(UnitDefinition self, bool relaxed=False) -> bool
18636
18637        Convenience function for testing if a given unit definition is a
18638        variant of the predefined unit identifier @c 'time'.
18639
18640        @return @c True if this UnitDefinition is a variant of the predefined
18641        unit @c time, meaning seconds with only arbitrary variations in scale or
18642        multiplier values; @c False otherwise.
18643
18644
18645
18646        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18647
18648        """
18649        return _libsbml.UnitDefinition_isVariantOfTime(self, relaxed)
18650
18651    def isVariantOfVolume(self, relaxed=False):
18652        r"""
18653        isVariantOfVolume(UnitDefinition self, bool relaxed=False) -> bool
18654
18655        Convenience function for testing if a given unit definition is a
18656        variant of the predefined unit identifier @c 'volume'.
18657
18658        @return @c True if this UnitDefinition is a variant of the predefined
18659        unit @c volume, meaning litre or cubic metre with only arbitrary
18660        variations in scale or multiplier values; @c False otherwise.
18661
18662
18663
18664        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18665
18666        """
18667        return _libsbml.UnitDefinition_isVariantOfVolume(self, relaxed)
18668
18669    def isVariantOfDimensionless(self, relaxed=False):
18670        r"""
18671        isVariantOfDimensionless(UnitDefinition self, bool relaxed=False) -> bool
18672
18673        Convenience function for testing if a given unit definition is a
18674        variant of the unit @c 'dimensionless'.
18675
18676        @return @c True if this UnitDefinition is a variant of
18677        @c dimensionless, meaning dimensionless with only arbitrary variations in
18678        scale or multiplier values; @c False otherwise.
18679
18680
18681
18682        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18683
18684        """
18685        return _libsbml.UnitDefinition_isVariantOfDimensionless(self, relaxed)
18686
18687    def isVariantOfMass(self, relaxed=False):
18688        r"""
18689        isVariantOfMass(UnitDefinition self, bool relaxed=False) -> bool
18690
18691        Convenience function for testing if a given unit definition is a
18692        variant of the predefined unit identifier @c 'mass'.
18693
18694        @return @c True if this UnitDefinition is a variant of mass units,
18695        meaning gram or kilogram with only arbitrary variations in scale or
18696        multiplier values; @c False otherwise.
18697
18698
18699
18700        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18701
18702        """
18703        return _libsbml.UnitDefinition_isVariantOfMass(self, relaxed)
18704
18705    def isVariantOfSubstancePerTime(self, relaxed=False):
18706        r"""
18707        isVariantOfSubstancePerTime(UnitDefinition self, bool relaxed=False) -> bool
18708
18709        Convenience function for testing if a given unit definition is a
18710        variant of the predefined unit @c 'substance' divided by the predefined
18711        unit @c 'time'.
18712
18713        @return @c True if this UnitDefinition is a variant of the predefined
18714        unit @c substance per predefined unit @c time, meaning it contains two
18715        units one of which is a variant of substance and the other is a
18716        variant of time which an exponent of -1; @c False otherwise.
18717
18718
18719
18720        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
18721
18722        """
18723        return _libsbml.UnitDefinition_isVariantOfSubstancePerTime(self, relaxed)
18724
18725    def addUnit(self, u):
18726        r"""
18727        addUnit(UnitDefinition self, Unit u) -> int
18728
18729        Adds a copy of the given Unit to this UnitDefinition.
18730
18731        @param u the Unit instance to add to this UnitDefinition.
18732
18733        @return integer value indicating success/failure of the
18734        function.  @if clike The value is drawn from the
18735        enumeration #OperationReturnValues_t. @endif@~ The possible values
18736        returned by this function are:
18737        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
18738        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
18739        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
18740        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
18741        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
18742
18743        @note This method should be used with some caution.  The fact that this
18744        method @em copies the object passed to it means that the caller will be
18745        left holding a physically different object instance than the one contained
18746        inside this object.  Changes made to the original object instance (such as
18747        resetting attribute values) will <em>not affect the instance in this
18748        object</em>.  In addition, the caller should make sure to free the
18749        original object if it is no longer being used, or else a memory leak will
18750        result.  Please see other methods on this class (particularly a
18751        corresponding method whose name begins with the word <code>create</code>)
18752        for alternatives that do not lead to these issues.
18753
18754        @see createUnit()
18755
18756        """
18757        return _libsbml.UnitDefinition_addUnit(self, u)
18758
18759    def createUnit(self):
18760        r"""
18761        createUnit(UnitDefinition self) -> Unit
18762
18763        Creates a new and empty Unit, adds it to this UnitDefinition's list of
18764        units, and returns it.
18765
18766        @return a newly constructed (and empty) Unit instance.
18767
18768        @note It is worth emphasizing that the attribute 'kind' value of a
18769        Unit is a required attribute for a valid Unit definition.  The
18770        createUnit() method does not assign a valid kind to the constructed
18771        unit (instead, it sets the 'kind' to @link libsbml#UNIT_KIND_INVALID UNIT_KIND_INVALID@endlink).
18772        Callers are cautioned to set the newly-constructed Unit's kind using
18773        Unit.setKind() soon after calling this method.
18774
18775        @see addUnit()
18776
18777        """
18778        return _libsbml.UnitDefinition_createUnit(self)
18779
18780    def getListOfUnits(self, *args):
18781        r"""
18782        getListOfUnits(UnitDefinition self) -> ListOfUnits
18783        getListOfUnits(UnitDefinition self) -> ListOfUnits
18784
18785        Returns the list of Units for this UnitDefinition instance.
18786        @return the ListOfUnits value for this UnitDefinition.
18787
18788        """
18789        return _libsbml.UnitDefinition_getListOfUnits(self, *args)
18790
18791    def getUnit(self, *args):
18792        r"""
18793        getUnit(UnitDefinition self, unsigned int n) -> Unit
18794        getUnit(UnitDefinition self, unsigned int n) -> Unit
18795
18796        Returns a specific Unit instance belonging to this UnitDefinition.
18797
18798        @param n an integer, the index of the Unit to be returned.
18799
18800        @return the nth Unit of this UnitDefinition.
18801        If the index @p n is invalid, @c None is returned.
18802
18803        @see getNumUnits()
18804
18805        """
18806        return _libsbml.UnitDefinition_getUnit(self, *args)
18807
18808    def getNumUnits(self):
18809        r"""
18810        getNumUnits(UnitDefinition self) -> unsigned int
18811
18812        Returns the number of Unit objects contained within this
18813        UnitDefinition.
18814
18815        @return an integer representing the number of Units in this
18816        UnitDefinition.
18817
18818        """
18819        return _libsbml.UnitDefinition_getNumUnits(self)
18820
18821    def removeUnit(self, n):
18822        r"""
18823        removeUnit(UnitDefinition self, unsigned int n) -> Unit
18824
18825        Removes the nth Unit object from this UnitDefinition object and
18826        returns a pointer to it.
18827
18828        The caller owns the returned object and is responsible for deleting it.
18829
18830        @param n the index of the Unit object to remove.
18831
18832        @return the Unit object removed, or @c None if the given index
18833        is out of range.
18834
18835        """
18836        return _libsbml.UnitDefinition_removeUnit(self, n)
18837
18838    def connectToChild(self):
18839        r"""connectToChild(UnitDefinition self)"""
18840        return _libsbml.UnitDefinition_connectToChild(self)
18841
18842    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
18843        r"""
18844        enablePackageInternal(UnitDefinition self, string pkgURI, string pkgPrefix, bool flag)
18845
18846        @internal
18847
18848        @internal
18849
18850        """
18851        return _libsbml.UnitDefinition_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
18852
18853    def updateSBMLNamespace(self, package, level, version):
18854        r"""
18855        updateSBMLNamespace(UnitDefinition self, string package, unsigned int level, unsigned int version)
18856
18857        @internal
18858
18859        @internal
18860
18861        """
18862        return _libsbml.UnitDefinition_updateSBMLNamespace(self, package, level, version)
18863
18864    def getTypeCode(self):
18865        r"""
18866        getTypeCode(UnitDefinition self) -> int
18867
18868        Returns the libSBML type code for this object instance.
18869
18870        @par
18871        LibSBML attaches an identifying code to every kind of SBML object.  These
18872        are integer constants known as <em>SBML type codes</em>.  The names of all
18873        the codes begin with the characters <code>SBML_</code>.
18874        @if clike The set of possible type codes for core elements is defined in
18875        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
18876        SBML Level&nbsp;3 packages define their own extra enumerations of type
18877        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
18878        package).@endif@if java In the Java language interface for libSBML, the
18879        type codes are defined as static integer constants in the interface class
18880        {@link libsbmlConstants}.  @endif@if python In the Python language
18881        interface for libSBML, the type codes are defined as static integer
18882        constants in the interface class @link libsbml@endlink.@endif@if csharp In
18883        the C# language interface for libSBML, the type codes are defined as
18884        static integer constants in the interface class
18885        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
18886        package plug-ins may use overlapping type codes; to identify the package
18887        to which a given object belongs, call the
18888        <code>@if conly SBase_getPackageName()
18889        @else SBase.getPackageName()
18890        @endif</code>
18891        method on the object.
18892
18893        The exception to this is lists:  all SBML-style list elements have the type
18894        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
18895        are from.
18896
18897        @return the SBML type code for this object:
18898        @link libsbml#SBML_UNIT_DEFINITION SBML_UNIT_DEFINITION@endlink (default).
18899
18900        @warning <span class='warning'>The specific integer values of the possible
18901        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
18902        packages,  To fully identify the correct code, <strong>it is necessary to
18903        invoke both getPackageName() and getTypeCode()</strong> (or
18904        ListOf.getItemTypeCode()).</span>
18905
18906        @see getPackageName()
18907        @see getElementName()
18908
18909        """
18910        return _libsbml.UnitDefinition_getTypeCode(self)
18911
18912    def getElementName(self):
18913        r"""
18914        getElementName(UnitDefinition self) -> string
18915
18916        Returns the XML element name of this object, which for UnitDefinition,
18917        is always @c 'unitDefinition'.
18918
18919        @return the name of this element, i.e., @c 'unitDefinition'.
18920
18921        """
18922        return _libsbml.UnitDefinition_getElementName(self)
18923
18924    @staticmethod
18925    def simplify(ud):
18926        r"""
18927        simplify(UnitDefinition ud)
18928
18929        Simplifies the UnitDefinition such that any given kind of Unit object
18930        occurs only once in the ListOfUnits.
18931
18932        For example, the following definition,
18933        @verbatim
18934         <unitDefinition>
18935          <listOfUnits>
18936            <unit kind='metre' exponent='1'/>
18937            <unit kind='metre' exponent='2'/>
18938          </listOfUnits>
18939         <unitDefinition>
18940         @endverbatim
18941        will be simplified to
18942        @verbatim
18943         <unitDefinition>
18944           <listOfUnits>
18945             <unit kind='metre' exponent='3'/>
18946           </listOfUnits>
18947         <unitDefinition>
18948         @endverbatim
18949
18950        @param ud the UnitDefinition object to be simplified.
18951
18952        @if python @note Because this is a static method on a class, the Python
18953        language interface for libSBML will contain two variants.  One will be the
18954        expected, normal static method on the class (i.e., a regular
18955        <em>methodName</em>), and the other will be a standalone top-level
18956        function with the name <em>ClassName_methodName()</em>. This is merely an
18957        artifact of how the language interfaces are created in libSBML.  The
18958        methods are functionally identical. @endif@~
18959
18960        """
18961        return _libsbml.UnitDefinition_simplify(ud)
18962
18963    @staticmethod
18964    def reorder(ud):
18965        r"""
18966        reorder(UnitDefinition ud)
18967
18968        Alphabetically orders the Unit objects within the ListOfUnits of a
18969        UnitDefinition.
18970
18971        @param ud the UnitDefinition object whose units are to be reordered.
18972
18973        @if python @note Because this is a static method on a class, the Python
18974        language interface for libSBML will contain two variants.  One will be the
18975        expected, normal static method on the class (i.e., a regular
18976        <em>methodName</em>), and the other will be a standalone top-level
18977        function with the name <em>ClassName_methodName()</em>. This is merely an
18978        artifact of how the language interfaces are created in libSBML.  The
18979        methods are functionally identical. @endif@~
18980
18981        """
18982        return _libsbml.UnitDefinition_reorder(ud)
18983
18984    @staticmethod
18985    def convertToSI(ud):
18986        r"""
18987        convertToSI(UnitDefinition ud) -> UnitDefinition
18988
18989        Convert a given UnitDefinition into a new UnitDefinition object
18990        that uses SI units.
18991
18992        @param ud the UnitDefinition object to convert to SI.
18993
18994        @return a new UnitDefinition object representing the results of the
18995        conversion.
18996
18997        @if python @note Because this is a static method on a class, the Python
18998        language interface for libSBML will contain two variants.  One will be the
18999        expected, normal static method on the class (i.e., a regular
19000        <em>methodName</em>), and the other will be a standalone top-level
19001        function with the name <em>ClassName_methodName()</em>. This is merely an
19002        artifact of how the language interfaces are created in libSBML.  The
19003        methods are functionally identical. @endif@~
19004
19005        """
19006        return _libsbml.UnitDefinition_convertToSI(ud)
19007
19008    @staticmethod
19009    def areIdentical(ud1, ud2):
19010        r"""
19011        areIdentical(UnitDefinition ud1, UnitDefinition ud2) -> bool
19012
19013        Predicate returning @c True if two
19014        UnitDefinition objects are identical.
19015
19016        For the purposes of performing this comparison, two UnitDefinition
19017        objects are considered identical when they contain identical lists of
19018        Unit objects.  Pairs of Unit objects in the lists are in turn
19019        considered identical if they satisfy the predicate
19020        Unit.areIdentical().
19021        The predicate compares every attribute of the
19022        Unit objects.
19023
19024        @param ud1 the first UnitDefinition object to compare.
19025        @param ud2 the second UnitDefinition object to compare.
19026
19027        @return @c True if all the Unit objects in @p ud1 are identical to the
19028        Unit objects of @p ud2, @c False otherwise.
19029
19030        @if python @note Because this is a static method on a class, the Python
19031        language interface for libSBML will contain two variants.  One will be the
19032        expected, normal static method on the class (i.e., a regular
19033        <em>methodName</em>), and the other will be a standalone top-level
19034        function with the name <em>ClassName_methodName()</em>. This is merely an
19035        artifact of how the language interfaces are created in libSBML.  The
19036        methods are functionally identical. @endif@~
19037
19038        @see UnitDefinition.areEquivalent()
19039        @see Unit.areIdentical()
19040
19041        """
19042        return _libsbml.UnitDefinition_areIdentical(ud1, ud2)
19043
19044    @staticmethod
19045    def areEquivalent(ud1, ud2):
19046        r"""
19047        areEquivalent(UnitDefinition ud1, UnitDefinition ud2) -> bool
19048
19049        Predicate returning @c True if two
19050        UnitDefinition objects are equivalent.
19051
19052        For the purposes of performing this comparison, two UnitDefinition
19053        objects are considered equivalent when they contain @em equivalent
19054        list of Unit objects.  Unit objects are in turn considered equivalent
19055        if they satisfy the predicate
19056        Unit.areEquivalent().
19057        The predicate tests a subset of the objects's attributes.
19058
19059        @param ud1 the first UnitDefinition object to compare.
19060
19061        @param ud2 the second UnitDefinition object to compare.
19062
19063        @return @c True if all the Unit objects in @p ud1 are equivalent
19064        to the Unit objects in @p ud2, @c False otherwise.
19065
19066        @if python @note Because this is a static method on a class, the Python
19067        language interface for libSBML will contain two variants.  One will be the
19068        expected, normal static method on the class (i.e., a regular
19069        <em>methodName</em>), and the other will be a standalone top-level
19070        function with the name <em>ClassName_methodName()</em>. This is merely an
19071        artifact of how the language interfaces are created in libSBML.  The
19072        methods are functionally identical. @endif@~
19073
19074        @see UnitDefinition.areIdentical()
19075        @see Unit.areEquivalent()
19076
19077        """
19078        return _libsbml.UnitDefinition_areEquivalent(ud1, ud2)
19079
19080    @staticmethod
19081    def combine(ud1, ud2):
19082        r"""
19083        combine(UnitDefinition ud1, UnitDefinition ud2) -> UnitDefinition
19084
19085        Combines two UnitDefinition objects into a single UnitDefinition.
19086
19087        This takes UnitDefinition objects @p ud1 and @p ud2, and creates a
19088        UnitDefinition object that expresses the product of the units of @p
19089        ud1 and @p ud2.
19090
19091        @param ud1 the first UnitDefinition object.
19092        @param ud2 the second UnitDefinition object.
19093
19094        @return a UnitDefinition which represents the product of the
19095        units of the two argument UnitDefinitions.
19096
19097        @if python @note Because this is a static method on a class, the Python
19098        language interface for libSBML will contain two variants.  One will be the
19099        expected, normal static method on the class (i.e., a regular
19100        <em>methodName</em>), and the other will be a standalone top-level
19101        function with the name <em>ClassName_methodName()</em>. This is merely an
19102        artifact of how the language interfaces are created in libSBML.  The
19103        methods are functionally identical. @endif@~
19104
19105        """
19106        return _libsbml.UnitDefinition_combine(ud1, ud2)
19107
19108    @staticmethod
19109    def divide(ud1, ud2):
19110        r"""
19111        divide(UnitDefinition ud1, UnitDefinition ud2) -> UnitDefinition
19112
19113        Combines two UnitDefinition objects into a single UnitDefinition as
19114        a division.
19115
19116        This takes UnitDefinition objects @p ud1 and @p ud2, and creates a
19117        UnitDefinition object that expresses the division of the units of @p
19118        ud1 and @p ud2.
19119
19120        @param ud1 the first UnitDefinition object.
19121        @param ud2 the second UnitDefinition object.
19122
19123        @return a UnitDefinition which represents the division of the
19124        units of the two argument UnitDefinitions.
19125
19126        @if python @note Because this is a static method on a class, the Python
19127        language interface for libSBML will contain two variants.  One will be the
19128        expected, normal static method on the class (i.e., a regular
19129        <em>methodName</em>), and the other will be a standalone top-level
19130        function with the name <em>ClassName_methodName()</em>. This is merely an
19131        artifact of how the language interfaces are created in libSBML.  The
19132        methods are functionally identical. @endif@~
19133
19134        """
19135        return _libsbml.UnitDefinition_divide(ud1, ud2)
19136
19137    @staticmethod
19138    def printUnits(ud, compact=False):
19139        r"""
19140        printUnits(UnitDefinition ud, bool compact=False) -> string
19141
19142        Expresses the given definition in a plain-text form.
19143
19144        For example,
19145        UnitDefinition.printUnits()
19146        applied to
19147        @verbatim
19148         <unitDefinition>
19149          <listOfUnits>
19150            <unit kind='metre' exponent='1'/>
19151            <unit kind='second' exponent='-2'/>
19152          </listOfUnits>
19153         <unitDefinition>
19154         @endverbatim
19155        will return the string <code>'metre (exponent = 1, multiplier = 1,
19156        scale = 0) second (exponent = -2, multiplier = 1, scale = 0)'</code>
19157        or, if the optional parameter @p compact is given the value @c True,
19158        the string <code>'(1 metre)^1 (1 second)^-2'</code>.  This method may
19159        be useful for printing unit information to human users, or in
19160        debugging software, or other situations.
19161
19162        @param ud the UnitDefinition object.
19163        @param compact boolean indicating whether the compact form
19164        should be used (defaults to false).
19165
19166        @return a string expressing the unit definition defined by the given
19167        UnitDefinition object @p ud.
19168
19169        @if python @note Because this is a static method on a class, the Python
19170        language interface for libSBML will contain two variants.  One will be the
19171        expected, normal static method on the class (i.e., a regular
19172        <em>methodName</em>), and the other will be a standalone top-level
19173        function with the name <em>ClassName_methodName()</em>. This is merely an
19174        artifact of how the language interfaces are created in libSBML.  The
19175        methods are functionally identical. @endif@~
19176
19177
19178
19179        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
19180
19181        """
19182        return _libsbml.UnitDefinition_printUnits(ud, compact)
19183
19184    def hasRequiredAttributes(self):
19185        r"""
19186        hasRequiredAttributes(UnitDefinition self) -> bool
19187
19188        Predicate returning @c True if
19189        all the required attributes for this UnitDefinition object
19190        have been set.
19191
19192        The required attributes for a UnitDefinition object are:
19193        @li 'id'
19194
19195        @return @c True if the required attributes have been set, @c False
19196        otherwise.
19197
19198        """
19199        return _libsbml.UnitDefinition_hasRequiredAttributes(self)
19200
19201    def hasRequiredElements(self):
19202        r"""
19203        hasRequiredElements(UnitDefinition self) -> bool
19204
19205        Predicate returning @c True if
19206        all the required elements for this UnitDefinition object
19207        have been set.
19208
19209        @note The required elements for a Constraint object are:
19210        @li 'listOfUnits' (required in SBML Level&nbsp;2 only, optional in Level&nbsp;3)
19211
19212        @return a boolean value indicating whether all the required
19213        elements for this object have been defined.
19214
19215        """
19216        return _libsbml.UnitDefinition_hasRequiredElements(self)
19217
19218# Register UnitDefinition in _libsbml:
19219_libsbml.UnitDefinition_swigregister(UnitDefinition)
19220
19221def UnitDefinition_simplify(ud):
19222    r"""
19223    UnitDefinition_simplify(UnitDefinition ud)
19224
19225    Simplifies the UnitDefinition such that any given kind of Unit object
19226    occurs only once in the ListOfUnits.
19227
19228    For example, the following definition,
19229    @verbatim
19230     <unitDefinition>
19231      <listOfUnits>
19232        <unit kind='metre' exponent='1'/>
19233        <unit kind='metre' exponent='2'/>
19234      </listOfUnits>
19235     <unitDefinition>
19236     @endverbatim
19237    will be simplified to
19238    @verbatim
19239     <unitDefinition>
19240       <listOfUnits>
19241         <unit kind='metre' exponent='3'/>
19242       </listOfUnits>
19243     <unitDefinition>
19244     @endverbatim
19245
19246    @param ud the UnitDefinition object to be simplified.
19247
19248    @if python @note Because this is a static method on a class, the Python
19249    language interface for libSBML will contain two variants.  One will be the
19250    expected, normal static method on the class (i.e., a regular
19251    <em>methodName</em>), and the other will be a standalone top-level
19252    function with the name <em>ClassName_methodName()</em>. This is merely an
19253    artifact of how the language interfaces are created in libSBML.  The
19254    methods are functionally identical. @endif@~
19255
19256    """
19257    return _libsbml.UnitDefinition_simplify(ud)
19258
19259def UnitDefinition_reorder(ud):
19260    r"""
19261    UnitDefinition_reorder(UnitDefinition ud)
19262
19263    Alphabetically orders the Unit objects within the ListOfUnits of a
19264    UnitDefinition.
19265
19266    @param ud the UnitDefinition object whose units are to be reordered.
19267
19268    @if python @note Because this is a static method on a class, the Python
19269    language interface for libSBML will contain two variants.  One will be the
19270    expected, normal static method on the class (i.e., a regular
19271    <em>methodName</em>), and the other will be a standalone top-level
19272    function with the name <em>ClassName_methodName()</em>. This is merely an
19273    artifact of how the language interfaces are created in libSBML.  The
19274    methods are functionally identical. @endif@~
19275
19276    """
19277    return _libsbml.UnitDefinition_reorder(ud)
19278
19279def UnitDefinition_convertToSI(ud):
19280    r"""
19281    UnitDefinition_convertToSI(UnitDefinition ud) -> UnitDefinition
19282
19283    Convert a given UnitDefinition into a new UnitDefinition object
19284    that uses SI units.
19285
19286    @param ud the UnitDefinition object to convert to SI.
19287
19288    @return a new UnitDefinition object representing the results of the
19289    conversion.
19290
19291    @if python @note Because this is a static method on a class, the Python
19292    language interface for libSBML will contain two variants.  One will be the
19293    expected, normal static method on the class (i.e., a regular
19294    <em>methodName</em>), and the other will be a standalone top-level
19295    function with the name <em>ClassName_methodName()</em>. This is merely an
19296    artifact of how the language interfaces are created in libSBML.  The
19297    methods are functionally identical. @endif@~
19298
19299    """
19300    return _libsbml.UnitDefinition_convertToSI(ud)
19301
19302def UnitDefinition_areIdentical(ud1, ud2):
19303    r"""
19304    UnitDefinition_areIdentical(UnitDefinition ud1, UnitDefinition ud2) -> bool
19305
19306    Predicate returning @c True if two
19307    UnitDefinition objects are identical.
19308
19309    For the purposes of performing this comparison, two UnitDefinition
19310    objects are considered identical when they contain identical lists of
19311    Unit objects.  Pairs of Unit objects in the lists are in turn
19312    considered identical if they satisfy the predicate
19313    Unit.areIdentical().
19314    The predicate compares every attribute of the
19315    Unit objects.
19316
19317    @param ud1 the first UnitDefinition object to compare.
19318    @param ud2 the second UnitDefinition object to compare.
19319
19320    @return @c True if all the Unit objects in @p ud1 are identical to the
19321    Unit objects of @p ud2, @c False otherwise.
19322
19323    @if python @note Because this is a static method on a class, the Python
19324    language interface for libSBML will contain two variants.  One will be the
19325    expected, normal static method on the class (i.e., a regular
19326    <em>methodName</em>), and the other will be a standalone top-level
19327    function with the name <em>ClassName_methodName()</em>. This is merely an
19328    artifact of how the language interfaces are created in libSBML.  The
19329    methods are functionally identical. @endif@~
19330
19331    @see UnitDefinition.areEquivalent()
19332    @see Unit.areIdentical()
19333
19334    """
19335    return _libsbml.UnitDefinition_areIdentical(ud1, ud2)
19336
19337def UnitDefinition_areEquivalent(ud1, ud2):
19338    r"""
19339    UnitDefinition_areEquivalent(UnitDefinition ud1, UnitDefinition ud2) -> bool
19340
19341    Predicate returning @c True if two
19342    UnitDefinition objects are equivalent.
19343
19344    For the purposes of performing this comparison, two UnitDefinition
19345    objects are considered equivalent when they contain @em equivalent
19346    list of Unit objects.  Unit objects are in turn considered equivalent
19347    if they satisfy the predicate
19348    Unit.areEquivalent().
19349    The predicate tests a subset of the objects's attributes.
19350
19351    @param ud1 the first UnitDefinition object to compare.
19352
19353    @param ud2 the second UnitDefinition object to compare.
19354
19355    @return @c True if all the Unit objects in @p ud1 are equivalent
19356    to the Unit objects in @p ud2, @c False otherwise.
19357
19358    @if python @note Because this is a static method on a class, the Python
19359    language interface for libSBML will contain two variants.  One will be the
19360    expected, normal static method on the class (i.e., a regular
19361    <em>methodName</em>), and the other will be a standalone top-level
19362    function with the name <em>ClassName_methodName()</em>. This is merely an
19363    artifact of how the language interfaces are created in libSBML.  The
19364    methods are functionally identical. @endif@~
19365
19366    @see UnitDefinition.areIdentical()
19367    @see Unit.areEquivalent()
19368
19369    """
19370    return _libsbml.UnitDefinition_areEquivalent(ud1, ud2)
19371
19372def UnitDefinition_combine(ud1, ud2):
19373    r"""
19374    UnitDefinition_combine(UnitDefinition ud1, UnitDefinition ud2) -> UnitDefinition
19375
19376    Combines two UnitDefinition objects into a single UnitDefinition.
19377
19378    This takes UnitDefinition objects @p ud1 and @p ud2, and creates a
19379    UnitDefinition object that expresses the product of the units of @p
19380    ud1 and @p ud2.
19381
19382    @param ud1 the first UnitDefinition object.
19383    @param ud2 the second UnitDefinition object.
19384
19385    @return a UnitDefinition which represents the product of the
19386    units of the two argument UnitDefinitions.
19387
19388    @if python @note Because this is a static method on a class, the Python
19389    language interface for libSBML will contain two variants.  One will be the
19390    expected, normal static method on the class (i.e., a regular
19391    <em>methodName</em>), and the other will be a standalone top-level
19392    function with the name <em>ClassName_methodName()</em>. This is merely an
19393    artifact of how the language interfaces are created in libSBML.  The
19394    methods are functionally identical. @endif@~
19395
19396    """
19397    return _libsbml.UnitDefinition_combine(ud1, ud2)
19398
19399def UnitDefinition_divide(ud1, ud2):
19400    r"""
19401    UnitDefinition_divide(UnitDefinition ud1, UnitDefinition ud2) -> UnitDefinition
19402
19403    Combines two UnitDefinition objects into a single UnitDefinition as
19404    a division.
19405
19406    This takes UnitDefinition objects @p ud1 and @p ud2, and creates a
19407    UnitDefinition object that expresses the division of the units of @p
19408    ud1 and @p ud2.
19409
19410    @param ud1 the first UnitDefinition object.
19411    @param ud2 the second UnitDefinition object.
19412
19413    @return a UnitDefinition which represents the division of the
19414    units of the two argument UnitDefinitions.
19415
19416    @if python @note Because this is a static method on a class, the Python
19417    language interface for libSBML will contain two variants.  One will be the
19418    expected, normal static method on the class (i.e., a regular
19419    <em>methodName</em>), and the other will be a standalone top-level
19420    function with the name <em>ClassName_methodName()</em>. This is merely an
19421    artifact of how the language interfaces are created in libSBML.  The
19422    methods are functionally identical. @endif@~
19423
19424    """
19425    return _libsbml.UnitDefinition_divide(ud1, ud2)
19426
19427def UnitDefinition_printUnits(ud, compact=False):
19428    r"""
19429    UnitDefinition_printUnits(UnitDefinition ud, bool compact=False) -> string
19430
19431    Expresses the given definition in a plain-text form.
19432
19433    For example,
19434    UnitDefinition.printUnits()
19435    applied to
19436    @verbatim
19437     <unitDefinition>
19438      <listOfUnits>
19439        <unit kind='metre' exponent='1'/>
19440        <unit kind='second' exponent='-2'/>
19441      </listOfUnits>
19442     <unitDefinition>
19443     @endverbatim
19444    will return the string <code>'metre (exponent = 1, multiplier = 1,
19445    scale = 0) second (exponent = -2, multiplier = 1, scale = 0)'</code>
19446    or, if the optional parameter @p compact is given the value @c True,
19447    the string <code>'(1 metre)^1 (1 second)^-2'</code>.  This method may
19448    be useful for printing unit information to human users, or in
19449    debugging software, or other situations.
19450
19451    @param ud the UnitDefinition object.
19452    @param compact boolean indicating whether the compact form
19453    should be used (defaults to false).
19454
19455    @return a string expressing the unit definition defined by the given
19456    UnitDefinition object @p ud.
19457
19458    @if python @note Because this is a static method on a class, the Python
19459    language interface for libSBML will contain two variants.  One will be the
19460    expected, normal static method on the class (i.e., a regular
19461    <em>methodName</em>), and the other will be a standalone top-level
19462    function with the name <em>ClassName_methodName()</em>. This is merely an
19463    artifact of how the language interfaces are created in libSBML.  The
19464    methods are functionally identical. @endif@~
19465
19466
19467
19468    @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
19469
19470    """
19471    return _libsbml.UnitDefinition_printUnits(ud, compact)
19472
19473class ListOfUnitDefinitions(ListOf):
19474    r"""
19475
19476    @sbmlpackage{core}
19477
19478    @htmlinclude pkg-marker-core.html A list of UnitDefinition objects.
19479
19480    @par
19481    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
19482    are merely containers used for organizing the main components of an SBML
19483    model.  In libSBML's implementation, ListOf___
19484    @if conly data structures @else classes@endif@~ are derived from the
19485    intermediate utility @if conly structure @else class@endif@~ ListOf, which
19486    is not defined by the SBML specifications but serves as a useful
19487    programmatic construct.  ListOf is itself is in turn derived from SBase,
19488    which provides all of the various ListOf___
19489    @if conly data structures @else classes@endif@~ with common features
19490    defined by the SBML specification, such as 'metaid' attributes and
19491    annotations.
19492
19493    The relationship between the lists and the rest of an SBML model is
19494    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
19495
19496    @htmlinclude listof-illustration.html
19497
19498    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
19499    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
19500    Version&nbsp;2 allows
19501    containers to contain zero or more of the relevant object, instead of
19502    requiring at least one.  As such, libsbml will write out an
19503    otherwise-empty ListOf___ element that has any optional attribute set
19504    (such as 'id' or 'metaid'), that has an optional child (such
19505    as a 'notes' or 'annotation'), or that has attributes or children set
19506    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
19507    any other children.
19508
19509    Readers may wonder about the motivations for using the ListOf___
19510    containers in SBML.  A simpler approach in XML might be to place the
19511    components all directly at the top level of the model definition.  The
19512    choice made in SBML is to group them within XML elements named after
19513    %ListOf<em>Classname</em>, in part because it helps organize the
19514    components.  More importantly, the fact that the container classes are
19515    derived from SBase means that software tools can add information @em about
19516    the lists themselves into each list container's 'annotation'.
19517
19518    @see ListOfFunctionDefinitions
19519    @see ListOfUnitDefinitions
19520    @see ListOfCompartmentTypes
19521    @see ListOfSpeciesTypes
19522    @see ListOfCompartments
19523    @see ListOfSpecies
19524    @see ListOfParameters
19525    @see ListOfInitialAssignments
19526    @see ListOfRules
19527    @see ListOfConstraints
19528    @see ListOfReactions
19529    @see ListOfEvents
19530
19531    @if conly
19532    @note In the C API for libSBML, functions that in other language APIs
19533    would be inherited by the various ListOf___ structures not shown in the
19534    pages for the individual ListOf___'s.  Instead, the functions are defined
19535    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
19536    the many common functions available for manipulating ListOf___
19537    structures</strong>.  The documentation for the individual ListOf___
19538    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
19539    all of the functionality available. @endif@~
19540
19541    """
19542
19543    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
19544    __repr__ = _swig_repr
19545
19546    def __init__(self, *args):
19547        r"""
19548        __init__(ListOfUnitDefinitions self, unsigned int level, unsigned int version) -> ListOfUnitDefinitions
19549        __init__(ListOfUnitDefinitions self, SBMLNamespaces sbmlns) -> ListOfUnitDefinitions
19550
19551        This method has multiple variants; they differ in the arguments
19552         they accept.  Each variant is described separately below.
19553
19554        @par
19555        <hr>
19556        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19557         <pre class='signature'>ListOfUnitDefinitions(SBMLNamespaces sbmlns)</pre>
19558
19559        Creates a new ListOfUnitDefinitions object.
19560
19561        The object is constructed such that it is valid for the SBML Level and
19562        Version combination determined by the SBMLNamespaces object in @p
19563        sbmlns.
19564
19565        @param sbmlns an SBMLNamespaces object that is used to determine the
19566        characteristics of the ListOfUnitDefinitions object to be created.
19567
19568        @throws SBMLConstructorException
19569        Thrown if the given @p sbmlns is inconsistent or incompatible
19570        with this object.
19571
19572        @note Attempting to add an object to an SBMLDocument having a different
19573        combination of SBML Level, Version and XML namespaces than the object
19574        itself will result in an error at the time a caller attempts to make the
19575        addition.  A parent object must have compatible Level, Version and XML
19576        namespaces.  (Strictly speaking, a parent may also have more XML
19577        namespaces than a child, but the reverse is not permitted.)  The
19578        restriction is necessary to ensure that an SBML model has a consistent
19579        overall structure.  This requires callers to manage their objects
19580        carefully, but the benefit is increased flexibility in how models can be
19581        created by permitting callers to create objects bottom-up if desired.  In
19582        situations where objects are not yet attached to parents (e.g.,
19583        SBMLDocument), knowledge of the intented SBML Level and Version help
19584        libSBML determine such things as whether it is valid to assign a
19585        particular value to an attribute.
19586
19587
19588        @par
19589        <hr>
19590        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19591         <pre class='signature'>ListOfUnitDefinitions(long level, long version)</pre>
19592
19593        Creates a new ListOfUnitDefinitions object.
19594
19595        The object is constructed such that it is valid for the given SBML
19596        Level and Version combination.
19597
19598        @param level the SBML Level.
19599
19600        @param version the Version within the SBML Level.
19601
19602        @throws SBMLConstructorException
19603        Thrown if the given @p level and @p version combination are invalid
19604        or if this object is incompatible with the given level and version.
19605
19606        @note Attempting to add an object to an SBMLDocument having a different
19607        combination of SBML Level, Version and XML namespaces than the object
19608        itself will result in an error at the time a caller attempts to make the
19609        addition.  A parent object must have compatible Level, Version and XML
19610        namespaces.  (Strictly speaking, a parent may also have more XML
19611        namespaces than a child, but the reverse is not permitted.)  The
19612        restriction is necessary to ensure that an SBML model has a consistent
19613        overall structure.  This requires callers to manage their objects
19614        carefully, but the benefit is increased flexibility in how models can be
19615        created by permitting callers to create objects bottom-up if desired.  In
19616        situations where objects are not yet attached to parents (e.g.,
19617        SBMLDocument), knowledge of the intented SBML Level and Version help
19618        libSBML determine such things as whether it is valid to assign a
19619        particular value to an attribute.
19620
19621        """
19622        _libsbml.ListOfUnitDefinitions_swiginit(self, _libsbml.new_ListOfUnitDefinitions(*args))
19623
19624    def clone(self):
19625        r"""
19626        clone(ListOfUnitDefinitions self) -> ListOfUnitDefinitions
19627
19628        Creates and returns a deep copy of this ListOfUnitDefinitions object.
19629
19630        @return the (deep) copy of this ListOfUnitDefinitions object.
19631
19632        """
19633        return _libsbml.ListOfUnitDefinitions_clone(self)
19634
19635    def getItemTypeCode(self):
19636        r"""
19637        getItemTypeCode(ListOfUnitDefinitions self) -> int
19638
19639        Returns the libSBML type code for the objects contained in this ListOf
19640        (i.e., UnitDefinition objects, if the list is non-empty).
19641
19642        @par
19643        LibSBML attaches an identifying code to every kind of SBML object.  These
19644        are integer constants known as <em>SBML type codes</em>.  The names of all
19645        the codes begin with the characters <code>SBML_</code>.
19646        @if clike The set of possible type codes for core elements is defined in
19647        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
19648        SBML Level&nbsp;3 packages define their own extra enumerations of type
19649        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
19650        package).@endif@if java In the Java language interface for libSBML, the
19651        type codes are defined as static integer constants in the interface class
19652        {@link libsbmlConstants}.  @endif@if python In the Python language
19653        interface for libSBML, the type codes are defined as static integer
19654        constants in the interface class @link libsbml@endlink.@endif@if csharp In
19655        the C# language interface for libSBML, the type codes are defined as
19656        static integer constants in the interface class
19657        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
19658        package plug-ins may use overlapping type codes; to identify the package
19659        to which a given object belongs, call the
19660        <code>@if conly SBase_getPackageName()
19661        @else SBase.getPackageName()
19662        @endif</code>
19663        method on the object.
19664
19665        The exception to this is lists:  all SBML-style list elements have the type
19666        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
19667        are from.
19668
19669        @return the SBML type code for objects contained in this list:
19670        @link libsbml#SBML_UNIT_DEFINITION SBML_UNIT_DEFINITION@endlink (default).
19671
19672        @see getElementName()
19673        @see getPackageName()
19674
19675        """
19676        return _libsbml.ListOfUnitDefinitions_getItemTypeCode(self)
19677
19678    def getElementName(self):
19679        r"""
19680        getElementName(ListOfUnitDefinitions self) -> string
19681
19682        Returns the XML element name of this object.
19683
19684        For ListOfUnitDefinitions, the XML element name is
19685        @c 'listOfUnitDefinitions'.
19686
19687        @return the name of this element, i.e., @c 'listOfUnitDefinitions'.
19688
19689        """
19690        return _libsbml.ListOfUnitDefinitions_getElementName(self)
19691
19692    def get(self, *args):
19693        r"""
19694        get(ListOfUnitDefinitions self, unsigned int n) -> UnitDefinition
19695        get(ListOfUnitDefinitions self, unsigned int n) -> UnitDefinition
19696        get(ListOfUnitDefinitions self, string sid) -> UnitDefinition
19697        get(ListOfUnitDefinitions self, string sid) -> UnitDefinition
19698
19699        This method has multiple variants; they differ in the arguments
19700         they accept.  Each variant is described separately below.
19701
19702        @par
19703        <hr>
19704        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19705         <pre class='signature'>get(long n)</pre>
19706
19707        Get a UnitDefinition from the ListOfUnitDefinitions.
19708
19709        @param n the index number of the UnitDefinition to get.
19710
19711        @return the nth UnitDefinition in this ListOfUnitDefinitions.
19712        If the index @p n is invalid, @c None is returned.
19713
19714        @see size()
19715
19716
19717        @par
19718        <hr>
19719        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19720         <pre class='signature'>get(string sid)</pre>
19721
19722        Get a UnitDefinition from the ListOfUnitDefinitions
19723        based on its identifier.
19724
19725        @param sid a string representing the identifier
19726        of the UnitDefinition to get.
19727
19728        @return UnitDefinition in this ListOfUnitDefinitions
19729        with the given @p sid or @c None if no such
19730        UnitDefinition exists.
19731
19732        @see get()
19733        @see size()
19734
19735        """
19736        return _libsbml.ListOfUnitDefinitions_get(self, *args)
19737
19738    def getElementBySId(self, id):
19739        r"""
19740        getElementBySId(ListOfUnitDefinitions self, string id) -> SBase
19741
19742        Returns the first child element found that has the given @p id in the
19743        model-wide SId namespace, or @c None if no such object is found.
19744
19745        Note that UnitDefinitions themselves are in the UnitId namespace, not
19746        the SId namespace, so no UnitDefinition object will be returned from
19747        this function (and is the reason we override the base
19748        ListOf::getElementBySId function here).
19749
19750        @param id string representing the id of the object to find.
19751
19752        @return pointer to the first element found with the given @p id.
19753
19754        """
19755        return _libsbml.ListOfUnitDefinitions_getElementBySId(self, id)
19756
19757    def remove(self, *args):
19758        r"""
19759        remove(ListOfUnitDefinitions self, unsigned int n) -> UnitDefinition
19760        remove(ListOfUnitDefinitions self, string sid) -> UnitDefinition
19761
19762        This method has multiple variants; they differ in the arguments
19763         they accept.  Each variant is described separately below.
19764
19765        @par
19766        <hr>
19767        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19768         <pre class='signature'>remove(long n)</pre>
19769
19770        Removes the nth item from this ListOfUnitDefinitions items and returns a pointer to
19771        it.
19772
19773        The caller owns the returned item and is responsible for deleting it.
19774
19775        @param n the index of the item to remove.
19776
19777        @see size()
19778
19779
19780        @par
19781        <hr>
19782        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19783         <pre class='signature'>remove(string sid)</pre>
19784
19785        Removes item in this ListOfUnitDefinitions items with the given identifier.
19786
19787        The caller owns the returned item and is responsible for deleting it.
19788        If none of the items in this list have the identifier @p sid, then
19789        @c None is returned.
19790
19791        @param sid the identifier of the item to remove.
19792
19793        @return the item removed.  As mentioned above, the caller owns the
19794        returned item.
19795
19796        """
19797        return _libsbml.ListOfUnitDefinitions_remove(self, *args)
19798    __swig_destroy__ = _libsbml.delete_ListOfUnitDefinitions
19799
19800# Register ListOfUnitDefinitions in _libsbml:
19801_libsbml.ListOfUnitDefinitions_swigregister(ListOfUnitDefinitions)
19802
19803class CompartmentType(SBase):
19804    r"""
19805
19806    @sbmlpackage{core}
19807
19808    @htmlinclude pkg-marker-core.html A <em>compartment type</em> in SBML Level&nbsp;2.
19809
19810    SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 provide the <em>compartment
19811    type</em> as a grouping construct that can be used to establish a
19812    relationship between multiple Compartment objects.  A CompartmentType
19813    object only has an identity, and this identity can only be used to
19814    indicate that particular Compartment objects in the model belong to this
19815    type.  This may be useful for conveying a modeling intention, such as
19816    when a model contains many similar compartments, either by their
19817    biological function or the reactions they carry.  Without a compartment
19818    type construct, it would be impossible within SBML itself to indicate
19819    that all of the compartments share an underlying conceptual relationship
19820    because each SBML compartment must be given a unique and separate
19821    identity.  A CompartmentType has no mathematical meaning in
19822    SBML---it has no effect on a model's mathematical interpretation.
19823    Simulators and other numerical analysis software may ignore
19824    CompartmentType definitions and references to them in a model.
19825
19826    There is no mechanism in SBML Level 2 for representing hierarchies of
19827    compartment types.  One CompartmentType instance cannot be the subtype
19828    of another CompartmentType instance; SBML provides no means of defining
19829    such relationships.
19830
19831    As with other major structures in SBML, CompartmentType has a mandatory
19832    attribute, 'id', used to give the compartment type an identifier.  The
19833    identifier must be a text %string conforming to the identifer syntax
19834    permitted in SBML.  CompartmentType also has an optional 'name'
19835    attribute, of type @c string.  The 'id' and 'name' must be used
19836    according to the guidelines described in the SBML specification (e.g.,
19837    Section 3.3 in the Level 2 Version 4 specification).
19838
19839    CompartmentType was introduced in SBML Level 2 Version 2.  It is not
19840    available in SBML Level&nbsp;1 nor in Level&nbsp;3.
19841
19842    @see Compartment
19843    @see ListOfCompartmentTypes
19844    @see SpeciesType
19845    @see ListOfSpeciesTypes
19846
19847    """
19848
19849    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
19850    __repr__ = _swig_repr
19851    __swig_destroy__ = _libsbml.delete_CompartmentType
19852
19853    def __init__(self, *args):
19854        r"""
19855        __init__(CompartmentType self, unsigned int level, unsigned int version) -> CompartmentType
19856        __init__(CompartmentType self, SBMLNamespaces sbmlns) -> CompartmentType
19857        __init__(CompartmentType self, CompartmentType orig) -> CompartmentType
19858
19859        This method has multiple variants; they differ in the arguments
19860         they accept.  Each variant is described separately below.
19861
19862        @par
19863        <hr>
19864        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19865         <pre class='signature'>CompartmentType(SBMLNamespaces sbmlns)</pre>
19866
19867        Creates a new CompartmentType object using the given SBMLNamespaces
19868        object @p sbmlns.
19869
19870        @par
19871        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
19872        information.  It is used to communicate the SBML Level, Version, and (in
19873        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
19874        common approach to using libSBML's SBMLNamespaces facilities is to create an
19875        SBMLNamespaces object somewhere in a program once, then hand that object
19876        as needed to object constructors that accept SBMLNamespaces as arguments.
19877
19878        It is worth emphasizing that although this constructor does not take an
19879        identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
19880        (identifier) attribute of a CompartmentType object is required to have a
19881        value.  Thus, callers are cautioned to assign a value after calling this
19882        constructor.  Setting the identifier can be accomplished using the
19883        method setId(@if java String@endif).
19884
19885        @param sbmlns an SBMLNamespaces object.
19886
19887        @throws SBMLConstructorException
19888        Thrown if the given @p sbmlns is inconsistent or incompatible
19889        with this object.
19890
19891        @note Attempting to add an object to an SBMLDocument having a different
19892        combination of SBML Level, Version and XML namespaces than the object
19893        itself will result in an error at the time a caller attempts to make the
19894        addition.  A parent object must have compatible Level, Version and XML
19895        namespaces.  (Strictly speaking, a parent may also have more XML
19896        namespaces than a child, but the reverse is not permitted.)  The
19897        restriction is necessary to ensure that an SBML model has a consistent
19898        overall structure.  This requires callers to manage their objects
19899        carefully, but the benefit is increased flexibility in how models can be
19900        created by permitting callers to create objects bottom-up if desired.  In
19901        situations where objects are not yet attached to parents (e.g.,
19902        SBMLDocument), knowledge of the intented SBML Level and Version help
19903        libSBML determine such things as whether it is valid to assign a
19904        particular value to an attribute.
19905
19906
19907        @par
19908        <hr>
19909        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19910         <pre class='signature'>CompartmentType(long level, long version)</pre>
19911
19912        Creates a new CompartmentType object using the given SBML @p level and
19913        @p version values.
19914
19915        @param level a long integer, the SBML Level to assign to this
19916        CompartmentType.
19917
19918        @param version a long integer, the SBML Version to assign to this
19919        CompartmentType.
19920
19921        @throws SBMLConstructorException
19922        Thrown if the given @p level and @p version combination are invalid
19923        or if this object is incompatible with the given level and version.
19924
19925        @note Attempting to add an object to an SBMLDocument having a different
19926        combination of SBML Level, Version and XML namespaces than the object
19927        itself will result in an error at the time a caller attempts to make the
19928        addition.  A parent object must have compatible Level, Version and XML
19929        namespaces.  (Strictly speaking, a parent may also have more XML
19930        namespaces than a child, but the reverse is not permitted.)  The
19931        restriction is necessary to ensure that an SBML model has a consistent
19932        overall structure.  This requires callers to manage their objects
19933        carefully, but the benefit is increased flexibility in how models can be
19934        created by permitting callers to create objects bottom-up if desired.  In
19935        situations where objects are not yet attached to parents (e.g.,
19936        SBMLDocument), knowledge of the intented SBML Level and Version help
19937        libSBML determine such things as whether it is valid to assign a
19938        particular value to an attribute.
19939
19940
19941        @par
19942        <hr>
19943        <span class='variant-sig-heading'>Method variant with the following signature</span>:
19944         <pre class='signature'>CompartmentType(CompartmentType orig)</pre>
19945
19946        Copy constructor; creates a copy of this CompartmentType object.
19947
19948        @param orig the object to copy.
19949
19950        """
19951        _libsbml.CompartmentType_swiginit(self, _libsbml.new_CompartmentType(*args))
19952
19953    def clone(self):
19954        r"""
19955        clone(CompartmentType self) -> CompartmentType
19956
19957        Creates and returns a deep copy of this CompartmentType object.
19958
19959        @return the (deep) copy of this CompartmentType object.
19960
19961        """
19962        return _libsbml.CompartmentType_clone(self)
19963
19964    def getId(self):
19965        r"""
19966        getId(CompartmentType self) -> string
19967
19968        Returns the value of the 'id' attribute of this CompartmentType.
19969
19970        @note Because of the inconsistent behavior of this function with
19971        respect to assignments and rules, it is now recommended to
19972        use the getIdAttribute() function instead.
19973
19974        @par
19975        The identifier given by an object's 'id' attribute value
19976        is used to identify the object within the SBML model definition.
19977        Other objects can refer to the component using this identifier.  The
19978        data type of 'id' is always <code>SId</code> or a type derived
19979        from that, such as <code>UnitSId</code>, depending on the object in
19980        question.  All data types are defined as follows:
19981        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
19982        letter ::= 'a'..'z','A'..'Z'
19983        digit  ::= '0'..'9'
19984        idChar ::= letter | digit | '_'
19985        SId    ::= ( letter | '_' ) idChar*
19986        </pre>
19987        The characters <code>(</code> and <code>)</code> are used for grouping,
19988        the character <code>*</code> 'zero or more times', and the character
19989        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
19990        is determined by an exact character sequence match; i.e., comparisons must
19991        be performed in a case-sensitive manner.  This applies to all uses of
19992        <code>SId</code>, <code>SIdRef</code>, and derived types.
19993
19994        Users need to be aware of some important API issues that are the result of
19995        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
19996        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
19997        of SBML objects.  To simplify the work of programmers, libSBML's API
19998        provided get, set, check, and unset on the SBase object class itself
19999        instead of on individual subobject classes. This made the
20000        get/set/etc. methods uniformly available on all objects in the libSBML
20001        API.  LibSBML simply returned empty strings or otherwise did not act when
20002        the methods were applied to SBML objects that were not defined by the SBML
20003        specification to have 'id' or 'name' attributes.  Additional complications
20004        arose with the rule and assignment objects: InitialAssignment,
20005        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
20006        the rule object hierarchy was different, and in addition, then as now,
20007        they possess different attributes: 'variable' (for the rules and event
20008        assignments), 'symbol' (for initial assignments), or neither (for
20009        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
20010        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
20011
20012        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
20013        Version&nbsp;2, it became necessary to introduce a new way to interact
20014        with the attributes more consistently in libSBML to avoid breaking
20015        backward compatibility in the behavior of the original 'id' methods.  For
20016        this reason, libSBML provides four functions (getIdAttribute(),
20017        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
20018        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
20019        from SBase, regardless of the object's type.  <strong>These new methods
20020        should be used instead of the older getId()/setId()/etc. methods</strong>
20021        unless the old behavior is somehow necessary.  Regardless of the Level and
20022        Version of the SBML, these functions allow client applications to use more
20023        generalized code in some situations (for instance, when manipulating
20024        objects that are all known to have identifiers).  If the object in
20025        question does not posess an 'id' attribute according to the SBML
20026        specification for the Level and Version in use, libSBML will not allow the
20027        identifier to be set, nor will it read or write 'id' attributes for those
20028        objects.
20029
20030        @return the id of this CompartmentType.
20031
20032        @see getIdAttribute()
20033        @see setIdAttribute()
20034        @see isSetIdAttribute()
20035        @see unsetIdAttribute()
20036
20037        """
20038        return _libsbml.CompartmentType_getId(self)
20039
20040    def getName(self):
20041        r"""
20042        getName(CompartmentType self) -> string
20043
20044        Returns the value of the 'name' attribute of this CompartmentType object.
20045
20046        @par
20047        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
20048        moved to SBase directly, instead of being defined individually for many
20049        (but not all) objects.  LibSBML has for a long time provided functions
20050        defined on SBase itself to get, set, and unset those attributes, which
20051        would fail or otherwise return empty strings if executed on any object
20052        for which those attributes were not defined.  Now that all SBase objects
20053        define those attributes, those functions now succeed for any object with
20054        the appropriate level and version.
20055
20056        The 'name' attribute is
20057        optional and is not intended to be used for cross-referencing purposes
20058        within a model.  Its purpose instead is to provide a human-readable
20059        label for the component.  The data type of 'name' is the type
20060        <code>string</code> defined in XML Schema.  SBML imposes no
20061        restrictions as to the content of 'name' attributes beyond those
20062        restrictions defined by the <code>string</code> type in XML Schema.
20063
20064        The recommended practice for handling 'name' is as follows.  If a
20065        software tool has the capability for displaying the content of 'name'
20066        attributes, it should display this content to the user as a
20067        component's label instead of the component's 'id'.  If the user
20068        interface does not have this capability (e.g., because it cannot
20069        display or use special characters in symbol names), or if the 'name'
20070        attribute is missing on a given component, then the user interface
20071        should display the value of the 'id' attribute instead.  (Script
20072        language interpreters are especially likely to display 'id' instead of
20073        'name'.)
20074
20075        As a consequence of the above, authors of systems that automatically
20076        generate the values of 'id' attributes should be aware some systems
20077        may display the 'id''s to the user.  Authors therefore may wish to
20078        take some care to have their software create 'id' values that are: (a)
20079        reasonably easy for humans to type and read; and (b) likely to be
20080        meaningful, for example by making the 'id' attribute be an abbreviated
20081        form of the name attribute value.
20082
20083        An additional point worth mentioning is although there are
20084        restrictions on the uniqueness of 'id' values, there are no
20085        restrictions on the uniqueness of 'name' values in a model.  This
20086        allows software applications leeway in assigning component identifiers.
20087
20088        Regardless of the level and version of the SBML, these functions allow
20089        client applications to use more generalized code in some situations
20090        (for instance, when manipulating objects that are all known to have
20091        names).  If the object in question does not posess a 'name' attribute
20092        according to the SBML specification for the Level and Version in use,
20093        libSBML will not allow the name to be set, nor will it read or
20094        write 'name' attributes for those objects.
20095
20096        @return the name of this SBML object, or the empty string if not set or unsettable.
20097
20098        @see getIdAttribute()
20099        @see isSetName()
20100        @see setName()
20101        @see unsetName()
20102
20103        """
20104        return _libsbml.CompartmentType_getName(self)
20105
20106    def isSetId(self):
20107        r"""
20108        isSetId(CompartmentType self) -> bool
20109
20110        Predicate returning @c True if this CompartmentType object's 'id'
20111        attribute is set.
20112
20113        @par
20114        The identifier given by an object's 'id' attribute value
20115        is used to identify the object within the SBML model definition.
20116        Other objects can refer to the component using this identifier.  The
20117        data type of 'id' is always <code>SId</code> or a type derived
20118        from that, such as <code>UnitSId</code>, depending on the object in
20119        question.  All data types are defined as follows:
20120        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
20121        letter ::= 'a'..'z','A'..'Z'
20122        digit  ::= '0'..'9'
20123        idChar ::= letter | digit | '_'
20124        SId    ::= ( letter | '_' ) idChar*
20125        </pre>
20126        The characters <code>(</code> and <code>)</code> are used for grouping,
20127        the character <code>*</code> 'zero or more times', and the character
20128        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
20129        is determined by an exact character sequence match; i.e., comparisons must
20130        be performed in a case-sensitive manner.  This applies to all uses of
20131        <code>SId</code>, <code>SIdRef</code>, and derived types.
20132
20133        Users need to be aware of some important API issues that are the result of
20134        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
20135        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
20136        of SBML objects.  To simplify the work of programmers, libSBML's API
20137        provided get, set, check, and unset on the SBase object class itself
20138        instead of on individual subobject classes. This made the
20139        get/set/etc. methods uniformly available on all objects in the libSBML
20140        API.  LibSBML simply returned empty strings or otherwise did not act when
20141        the methods were applied to SBML objects that were not defined by the SBML
20142        specification to have 'id' or 'name' attributes.  Additional complications
20143        arose with the rule and assignment objects: InitialAssignment,
20144        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
20145        the rule object hierarchy was different, and in addition, then as now,
20146        they possess different attributes: 'variable' (for the rules and event
20147        assignments), 'symbol' (for initial assignments), or neither (for
20148        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
20149        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
20150
20151        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
20152        Version&nbsp;2, it became necessary to introduce a new way to interact
20153        with the attributes more consistently in libSBML to avoid breaking
20154        backward compatibility in the behavior of the original 'id' methods.  For
20155        this reason, libSBML provides four functions (getIdAttribute(),
20156        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
20157        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
20158        from SBase, regardless of the object's type.  <strong>These new methods
20159        should be used instead of the older getId()/setId()/etc. methods</strong>
20160        unless the old behavior is somehow necessary.  Regardless of the Level and
20161        Version of the SBML, these functions allow client applications to use more
20162        generalized code in some situations (for instance, when manipulating
20163        objects that are all known to have identifiers).  If the object in
20164        question does not posess an 'id' attribute according to the SBML
20165        specification for the Level and Version in use, libSBML will not allow the
20166        identifier to be set, nor will it read or write 'id' attributes for those
20167        objects.
20168
20169        @return @c True if the 'id' attribute of this SBML object is
20170        set, @c False otherwise.
20171
20172        @note Because of the inconsistent behavior of this function with
20173        respect to assignments and rules, it is recommended that callers
20174        use isSetIdAttribute() instead.
20175
20176        @see getIdAttribute()
20177        @see setIdAttribute()
20178        @see unsetIdAttribute()
20179        @see isSetIdAttribute()
20180
20181        """
20182        return _libsbml.CompartmentType_isSetId(self)
20183
20184    def isSetName(self):
20185        r"""
20186        isSetName(CompartmentType self) -> bool
20187
20188        Predicate returning @c True if this CompartmentType object's 'name'
20189        attribute is set.
20190
20191        @par
20192        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
20193        moved to SBase directly, instead of being defined individually for many
20194        (but not all) objects.  LibSBML has for a long time provided functions
20195        defined on SBase itself to get, set, and unset those attributes, which
20196        would fail or otherwise return empty strings if executed on any object
20197        for which those attributes were not defined.  Now that all SBase objects
20198        define those attributes, those functions now succeed for any object with
20199        the appropriate level and version.
20200
20201        The 'name' attribute is
20202        optional and is not intended to be used for cross-referencing purposes
20203        within a model.  Its purpose instead is to provide a human-readable
20204        label for the component.  The data type of 'name' is the type
20205        <code>string</code> defined in XML Schema.  SBML imposes no
20206        restrictions as to the content of 'name' attributes beyond those
20207        restrictions defined by the <code>string</code> type in XML Schema.
20208
20209        The recommended practice for handling 'name' is as follows.  If a
20210        software tool has the capability for displaying the content of 'name'
20211        attributes, it should display this content to the user as a
20212        component's label instead of the component's 'id'.  If the user
20213        interface does not have this capability (e.g., because it cannot
20214        display or use special characters in symbol names), or if the 'name'
20215        attribute is missing on a given component, then the user interface
20216        should display the value of the 'id' attribute instead.  (Script
20217        language interpreters are especially likely to display 'id' instead of
20218        'name'.)
20219
20220        As a consequence of the above, authors of systems that automatically
20221        generate the values of 'id' attributes should be aware some systems
20222        may display the 'id''s to the user.  Authors therefore may wish to
20223        take some care to have their software create 'id' values that are: (a)
20224        reasonably easy for humans to type and read; and (b) likely to be
20225        meaningful, for example by making the 'id' attribute be an abbreviated
20226        form of the name attribute value.
20227
20228        An additional point worth mentioning is although there are
20229        restrictions on the uniqueness of 'id' values, there are no
20230        restrictions on the uniqueness of 'name' values in a model.  This
20231        allows software applications leeway in assigning component identifiers.
20232
20233        Regardless of the level and version of the SBML, these functions allow
20234        client applications to use more generalized code in some situations
20235        (for instance, when manipulating objects that are all known to have
20236        names).  If the object in question does not posess a 'name' attribute
20237        according to the SBML specification for the Level and Version in use,
20238        libSBML will not allow the name to be set, nor will it read or
20239        write 'name' attributes for those objects.
20240
20241        @return @c True if the 'name' attribute of this SBML object is
20242        set, @c False otherwise.
20243
20244        @see getName()
20245        @see setName()
20246        @see unsetName()
20247
20248        """
20249        return _libsbml.CompartmentType_isSetName(self)
20250
20251    def setId(self, sid):
20252        r"""
20253        setId(CompartmentType self, string sid) -> int
20254
20255        Sets the value of the 'id' attribute of this CompartmentType.
20256
20257        @par
20258        The string @p sid is copied.
20259
20260        @par
20261        The identifier given by an object's 'id' attribute value
20262        is used to identify the object within the SBML model definition.
20263        Other objects can refer to the component using this identifier.  The
20264        data type of 'id' is always <code>SId</code> or a type derived
20265        from that, such as <code>UnitSId</code>, depending on the object in
20266        question.  All data types are defined as follows:
20267        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
20268        letter ::= 'a'..'z','A'..'Z'
20269        digit  ::= '0'..'9'
20270        idChar ::= letter | digit | '_'
20271        SId    ::= ( letter | '_' ) idChar*
20272        </pre>
20273        The characters <code>(</code> and <code>)</code> are used for grouping,
20274        the character <code>*</code> 'zero or more times', and the character
20275        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
20276        is determined by an exact character sequence match; i.e., comparisons must
20277        be performed in a case-sensitive manner.  This applies to all uses of
20278        <code>SId</code>, <code>SIdRef</code>, and derived types.
20279
20280        Users need to be aware of some important API issues that are the result of
20281        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
20282        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
20283        of SBML objects.  To simplify the work of programmers, libSBML's API
20284        provided get, set, check, and unset on the SBase object class itself
20285        instead of on individual subobject classes. This made the
20286        get/set/etc. methods uniformly available on all objects in the libSBML
20287        API.  LibSBML simply returned empty strings or otherwise did not act when
20288        the methods were applied to SBML objects that were not defined by the SBML
20289        specification to have 'id' or 'name' attributes.  Additional complications
20290        arose with the rule and assignment objects: InitialAssignment,
20291        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
20292        the rule object hierarchy was different, and in addition, then as now,
20293        they possess different attributes: 'variable' (for the rules and event
20294        assignments), 'symbol' (for initial assignments), or neither (for
20295        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
20296        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
20297
20298        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
20299        Version&nbsp;2, it became necessary to introduce a new way to interact
20300        with the attributes more consistently in libSBML to avoid breaking
20301        backward compatibility in the behavior of the original 'id' methods.  For
20302        this reason, libSBML provides four functions (getIdAttribute(),
20303        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
20304        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
20305        from SBase, regardless of the object's type.  <strong>These new methods
20306        should be used instead of the older getId()/setId()/etc. methods</strong>
20307        unless the old behavior is somehow necessary.  Regardless of the Level and
20308        Version of the SBML, these functions allow client applications to use more
20309        generalized code in some situations (for instance, when manipulating
20310        objects that are all known to have identifiers).  If the object in
20311        question does not posess an 'id' attribute according to the SBML
20312        specification for the Level and Version in use, libSBML will not allow the
20313        identifier to be set, nor will it read or write 'id' attributes for those
20314        objects.
20315
20316        @param sid the string to use as the identifier of this object.
20317
20318        @return integer value indicating success/failure of the
20319        function.  @if clike The value is drawn from the
20320        enumeration #OperationReturnValues_t. @endif@~ The possible values
20321        returned by this function are:
20322        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
20323        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
20324        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
20325
20326        @see getIdAttribute()
20327        @see setIdAttribute()
20328        @see isSetIdAttribute()
20329        @see unsetIdAttribute()
20330
20331        """
20332        return _libsbml.CompartmentType_setId(self, sid)
20333
20334    def setName(self, name):
20335        r"""
20336        setName(CompartmentType self, string name) -> int
20337
20338        Sets the value of the 'name' attribute of this CompartmentType.
20339
20340        @par
20341
20342        The string in @p name is copied.
20343
20344        @param name the new name for the SBML object.
20345
20346        @return integer value indicating success/failure of the
20347        function.  @if clike The value is drawn from the
20348        enumeration #OperationReturnValues_t. @endif@~ The possible values
20349        returned by this function are:
20350        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
20351        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
20352
20353        """
20354        return _libsbml.CompartmentType_setName(self, name)
20355
20356    def unsetName(self):
20357        r"""
20358        unsetName(CompartmentType self) -> int
20359
20360        Unsets the value of the 'name' attribute of this CompartmentType object.
20361
20362        @par
20363        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
20364        moved to SBase directly, instead of being defined individually for many
20365        (but not all) objects.  LibSBML has for a long time provided functions
20366        defined on SBase itself to get, set, and unset those attributes, which
20367        would fail or otherwise return empty strings if executed on any object
20368        for which those attributes were not defined.  Now that all SBase objects
20369        define those attributes, those functions now succeed for any object with
20370        the appropriate level and version.
20371
20372        The 'name' attribute is
20373        optional and is not intended to be used for cross-referencing purposes
20374        within a model.  Its purpose instead is to provide a human-readable
20375        label for the component.  The data type of 'name' is the type
20376        <code>string</code> defined in XML Schema.  SBML imposes no
20377        restrictions as to the content of 'name' attributes beyond those
20378        restrictions defined by the <code>string</code> type in XML Schema.
20379
20380        The recommended practice for handling 'name' is as follows.  If a
20381        software tool has the capability for displaying the content of 'name'
20382        attributes, it should display this content to the user as a
20383        component's label instead of the component's 'id'.  If the user
20384        interface does not have this capability (e.g., because it cannot
20385        display or use special characters in symbol names), or if the 'name'
20386        attribute is missing on a given component, then the user interface
20387        should display the value of the 'id' attribute instead.  (Script
20388        language interpreters are especially likely to display 'id' instead of
20389        'name'.)
20390
20391        As a consequence of the above, authors of systems that automatically
20392        generate the values of 'id' attributes should be aware some systems
20393        may display the 'id''s to the user.  Authors therefore may wish to
20394        take some care to have their software create 'id' values that are: (a)
20395        reasonably easy for humans to type and read; and (b) likely to be
20396        meaningful, for example by making the 'id' attribute be an abbreviated
20397        form of the name attribute value.
20398
20399        An additional point worth mentioning is although there are
20400        restrictions on the uniqueness of 'id' values, there are no
20401        restrictions on the uniqueness of 'name' values in a model.  This
20402        allows software applications leeway in assigning component identifiers.
20403
20404        Regardless of the level and version of the SBML, these functions allow
20405        client applications to use more generalized code in some situations
20406        (for instance, when manipulating objects that are all known to have
20407        names).  If the object in question does not posess a 'name' attribute
20408        according to the SBML specification for the Level and Version in use,
20409        libSBML will not allow the name to be set, nor will it read or
20410        write 'name' attributes for those objects.
20411
20412        @return integer value indicating success/failure of the
20413        function.  @if clike The value is drawn from the
20414        enumeration #OperationReturnValues_t. @endif@~ The possible values
20415        returned by this function are:
20416        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
20417        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
20418
20419        @see getName()
20420        @see setName()
20421        @see isSetName()
20422
20423        """
20424        return _libsbml.CompartmentType_unsetName(self)
20425
20426    def getTypeCode(self):
20427        r"""
20428        getTypeCode(CompartmentType self) -> int
20429
20430        Returns the libSBML type code for this SBML object.
20431
20432        @par
20433        LibSBML attaches an identifying code to every kind of SBML object.  These
20434        are integer constants known as <em>SBML type codes</em>.  The names of all
20435        the codes begin with the characters <code>SBML_</code>.
20436        @if clike The set of possible type codes for core elements is defined in
20437        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
20438        SBML Level&nbsp;3 packages define their own extra enumerations of type
20439        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
20440        package).@endif@if java In the Java language interface for libSBML, the
20441        type codes are defined as static integer constants in the interface class
20442        {@link libsbmlConstants}.  @endif@if python In the Python language
20443        interface for libSBML, the type codes are defined as static integer
20444        constants in the interface class @link libsbml@endlink.@endif@if csharp In
20445        the C# language interface for libSBML, the type codes are defined as
20446        static integer constants in the interface class
20447        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
20448        package plug-ins may use overlapping type codes; to identify the package
20449        to which a given object belongs, call the
20450        <code>@if conly SBase_getPackageName()
20451        @else SBase.getPackageName()
20452        @endif</code>
20453        method on the object.
20454
20455        The exception to this is lists:  all SBML-style list elements have the type
20456        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
20457        are from.
20458
20459        @return the SBML type code for this object:
20460        @link libsbml#SBML_COMPARTMENT_TYPE SBML_COMPARTMENT_TYPE@endlink (default).
20461
20462        @warning <span class='warning'>The specific integer values of the possible
20463        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
20464        packages,  To fully identify the correct code, <strong>it is necessary to
20465        invoke both getPackageName() and getTypeCode()</strong> (or
20466        ListOf.getItemTypeCode()).</span>
20467
20468        @see getElementName()
20469        @see getPackageName()
20470
20471        """
20472        return _libsbml.CompartmentType_getTypeCode(self)
20473
20474    def getElementName(self):
20475        r"""
20476        getElementName(CompartmentType self) -> string
20477
20478        Returns the XML element name of this object
20479
20480        For CompartmentType, the element name is always @c 'compartmentType'.
20481
20482        @return the name of this element.
20483
20484        @see getTypeCode()
20485        @see getPackageName()
20486
20487        """
20488        return _libsbml.CompartmentType_getElementName(self)
20489
20490    def hasRequiredAttributes(self):
20491        r"""
20492        hasRequiredAttributes(CompartmentType self) -> bool
20493
20494        Predicate returning @c True if all the required attributes for this
20495        CompartmentType object have been set.
20496
20497        The required attributes for a CompartmentType object are:
20498        @li 'id'
20499
20500        @return @c True if the required attributes have been set, @c False
20501        otherwise.
20502
20503        """
20504        return _libsbml.CompartmentType_hasRequiredAttributes(self)
20505
20506# Register CompartmentType in _libsbml:
20507_libsbml.CompartmentType_swigregister(CompartmentType)
20508
20509class ListOfCompartmentTypes(ListOf):
20510    r"""
20511
20512    @sbmlpackage{core}
20513
20514    @htmlinclude pkg-marker-core.html A list of CompartmentType objects.
20515
20516    @par
20517    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
20518    are merely containers used for organizing the main components of an SBML
20519    model.  In libSBML's implementation, ListOf___
20520    @if conly data structures @else classes@endif@~ are derived from the
20521    intermediate utility @if conly structure @else class@endif@~ ListOf, which
20522    is not defined by the SBML specifications but serves as a useful
20523    programmatic construct.  ListOf is itself is in turn derived from SBase,
20524    which provides all of the various ListOf___
20525    @if conly data structures @else classes@endif@~ with common features
20526    defined by the SBML specification, such as 'metaid' attributes and
20527    annotations.
20528
20529    The relationship between the lists and the rest of an SBML model is
20530    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
20531
20532    @htmlinclude listof-illustration.html
20533
20534    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
20535    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
20536    Version&nbsp;2 allows
20537    containers to contain zero or more of the relevant object, instead of
20538    requiring at least one.  As such, libsbml will write out an
20539    otherwise-empty ListOf___ element that has any optional attribute set
20540    (such as 'id' or 'metaid'), that has an optional child (such
20541    as a 'notes' or 'annotation'), or that has attributes or children set
20542    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
20543    any other children.
20544
20545    Readers may wonder about the motivations for using the ListOf___
20546    containers in SBML.  A simpler approach in XML might be to place the
20547    components all directly at the top level of the model definition.  The
20548    choice made in SBML is to group them within XML elements named after
20549    %ListOf<em>Classname</em>, in part because it helps organize the
20550    components.  More importantly, the fact that the container classes are
20551    derived from SBase means that software tools can add information @em about
20552    the lists themselves into each list container's 'annotation'.
20553
20554    @see ListOfFunctionDefinitions
20555    @see ListOfUnitDefinitions
20556    @see ListOfCompartmentTypes
20557    @see ListOfSpeciesTypes
20558    @see ListOfCompartments
20559    @see ListOfSpecies
20560    @see ListOfParameters
20561    @see ListOfInitialAssignments
20562    @see ListOfRules
20563    @see ListOfConstraints
20564    @see ListOfReactions
20565    @see ListOfEvents
20566
20567    @if conly
20568    @note In the C API for libSBML, functions that in other language APIs
20569    would be inherited by the various ListOf___ structures not shown in the
20570    pages for the individual ListOf___'s.  Instead, the functions are defined
20571    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
20572    the many common functions available for manipulating ListOf___
20573    structures</strong>.  The documentation for the individual ListOf___
20574    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
20575    all of the functionality available. @endif@~
20576
20577    """
20578
20579    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
20580    __repr__ = _swig_repr
20581
20582    def __init__(self, *args):
20583        r"""
20584        __init__(ListOfCompartmentTypes self, unsigned int level, unsigned int version) -> ListOfCompartmentTypes
20585        __init__(ListOfCompartmentTypes self, SBMLNamespaces sbmlns) -> ListOfCompartmentTypes
20586
20587        This method has multiple variants; they differ in the arguments
20588         they accept.  Each variant is described separately below.
20589
20590        @par
20591        <hr>
20592        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20593         <pre class='signature'>ListOfCompartmentTypes(SBMLNamespaces sbmlns)</pre>
20594
20595        Creates a new ListOfCompartmentTypes object.
20596
20597        The object is constructed such that it is valid for the SBML Level and
20598        Version combination determined by the SBMLNamespaces object in @p
20599        sbmlns.
20600
20601        @param sbmlns an SBMLNamespaces object that is used to determine the
20602        characteristics of the ListOfCompartmentTypes object to be created.
20603
20604        @throws SBMLConstructorException
20605        Thrown if the given @p sbmlns is inconsistent or incompatible
20606        with this object.
20607
20608        @note Attempting to add an object to an SBMLDocument having a different
20609        combination of SBML Level, Version and XML namespaces than the object
20610        itself will result in an error at the time a caller attempts to make the
20611        addition.  A parent object must have compatible Level, Version and XML
20612        namespaces.  (Strictly speaking, a parent may also have more XML
20613        namespaces than a child, but the reverse is not permitted.)  The
20614        restriction is necessary to ensure that an SBML model has a consistent
20615        overall structure.  This requires callers to manage their objects
20616        carefully, but the benefit is increased flexibility in how models can be
20617        created by permitting callers to create objects bottom-up if desired.  In
20618        situations where objects are not yet attached to parents (e.g.,
20619        SBMLDocument), knowledge of the intented SBML Level and Version help
20620        libSBML determine such things as whether it is valid to assign a
20621        particular value to an attribute.
20622
20623
20624        @par
20625        <hr>
20626        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20627         <pre class='signature'>ListOfCompartmentTypes(long level, long version)</pre>
20628
20629        Creates a new ListOfCompartmentTypes object.
20630
20631        The object is constructed such that it is valid for the given SBML
20632        Level and Version combination.
20633
20634        @param level the SBML Level.
20635
20636        @param version the Version within the SBML Level.
20637
20638        @throws SBMLConstructorException
20639        Thrown if the given @p level and @p version combination are invalid
20640        or if this object is incompatible with the given level and version.
20641
20642        @note Attempting to add an object to an SBMLDocument having a different
20643        combination of SBML Level, Version and XML namespaces than the object
20644        itself will result in an error at the time a caller attempts to make the
20645        addition.  A parent object must have compatible Level, Version and XML
20646        namespaces.  (Strictly speaking, a parent may also have more XML
20647        namespaces than a child, but the reverse is not permitted.)  The
20648        restriction is necessary to ensure that an SBML model has a consistent
20649        overall structure.  This requires callers to manage their objects
20650        carefully, but the benefit is increased flexibility in how models can be
20651        created by permitting callers to create objects bottom-up if desired.  In
20652        situations where objects are not yet attached to parents (e.g.,
20653        SBMLDocument), knowledge of the intented SBML Level and Version help
20654        libSBML determine such things as whether it is valid to assign a
20655        particular value to an attribute.
20656
20657        """
20658        _libsbml.ListOfCompartmentTypes_swiginit(self, _libsbml.new_ListOfCompartmentTypes(*args))
20659
20660    def clone(self):
20661        r"""
20662        clone(ListOfCompartmentTypes self) -> ListOfCompartmentTypes
20663
20664        Creates and returns a deep copy of this ListOfCompartmentTypes object.
20665
20666        @return the (deep) copy of this ListOfCompartmentTypes object.
20667
20668        """
20669        return _libsbml.ListOfCompartmentTypes_clone(self)
20670
20671    def getItemTypeCode(self):
20672        r"""
20673        getItemTypeCode(ListOfCompartmentTypes self) -> int
20674
20675        Returns the libSBML type code for the objects contained in this ListOf
20676        (i.e., CompartmentType objects, if the list is non-empty).
20677
20678        @par
20679        LibSBML attaches an identifying code to every kind of SBML object.  These
20680        are integer constants known as <em>SBML type codes</em>.  The names of all
20681        the codes begin with the characters <code>SBML_</code>.
20682        @if clike The set of possible type codes for core elements is defined in
20683        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
20684        SBML Level&nbsp;3 packages define their own extra enumerations of type
20685        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
20686        package).@endif@if java In the Java language interface for libSBML, the
20687        type codes are defined as static integer constants in the interface class
20688        {@link libsbmlConstants}.  @endif@if python In the Python language
20689        interface for libSBML, the type codes are defined as static integer
20690        constants in the interface class @link libsbml@endlink.@endif@if csharp In
20691        the C# language interface for libSBML, the type codes are defined as
20692        static integer constants in the interface class
20693        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
20694        package plug-ins may use overlapping type codes; to identify the package
20695        to which a given object belongs, call the
20696        <code>@if conly SBase_getPackageName()
20697        @else SBase.getPackageName()
20698        @endif</code>
20699        method on the object.
20700
20701        The exception to this is lists:  all SBML-style list elements have the type
20702        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
20703        are from.
20704
20705        @return the SBML type code for the objects contained in this ListOf
20706        instance: @link libsbml#SBML_COMPARTMENT_TYPE SBML_COMPARTMENT_TYPE@endlink (default).
20707
20708        @see getElementName()
20709        @see getPackageName()
20710
20711        """
20712        return _libsbml.ListOfCompartmentTypes_getItemTypeCode(self)
20713
20714    def getElementName(self):
20715        r"""
20716        getElementName(ListOfCompartmentTypes self) -> string
20717
20718        Returns the XML element name of this object.
20719
20720        For ListOfCompartmentTypes, the XML element name is
20721        @c 'listOfCompartmentTypes'.
20722
20723        @return the name of this element, i.e., @c 'listOfCompartmentTypes'.
20724
20725        """
20726        return _libsbml.ListOfCompartmentTypes_getElementName(self)
20727
20728    def get(self, *args):
20729        r"""
20730        get(ListOfCompartmentTypes self, unsigned int n) -> CompartmentType
20731        get(ListOfCompartmentTypes self, unsigned int n) -> CompartmentType
20732        get(ListOfCompartmentTypes self, string sid) -> CompartmentType
20733        get(ListOfCompartmentTypes self, string sid) -> CompartmentType
20734
20735        This method has multiple variants; they differ in the arguments
20736         they accept.  Each variant is described separately below.
20737
20738        @par
20739        <hr>
20740        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20741         <pre class='signature'>get(long n)</pre>
20742
20743        Get a CompartmentType object from the ListOfCompartmentTypes.
20744
20745        @param n the index number of the CompartmentType object to get.
20746
20747        @return the nth CompartmentType object in this ListOfCompartmentTypes.
20748        If the index @p n is invalid, @c None is returned.
20749
20750        @see size()
20751
20752
20753        @par
20754        <hr>
20755        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20756         <pre class='signature'>get(string sid)</pre>
20757
20758        Get a CompartmentType object from the ListOfCompartmentTypes
20759        based on its identifier.
20760
20761        @param sid a string representing the identifier
20762        of the CompartmentType object to get.
20763
20764        @return CompartmentType object in this ListOfCompartmentTypes
20765        with the given @p sid or @c None if no such
20766        CompartmentType object exists.
20767
20768        @see get()
20769        @see size()
20770
20771        """
20772        return _libsbml.ListOfCompartmentTypes_get(self, *args)
20773
20774    def remove(self, *args):
20775        r"""
20776        remove(ListOfCompartmentTypes self, unsigned int n) -> CompartmentType
20777        remove(ListOfCompartmentTypes self, string sid) -> CompartmentType
20778
20779        This method has multiple variants; they differ in the arguments
20780         they accept.  Each variant is described separately below.
20781
20782        @par
20783        <hr>
20784        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20785         <pre class='signature'>remove(long n)</pre>
20786
20787        Removes the nth item from this ListOfCompartmentTypes items
20788        and returns a pointer to it.
20789
20790        The caller owns the returned item and is responsible for deleting it.
20791
20792        @param n the index of the item to remove.
20793
20794        @see size()
20795
20796
20797        @par
20798        <hr>
20799        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20800         <pre class='signature'>remove(string sid)</pre>
20801
20802        Removes item in this ListOfCompartmentTypes items with the given identifier.
20803
20804        The caller owns the returned item and is responsible for deleting it.
20805        If none of the items in this list have the identifier @p sid, then
20806        @c None is returned.
20807
20808        @param sid the identifier of the item to remove.
20809
20810        @return the item removed.  As mentioned above, the caller owns the
20811        returned item.
20812
20813        """
20814        return _libsbml.ListOfCompartmentTypes_remove(self, *args)
20815    __swig_destroy__ = _libsbml.delete_ListOfCompartmentTypes
20816
20817# Register ListOfCompartmentTypes in _libsbml:
20818_libsbml.ListOfCompartmentTypes_swigregister(ListOfCompartmentTypes)
20819
20820class SpeciesType(SBase):
20821    r"""
20822
20823    @sbmlpackage{core}
20824
20825    @htmlinclude pkg-marker-core.html A <em>species type</em> in SBML Level 2.
20826
20827    The term @em species @em type refers to reacting entities independent of
20828    location.  These include simple ions (e.g., protons, calcium), simple
20829    molecules (e.g., glucose, ATP), large molecules (e.g., RNA,
20830    polysaccharides, and proteins), and others.
20831
20832    SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 provide an explicit
20833    SpeciesType class of object to enable Species objects of the same type
20834    to be related together.  SpeciesType is a conceptual construct; the
20835    existence of SpeciesType objects in a model has no effect on the model's
20836    numerical interpretation.  Except for the requirement for uniqueness of
20837    species/species type combinations located in compartments, simulators
20838    and other numerical analysis software may ignore SpeciesType definitions
20839    and references to them in a model.
20840
20841    There is no mechanism in SBML Level 2 for representing hierarchies of
20842    species types.  One SpeciesType object cannot be the subtype of another
20843    SpeciesType object; SBML provides no means of defining such
20844    relationships.
20845
20846    As with other major structures in SBML, SpeciesType has a mandatory
20847    attribute, 'id', used to give the species type an identifier.  The
20848    identifier must be a text string conforming to the identifer syntax
20849    permitted in SBML.  SpeciesType also has an optional 'name' attribute,
20850    of type @c string.  The 'id' and 'name' must be used according to the
20851    guidelines described in the SBML specification (e.g., Section 3.3 in
20852    the Level&nbsp;2 Version&nbsp;4 specification).
20853
20854    SpeciesType was introduced in SBML Level 2 Version 2.  It is not
20855    available in SBML Level&nbsp;1 nor in Level&nbsp;3.
20856
20857    @see Species
20858    @see ListOfSpeciesTypes
20859    @see CompartmentType
20860    @see ListOfCompartmentTypes
20861
20862    """
20863
20864    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
20865    __repr__ = _swig_repr
20866    __swig_destroy__ = _libsbml.delete_SpeciesType
20867
20868    def __init__(self, *args):
20869        r"""
20870        __init__(SpeciesType self, unsigned int level, unsigned int version) -> SpeciesType
20871        __init__(SpeciesType self, SBMLNamespaces sbmlns) -> SpeciesType
20872        __init__(SpeciesType self, SpeciesType orig) -> SpeciesType
20873
20874        This method has multiple variants; they differ in the arguments
20875         they accept.  Each variant is described separately below.
20876
20877        @par
20878        <hr>
20879        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20880         <pre class='signature'>SpeciesType(SBMLNamespaces sbmlns)</pre>
20881
20882        Creates a new SpeciesType using the given SBMLNamespaces object
20883        @p sbmlns.
20884
20885        @par
20886        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
20887        information.  It is used to communicate the SBML Level, Version, and (in
20888        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
20889        common approach to using libSBML's SBMLNamespaces facilities is to create an
20890        SBMLNamespaces object somewhere in a program once, then hand that object
20891        as needed to object constructors that accept SBMLNamespaces as arguments.
20892
20893        It is worth emphasizing that although this constructor does not take
20894        an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
20895        (identifier) attribute of a SpeciesType object is required to have a value.
20896        Thus, callers are cautioned to assign a value after calling this
20897        constructor.  Setting the identifier can be accomplished using the
20898        method SBase.setId().
20899
20900        @param sbmlns an SBMLNamespaces object.
20901
20902        @throws SBMLConstructorException
20903        Thrown if the given @p sbmlns is inconsistent or incompatible
20904        with this object.
20905
20906        @note Attempting to add an object to an SBMLDocument having a different
20907        combination of SBML Level, Version and XML namespaces than the object
20908        itself will result in an error at the time a caller attempts to make the
20909        addition.  A parent object must have compatible Level, Version and XML
20910        namespaces.  (Strictly speaking, a parent may also have more XML
20911        namespaces than a child, but the reverse is not permitted.)  The
20912        restriction is necessary to ensure that an SBML model has a consistent
20913        overall structure.  This requires callers to manage their objects
20914        carefully, but the benefit is increased flexibility in how models can be
20915        created by permitting callers to create objects bottom-up if desired.  In
20916        situations where objects are not yet attached to parents (e.g.,
20917        SBMLDocument), knowledge of the intented SBML Level and Version help
20918        libSBML determine such things as whether it is valid to assign a
20919        particular value to an attribute.
20920
20921
20922        @par
20923        <hr>
20924        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20925         <pre class='signature'>SpeciesType(long level, long version)</pre>
20926
20927        Creates a new SpeciesType using the given SBML @p level and @p version
20928        values.
20929
20930        @param level a long integer, the SBML Level to assign to this SpeciesType.
20931
20932        @param version a long integer, the SBML Version to assign to this
20933        SpeciesType.
20934
20935        @throws SBMLConstructorException
20936        Thrown if the given @p level and @p version combination are invalid
20937        or if this object is incompatible with the given level and version.
20938
20939        @note Attempting to add an object to an SBMLDocument having a different
20940        combination of SBML Level, Version and XML namespaces than the object
20941        itself will result in an error at the time a caller attempts to make the
20942        addition.  A parent object must have compatible Level, Version and XML
20943        namespaces.  (Strictly speaking, a parent may also have more XML
20944        namespaces than a child, but the reverse is not permitted.)  The
20945        restriction is necessary to ensure that an SBML model has a consistent
20946        overall structure.  This requires callers to manage their objects
20947        carefully, but the benefit is increased flexibility in how models can be
20948        created by permitting callers to create objects bottom-up if desired.  In
20949        situations where objects are not yet attached to parents (e.g.,
20950        SBMLDocument), knowledge of the intented SBML Level and Version help
20951        libSBML determine such things as whether it is valid to assign a
20952        particular value to an attribute.
20953
20954
20955        @par
20956        <hr>
20957        <span class='variant-sig-heading'>Method variant with the following signature</span>:
20958         <pre class='signature'>SpeciesType(SpeciesType orig)</pre>
20959
20960        Copy constructor; creates a copy of this SpeciesType.
20961
20962        @param orig the object to copy.
20963
20964        """
20965        _libsbml.SpeciesType_swiginit(self, _libsbml.new_SpeciesType(*args))
20966
20967    def clone(self):
20968        r"""
20969        clone(SpeciesType self) -> SpeciesType
20970
20971        Creates and returns a deep copy of this SpeciesType object.
20972
20973        @return the (deep) copy of this SpeciesType object.
20974
20975        """
20976        return _libsbml.SpeciesType_clone(self)
20977
20978    def getId(self):
20979        r"""
20980        getId(SpeciesType self) -> string
20981
20982        Returns the value of the 'id' attribute of this SpeciesType.
20983
20984        @note Because of the inconsistent behavior of this function with
20985        respect to assignments and rules, it is now recommended to
20986        use the getIdAttribute() function instead.
20987
20988        @par
20989        The identifier given by an object's 'id' attribute value
20990        is used to identify the object within the SBML model definition.
20991        Other objects can refer to the component using this identifier.  The
20992        data type of 'id' is always <code>SId</code> or a type derived
20993        from that, such as <code>UnitSId</code>, depending on the object in
20994        question.  All data types are defined as follows:
20995        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
20996        letter ::= 'a'..'z','A'..'Z'
20997        digit  ::= '0'..'9'
20998        idChar ::= letter | digit | '_'
20999        SId    ::= ( letter | '_' ) idChar*
21000        </pre>
21001        The characters <code>(</code> and <code>)</code> are used for grouping,
21002        the character <code>*</code> 'zero or more times', and the character
21003        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
21004        is determined by an exact character sequence match; i.e., comparisons must
21005        be performed in a case-sensitive manner.  This applies to all uses of
21006        <code>SId</code>, <code>SIdRef</code>, and derived types.
21007
21008        Users need to be aware of some important API issues that are the result of
21009        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
21010        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
21011        of SBML objects.  To simplify the work of programmers, libSBML's API
21012        provided get, set, check, and unset on the SBase object class itself
21013        instead of on individual subobject classes. This made the
21014        get/set/etc. methods uniformly available on all objects in the libSBML
21015        API.  LibSBML simply returned empty strings or otherwise did not act when
21016        the methods were applied to SBML objects that were not defined by the SBML
21017        specification to have 'id' or 'name' attributes.  Additional complications
21018        arose with the rule and assignment objects: InitialAssignment,
21019        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
21020        the rule object hierarchy was different, and in addition, then as now,
21021        they possess different attributes: 'variable' (for the rules and event
21022        assignments), 'symbol' (for initial assignments), or neither (for
21023        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
21024        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
21025
21026        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
21027        Version&nbsp;2, it became necessary to introduce a new way to interact
21028        with the attributes more consistently in libSBML to avoid breaking
21029        backward compatibility in the behavior of the original 'id' methods.  For
21030        this reason, libSBML provides four functions (getIdAttribute(),
21031        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
21032        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
21033        from SBase, regardless of the object's type.  <strong>These new methods
21034        should be used instead of the older getId()/setId()/etc. methods</strong>
21035        unless the old behavior is somehow necessary.  Regardless of the Level and
21036        Version of the SBML, these functions allow client applications to use more
21037        generalized code in some situations (for instance, when manipulating
21038        objects that are all known to have identifiers).  If the object in
21039        question does not posess an 'id' attribute according to the SBML
21040        specification for the Level and Version in use, libSBML will not allow the
21041        identifier to be set, nor will it read or write 'id' attributes for those
21042        objects.
21043
21044        @return the id of this SpeciesType.
21045
21046        @see getIdAttribute()
21047        @see setIdAttribute()
21048        @see isSetIdAttribute()
21049        @see unsetIdAttribute()
21050
21051        """
21052        return _libsbml.SpeciesType_getId(self)
21053
21054    def getName(self):
21055        r"""
21056        getName(SpeciesType self) -> string
21057
21058        Returns the value of the 'name' attribute of this SpeciesType object.
21059
21060        @par
21061        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
21062        moved to SBase directly, instead of being defined individually for many
21063        (but not all) objects.  LibSBML has for a long time provided functions
21064        defined on SBase itself to get, set, and unset those attributes, which
21065        would fail or otherwise return empty strings if executed on any object
21066        for which those attributes were not defined.  Now that all SBase objects
21067        define those attributes, those functions now succeed for any object with
21068        the appropriate level and version.
21069
21070        The 'name' attribute is
21071        optional and is not intended to be used for cross-referencing purposes
21072        within a model.  Its purpose instead is to provide a human-readable
21073        label for the component.  The data type of 'name' is the type
21074        <code>string</code> defined in XML Schema.  SBML imposes no
21075        restrictions as to the content of 'name' attributes beyond those
21076        restrictions defined by the <code>string</code> type in XML Schema.
21077
21078        The recommended practice for handling 'name' is as follows.  If a
21079        software tool has the capability for displaying the content of 'name'
21080        attributes, it should display this content to the user as a
21081        component's label instead of the component's 'id'.  If the user
21082        interface does not have this capability (e.g., because it cannot
21083        display or use special characters in symbol names), or if the 'name'
21084        attribute is missing on a given component, then the user interface
21085        should display the value of the 'id' attribute instead.  (Script
21086        language interpreters are especially likely to display 'id' instead of
21087        'name'.)
21088
21089        As a consequence of the above, authors of systems that automatically
21090        generate the values of 'id' attributes should be aware some systems
21091        may display the 'id''s to the user.  Authors therefore may wish to
21092        take some care to have their software create 'id' values that are: (a)
21093        reasonably easy for humans to type and read; and (b) likely to be
21094        meaningful, for example by making the 'id' attribute be an abbreviated
21095        form of the name attribute value.
21096
21097        An additional point worth mentioning is although there are
21098        restrictions on the uniqueness of 'id' values, there are no
21099        restrictions on the uniqueness of 'name' values in a model.  This
21100        allows software applications leeway in assigning component identifiers.
21101
21102        Regardless of the level and version of the SBML, these functions allow
21103        client applications to use more generalized code in some situations
21104        (for instance, when manipulating objects that are all known to have
21105        names).  If the object in question does not posess a 'name' attribute
21106        according to the SBML specification for the Level and Version in use,
21107        libSBML will not allow the name to be set, nor will it read or
21108        write 'name' attributes for those objects.
21109
21110        @return the name of this SBML object, or the empty string if not set or unsettable.
21111
21112        @see getIdAttribute()
21113        @see isSetName()
21114        @see setName()
21115        @see unsetName()
21116
21117        """
21118        return _libsbml.SpeciesType_getName(self)
21119
21120    def isSetId(self):
21121        r"""
21122        isSetId(SpeciesType self) -> bool
21123
21124        Predicate returning @c True if this
21125        SpeciesType's 'id' attribute is set.
21126
21127        @par
21128        The identifier given by an object's 'id' attribute value
21129        is used to identify the object within the SBML model definition.
21130        Other objects can refer to the component using this identifier.  The
21131        data type of 'id' is always <code>SId</code> or a type derived
21132        from that, such as <code>UnitSId</code>, depending on the object in
21133        question.  All data types are defined as follows:
21134        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
21135        letter ::= 'a'..'z','A'..'Z'
21136        digit  ::= '0'..'9'
21137        idChar ::= letter | digit | '_'
21138        SId    ::= ( letter | '_' ) idChar*
21139        </pre>
21140        The characters <code>(</code> and <code>)</code> are used for grouping,
21141        the character <code>*</code> 'zero or more times', and the character
21142        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
21143        is determined by an exact character sequence match; i.e., comparisons must
21144        be performed in a case-sensitive manner.  This applies to all uses of
21145        <code>SId</code>, <code>SIdRef</code>, and derived types.
21146
21147        Users need to be aware of some important API issues that are the result of
21148        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
21149        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
21150        of SBML objects.  To simplify the work of programmers, libSBML's API
21151        provided get, set, check, and unset on the SBase object class itself
21152        instead of on individual subobject classes. This made the
21153        get/set/etc. methods uniformly available on all objects in the libSBML
21154        API.  LibSBML simply returned empty strings or otherwise did not act when
21155        the methods were applied to SBML objects that were not defined by the SBML
21156        specification to have 'id' or 'name' attributes.  Additional complications
21157        arose with the rule and assignment objects: InitialAssignment,
21158        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
21159        the rule object hierarchy was different, and in addition, then as now,
21160        they possess different attributes: 'variable' (for the rules and event
21161        assignments), 'symbol' (for initial assignments), or neither (for
21162        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
21163        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
21164
21165        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
21166        Version&nbsp;2, it became necessary to introduce a new way to interact
21167        with the attributes more consistently in libSBML to avoid breaking
21168        backward compatibility in the behavior of the original 'id' methods.  For
21169        this reason, libSBML provides four functions (getIdAttribute(),
21170        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
21171        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
21172        from SBase, regardless of the object's type.  <strong>These new methods
21173        should be used instead of the older getId()/setId()/etc. methods</strong>
21174        unless the old behavior is somehow necessary.  Regardless of the Level and
21175        Version of the SBML, these functions allow client applications to use more
21176        generalized code in some situations (for instance, when manipulating
21177        objects that are all known to have identifiers).  If the object in
21178        question does not posess an 'id' attribute according to the SBML
21179        specification for the Level and Version in use, libSBML will not allow the
21180        identifier to be set, nor will it read or write 'id' attributes for those
21181        objects.
21182
21183        @return @c True if the 'id' attribute of this SBML object is
21184        set, @c False otherwise.
21185
21186        @note Because of the inconsistent behavior of this function with
21187        respect to assignments and rules, it is recommended that callers
21188        use isSetIdAttribute() instead.
21189
21190        @see getIdAttribute()
21191        @see setIdAttribute()
21192        @see unsetIdAttribute()
21193        @see isSetIdAttribute()
21194
21195        """
21196        return _libsbml.SpeciesType_isSetId(self)
21197
21198    def isSetName(self):
21199        r"""
21200        isSetName(SpeciesType self) -> bool
21201
21202        Predicate returning @c True if this
21203        SpeciesType's 'name' attribute is set.
21204
21205        @par
21206        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
21207        moved to SBase directly, instead of being defined individually for many
21208        (but not all) objects.  LibSBML has for a long time provided functions
21209        defined on SBase itself to get, set, and unset those attributes, which
21210        would fail or otherwise return empty strings if executed on any object
21211        for which those attributes were not defined.  Now that all SBase objects
21212        define those attributes, those functions now succeed for any object with
21213        the appropriate level and version.
21214
21215        The 'name' attribute is
21216        optional and is not intended to be used for cross-referencing purposes
21217        within a model.  Its purpose instead is to provide a human-readable
21218        label for the component.  The data type of 'name' is the type
21219        <code>string</code> defined in XML Schema.  SBML imposes no
21220        restrictions as to the content of 'name' attributes beyond those
21221        restrictions defined by the <code>string</code> type in XML Schema.
21222
21223        The recommended practice for handling 'name' is as follows.  If a
21224        software tool has the capability for displaying the content of 'name'
21225        attributes, it should display this content to the user as a
21226        component's label instead of the component's 'id'.  If the user
21227        interface does not have this capability (e.g., because it cannot
21228        display or use special characters in symbol names), or if the 'name'
21229        attribute is missing on a given component, then the user interface
21230        should display the value of the 'id' attribute instead.  (Script
21231        language interpreters are especially likely to display 'id' instead of
21232        'name'.)
21233
21234        As a consequence of the above, authors of systems that automatically
21235        generate the values of 'id' attributes should be aware some systems
21236        may display the 'id''s to the user.  Authors therefore may wish to
21237        take some care to have their software create 'id' values that are: (a)
21238        reasonably easy for humans to type and read; and (b) likely to be
21239        meaningful, for example by making the 'id' attribute be an abbreviated
21240        form of the name attribute value.
21241
21242        An additional point worth mentioning is although there are
21243        restrictions on the uniqueness of 'id' values, there are no
21244        restrictions on the uniqueness of 'name' values in a model.  This
21245        allows software applications leeway in assigning component identifiers.
21246
21247        Regardless of the level and version of the SBML, these functions allow
21248        client applications to use more generalized code in some situations
21249        (for instance, when manipulating objects that are all known to have
21250        names).  If the object in question does not posess a 'name' attribute
21251        according to the SBML specification for the Level and Version in use,
21252        libSBML will not allow the name to be set, nor will it read or
21253        write 'name' attributes for those objects.
21254
21255        @return @c True if the 'name' attribute of this SBML object is
21256        set, @c False otherwise.
21257
21258        @see getName()
21259        @see setName()
21260        @see unsetName()
21261
21262        """
21263        return _libsbml.SpeciesType_isSetName(self)
21264
21265    def setId(self, sid):
21266        r"""
21267        setId(SpeciesType self, string sid) -> int
21268
21269        Sets the value of the 'id' attribute of this SpeciesType.
21270
21271        @par
21272        The string @p sid is copied.
21273
21274        @par
21275        The identifier given by an object's 'id' attribute value
21276        is used to identify the object within the SBML model definition.
21277        Other objects can refer to the component using this identifier.  The
21278        data type of 'id' is always <code>SId</code> or a type derived
21279        from that, such as <code>UnitSId</code>, depending on the object in
21280        question.  All data types are defined as follows:
21281        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
21282        letter ::= 'a'..'z','A'..'Z'
21283        digit  ::= '0'..'9'
21284        idChar ::= letter | digit | '_'
21285        SId    ::= ( letter | '_' ) idChar*
21286        </pre>
21287        The characters <code>(</code> and <code>)</code> are used for grouping,
21288        the character <code>*</code> 'zero or more times', and the character
21289        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
21290        is determined by an exact character sequence match; i.e., comparisons must
21291        be performed in a case-sensitive manner.  This applies to all uses of
21292        <code>SId</code>, <code>SIdRef</code>, and derived types.
21293
21294        Users need to be aware of some important API issues that are the result of
21295        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
21296        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
21297        of SBML objects.  To simplify the work of programmers, libSBML's API
21298        provided get, set, check, and unset on the SBase object class itself
21299        instead of on individual subobject classes. This made the
21300        get/set/etc. methods uniformly available on all objects in the libSBML
21301        API.  LibSBML simply returned empty strings or otherwise did not act when
21302        the methods were applied to SBML objects that were not defined by the SBML
21303        specification to have 'id' or 'name' attributes.  Additional complications
21304        arose with the rule and assignment objects: InitialAssignment,
21305        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
21306        the rule object hierarchy was different, and in addition, then as now,
21307        they possess different attributes: 'variable' (for the rules and event
21308        assignments), 'symbol' (for initial assignments), or neither (for
21309        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
21310        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
21311
21312        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
21313        Version&nbsp;2, it became necessary to introduce a new way to interact
21314        with the attributes more consistently in libSBML to avoid breaking
21315        backward compatibility in the behavior of the original 'id' methods.  For
21316        this reason, libSBML provides four functions (getIdAttribute(),
21317        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
21318        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
21319        from SBase, regardless of the object's type.  <strong>These new methods
21320        should be used instead of the older getId()/setId()/etc. methods</strong>
21321        unless the old behavior is somehow necessary.  Regardless of the Level and
21322        Version of the SBML, these functions allow client applications to use more
21323        generalized code in some situations (for instance, when manipulating
21324        objects that are all known to have identifiers).  If the object in
21325        question does not posess an 'id' attribute according to the SBML
21326        specification for the Level and Version in use, libSBML will not allow the
21327        identifier to be set, nor will it read or write 'id' attributes for those
21328        objects.
21329
21330        @param sid the string to use as the identifier of this object.
21331
21332        @return integer value indicating success/failure of the
21333        function.  @if clike The value is drawn from the
21334        enumeration #OperationReturnValues_t. @endif@~ The possible values
21335        returned by this function are:
21336        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
21337        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
21338        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
21339
21340        @see getIdAttribute()
21341        @see setIdAttribute()
21342        @see isSetIdAttribute()
21343        @see unsetIdAttribute()
21344
21345        """
21346        return _libsbml.SpeciesType_setId(self, sid)
21347
21348    def setName(self, name):
21349        r"""
21350        setName(SpeciesType self, string name) -> int
21351
21352        Sets the value of the 'name' attribute of this SpeciesType.
21353
21354        @par
21355
21356        The string in @p name is copied.
21357
21358        @param name the new name for the SBML object.
21359
21360        @return integer value indicating success/failure of the
21361        function.  @if clike The value is drawn from the
21362        enumeration #OperationReturnValues_t. @endif@~ The possible values
21363        returned by this function are:
21364        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
21365        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
21366
21367        """
21368        return _libsbml.SpeciesType_setName(self, name)
21369
21370    def unsetName(self):
21371        r"""
21372        unsetName(SpeciesType self) -> int
21373
21374        Unsets the value of the 'name' attribute of this SpeciesType.
21375
21376        @par
21377        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
21378        moved to SBase directly, instead of being defined individually for many
21379        (but not all) objects.  LibSBML has for a long time provided functions
21380        defined on SBase itself to get, set, and unset those attributes, which
21381        would fail or otherwise return empty strings if executed on any object
21382        for which those attributes were not defined.  Now that all SBase objects
21383        define those attributes, those functions now succeed for any object with
21384        the appropriate level and version.
21385
21386        The 'name' attribute is
21387        optional and is not intended to be used for cross-referencing purposes
21388        within a model.  Its purpose instead is to provide a human-readable
21389        label for the component.  The data type of 'name' is the type
21390        <code>string</code> defined in XML Schema.  SBML imposes no
21391        restrictions as to the content of 'name' attributes beyond those
21392        restrictions defined by the <code>string</code> type in XML Schema.
21393
21394        The recommended practice for handling 'name' is as follows.  If a
21395        software tool has the capability for displaying the content of 'name'
21396        attributes, it should display this content to the user as a
21397        component's label instead of the component's 'id'.  If the user
21398        interface does not have this capability (e.g., because it cannot
21399        display or use special characters in symbol names), or if the 'name'
21400        attribute is missing on a given component, then the user interface
21401        should display the value of the 'id' attribute instead.  (Script
21402        language interpreters are especially likely to display 'id' instead of
21403        'name'.)
21404
21405        As a consequence of the above, authors of systems that automatically
21406        generate the values of 'id' attributes should be aware some systems
21407        may display the 'id''s to the user.  Authors therefore may wish to
21408        take some care to have their software create 'id' values that are: (a)
21409        reasonably easy for humans to type and read; and (b) likely to be
21410        meaningful, for example by making the 'id' attribute be an abbreviated
21411        form of the name attribute value.
21412
21413        An additional point worth mentioning is although there are
21414        restrictions on the uniqueness of 'id' values, there are no
21415        restrictions on the uniqueness of 'name' values in a model.  This
21416        allows software applications leeway in assigning component identifiers.
21417
21418        Regardless of the level and version of the SBML, these functions allow
21419        client applications to use more generalized code in some situations
21420        (for instance, when manipulating objects that are all known to have
21421        names).  If the object in question does not posess a 'name' attribute
21422        according to the SBML specification for the Level and Version in use,
21423        libSBML will not allow the name to be set, nor will it read or
21424        write 'name' attributes for those objects.
21425
21426        @return integer value indicating success/failure of the
21427        function.  @if clike The value is drawn from the
21428        enumeration #OperationReturnValues_t. @endif@~ The possible values
21429        returned by this function are:
21430        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
21431        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
21432
21433        @see getName()
21434        @see setName()
21435        @see isSetName()
21436
21437        """
21438        return _libsbml.SpeciesType_unsetName(self)
21439
21440    def getTypeCode(self):
21441        r"""
21442        getTypeCode(SpeciesType self) -> int
21443
21444        Returns the libSBML type code for this SBML object.
21445
21446        @par
21447        LibSBML attaches an identifying code to every kind of SBML object.  These
21448        are integer constants known as <em>SBML type codes</em>.  The names of all
21449        the codes begin with the characters <code>SBML_</code>.
21450        @if clike The set of possible type codes for core elements is defined in
21451        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
21452        SBML Level&nbsp;3 packages define their own extra enumerations of type
21453        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
21454        package).@endif@if java In the Java language interface for libSBML, the
21455        type codes are defined as static integer constants in the interface class
21456        {@link libsbmlConstants}.  @endif@if python In the Python language
21457        interface for libSBML, the type codes are defined as static integer
21458        constants in the interface class @link libsbml@endlink.@endif@if csharp In
21459        the C# language interface for libSBML, the type codes are defined as
21460        static integer constants in the interface class
21461        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
21462        package plug-ins may use overlapping type codes; to identify the package
21463        to which a given object belongs, call the
21464        <code>@if conly SBase_getPackageName()
21465        @else SBase.getPackageName()
21466        @endif</code>
21467        method on the object.
21468
21469        The exception to this is lists:  all SBML-style list elements have the type
21470        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
21471        are from.
21472
21473        @return the SBML type code for this object:
21474        @link libsbml#SBML_SPECIES_TYPE SBML_SPECIES_TYPE@endlink (default).
21475
21476        @warning <span class='warning'>The specific integer values of the possible
21477        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
21478        packages,  To fully identify the correct code, <strong>it is necessary to
21479        invoke both getPackageName() and getTypeCode()</strong> (or
21480        ListOf.getItemTypeCode()).</span>
21481
21482        @see getElementName()
21483        @see getPackageName()
21484
21485        """
21486        return _libsbml.SpeciesType_getTypeCode(self)
21487
21488    def getElementName(self):
21489        r"""
21490        getElementName(SpeciesType self) -> string
21491
21492        Returns the XML element name of this object, which for
21493        SpeciesType, is always @c 'compartmentType'.
21494
21495        @return the name of this element, i.e., @c 'compartmentType'.
21496
21497        """
21498        return _libsbml.SpeciesType_getElementName(self)
21499
21500    def hasRequiredAttributes(self):
21501        r"""
21502        hasRequiredAttributes(SpeciesType self) -> bool
21503
21504        Predicate returning @c True if
21505        all the required attributes for this SpeciesType object
21506        have been set.
21507
21508        The required attributes for a SpeciesType object are:
21509        @li 'id'
21510
21511        @return @c True if the required attributes have been set, @c False
21512        otherwise.
21513
21514        """
21515        return _libsbml.SpeciesType_hasRequiredAttributes(self)
21516
21517# Register SpeciesType in _libsbml:
21518_libsbml.SpeciesType_swigregister(SpeciesType)
21519
21520class ListOfSpeciesTypes(ListOf):
21521    r"""
21522
21523    @sbmlpackage{core}
21524
21525    @htmlinclude pkg-marker-core.html A list of SpeciesType objects.
21526
21527    @par
21528    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
21529    are merely containers used for organizing the main components of an SBML
21530    model.  In libSBML's implementation, ListOf___
21531    @if conly data structures @else classes@endif@~ are derived from the
21532    intermediate utility @if conly structure @else class@endif@~ ListOf, which
21533    is not defined by the SBML specifications but serves as a useful
21534    programmatic construct.  ListOf is itself is in turn derived from SBase,
21535    which provides all of the various ListOf___
21536    @if conly data structures @else classes@endif@~ with common features
21537    defined by the SBML specification, such as 'metaid' attributes and
21538    annotations.
21539
21540    The relationship between the lists and the rest of an SBML model is
21541    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
21542
21543    @htmlinclude listof-illustration.html
21544
21545    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
21546    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
21547    Version&nbsp;2 allows
21548    containers to contain zero or more of the relevant object, instead of
21549    requiring at least one.  As such, libsbml will write out an
21550    otherwise-empty ListOf___ element that has any optional attribute set
21551    (such as 'id' or 'metaid'), that has an optional child (such
21552    as a 'notes' or 'annotation'), or that has attributes or children set
21553    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
21554    any other children.
21555
21556    Readers may wonder about the motivations for using the ListOf___
21557    containers in SBML.  A simpler approach in XML might be to place the
21558    components all directly at the top level of the model definition.  The
21559    choice made in SBML is to group them within XML elements named after
21560    %ListOf<em>Classname</em>, in part because it helps organize the
21561    components.  More importantly, the fact that the container classes are
21562    derived from SBase means that software tools can add information @em about
21563    the lists themselves into each list container's 'annotation'.
21564
21565    @see ListOfFunctionDefinitions
21566    @see ListOfUnitDefinitions
21567    @see ListOfCompartmentTypes
21568    @see ListOfSpeciesTypes
21569    @see ListOfCompartments
21570    @see ListOfSpecies
21571    @see ListOfParameters
21572    @see ListOfInitialAssignments
21573    @see ListOfRules
21574    @see ListOfConstraints
21575    @see ListOfReactions
21576    @see ListOfEvents
21577
21578    @if conly
21579    @note In the C API for libSBML, functions that in other language APIs
21580    would be inherited by the various ListOf___ structures not shown in the
21581    pages for the individual ListOf___'s.  Instead, the functions are defined
21582    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
21583    the many common functions available for manipulating ListOf___
21584    structures</strong>.  The documentation for the individual ListOf___
21585    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
21586    all of the functionality available. @endif@~
21587
21588    """
21589
21590    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
21591    __repr__ = _swig_repr
21592
21593    def __init__(self, *args):
21594        r"""
21595        __init__(ListOfSpeciesTypes self, unsigned int level, unsigned int version) -> ListOfSpeciesTypes
21596        __init__(ListOfSpeciesTypes self, SBMLNamespaces sbmlns) -> ListOfSpeciesTypes
21597
21598        This method has multiple variants; they differ in the arguments
21599         they accept.  Each variant is described separately below.
21600
21601        @par
21602        <hr>
21603        <span class='variant-sig-heading'>Method variant with the following signature</span>:
21604         <pre class='signature'>ListOfSpeciesTypes(SBMLNamespaces sbmlns)</pre>
21605
21606        Creates a new ListOfSpeciesTypes object.
21607
21608        The object is constructed such that it is valid for the SBML Level and
21609        Version combination determined by the SBMLNamespaces object in @p
21610        sbmlns.
21611
21612        @param sbmlns an SBMLNamespaces object that is used to determine the
21613        characteristics of the ListOfSpeciesTypes object to be created.
21614
21615        @throws SBMLConstructorException
21616        Thrown if the given @p sbmlns is inconsistent or incompatible
21617        with this object.
21618
21619        @note Attempting to add an object to an SBMLDocument having a different
21620        combination of SBML Level, Version and XML namespaces than the object
21621        itself will result in an error at the time a caller attempts to make the
21622        addition.  A parent object must have compatible Level, Version and XML
21623        namespaces.  (Strictly speaking, a parent may also have more XML
21624        namespaces than a child, but the reverse is not permitted.)  The
21625        restriction is necessary to ensure that an SBML model has a consistent
21626        overall structure.  This requires callers to manage their objects
21627        carefully, but the benefit is increased flexibility in how models can be
21628        created by permitting callers to create objects bottom-up if desired.  In
21629        situations where objects are not yet attached to parents (e.g.,
21630        SBMLDocument), knowledge of the intented SBML Level and Version help
21631        libSBML determine such things as whether it is valid to assign a
21632        particular value to an attribute.
21633
21634
21635        @par
21636        <hr>
21637        <span class='variant-sig-heading'>Method variant with the following signature</span>:
21638         <pre class='signature'>ListOfSpeciesTypes(long level, long version)</pre>
21639
21640        Creates a new ListOfSpeciesTypes object.
21641
21642        The object is constructed such that it is valid for the given SBML
21643        Level and Version combination.
21644
21645        @param level the SBML Level.
21646
21647        @param version the Version within the SBML Level.
21648
21649        @throws SBMLConstructorException
21650        Thrown if the given @p level and @p version combination are invalid
21651        or if this object is incompatible with the given level and version.
21652
21653        @note Attempting to add an object to an SBMLDocument having a different
21654        combination of SBML Level, Version and XML namespaces than the object
21655        itself will result in an error at the time a caller attempts to make the
21656        addition.  A parent object must have compatible Level, Version and XML
21657        namespaces.  (Strictly speaking, a parent may also have more XML
21658        namespaces than a child, but the reverse is not permitted.)  The
21659        restriction is necessary to ensure that an SBML model has a consistent
21660        overall structure.  This requires callers to manage their objects
21661        carefully, but the benefit is increased flexibility in how models can be
21662        created by permitting callers to create objects bottom-up if desired.  In
21663        situations where objects are not yet attached to parents (e.g.,
21664        SBMLDocument), knowledge of the intented SBML Level and Version help
21665        libSBML determine such things as whether it is valid to assign a
21666        particular value to an attribute.
21667
21668        """
21669        _libsbml.ListOfSpeciesTypes_swiginit(self, _libsbml.new_ListOfSpeciesTypes(*args))
21670
21671    def clone(self):
21672        r"""
21673        clone(ListOfSpeciesTypes self) -> ListOfSpeciesTypes
21674
21675        Creates and returns a deep copy of this ListOfSpeciesTypes object.
21676
21677        @return the (deep) copy of this ListOfSpeciesTypes object.
21678
21679        """
21680        return _libsbml.ListOfSpeciesTypes_clone(self)
21681
21682    def getItemTypeCode(self):
21683        r"""
21684        getItemTypeCode(ListOfSpeciesTypes self) -> int
21685
21686        Returns the libSBML type code for the objects contained in this ListOf
21687        (i.e., SpeciesType objects, if the list is non-empty).
21688
21689        @par
21690        LibSBML attaches an identifying code to every kind of SBML object.  These
21691        are integer constants known as <em>SBML type codes</em>.  The names of all
21692        the codes begin with the characters <code>SBML_</code>.
21693        @if clike The set of possible type codes for core elements is defined in
21694        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
21695        SBML Level&nbsp;3 packages define their own extra enumerations of type
21696        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
21697        package).@endif@if java In the Java language interface for libSBML, the
21698        type codes are defined as static integer constants in the interface class
21699        {@link libsbmlConstants}.  @endif@if python In the Python language
21700        interface for libSBML, the type codes are defined as static integer
21701        constants in the interface class @link libsbml@endlink.@endif@if csharp In
21702        the C# language interface for libSBML, the type codes are defined as
21703        static integer constants in the interface class
21704        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
21705        package plug-ins may use overlapping type codes; to identify the package
21706        to which a given object belongs, call the
21707        <code>@if conly SBase_getPackageName()
21708        @else SBase.getPackageName()
21709        @endif</code>
21710        method on the object.
21711
21712        The exception to this is lists:  all SBML-style list elements have the type
21713        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
21714        are from.
21715
21716        @return the SBML type code for objects contained in this list:
21717        @link libsbml#SBML_SPECIES_TYPE SBML_SPECIES_TYPE@endlink (default).
21718
21719        @see getElementName()
21720        @see getPackageName()
21721
21722        """
21723        return _libsbml.ListOfSpeciesTypes_getItemTypeCode(self)
21724
21725    def getElementName(self):
21726        r"""
21727        getElementName(ListOfSpeciesTypes self) -> string
21728
21729        Returns the XML element name of this object.
21730
21731        For ListOfSpeciesTypes, the XML element name is
21732        @c 'listOfSpeciesTypes'.
21733
21734        @return the name of this element, i.e., @c 'listOfSpeciesTypes'.
21735
21736        """
21737        return _libsbml.ListOfSpeciesTypes_getElementName(self)
21738
21739    def get(self, *args):
21740        r"""
21741        get(ListOfSpeciesTypes self, unsigned int n) -> SpeciesType
21742        get(ListOfSpeciesTypes self, unsigned int n) -> SpeciesType
21743        get(ListOfSpeciesTypes self, string sid) -> SpeciesType
21744        get(ListOfSpeciesTypes self, string sid) -> SpeciesType
21745
21746        This method has multiple variants; they differ in the arguments
21747         they accept.  Each variant is described separately below.
21748
21749        @par
21750        <hr>
21751        <span class='variant-sig-heading'>Method variant with the following signature</span>:
21752         <pre class='signature'>get(long n)</pre>
21753
21754        Get a SpeciesType from the ListOfSpeciesTypes.
21755
21756        @param n the index number of the SpeciesType to get.
21757
21758        @return the nth SpeciesType in this ListOfSpeciesTypes.
21759        If the index @p n is invalid, @c None is returned.
21760
21761        @see size()
21762
21763
21764        @par
21765        <hr>
21766        <span class='variant-sig-heading'>Method variant with the following signature</span>:
21767         <pre class='signature'>get(string sid)</pre>
21768
21769        Get a SpeciesType from the ListOfSpeciesTypes
21770        based on its identifier.
21771
21772        @param sid a string representing the identifier
21773        of the SpeciesType to get.
21774
21775        @return SpeciesType in this ListOfSpeciesTypes
21776        with the given @p sid or @c None if no such
21777        SpeciesType exists.
21778
21779        @see get()
21780        @see size()
21781
21782        """
21783        return _libsbml.ListOfSpeciesTypes_get(self, *args)
21784
21785    def remove(self, *args):
21786        r"""
21787        remove(ListOfSpeciesTypes self, unsigned int n) -> SpeciesType
21788        remove(ListOfSpeciesTypes self, string sid) -> SpeciesType
21789
21790        This method has multiple variants; they differ in the arguments
21791         they accept.  Each variant is described separately below.
21792
21793        @par
21794        <hr>
21795        <span class='variant-sig-heading'>Method variant with the following signature</span>:
21796         <pre class='signature'>remove(long n)</pre>
21797
21798        Removes the nth item from this ListOfSpeciesTypes items and returns a pointer to
21799        it.
21800
21801        The caller owns the returned item and is responsible for deleting it.
21802
21803        @param n the index of the item to remove.
21804
21805        @see size()
21806
21807
21808        @par
21809        <hr>
21810        <span class='variant-sig-heading'>Method variant with the following signature</span>:
21811         <pre class='signature'>remove(string sid)</pre>
21812
21813        Removes item in this ListOfSpeciesTypes items with the given identifier.
21814
21815        The caller owns the returned item and is responsible for deleting it.
21816        If none of the items in this list have the identifier @p sid, then
21817        @c None is returned.
21818
21819        @param sid the identifier of the item to remove.
21820
21821        @return the item removed.  As mentioned above, the caller owns the
21822        returned item.
21823
21824        """
21825        return _libsbml.ListOfSpeciesTypes_remove(self, *args)
21826    __swig_destroy__ = _libsbml.delete_ListOfSpeciesTypes
21827
21828# Register ListOfSpeciesTypes in _libsbml:
21829_libsbml.ListOfSpeciesTypes_swigregister(ListOfSpeciesTypes)
21830
21831class Compartment(SBase):
21832    r"""
21833
21834    @sbmlpackage{core}
21835
21836    @htmlinclude pkg-marker-core.html An SBML compartment, where species are located.
21837
21838    A compartment in SBML represents a bounded space in which species are
21839    located.  Compartments do not necessarily have to correspond to actual
21840    structures inside or outside of a biological cell.
21841
21842    It is important to note that although compartments are optional in the
21843    overall definition of Model, every species in an SBML model must be
21844    located in a compartment.  This in turn means that if a model defines
21845    any species, the model must also define at least one compartment.  The
21846    reason is simply that species represent physical things, and therefore
21847    must exist @em somewhere.  Compartments represent the @em somewhere.
21848
21849    Compartment has one required attribute, 'id', to give the compartment a
21850    unique identifier by which other parts of an SBML model definition can
21851    refer to it.  A compartment can also have an optional 'name' attribute
21852    of type @c string.  Identifiers and names must be used according to the
21853    guidelines described in the SBML specifications.
21854
21855    Compartment also has an optional attribute 'spatialDimensions' that is
21856    used to indicate the number of spatial dimensions possessed by the
21857    compartment.  Most modeling scenarios involve compartments with integer
21858    values of 'spatialDimensions' of @c 3 (i.e., a three-dimensional
21859    compartment, which is to say, a volume), or 2 (a two-dimensional
21860    compartment, a surface), or @c 1 (a one-dimensional compartment, a
21861    line).  In SBML Level&nbsp;3, the type of this attribute is @c float,
21862    there are no restrictions on the permitted values of the
21863    'spatialDimensions' attribute, and there are no default values.  In SBML
21864    Level&nbsp;2, the value must be a positive @c integer, and the default
21865    value is @c 3; the permissible values in SBML Level&nbsp;2 are @c 3,
21866    @c 2, @c 1, and @c 0 (for a point).
21867
21868    Another optional attribute on Compartment is 'size', representing the @em
21869    initial total size of that compartment in the model.  The 'size' attribute
21870    must be a floating-point value and may represent a volume (if the
21871    compartment is a three-dimensional one), or an area (if the compartment is
21872    two-dimensional), or a length (if the compartment is one-dimensional).
21873    There is no default value of compartment size in SBML Level&nbsp;2 or
21874    Level&nbsp;3.  In particular, a missing 'size' value <em>does not imply
21875    that the compartment size is 1</em>.  (This is unlike the definition of
21876    compartment 'volume' in SBML Level&nbsp;1.)  When the compartment's
21877    'spatialDimensions' attribute does not have a value of @c 0, a missing
21878    value of 'size' for a given compartment signifies that the value either is
21879    unknown, or to be obtained from an external source, or determined by an
21880    InitialAssignment, AssignmentRule, AlgebraicRule or RateRule
21881    @if conly structure @else object@endif@~ elsewhere in the model.  In SBML
21882    Level&nbsp;2, there are additional special requirements on the values of
21883    'size'; we discuss them in a <a href='#comp-l2'>separate section
21884    below</a>.
21885
21886    The units associated with a compartment's 'size' attribute value may be
21887    set using the optional attribute 'units'.  The rules for setting and
21888    using compartment size units differ between SBML Level&nbsp;2 and
21889    Level&nbsp;3, and are discussed separately below.
21890
21891    Finally, the Compartment attribute named 'constant' is used to
21892    indicate whether the compartment's size stays constant after simulation
21893    begins.  A value of @c True indicates the compartment's 'size' cannot be
21894    changed by any other construct except InitialAssignment; a value of
21895    @c False indicates the compartment's 'size' can be changed by other
21896    constructs in SBML.  In SBML Level&nbsp;2, there is an additional
21897    explicit restriction that if 'spatialDimensions'=@c '0', the value
21898    cannot be changed by InitialAssignment either.  Further, in
21899    Level&nbsp;2, 'constant' is optional, and has a default value of @c True.  In SBML
21900    Level&nbsp;3, there is no default value for the 'constant' attribute,
21901    and it is required.
21902
21903
21904    @section comp-l2 Additional considerations in SBML Level&nbsp;2
21905
21906    In SBML Level&nbsp;2, the default units of compartment size, and the kinds
21907    of units allowed as values of the attribute 'units', interact with the
21908    number of spatial dimensions of the compartment.  The value of the 'units'
21909    attribute of a Compartment @if conly structure @else object@endif@~ must
21910    be one of the base units (see Unit), or the predefined unit identifiers
21911    @c volume, @c area, @c length or @c dimensionless, or a new unit defined by a
21912    UnitDefinition @if conly structure @else object@endif@~ in the enclosing
21913    Model, subject to the restrictions detailed in the following table:
21914
21915    <table border='0' class='centered text-table width80 normal-font alt-row-colors'
21916    style='padding-bottom: 0.5em'>
21917    <caption class='top-caption'>Restrictions on values permitted for
21918    compartment <code>size</code> and <code>units</code> attributes.</caption>
21919    <tr>
21920    <th align='left' valign='bottom'>
21921    Value of<br><code>spatialDimensions</code>
21922    </th>
21923    <th align='left' valign='bottom'>
21924    <code>size</code><br>allowed?
21925    </th>
21926    <th align='left' valign='bottom'>
21927    <code>units</code><br>allowed?
21928    </th>
21929    <th align='left' valign='bottom'>
21930    Allowable kinds of units
21931    </th>
21932    <th align='left' valign='bottom'>
21933    Default value of attribute <code>units</code>
21934    </th>
21935    </tr>
21936    <tr>
21937    <td><code>3</code></td>
21938    <td>yes</td>
21939    <td>yes</td>
21940    <td>units of volume, or <code>dimensionless</code></td>
21941    <td><code>volume</code></td>
21942    </tr>
21943    <tr>
21944    <td><code>2</code></td>
21945    <td>yes</td>
21946    <td>yes</td>
21947    <td>units of area, or <code>dimensionless</code></td>
21948    <td><code>area</code></td>
21949    </tr>
21950    <tr>
21951    <td><code>1</code></td>
21952    <td>yes</td>
21953    <td>yes</td>
21954    <td>units of length, or <code>dimensionless</code></td>
21955    <td><code>length</code></td>
21956    </tr>
21957    <tr>
21958    <td><code>0</code></td>
21959    <td>no</td>
21960    <td>no</td>
21961    <td>(no units allowed)</td>
21962    <td></td>
21963    </tr>
21964    </tr>
21965    </table>
21966
21967    In SBML Level&nbsp;2, the units of the compartment size, as defined by the
21968    'units' attribute or (if 'units' is not set) the default value listed in
21969    the table above, are used in the following ways when the compartment has
21970    a 'spatialDimensions' value greater than @c 0:
21971    <ul>
21972    <li> The value of the 'units' attribute is used as the units of the
21973    compartment identifier when the identifier appears as a numerical
21974    quantity in a mathematical formula expressed in MathML.
21975
21976    <li> The @c math element of an AssignmentRule or InitialAssignment
21977    referring to this compartment @em must (in Level&nbsp;2 Versions&nbsp;1-3)
21978    or @em should (in Level&nbsp;2 Version 4) have identical units.
21979
21980    <li> In RateRule objects that set the rate of change of the compartment's
21981    size, the units of the rule's @c math element @em must (in Level&nbsp;2
21982    Versions&nbsp;1&ndash;3) or @em should (in Level&nbsp;2 Version 4) be identical to the
21983    compartment's units (whether defined by the 'units' attribute or by taking the
21984    default value from the Model) divided by the default @em time units.
21985    (In other words, the units for the rate of change of compartment size
21986    are <em>compartment size</em>/<em>time</em> units.
21987
21988    <li> When a Species is to be treated in terms of concentrations or
21989    density, the units of the spatial size portion of the concentration
21990    value (i.e., the denominator in the units formula @em substance/@em
21991    size) are those indicated by the value of the 'units' attribute on the
21992    compartment in which the species is located.
21993    </ul>
21994
21995    Compartments with 'spatialDimensions'=@c 0 require special treatment in
21996    this framework.  As implied above, the 'size' attribute must not have a
21997    value on an SBML Level&nbsp;2 Compartment
21998    @if conly structure @else object@endif@~ if the 'spatialDimensions'
21999    attribute has a value of @c 0.  An additional related restriction is that
22000    the 'constant' attribute must default to or be set to @c True if the value
22001    of the 'spatialDimensions' attribute is @c 0, because a zero-dimensional
22002    compartment cannot ever have a size.
22003
22004    If a compartment has no size or dimensional units, how should such a
22005    compartment's identifier be interpreted when it appears in mathematical
22006    formulas?  The answer is that such a compartment's identifier should not
22007    appear in mathematical formulas in the first place---it has no
22008    value, and its value cannot change.  Note also that a zero-dimensional
22009    compartment is a point, and species located at points can only be
22010    described in terms of amounts, not spatially-dependent measures such as
22011    concentration.  Since SBML KineticLaw formulas are already in terms of
22012    @em substance/@em time and not (say) @em concentration/@em time, volume
22013    or other factors in principle are not needed for species located in
22014    zero-dimensional compartments.
22015
22016    Finally, in SBML Level&nbsp;2 Versions 2&ndash;4, each compartment in a
22017    model may optionally be designated as belonging to a particular
22018    compartment @em type.  The optional attribute 'compartmentType' is used
22019    identify the compartment type represented by the Compartment structure.
22020    The 'compartmentType' attribute's value must be the identifier of a
22021    CompartmentType instance defined in the model.  If the 'compartmentType'
22022    attribute is not present on a particular compartment definition, a
22023    unique virtual compartment type is assumed for that compartment, and no
22024    other compartment can belong to that compartment type.  The values of
22025    'compartmentType' attributes on compartments have no effect on the
22026    numerical interpretation of a model.  Simulators and other numerical
22027    analysis software may ignore 'compartmentType' attributes.  The
22028    'compartmentType' attribute and the CompartmentType
22029    @if conly structures @else class of objects@endif@~ are
22030    not present in SBML Level&nbsp;3 Core nor in SBML Level&nbsp;1.
22031
22032
22033    @section comp-l3 Additional considerations in SBML Level&nbsp;3
22034
22035    One difference between SBML Level&nbsp;3 and lower Levels of SBML is
22036    that there are no restrictions on the permissible values of the
22037    'spatialDimensions' attribute, and there is no default value defined for
22038    the attribute.  The value of 'spatialDimensions' does not have to be an
22039    integer, either; this is to allow for the possibility of representing
22040    structures with fractal dimensions.
22041
22042    The number of spatial dimensions possessed by a compartment cannot enter
22043    into mathematical formulas, and therefore cannot directly alter the
22044    numerical interpretation of a model.  However, the value of
22045    'spatialDimensions' @em does affect the interpretation of the units
22046    associated with a compartment's size.  Specifically, the value of
22047    'spatialDimensions' is used to select among the Model attributes
22048    'volumeUnits', 'areaUnits' and 'lengthUnits' when a Compartment
22049    @if conly object @else structure@endif@~ does not define a value for its
22050    'units' attribute.
22051
22052    The 'units' attribute may be left unspecified for a given compartment in a
22053    model; in that case, the compartment inherits the unit of measurement
22054    specified by one of the attributes on the enclosing Model
22055    @if conly structure @else object@endif@~ instance.  The applicable
22056    attribute on Model depends on the value of the compartment's
22057    'spatialDimensions' attribute; the relationship is shown in the table
22058    below.  If the Model @if conly structure @else object@endif@~ does not
22059    define the relevant attribute ('volumeUnits', 'areaUnits' or
22060    'lengthUnits') for a given 'spatialDimensions' value, the unit associated
22061    with that Compartment @if conly structure @else object@endif's size is
22062    undefined.  If a given Compartment's 'units' are left unset and
22063    the 'spatialDimensions' either has a value other than @c 1, @c 2, or
22064    @c 3 or is left unset itself (as it has no default value),
22065    then no unit can be chosen from among the Model's 'volumeUnits',
22066    'areaUnits' or 'lengthUnits' attributes (even if the Model instance
22067    provides values for those attributes), because there is no basis to select
22068    between them.
22069    Leaving the units of compartments' sizes undefined in an SBML model does
22070    not render the model invalid; however, as a matter of best practice, we
22071    strongly recommend that all models specify the units of measurement for
22072    all compartment sizes.
22073
22074    <table border='0' class='centered text-table width80 normal-font alt-row-colors'
22075    style='padding-bottom: 0.5em'>
22076    <caption class='top-caption'>Interpretation of the Compartment 'units' attribute.</caption>
22077    <tr>
22078    <th align='left' valign='bottom'>
22079    Value of attribute<br>'spatialDimensions'
22080    </th>
22081    <th align='left' valign='bottom'>
22082    Attribute of Model used<br>for inheriting the unit
22083    </th>
22084    <th align='left' valign='bottom'>
22085    Recommended candidate units
22086    </th>
22087    </tr>
22088    <tr>
22089    <td><code>3</code></td>
22090    <td>&quot;volumeUnits&quot;</td>
22091    <td>units of volume, or <code>dimensionless</code></td>
22092    </tr>
22093    <tr>
22094    <td><code>2</code></td>
22095    <td>&quot;areaUnits&quot;</td>
22096    <td>units of area, or <code>dimensionless</code></td>
22097    </tr>
22098    <tr>
22099    <td><code>1</code></td>
22100    <td>&quot;lengthUnits&quot;</td>
22101    <td>units of length, or <code>dimensionless</code></td>
22102    </tr>
22103    <tr>
22104    <td><em>other</em></td>
22105    <td><em>no units inherited</em></td>
22106    <td><em>no specific recommendations</em></td>
22107    </tr>
22108    </tr>
22109    </table>
22110
22111    The unit of measurement associated with a compartment's size, as defined
22112    by the 'units' attribute or (if 'units' is not set) the inherited value
22113    from Model according to the table above, is used in the following ways:
22114
22115    <ul>
22116
22117    <li> When the identifier of the compartment appears as a numerical
22118    quantity in a mathematical formula expressed in MathML, it represents
22119    the size of the compartment, and the unit associated with the size is
22120    the value of the 'units' attribute.
22121
22122    <li> When a Species is to be treated in terms of concentrations or
22123    density, the unit associated with the spatial size portion of the
22124    concentration value (i.e., the denominator in the formula
22125    <em>amount</em>/<em>size</em>) is specified by the value of the 'units'
22126    attribute on the compartment in which the species is located.
22127
22128    <li> The 'math' elements of AssignmentRule, InitialAssignment and
22129    EventAssignment @if conly structures @else objects@endif@~ setting the
22130    value of the compartment size should all have the same units as the unit
22131    associated with the compartment's size.
22132
22133    <li> In a RateRule @if conly structure @else object@endif@~ that defines a
22134    rate of change for a compartment's size, the unit of the rule's 'math'
22135    element should be identical to the compartment's 'units' attribute divided
22136    by the model-wide unit of <em>time</em>.  (In other words, {<em>unit of
22137    compartment size</em>}/{<em>unit of time</em>}.)
22138
22139    </ul>
22140
22141
22142    @section comp-other Other aspects of Compartment
22143
22144    In SBML Level&nbsp;1 and Level&nbsp;2, Compartment has an optional
22145    attribute named 'outside', whose value can be the identifier of another
22146    Compartment @if conly structure @else object@endif@~ defined in the
22147    enclosing Model @if conly structure @else object@endif@~.  Doing so means
22148    that the other compartment contains it or is outside of it.  This enables
22149    the representation of simple topological relationships between
22150    compartments, for those simulation systems that can make use of the
22151    information (e.g., for drawing simple diagrams of compartments).  It is
22152    worth noting that in SBML, there is no relationship between compartment
22153    sizes when compartment positioning is expressed using the 'outside'
22154    attribute.  The size of a given compartment does not in any sense include
22155    the sizes of other compartments having it as the value of their 'outside'
22156    attributes.  In other words, if a compartment @em B has the identifier of
22157    compartment @em A as its 'outside' attribute value, the size of @em A does
22158    not include the size of @em B.  The compartment sizes are separate.
22159
22160    In Level&nbsp;2, there are two restrictions on the 'outside' attribute.
22161    First, because a compartment with 'spatialDimensions' of @c 0 has no
22162    size, such a compartment cannot act as the container of any other
22163    compartment @em except compartments that @em also have
22164    'spatialDimensions' values of @c 0.  Second, the directed graph formed
22165    by representing Compartment structures as vertexes and the 'outside'
22166    attribute values as edges must be acyclic.  The latter condition is
22167    imposed to prevent a compartment from being contained inside itself.  In
22168    the absence of a value for 'outside', compartment definitions in SBML
22169    Level&nbsp;2 do not have any implied spatial relationships between each
22170    other.
22171
22172    """
22173
22174    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
22175    __repr__ = _swig_repr
22176    __swig_destroy__ = _libsbml.delete_Compartment
22177
22178    def __init__(self, *args):
22179        r"""
22180        __init__(Compartment self, unsigned int level, unsigned int version) -> Compartment
22181        __init__(Compartment self, SBMLNamespaces sbmlns) -> Compartment
22182        __init__(Compartment self, Compartment orig) -> Compartment
22183
22184        This method has multiple variants; they differ in the arguments
22185         they accept.  Each variant is described separately below.
22186
22187        @par
22188        <hr>
22189        <span class='variant-sig-heading'>Method variant with the following signature</span>:
22190         <pre class='signature'>Compartment(SBMLNamespaces sbmlns)</pre>
22191
22192        Creates a new Compartment object using the given SBMLNamespaces object
22193        @p sbmlns.
22194
22195        @par
22196        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
22197        information.  It is used to communicate the SBML Level, Version, and (in
22198        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
22199        common approach to using libSBML's SBMLNamespaces facilities is to create an
22200        SBMLNamespaces object somewhere in a program once, then hand that object
22201        as needed to object constructors that accept SBMLNamespaces as arguments.
22202
22203        It is worth emphasizing that although this constructor does not take an
22204        identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
22205        (identifier) attribute of a Compartment object is required to have a
22206        value.  Thus, callers are cautioned to assign a value after calling this
22207        constructor.  Setting the identifier can be accomplished using the
22208        method @if java Compartment.setId()@else setId()@endif.
22209
22210        @param sbmlns an SBMLNamespaces object.
22211
22212        @throws SBMLConstructorException
22213        Thrown if the given @p sbmlns is inconsistent or incompatible
22214        with this object.
22215
22216        @note Attempting to add an object to an SBMLDocument having a different
22217        combination of SBML Level, Version and XML namespaces than the object
22218        itself will result in an error at the time a caller attempts to make the
22219        addition.  A parent object must have compatible Level, Version and XML
22220        namespaces.  (Strictly speaking, a parent may also have more XML
22221        namespaces than a child, but the reverse is not permitted.)  The
22222        restriction is necessary to ensure that an SBML model has a consistent
22223        overall structure.  This requires callers to manage their objects
22224        carefully, but the benefit is increased flexibility in how models can be
22225        created by permitting callers to create objects bottom-up if desired.  In
22226        situations where objects are not yet attached to parents (e.g.,
22227        SBMLDocument), knowledge of the intented SBML Level and Version help
22228        libSBML determine such things as whether it is valid to assign a
22229        particular value to an attribute.
22230
22231
22232        @par
22233        <hr>
22234        <span class='variant-sig-heading'>Method variant with the following signature</span>:
22235         <pre class='signature'>Compartment(long level, long version)</pre>
22236
22237        Creates a new Compartment object using the given SBML @p level and @p
22238        version values.
22239
22240        @param level a long integer, the SBML Level to assign to this Compartment.
22241
22242        @param version a long integer, the SBML Version to assign to this
22243        Compartment.
22244
22245        @throws SBMLConstructorException
22246        Thrown if the given @p level and @p version combination are invalid
22247        or if this object is incompatible with the given level and version.
22248
22249        @note Attempting to add an object to an SBMLDocument having a different
22250        combination of SBML Level, Version and XML namespaces than the object
22251        itself will result in an error at the time a caller attempts to make the
22252        addition.  A parent object must have compatible Level, Version and XML
22253        namespaces.  (Strictly speaking, a parent may also have more XML
22254        namespaces than a child, but the reverse is not permitted.)  The
22255        restriction is necessary to ensure that an SBML model has a consistent
22256        overall structure.  This requires callers to manage their objects
22257        carefully, but the benefit is increased flexibility in how models can be
22258        created by permitting callers to create objects bottom-up if desired.  In
22259        situations where objects are not yet attached to parents (e.g.,
22260        SBMLDocument), knowledge of the intented SBML Level and Version help
22261        libSBML determine such things as whether it is valid to assign a
22262        particular value to an attribute.
22263
22264
22265        @par
22266        <hr>
22267        <span class='variant-sig-heading'>Method variant with the following signature</span>:
22268         <pre class='signature'>Compartment(Compartment orig)</pre>
22269
22270        Copy constructor.
22271
22272        This creates a copy of a Compartment object.
22273
22274        @param orig the Compartment instance to copy.
22275
22276        """
22277        _libsbml.Compartment_swiginit(self, _libsbml.new_Compartment(*args))
22278
22279    def clone(self):
22280        r"""
22281        clone(Compartment self) -> Compartment
22282
22283        Creates and returns a deep copy of this Compartment object.
22284
22285        @return the (deep) copy of this Compartment object.
22286
22287        """
22288        return _libsbml.Compartment_clone(self)
22289
22290    def initDefaults(self):
22291        r"""
22292        initDefaults(Compartment self)
22293
22294        Initializes the fields of this Compartment object to 'typical' default
22295        values.
22296
22297        The SBML Compartment component has slightly different aspects and
22298        default attribute values in different SBML Levels and Versions.
22299        This method sets the values to certain common defaults, based
22300        mostly on what they are in SBML Level&nbsp;2.  Specifically:
22301
22302        @li Sets attribute 'spatialDimensions' to @c 3
22303        @li Sets attribute 'constant' to @c True
22304        @li (Applies to Level&nbsp;1 models only) Sets attribute 'volume' to @c 1.0
22305        @li (Applies to Level&nbsp;3 models only) Sets attribute 'units' to @c litre
22306
22307        """
22308        return _libsbml.Compartment_initDefaults(self)
22309
22310    def getId(self):
22311        r"""
22312        getId(Compartment self) -> string
22313
22314        Returns the value of the 'id' attribute of this Compartment.
22315
22316        @note Because of the inconsistent behavior of this function with
22317        respect to assignments and rules, it is now recommended to
22318        use the getIdAttribute() function instead.
22319
22320        @par
22321        The identifier given by an object's 'id' attribute value
22322        is used to identify the object within the SBML model definition.
22323        Other objects can refer to the component using this identifier.  The
22324        data type of 'id' is always <code>SId</code> or a type derived
22325        from that, such as <code>UnitSId</code>, depending on the object in
22326        question.  All data types are defined as follows:
22327        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
22328        letter ::= 'a'..'z','A'..'Z'
22329        digit  ::= '0'..'9'
22330        idChar ::= letter | digit | '_'
22331        SId    ::= ( letter | '_' ) idChar*
22332        </pre>
22333        The characters <code>(</code> and <code>)</code> are used for grouping,
22334        the character <code>*</code> 'zero or more times', and the character
22335        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
22336        is determined by an exact character sequence match; i.e., comparisons must
22337        be performed in a case-sensitive manner.  This applies to all uses of
22338        <code>SId</code>, <code>SIdRef</code>, and derived types.
22339
22340        Users need to be aware of some important API issues that are the result of
22341        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
22342        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
22343        of SBML objects.  To simplify the work of programmers, libSBML's API
22344        provided get, set, check, and unset on the SBase object class itself
22345        instead of on individual subobject classes. This made the
22346        get/set/etc. methods uniformly available on all objects in the libSBML
22347        API.  LibSBML simply returned empty strings or otherwise did not act when
22348        the methods were applied to SBML objects that were not defined by the SBML
22349        specification to have 'id' or 'name' attributes.  Additional complications
22350        arose with the rule and assignment objects: InitialAssignment,
22351        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
22352        the rule object hierarchy was different, and in addition, then as now,
22353        they possess different attributes: 'variable' (for the rules and event
22354        assignments), 'symbol' (for initial assignments), or neither (for
22355        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
22356        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
22357
22358        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
22359        Version&nbsp;2, it became necessary to introduce a new way to interact
22360        with the attributes more consistently in libSBML to avoid breaking
22361        backward compatibility in the behavior of the original 'id' methods.  For
22362        this reason, libSBML provides four functions (getIdAttribute(),
22363        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
22364        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
22365        from SBase, regardless of the object's type.  <strong>These new methods
22366        should be used instead of the older getId()/setId()/etc. methods</strong>
22367        unless the old behavior is somehow necessary.  Regardless of the Level and
22368        Version of the SBML, these functions allow client applications to use more
22369        generalized code in some situations (for instance, when manipulating
22370        objects that are all known to have identifiers).  If the object in
22371        question does not posess an 'id' attribute according to the SBML
22372        specification for the Level and Version in use, libSBML will not allow the
22373        identifier to be set, nor will it read or write 'id' attributes for those
22374        objects.
22375
22376        @return the id of this Compartment.
22377
22378        @see getIdAttribute()
22379        @see setIdAttribute()
22380        @see isSetIdAttribute()
22381        @see unsetIdAttribute()
22382
22383        """
22384        return _libsbml.Compartment_getId(self)
22385
22386    def getName(self):
22387        r"""
22388        getName(Compartment self) -> string
22389
22390        Returns the value of the 'name' attribute of this Compartment object.
22391
22392        @par
22393        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
22394        moved to SBase directly, instead of being defined individually for many
22395        (but not all) objects.  LibSBML has for a long time provided functions
22396        defined on SBase itself to get, set, and unset those attributes, which
22397        would fail or otherwise return empty strings if executed on any object
22398        for which those attributes were not defined.  Now that all SBase objects
22399        define those attributes, those functions now succeed for any object with
22400        the appropriate level and version.
22401
22402        The 'name' attribute is
22403        optional and is not intended to be used for cross-referencing purposes
22404        within a model.  Its purpose instead is to provide a human-readable
22405        label for the component.  The data type of 'name' is the type
22406        <code>string</code> defined in XML Schema.  SBML imposes no
22407        restrictions as to the content of 'name' attributes beyond those
22408        restrictions defined by the <code>string</code> type in XML Schema.
22409
22410        The recommended practice for handling 'name' is as follows.  If a
22411        software tool has the capability for displaying the content of 'name'
22412        attributes, it should display this content to the user as a
22413        component's label instead of the component's 'id'.  If the user
22414        interface does not have this capability (e.g., because it cannot
22415        display or use special characters in symbol names), or if the 'name'
22416        attribute is missing on a given component, then the user interface
22417        should display the value of the 'id' attribute instead.  (Script
22418        language interpreters are especially likely to display 'id' instead of
22419        'name'.)
22420
22421        As a consequence of the above, authors of systems that automatically
22422        generate the values of 'id' attributes should be aware some systems
22423        may display the 'id''s to the user.  Authors therefore may wish to
22424        take some care to have their software create 'id' values that are: (a)
22425        reasonably easy for humans to type and read; and (b) likely to be
22426        meaningful, for example by making the 'id' attribute be an abbreviated
22427        form of the name attribute value.
22428
22429        An additional point worth mentioning is although there are
22430        restrictions on the uniqueness of 'id' values, there are no
22431        restrictions on the uniqueness of 'name' values in a model.  This
22432        allows software applications leeway in assigning component identifiers.
22433
22434        Regardless of the level and version of the SBML, these functions allow
22435        client applications to use more generalized code in some situations
22436        (for instance, when manipulating objects that are all known to have
22437        names).  If the object in question does not posess a 'name' attribute
22438        according to the SBML specification for the Level and Version in use,
22439        libSBML will not allow the name to be set, nor will it read or
22440        write 'name' attributes for those objects.
22441
22442        @return the name of this SBML object, or the empty string if not set or unsettable.
22443
22444        @see getIdAttribute()
22445        @see isSetName()
22446        @see setName()
22447        @see unsetName()
22448
22449        """
22450        return _libsbml.Compartment_getName(self)
22451
22452    def getCompartmentType(self):
22453        r"""
22454        getCompartmentType(Compartment self) -> string
22455
22456        Get the value of the 'compartmentType' attribute of this Compartment
22457        object.
22458
22459        @return the value of the 'compartmentType' attribute of this
22460        Compartment object as a string.
22461
22462        @note The 'compartmentType' attribute is only available in SBML
22463        Level&nbsp;2 Versions&nbsp;2&ndash;4.
22464
22465        @see isSetCompartmentType()
22466        @see setCompartmentType()
22467        @see unsetCompartmentType()
22468
22469        """
22470        return _libsbml.Compartment_getCompartmentType(self)
22471
22472    def getSpatialDimensions(self):
22473        r"""
22474        getSpatialDimensions(Compartment self) -> unsigned int
22475
22476        Get the number of spatial dimensions of this Compartment object.
22477
22478        @return the value of the 'spatialDimensions' attribute of this
22479        Compartment object as a long integereger.
22480
22481        @note In SBML Level&nbsp;3, the data type of the 'spatialDimensions'
22482        attribute is @c float, whereas in Level&nbsp;2, it is @c integer.  To
22483        avoid backward compatibility issues, libSBML provides two separate methods
22484        for obtaining the value as either an integer or a type @c float, for
22485        models where it is relevant.
22486
22487        @see getSpatialDimensionsAsDouble()
22488        @see setSpatialDimensions()
22489        @see isSetSpatialDimensions()
22490        @see unsetSpatialDimensions()
22491
22492        """
22493        return _libsbml.Compartment_getSpatialDimensions(self)
22494
22495    def getSpatialDimensionsAsDouble(self):
22496        r"""
22497        getSpatialDimensionsAsDouble(Compartment self) -> double
22498
22499        Get the number of spatial dimensions of this Compartment object,
22500        as a double.
22501
22502        @return the value of the 'spatialDimensions' attribute of this
22503        Compartment object as a double, or @c NaN if this model is not in SBML
22504        Level&nbsp;3 format.
22505
22506        @note In SBML Level&nbsp;3, the data type of the 'spatialDimensions'
22507        attribute is @c float, whereas in Level&nbsp;2, it is @c integer.  To
22508        avoid backward compatibility issues, libSBML provides two separate methods
22509        for obtaining the value as either an integer or a type @c float, for
22510        models where it is relevant.
22511
22512        @see getSpatialDimensions()
22513        @see setSpatialDimensions()
22514        @see isSetSpatialDimensions()
22515        @see unsetSpatialDimensions()
22516
22517        """
22518        return _libsbml.Compartment_getSpatialDimensionsAsDouble(self)
22519
22520    def getSize(self):
22521        r"""
22522        getSize(Compartment self) -> double
22523
22524        Get the size of this Compartment object.
22525
22526        @par
22527        In SBML Level&nbsp;1, compartments are always three-dimensional
22528        constructs and only have volumes, whereas in SBML Level&nbsp;2 and higher,
22529        compartments may be other than three-dimensional, and therefore the
22530        'volume' attribute is named 'size' in Level&nbsp;2 and above.  LibSBML
22531        provides both @if conly Compartment_getSize() and Compartment_getVolume()
22532        @else getSize() and getVolume()@endif@~
22533        for easier support of different SBML Levels.
22534
22535        @return the value of the 'size' attribute ('volume' in Level&nbsp;1) of
22536        this Compartment object as a floating-point number.
22537
22538        @note This method is identical to
22539        @if java Compartment.getVolume()@else getVolume()@endif.
22540
22541        @see getVolume()
22542        @see isSetSize()
22543        @see setSize()
22544        @see unsetSize()
22545
22546        """
22547        return _libsbml.Compartment_getSize(self)
22548
22549    def getVolume(self):
22550        r"""
22551        getVolume(Compartment self) -> double
22552
22553        Get the volume of this Compartment object.
22554
22555        @par
22556        In SBML Level&nbsp;1, compartments are always three-dimensional
22557        constructs and only have volumes, whereas in SBML Level&nbsp;2 and higher,
22558        compartments may be other than three-dimensional, and therefore the
22559        'volume' attribute is named 'size' in Level&nbsp;2 and above.  LibSBML
22560        provides both @if conly Compartment_getSize() and Compartment_getVolume()
22561        @else getSize() and getVolume()@endif@~
22562        for easier support of different SBML Levels.
22563
22564        @return the value of the 'volume' attribute ('size' in Level&nbsp;2) of
22565        this Compartment object, as a floating-point number.
22566
22567        @note The attribute 'volume' only exists by that name in SBML
22568        Level&nbsp;1.  In Level&nbsp;2 and above, the equivalent attribute is
22569        named 'size'.  In SBML Level&nbsp;1, a compartment's volume has a default
22570        value (@c 1.0) and therefore methods such as
22571        @if conly Compartment_isSetVolume() @else isSetVolume()@endif@~
22572        will always return @c True for a Level&nbsp;1 model.  In Level&nbsp;2, a
22573        compartment's size (the equivalent of SBML Level&nbsp;1's 'volume') is
22574        optional and has no default value, and therefore may or may not be set.
22575
22576        @note This method is identical to
22577        @if java Compartment.getSize()@else getSize()@endif.
22578
22579        @see getSize()
22580        @see isSetVolume()
22581        @see setVolume()
22582        @see unsetVolume()
22583
22584        """
22585        return _libsbml.Compartment_getVolume(self)
22586
22587    def getUnits(self):
22588        r"""
22589        getUnits(Compartment self) -> string
22590
22591        Get the units of this Compartment object's size.
22592
22593        The value of an SBML compartment's 'units' attribute establishes the
22594        unit of measurement associated with the compartment's size.
22595
22596        @return the value of the 'units' attribute of this Compartment object,
22597        as a string.  An empty string indicates that no units have been assigned
22598        to the value of the size.
22599
22600        @note There is an important distinction to be made between <em>no units
22601        assigned</em>, and assuming a value without units has any specific unit
22602        such as <code>dimensionless</code>.  In SBML, default units are never
22603        attributed to numbers, and numbers without units are not automatically
22604        assumed to have the unit <code>dimensionless</code>.  Please consult the
22605        relevant SBML specification document for a more in-depth explanation of
22606        this topic and the SBML unit system.
22607
22608        @see isSetUnits()
22609        @see setUnits()
22610        @see unsetUnits()
22611
22612        """
22613        return _libsbml.Compartment_getUnits(self)
22614
22615    def getOutside(self):
22616        r"""
22617        getOutside(Compartment self) -> string
22618
22619        Get the identifier, if any, of the Compartment object that is designated
22620        as being outside of @em this one.
22621
22622        @return the value of the 'outside' attribute of this Compartment object.
22623
22624        @note The 'outside' attribute is defined in SBML Level&nbsp;1 and
22625        Level&nbsp;2, but does not exist in SBML Level&nbsp;3.
22626
22627        @see isSetOutside()
22628        @see setOutside()
22629        @see unsetOutside()
22630
22631        """
22632        return _libsbml.Compartment_getOutside(self)
22633
22634    def getConstant(self):
22635        r"""
22636        getConstant(Compartment self) -> bool
22637
22638        Get the value of the 'constant' attribute of this Compartment object.
22639
22640        @return @c True if this Compartment object's size is flagged as being
22641        constant, @c False otherwise.
22642
22643        @see isSetConstant()
22644        @see setConstant()
22645
22646        """
22647        return _libsbml.Compartment_getConstant(self)
22648
22649    def isSetId(self):
22650        r"""
22651        isSetId(Compartment self) -> bool
22652
22653        Predicate returning @c True if this Compartment object's 'id' attribute
22654        is set.
22655
22656        @par
22657        The identifier given by an object's 'id' attribute value
22658        is used to identify the object within the SBML model definition.
22659        Other objects can refer to the component using this identifier.  The
22660        data type of 'id' is always <code>SId</code> or a type derived
22661        from that, such as <code>UnitSId</code>, depending on the object in
22662        question.  All data types are defined as follows:
22663        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
22664        letter ::= 'a'..'z','A'..'Z'
22665        digit  ::= '0'..'9'
22666        idChar ::= letter | digit | '_'
22667        SId    ::= ( letter | '_' ) idChar*
22668        </pre>
22669        The characters <code>(</code> and <code>)</code> are used for grouping,
22670        the character <code>*</code> 'zero or more times', and the character
22671        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
22672        is determined by an exact character sequence match; i.e., comparisons must
22673        be performed in a case-sensitive manner.  This applies to all uses of
22674        <code>SId</code>, <code>SIdRef</code>, and derived types.
22675
22676        Users need to be aware of some important API issues that are the result of
22677        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
22678        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
22679        of SBML objects.  To simplify the work of programmers, libSBML's API
22680        provided get, set, check, and unset on the SBase object class itself
22681        instead of on individual subobject classes. This made the
22682        get/set/etc. methods uniformly available on all objects in the libSBML
22683        API.  LibSBML simply returned empty strings or otherwise did not act when
22684        the methods were applied to SBML objects that were not defined by the SBML
22685        specification to have 'id' or 'name' attributes.  Additional complications
22686        arose with the rule and assignment objects: InitialAssignment,
22687        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
22688        the rule object hierarchy was different, and in addition, then as now,
22689        they possess different attributes: 'variable' (for the rules and event
22690        assignments), 'symbol' (for initial assignments), or neither (for
22691        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
22692        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
22693
22694        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
22695        Version&nbsp;2, it became necessary to introduce a new way to interact
22696        with the attributes more consistently in libSBML to avoid breaking
22697        backward compatibility in the behavior of the original 'id' methods.  For
22698        this reason, libSBML provides four functions (getIdAttribute(),
22699        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
22700        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
22701        from SBase, regardless of the object's type.  <strong>These new methods
22702        should be used instead of the older getId()/setId()/etc. methods</strong>
22703        unless the old behavior is somehow necessary.  Regardless of the Level and
22704        Version of the SBML, these functions allow client applications to use more
22705        generalized code in some situations (for instance, when manipulating
22706        objects that are all known to have identifiers).  If the object in
22707        question does not posess an 'id' attribute according to the SBML
22708        specification for the Level and Version in use, libSBML will not allow the
22709        identifier to be set, nor will it read or write 'id' attributes for those
22710        objects.
22711
22712        @return @c True if the 'id' attribute of this SBML object is
22713        set, @c False otherwise.
22714
22715        @note Because of the inconsistent behavior of this function with
22716        respect to assignments and rules, it is recommended that callers
22717        use isSetIdAttribute() instead.
22718
22719        @see getIdAttribute()
22720        @see setIdAttribute()
22721        @see unsetIdAttribute()
22722        @see isSetIdAttribute()
22723
22724        """
22725        return _libsbml.Compartment_isSetId(self)
22726
22727    def isSetName(self):
22728        r"""
22729        isSetName(Compartment self) -> bool
22730
22731        Predicate returning @c True if this Compartment object's 'name'
22732        attribute is set.
22733
22734        @par
22735        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
22736        moved to SBase directly, instead of being defined individually for many
22737        (but not all) objects.  LibSBML has for a long time provided functions
22738        defined on SBase itself to get, set, and unset those attributes, which
22739        would fail or otherwise return empty strings if executed on any object
22740        for which those attributes were not defined.  Now that all SBase objects
22741        define those attributes, those functions now succeed for any object with
22742        the appropriate level and version.
22743
22744        The 'name' attribute is
22745        optional and is not intended to be used for cross-referencing purposes
22746        within a model.  Its purpose instead is to provide a human-readable
22747        label for the component.  The data type of 'name' is the type
22748        <code>string</code> defined in XML Schema.  SBML imposes no
22749        restrictions as to the content of 'name' attributes beyond those
22750        restrictions defined by the <code>string</code> type in XML Schema.
22751
22752        The recommended practice for handling 'name' is as follows.  If a
22753        software tool has the capability for displaying the content of 'name'
22754        attributes, it should display this content to the user as a
22755        component's label instead of the component's 'id'.  If the user
22756        interface does not have this capability (e.g., because it cannot
22757        display or use special characters in symbol names), or if the 'name'
22758        attribute is missing on a given component, then the user interface
22759        should display the value of the 'id' attribute instead.  (Script
22760        language interpreters are especially likely to display 'id' instead of
22761        'name'.)
22762
22763        As a consequence of the above, authors of systems that automatically
22764        generate the values of 'id' attributes should be aware some systems
22765        may display the 'id''s to the user.  Authors therefore may wish to
22766        take some care to have their software create 'id' values that are: (a)
22767        reasonably easy for humans to type and read; and (b) likely to be
22768        meaningful, for example by making the 'id' attribute be an abbreviated
22769        form of the name attribute value.
22770
22771        An additional point worth mentioning is although there are
22772        restrictions on the uniqueness of 'id' values, there are no
22773        restrictions on the uniqueness of 'name' values in a model.  This
22774        allows software applications leeway in assigning component identifiers.
22775
22776        Regardless of the level and version of the SBML, these functions allow
22777        client applications to use more generalized code in some situations
22778        (for instance, when manipulating objects that are all known to have
22779        names).  If the object in question does not posess a 'name' attribute
22780        according to the SBML specification for the Level and Version in use,
22781        libSBML will not allow the name to be set, nor will it read or
22782        write 'name' attributes for those objects.
22783
22784        @return @c True if the 'name' attribute of this SBML object is
22785        set, @c False otherwise.
22786
22787        @see getName()
22788        @see setName()
22789        @see unsetName()
22790
22791        """
22792        return _libsbml.Compartment_isSetName(self)
22793
22794    def isSetCompartmentType(self):
22795        r"""
22796        isSetCompartmentType(Compartment self) -> bool
22797
22798        Predicate returning @c True if this Compartment object's
22799        'compartmentType' attribute is set.
22800
22801        @return @c True if the 'compartmentType' attribute of this Compartment
22802        is set, @c False otherwise.
22803
22804        @note The 'compartmentType' attribute is only available in SBML
22805        Level&nbsp;2 Versions&nbsp;2&ndash;4.
22806
22807        @see setCompartmentType()
22808        @see getCompartmentType()
22809        @see unsetCompartmentType()
22810
22811        """
22812        return _libsbml.Compartment_isSetCompartmentType(self)
22813
22814    def isSetSize(self):
22815        r"""
22816        isSetSize(Compartment self) -> bool
22817
22818        Predicate returning @c True if this Compartment object's 'size'
22819        attribute is set.
22820
22821        This method is similar but not identical to
22822        @if java Compartment.isSetVolume()@else isSetVolume()@endif.  The latter
22823        should be used in the context of SBML Level&nbsp;1 models instead of
22824        @if java Compartment.isSetSize()@else isSetSize()@endif@~
22825        because @if java Compartment.isSetVolume()@else isSetVolume()@endif@~
22826        performs extra processing to take into account the difference in
22827        default values between SBML Levels&nbsp;1 and&nbsp;2.
22828
22829        @return @c True if the 'size' attribute ('volume' in Level&nbsp;2) of
22830        this Compartment object is set, @c False otherwise.
22831
22832        @see isSetVolume()
22833        @see setSize()
22834        @see getSize()
22835        @see unsetSize()
22836
22837        """
22838        return _libsbml.Compartment_isSetSize(self)
22839
22840    def isSetVolume(self):
22841        r"""
22842        isSetVolume(Compartment self) -> bool
22843
22844        Predicate returning @c True if this Compartment object's 'volume'
22845        attribute is set.
22846
22847        This method is similar but not identical to
22848        @if java Compartment.isSetSize()@else isSetSize()@endif.  The latter
22849        should not be used in the context of SBML Level&nbsp;1 models because the
22850        present method performs extra processing to take into account
22851        the difference in default values between SBML Levels&nbsp;1 and&nbsp;2.
22852
22853        @return @c True if the 'volume' attribute ('size' in Level&nbsp;2 and
22854        above) of this Compartment object is set, @c False otherwise.
22855
22856        @note The attribute 'volume' only exists by that name in SBML
22857        Level&nbsp;1.  In Level&nbsp;2 and above, the equivalent attribute is
22858        named 'size'.  In SBML Level&nbsp;1, a compartment's volume has a default
22859        value (@c 1.0) and therefore methods such as
22860        @if conly Compartment_isSetVolume() @else isSetVolume()@endif@~
22861        will always return @c True for a Level&nbsp;1 model.  In Level&nbsp;2, a
22862        compartment's size (the equivalent of SBML Level&nbsp;1's 'volume') is
22863        optional and has no default value, and therefore may or may not be set.
22864
22865        @see isSetSize()
22866        @see getVolume()
22867        @see setVolume()
22868        @see unsetVolume()
22869
22870        """
22871        return _libsbml.Compartment_isSetVolume(self)
22872
22873    def isSetUnits(self):
22874        r"""
22875        isSetUnits(Compartment self) -> bool
22876
22877        Predicate returning @c True if this Compartment object's 'units'
22878        attribute is set.
22879
22880        @return @c True if the 'units' attribute of this Compartment object is
22881        set, @c False otherwise.
22882
22883        @note There is an important distinction to be made between <em>no units
22884        assigned</em>, and assuming a value without units has any specific unit
22885        such as <code>dimensionless</code>.  In SBML, default units are never
22886        attributed to numbers, and numbers without units are not automatically
22887        assumed to have the unit <code>dimensionless</code>.  Please consult the
22888        relevant SBML specification document for a more in-depth explanation of
22889        this topic and the SBML unit system.
22890
22891        @see setUnits()
22892        @see getUnits()
22893        @see unsetUnits()
22894
22895        """
22896        return _libsbml.Compartment_isSetUnits(self)
22897
22898    def isSetOutside(self):
22899        r"""
22900        isSetOutside(Compartment self) -> bool
22901
22902        Predicate returning @c True if this Compartment object's 'outside'
22903        attribute is set.
22904
22905        @return @c True if the 'outside' attribute of this Compartment object is
22906        set, @c False otherwise.
22907
22908        @note The 'outside' attribute is defined in SBML Level&nbsp;1 and
22909        Level&nbsp;2, but does not exist in SBML Level&nbsp;3.
22910
22911        @see getOutside()
22912        @see setOutside()
22913        @see unsetOutside()
22914
22915        """
22916        return _libsbml.Compartment_isSetOutside(self)
22917
22918    def isSetSpatialDimensions(self):
22919        r"""
22920        isSetSpatialDimensions(Compartment self) -> bool
22921
22922        Predicate returning @c True if this Compartment object's
22923        'spatialDimensions' attribute is set.
22924
22925        @return @c True if the 'spatialDimensions' attribute of this
22926        Compartment object is set, @c False otherwise.
22927
22928        @see getSpatialDimensions()
22929        @see setSpatialDimensions()
22930        @see unsetSpatialDimensions()
22931
22932        """
22933        return _libsbml.Compartment_isSetSpatialDimensions(self)
22934
22935    def isSetConstant(self):
22936        r"""
22937        isSetConstant(Compartment self) -> bool
22938
22939        Predicate returning @c True if this Compartment object's 'constant'
22940        attribute is set.
22941
22942        @return @c True if the 'constant' attribute of this Compartment object is
22943        set, @c False otherwise.
22944
22945        @see getConstant()
22946        @see setConstant()
22947
22948        """
22949        return _libsbml.Compartment_isSetConstant(self)
22950
22951    def setId(self, sid):
22952        r"""
22953        setId(Compartment self, string sid) -> int
22954
22955        Sets the value of the 'id' attribute of this Compartment object.
22956
22957        The string @p sid is copied.
22958
22959        @par
22960        The identifier given by an object's 'id' attribute value
22961        is used to identify the object within the SBML model definition.
22962        Other objects can refer to the component using this identifier.  The
22963        data type of 'id' is always <code>SId</code> or a type derived
22964        from that, such as <code>UnitSId</code>, depending on the object in
22965        question.  All data types are defined as follows:
22966        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
22967        letter ::= 'a'..'z','A'..'Z'
22968        digit  ::= '0'..'9'
22969        idChar ::= letter | digit | '_'
22970        SId    ::= ( letter | '_' ) idChar*
22971        </pre>
22972        The characters <code>(</code> and <code>)</code> are used for grouping,
22973        the character <code>*</code> 'zero or more times', and the character
22974        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
22975        is determined by an exact character sequence match; i.e., comparisons must
22976        be performed in a case-sensitive manner.  This applies to all uses of
22977        <code>SId</code>, <code>SIdRef</code>, and derived types.
22978
22979        Users need to be aware of some important API issues that are the result of
22980        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
22981        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
22982        of SBML objects.  To simplify the work of programmers, libSBML's API
22983        provided get, set, check, and unset on the SBase object class itself
22984        instead of on individual subobject classes. This made the
22985        get/set/etc. methods uniformly available on all objects in the libSBML
22986        API.  LibSBML simply returned empty strings or otherwise did not act when
22987        the methods were applied to SBML objects that were not defined by the SBML
22988        specification to have 'id' or 'name' attributes.  Additional complications
22989        arose with the rule and assignment objects: InitialAssignment,
22990        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
22991        the rule object hierarchy was different, and in addition, then as now,
22992        they possess different attributes: 'variable' (for the rules and event
22993        assignments), 'symbol' (for initial assignments), or neither (for
22994        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
22995        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
22996
22997        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
22998        Version&nbsp;2, it became necessary to introduce a new way to interact
22999        with the attributes more consistently in libSBML to avoid breaking
23000        backward compatibility in the behavior of the original 'id' methods.  For
23001        this reason, libSBML provides four functions (getIdAttribute(),
23002        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
23003        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
23004        from SBase, regardless of the object's type.  <strong>These new methods
23005        should be used instead of the older getId()/setId()/etc. methods</strong>
23006        unless the old behavior is somehow necessary.  Regardless of the Level and
23007        Version of the SBML, these functions allow client applications to use more
23008        generalized code in some situations (for instance, when manipulating
23009        objects that are all known to have identifiers).  If the object in
23010        question does not posess an 'id' attribute according to the SBML
23011        specification for the Level and Version in use, libSBML will not allow the
23012        identifier to be set, nor will it read or write 'id' attributes for those
23013        objects.
23014
23015        @param sid the string to use as the identifier of this Compartment object. If
23016        the string is @c None, this method will return
23017        @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink.
23018
23019        @return integer value indicating success/failure of the
23020        function.  @if clike The value is drawn from the
23021        enumeration #OperationReturnValues_t. @endif@~ The possible values
23022        returned by this function are:
23023        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23024        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
23025
23026        @see getId()
23027        @see unsetId()
23028        @see isSetId()
23029
23030        """
23031        return _libsbml.Compartment_setId(self, sid)
23032
23033    def setName(self, name):
23034        r"""
23035        setName(Compartment self, string name) -> int
23036
23037        Sets the value of the 'name' attribute of this Compartment object.
23038
23039        @par
23040
23041        The string in @p name is copied.
23042
23043        @param name the new name for the SBML object.
23044
23045        @return integer value indicating success/failure of the
23046        function.  @if clike The value is drawn from the
23047        enumeration #OperationReturnValues_t. @endif@~ The possible values
23048        returned by this function are:
23049        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23050        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
23051
23052        """
23053        return _libsbml.Compartment_setName(self, name)
23054
23055    def setCompartmentType(self, sid):
23056        r"""
23057        setCompartmentType(Compartment self, string sid) -> int
23058
23059        Sets the 'compartmentType' attribute of this Compartment object.
23060
23061        @param sid the identifier of a CompartmentType object defined elsewhere
23062        in this Model. If the string is @c None, this method will return
23063        @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink.
23064
23065        @return integer value indicating success/failure of the
23066        function.  @if clike The value is drawn from the
23067        enumeration #OperationReturnValues_t. @endif@~ The possible values
23068        returned by this function are:
23069        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23070        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
23071        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
23072
23073        @note The 'compartmentType' attribute is only available in SBML
23074        Level&nbsp;2 Versions&nbsp;2&ndash;4.
23075
23076        @see isSetCompartmentType()
23077        @see getCompartmentType()
23078        @see unsetCompartmentType()
23079
23080        """
23081        return _libsbml.Compartment_setCompartmentType(self, sid)
23082
23083    def setSpatialDimensions(self, *args):
23084        r"""
23085        setSpatialDimensions(Compartment self, unsigned int value) -> int
23086        setSpatialDimensions(Compartment self, double value) -> int
23087
23088        This method has multiple variants; they differ in the arguments
23089         they accept.  Each variant is described separately below.
23090
23091        @par
23092        <hr>
23093        <span class='variant-sig-heading'>Method variant with the following signature</span>:
23094         <pre class='signature'>setSpatialDimensions(double value)</pre>
23095
23096        Sets the 'spatialDimensions' attribute of this Compartment object as a double.
23097
23098        @param value a double indicating the number of dimensions
23099        of this compartment.
23100
23101        @return integer value indicating success/failure of the
23102        function.  @if clike The value is drawn from the
23103        enumeration #OperationReturnValues_t. @endif@~ The possible values
23104        returned by this function are:
23105        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23106        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
23107        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
23108
23109        @see getSpatialDimensions()
23110        @see isSetSpatialDimensions()
23111        @see unsetSpatialDimensions()
23112
23113
23114        @par
23115        <hr>
23116        <span class='variant-sig-heading'>Method variant with the following signature</span>:
23117         <pre class='signature'>setSpatialDimensions(long value)</pre>
23118
23119        Sets the 'spatialDimensions' attribute of this Compartment object.
23120
23121        @param value a long integereger indicating the number of dimensions
23122        of this compartment.
23123
23124        @return integer value indicating success/failure of the
23125        function.  @if clike The value is drawn from the
23126        enumeration #OperationReturnValues_t. @endif@~ The possible values
23127        returned by this function are:
23128        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23129        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
23130        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
23131
23132        @see getSpatialDimensions()
23133        @see isSetSpatialDimensions()
23134        @see unsetSpatialDimensions()
23135
23136        """
23137        return _libsbml.Compartment_setSpatialDimensions(self, *args)
23138
23139    def setSize(self, value):
23140        r"""
23141        setSize(Compartment self, double value) -> int
23142
23143        Sets the 'size' attribute (or 'volume' in SBML Level&nbsp;1) of this
23144        Compartment object.
23145
23146        @param value a @c float representing the size of this compartment
23147        instance in whatever units are in effect for the compartment.
23148
23149        @return integer value indicating success/failure of the
23150        function.  @if clike The value is drawn from the
23151        enumeration #OperationReturnValues_t. @endif@~ This particular
23152        function only does one thing irrespective of user input or
23153        object state, and thus will only return a single value:
23154        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23155
23156        @note This method is identical to
23157        @if java Compartment.setVolume()@else setVolume()@endif.
23158
23159        @see setVolume()
23160        @see getSize()
23161        @see isSetSize()
23162        @see unsetSize()
23163
23164        """
23165        return _libsbml.Compartment_setSize(self, value)
23166
23167    def setVolume(self, value):
23168        r"""
23169        setVolume(Compartment self, double value) -> int
23170
23171        Sets the 'volume' attribute (or 'size' in SBML Level&nbsp;2) of this
23172        Compartment object.
23173
23174        This method is identical to
23175        @if java Compartment.setSize()@else setSize()@endif@~
23176        and is provided for compatibility between SBML Level&nbsp;1 and
23177        higher Levels of SBML.
23178
23179        @param value a @c float representing the volume of this compartment
23180        instance in whatever units are in effect for the compartment.
23181
23182        @return integer value indicating success/failure of the
23183        function.  @if clike The value is drawn from the
23184        enumeration #OperationReturnValues_t. @endif@~ This particular
23185        function only does one thing irrespective of user input or
23186        object state, and thus will only return a single value:
23187        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23188
23189        @note The attribute 'volume' only exists by that name in SBML
23190        Level&nbsp;1.  In Level&nbsp;2 and above, the equivalent attribute is
23191        named 'size'.  In SBML Level&nbsp;1, a compartment's volume has a default
23192        value (@c 1.0) and therefore methods such as
23193        @if conly Compartment_isSetVolume() @else isSetVolume()@endif@~
23194        will always return @c True for a Level&nbsp;1 model.  In Level&nbsp;2, a
23195        compartment's size (the equivalent of SBML Level&nbsp;1's 'volume') is
23196        optional and has no default value, and therefore may or may not be set.
23197
23198        @see setSize()
23199        @see getVolume()
23200        @see isSetVolume()
23201        @see unsetVolume()
23202
23203        """
23204        return _libsbml.Compartment_setVolume(self, value)
23205
23206    def setUnits(self, sid):
23207        r"""
23208        setUnits(Compartment self, string sid) -> int
23209
23210        Sets the 'units' attribute of this Compartment object.
23211
23212        @param sid the identifier of the defined units to use.  If @p sid is
23213        @c None, then this method will return
23214        @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink.
23215
23216        @return integer value indicating success/failure of the
23217        function.  @if clike The value is drawn from the
23218        enumeration #OperationReturnValues_t. @endif@~ The possible values
23219        returned by this function are:
23220        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23221        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
23222
23223        @see isSetUnits()
23224        @see getUnits()
23225        @see unsetUnits()
23226
23227        """
23228        return _libsbml.Compartment_setUnits(self, sid)
23229
23230    def setOutside(self, sid):
23231        r"""
23232        setOutside(Compartment self, string sid) -> int
23233
23234        Sets the 'outside' attribute of this Compartment object.
23235
23236        @param sid the identifier of a compartment that encloses this one. If @p
23237        sid is @c None, then this method will return
23238        @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink.
23239
23240        @return integer value indicating success/failure of the
23241        function.  @if clike The value is drawn from the
23242        enumeration #OperationReturnValues_t. @endif@~ The possible values
23243        returned by this function are:
23244        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23245        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
23246
23247        @note The 'outside' attribute is defined in SBML Level&nbsp;1 and
23248        Level&nbsp;2, but does not exist in SBML Level&nbsp;3.
23249
23250        @see isSetOutside()
23251        @see getOutside()
23252        @see unsetOutside()
23253
23254        """
23255        return _libsbml.Compartment_setOutside(self, sid)
23256
23257    def setConstant(self, value):
23258        r"""
23259        setConstant(Compartment self, bool value) -> int
23260
23261        Sets the value of the 'constant' attribute of this Compartment object.
23262
23263        @param value a boolean indicating whether the size/volume of this
23264        compartment should be considered constant (@c True) or variable
23265        (@c False).
23266
23267        @return integer value indicating success/failure of the
23268        function.  @if clike The value is drawn from the
23269        enumeration #OperationReturnValues_t. @endif@~ The possible values
23270        returned by this function are:
23271        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23272        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
23273
23274        @see isSetConstant()
23275        @see getConstant()
23276
23277        """
23278        return _libsbml.Compartment_setConstant(self, value)
23279
23280    def renameSIdRefs(self, oldid, newid):
23281        r"""
23282        renameSIdRefs(Compartment self, string oldid, string newid)
23283
23284        Replaces all uses of a given @c SIdRef type attribute value with another
23285        value.
23286
23287        @par
23288        In SBML, object identifiers are of a data type called <code>SId</code>.
23289        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
23290        introduced for attribute values that refer to <code>SId</code> values; in
23291        previous Levels of SBML, this data type did not exist and attributes were
23292        simply described to as 'referring to an identifier', but the effective
23293        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
23294        other methods of libSBML refer to the type <code>SIdRef</code> for all
23295        Levels of SBML, even if the corresponding SBML specification did not
23296        explicitly name the data type.
23297
23298        This method works by looking at all attributes and (if appropriate)
23299        mathematical formulas in MathML content, comparing the referenced
23300        identifiers to the value of @p oldid.  If any matches are found, the
23301        matching values are replaced with @p newid.  The method does @em not
23302        descend into child elements.
23303
23304        @param oldid the old identifier.
23305        @param newid the new identifier.
23306
23307        """
23308        return _libsbml.Compartment_renameSIdRefs(self, oldid, newid)
23309
23310    def renameUnitSIdRefs(self, oldid, newid):
23311        r"""
23312        renameUnitSIdRefs(Compartment self, string oldid, string newid)
23313
23314        Replaces all uses of a given @c UnitSIdRef type attribute value with
23315        another value.
23316
23317        @par
23318        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
23319        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
23320        introduced for attribute values that refer to <code>UnitSId</code> values; in
23321        previous Levels of SBML, this data type did not exist and attributes were
23322        simply described to as 'referring to a unit identifier', but the effective
23323        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
23324        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
23325        Levels of SBML, even if the corresponding SBML specification did not
23326        explicitly name the data type.
23327
23328        This method works by looking at all unit identifier attribute values
23329        (including, if appropriate, inside mathematical formulas), comparing the
23330        referenced unit identifiers to the value of @p oldid.  If any matches
23331        are found, the matching values are replaced with @p newid.  The method
23332        does @em not descend into child elements.
23333
23334        @param oldid the old identifier.
23335        @param newid the new identifier.
23336
23337        """
23338        return _libsbml.Compartment_renameUnitSIdRefs(self, oldid, newid)
23339
23340    def unsetName(self):
23341        r"""
23342        unsetName(Compartment self) -> int
23343
23344        Unsets the value of the 'name' attribute of this Compartment object.
23345
23346        @par
23347        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
23348        moved to SBase directly, instead of being defined individually for many
23349        (but not all) objects.  LibSBML has for a long time provided functions
23350        defined on SBase itself to get, set, and unset those attributes, which
23351        would fail or otherwise return empty strings if executed on any object
23352        for which those attributes were not defined.  Now that all SBase objects
23353        define those attributes, those functions now succeed for any object with
23354        the appropriate level and version.
23355
23356        The 'name' attribute is
23357        optional and is not intended to be used for cross-referencing purposes
23358        within a model.  Its purpose instead is to provide a human-readable
23359        label for the component.  The data type of 'name' is the type
23360        <code>string</code> defined in XML Schema.  SBML imposes no
23361        restrictions as to the content of 'name' attributes beyond those
23362        restrictions defined by the <code>string</code> type in XML Schema.
23363
23364        The recommended practice for handling 'name' is as follows.  If a
23365        software tool has the capability for displaying the content of 'name'
23366        attributes, it should display this content to the user as a
23367        component's label instead of the component's 'id'.  If the user
23368        interface does not have this capability (e.g., because it cannot
23369        display or use special characters in symbol names), or if the 'name'
23370        attribute is missing on a given component, then the user interface
23371        should display the value of the 'id' attribute instead.  (Script
23372        language interpreters are especially likely to display 'id' instead of
23373        'name'.)
23374
23375        As a consequence of the above, authors of systems that automatically
23376        generate the values of 'id' attributes should be aware some systems
23377        may display the 'id''s to the user.  Authors therefore may wish to
23378        take some care to have their software create 'id' values that are: (a)
23379        reasonably easy for humans to type and read; and (b) likely to be
23380        meaningful, for example by making the 'id' attribute be an abbreviated
23381        form of the name attribute value.
23382
23383        An additional point worth mentioning is although there are
23384        restrictions on the uniqueness of 'id' values, there are no
23385        restrictions on the uniqueness of 'name' values in a model.  This
23386        allows software applications leeway in assigning component identifiers.
23387
23388        Regardless of the level and version of the SBML, these functions allow
23389        client applications to use more generalized code in some situations
23390        (for instance, when manipulating objects that are all known to have
23391        names).  If the object in question does not posess a 'name' attribute
23392        according to the SBML specification for the Level and Version in use,
23393        libSBML will not allow the name to be set, nor will it read or
23394        write 'name' attributes for those objects.
23395
23396        @return integer value indicating success/failure of the
23397        function.  @if clike The value is drawn from the
23398        enumeration #OperationReturnValues_t. @endif@~ The possible values
23399        returned by this function are:
23400        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23401        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23402
23403        @see getName()
23404        @see setName()
23405        @see isSetName()
23406
23407        """
23408        return _libsbml.Compartment_unsetName(self)
23409
23410    def unsetCompartmentType(self):
23411        r"""
23412        unsetCompartmentType(Compartment self) -> int
23413
23414        Unsets the value of the 'compartmentType' attribute of this Compartment object.
23415
23416        @return integer value indicating success/failure of the
23417        function.  @if clike The value is drawn from the
23418        enumeration #OperationReturnValues_t. @endif@~ The possible values
23419        returned by this function are:
23420        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23421        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23422        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
23423
23424        @note The 'compartmentType' attribute is only available in SBML
23425        Level&nbsp;2 Versions&nbsp;2&ndash;4.
23426
23427        @see setCompartmentType()
23428        @see isSetCompartmentType()
23429        @see getCompartmentType()
23430
23431        """
23432        return _libsbml.Compartment_unsetCompartmentType(self)
23433
23434    def unsetConstant(self):
23435        r"""
23436        unsetConstant(Compartment self) -> int
23437
23438        Unsets the value of the 'constant' attribute of this Compartment object.
23439
23440        @return integer value indicating success/failure of the
23441        function.  @if clike The value is drawn from the
23442        enumeration #OperationReturnValues_t. @endif@~ The possible values
23443        returned by this function are:
23444        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23445        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23446
23447        @see isSetConstant()
23448        @see setConstant()
23449        @see getConstant()
23450
23451        """
23452        return _libsbml.Compartment_unsetConstant(self)
23453
23454    def unsetSize(self):
23455        r"""
23456        unsetSize(Compartment self) -> int
23457
23458        Unsets the value of the 'size' attribute of this Compartment object.
23459
23460        In SBML Level&nbsp;1, a compartment's volume has a default value
23461        (@c 1.0) and therefore <em>should always be set</em>.  Calling this method
23462        on a Level&nbsp;1 model resets the value to @c 1.0 rather than actually
23463        unsetting it.  In Level&nbsp;2, a compartment's 'size' is optional with
23464        no default value, and unsetting it will result in the compartment having
23465        no defined size.
23466
23467        @return integer value indicating success/failure of the
23468        function.  @if clike The value is drawn from the
23469        enumeration #OperationReturnValues_t. @endif@~ The possible values
23470        returned by this function are:
23471        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23472        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23473
23474        @note This method is identical to
23475        @if java Compartment.unsetVolume()@else unsetVolume()@endif.
23476
23477        @see unsetVolume()
23478        @see getSize()
23479        @see isSetSize()
23480        @see setSize()
23481
23482        """
23483        return _libsbml.Compartment_unsetSize(self)
23484
23485    def unsetVolume(self):
23486        r"""
23487        unsetVolume(Compartment self) -> int
23488
23489        Unsets the value of the 'volume' attribute of this Compartment object.
23490
23491        This method is identical to
23492        @if java Compartment.unsetSize()@else unsetSize()@endif.  Please refer
23493        to that method's documentation for more information about its behavior.
23494
23495        @return integer value indicating success/failure of the
23496        function.  @if clike The value is drawn from the
23497        enumeration #OperationReturnValues_t. @endif@~ The possible values
23498        returned by this function are:
23499        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23500        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23501
23502        @note The attribute 'volume' only exists by that name in SBML
23503        Level&nbsp;1.  In Level&nbsp;2 and above, the equivalent attribute is
23504        named 'size'.  In SBML Level&nbsp;1, a compartment's volume has a default
23505        value (@c 1.0) and therefore methods such as
23506        @if conly Compartment_isSetVolume() @else isSetVolume()@endif@~
23507        will always return @c True for a Level&nbsp;1 model.  In Level&nbsp;2, a
23508        compartment's size (the equivalent of SBML Level&nbsp;1's 'volume') is
23509        optional and has no default value, and therefore may or may not be set.
23510
23511        @see unsetSize()
23512        @see getVolume()
23513        @see setVolume()
23514        @see isSetVolume()
23515
23516        """
23517        return _libsbml.Compartment_unsetVolume(self)
23518
23519    def unsetUnits(self):
23520        r"""
23521        unsetUnits(Compartment self) -> int
23522
23523        Unsets the value of the 'units' attribute of this Compartment object.
23524
23525        @return integer value indicating success/failure of the
23526        function.  @if clike The value is drawn from the
23527        enumeration #OperationReturnValues_t. @endif@~ The possible values
23528        returned by this function are:
23529        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23530        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23531
23532        @see isSetUnits()
23533        @see setUnits()
23534        @see getUnits()
23535
23536        """
23537        return _libsbml.Compartment_unsetUnits(self)
23538
23539    def unsetOutside(self):
23540        r"""
23541        unsetOutside(Compartment self) -> int
23542
23543        Unsets the value of the 'outside' attribute of this Compartment object.
23544
23545        @return integer value indicating success/failure of the
23546        function.  @if clike The value is drawn from the
23547        enumeration #OperationReturnValues_t. @endif@~ The possible values
23548        returned by this function are:
23549        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23550        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23551
23552        @note The 'outside' attribute is defined in SBML Level&nbsp;1 and
23553        Level&nbsp;2, but does not exist in SBML Level&nbsp;3.
23554
23555        @see isSetOutside()
23556        @see getOutside()
23557        @see setOutside()
23558
23559        """
23560        return _libsbml.Compartment_unsetOutside(self)
23561
23562    def unsetSpatialDimensions(self):
23563        r"""
23564        unsetSpatialDimensions(Compartment self) -> int
23565
23566        Unsets the value of the 'spatialDimensions' attribute of this
23567        Compartment object.
23568
23569        In SBML Levels prior to Level&nbsp;3, compartments must always have a
23570        value for the number of dimensions.  Consequently, calling this method
23571        on a model of SBML Level 1&ndash;2 will result in a return value of
23572        @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
23573
23574        @return integer value indicating success/failure of the
23575        function.  @if clike The value is drawn from the
23576        enumeration #OperationReturnValues_t. @endif@~ The possible values
23577        returned by this function are:
23578        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
23579        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
23580        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
23581
23582        @note This function is only valid for SBML Level&nbsp;3.
23583
23584        @see getSpatialDimensions()
23585        @see isSetSpatialDimensions()
23586        @see setSpatialDimensions()
23587
23588        """
23589        return _libsbml.Compartment_unsetSpatialDimensions(self)
23590
23591    def getDerivedUnitDefinition(self, *args):
23592        r"""
23593        getDerivedUnitDefinition(Compartment self) -> UnitDefinition
23594        getDerivedUnitDefinition(Compartment self) -> UnitDefinition
23595
23596        Constructs and returns a UnitDefinition that corresponds to the units
23597        of this Compartment object's designated size.
23598
23599        @par
23600        Compartments in SBML have an attribute ('units') for declaring the
23601        units of measurement intended for the value of the compartment's size.  In
23602        the absence of a value given for this attribute, the units are inherited
23603        from values either defined on the enclosing Model (in SBML Level&nbsp;3)
23604        or in defaults (in SBML Level&nbsp;2).  This method returns a
23605        @if conly UnitDefinition_t structure @else UnitDefinition object@endif@~
23606        based on how this compartment's units are interpreted according to the
23607        relevant SBML guidelines, or it returns @c None if no units have been
23608        declared and no defaults are defined by the relevant SBML specification.
23609
23610        Note that unit declarations for
23611        @if conly Compartment_t structures @else Compartment objects @endif@~
23612        are specified in terms of the @em identifier of a unit,
23613        but @em this method returns @if conly a structure @else an object @endif,
23614        not a unit identifier.  It does this by constructing an appropriate
23615        @if conly UnitDefinition_t structure @else UnitDefinition object@endif.  For
23616        SBML Level&nbsp;2 models, it will do this even when the value of the
23617        'units' attribute is one of the special SBML Level&nbsp;2 unit identifiers
23618        @c 'substance', @c 'volume', @c 'area', @c 'length' or @c 'time'.  Callers
23619        may find this useful in conjunction with the helper methods provided by
23620        the @if conly UnitDefinition_t structure @else UnitDefinition
23621        class@endif@~ for comparing different UnitDefinition objects.
23622
23623        @return a UnitDefinition that expresses the units of this
23624        Compartment object, or @c None if one cannot be constructed.
23625
23626        @note The libSBML system for unit analysis depends on the model as a
23627        whole.  In cases where the
23628        @if conly Compartment_t structure @else Compartment object@endif@~ has not
23629        yet been added to a model, or the model itself is incomplete, unit
23630        analysis is not possible, and consequently this method will return
23631        @c None.
23632
23633        @see isSetUnits()
23634        @see getUnits()
23635
23636        """
23637        return _libsbml.Compartment_getDerivedUnitDefinition(self, *args)
23638
23639    def getTypeCode(self):
23640        r"""
23641        getTypeCode(Compartment self) -> int
23642
23643        Returns the libSBML type code for this SBML object.
23644
23645        @par
23646        LibSBML attaches an identifying code to every kind of SBML object.  These
23647        are integer constants known as <em>SBML type codes</em>.  The names of all
23648        the codes begin with the characters <code>SBML_</code>.
23649        @if clike The set of possible type codes for core elements is defined in
23650        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
23651        SBML Level&nbsp;3 packages define their own extra enumerations of type
23652        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
23653        package).@endif@if java In the Java language interface for libSBML, the
23654        type codes are defined as static integer constants in the interface class
23655        {@link libsbmlConstants}.  @endif@if python In the Python language
23656        interface for libSBML, the type codes are defined as static integer
23657        constants in the interface class @link libsbml@endlink.@endif@if csharp In
23658        the C# language interface for libSBML, the type codes are defined as
23659        static integer constants in the interface class
23660        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
23661        package plug-ins may use overlapping type codes; to identify the package
23662        to which a given object belongs, call the
23663        <code>@if conly SBase_getPackageName()
23664        @else SBase.getPackageName()
23665        @endif</code>
23666        method on the object.
23667
23668        The exception to this is lists:  all SBML-style list elements have the type
23669        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
23670        are from.
23671
23672        @return the SBML type code for this object:
23673        @link libsbml#SBML_COMPARTMENT SBML_COMPARTMENT@endlink (default).
23674
23675        @warning <span class='warning'>The specific integer values of the possible
23676        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
23677        packages,  To fully identify the correct code, <strong>it is necessary to
23678        invoke both getPackageName() and getTypeCode()</strong> (or
23679        ListOf.getItemTypeCode()).</span>
23680
23681        @see getElementName()
23682        @see getPackageName()
23683
23684        """
23685        return _libsbml.Compartment_getTypeCode(self)
23686
23687    def getElementName(self):
23688        r"""
23689        getElementName(Compartment self) -> string
23690
23691        Returns the XML element name of this object
23692
23693        For Compartment, the XML element name is always @c 'compartment'.
23694
23695        @return the name of this element.
23696
23697        """
23698        return _libsbml.Compartment_getElementName(self)
23699
23700    def hasRequiredAttributes(self):
23701        r"""
23702        hasRequiredAttributes(Compartment self) -> bool
23703
23704        Predicate returning @c True if all the required attributes for this
23705        Compartment object have been set.
23706
23707        The required attributes for a Compartment object are:
23708        @li 'id' (or 'name' in SBML Level&nbsp;1)
23709        @li 'constant' (in SBML Level&nbsp;3 only)
23710
23711        @return @c True if the required attributes have been set, @c False
23712        otherwise.
23713
23714        """
23715        return _libsbml.Compartment_hasRequiredAttributes(self)
23716
23717# Register Compartment in _libsbml:
23718_libsbml.Compartment_swigregister(Compartment)
23719
23720class ListOfCompartments(ListOf):
23721    r"""
23722
23723    @sbmlpackage{core}
23724
23725    @htmlinclude pkg-marker-core.html A list of Compartment objects.
23726
23727    @par
23728    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
23729    are merely containers used for organizing the main components of an SBML
23730    model.  In libSBML's implementation, ListOf___
23731    @if conly data structures @else classes@endif@~ are derived from the
23732    intermediate utility @if conly structure @else class@endif@~ ListOf, which
23733    is not defined by the SBML specifications but serves as a useful
23734    programmatic construct.  ListOf is itself is in turn derived from SBase,
23735    which provides all of the various ListOf___
23736    @if conly data structures @else classes@endif@~ with common features
23737    defined by the SBML specification, such as 'metaid' attributes and
23738    annotations.
23739
23740    The relationship between the lists and the rest of an SBML model is
23741    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
23742
23743    @htmlinclude listof-illustration.html
23744
23745    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
23746    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
23747    Version&nbsp;2 allows
23748    containers to contain zero or more of the relevant object, instead of
23749    requiring at least one.  As such, libsbml will write out an
23750    otherwise-empty ListOf___ element that has any optional attribute set
23751    (such as 'id' or 'metaid'), that has an optional child (such
23752    as a 'notes' or 'annotation'), or that has attributes or children set
23753    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
23754    any other children.
23755
23756    Readers may wonder about the motivations for using the ListOf___
23757    containers in SBML.  A simpler approach in XML might be to place the
23758    components all directly at the top level of the model definition.  The
23759    choice made in SBML is to group them within XML elements named after
23760    %ListOf<em>Classname</em>, in part because it helps organize the
23761    components.  More importantly, the fact that the container classes are
23762    derived from SBase means that software tools can add information @em about
23763    the lists themselves into each list container's 'annotation'.
23764
23765    @see ListOfFunctionDefinitions
23766    @see ListOfUnitDefinitions
23767    @see ListOfCompartmentTypes
23768    @see ListOfSpeciesTypes
23769    @see ListOfCompartments
23770    @see ListOfSpecies
23771    @see ListOfParameters
23772    @see ListOfInitialAssignments
23773    @see ListOfRules
23774    @see ListOfConstraints
23775    @see ListOfReactions
23776    @see ListOfEvents
23777
23778    @if conly
23779    @note In the C API for libSBML, functions that in other language APIs
23780    would be inherited by the various ListOf___ structures not shown in the
23781    pages for the individual ListOf___'s.  Instead, the functions are defined
23782    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
23783    the many common functions available for manipulating ListOf___
23784    structures</strong>.  The documentation for the individual ListOf___
23785    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
23786    all of the functionality available. @endif@~
23787
23788    """
23789
23790    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
23791    __repr__ = _swig_repr
23792
23793    def __init__(self, *args):
23794        r"""
23795        __init__(ListOfCompartments self, unsigned int level, unsigned int version) -> ListOfCompartments
23796        __init__(ListOfCompartments self, SBMLNamespaces sbmlns) -> ListOfCompartments
23797
23798        This method has multiple variants; they differ in the arguments
23799         they accept.  Each variant is described separately below.
23800
23801        @par
23802        <hr>
23803        <span class='variant-sig-heading'>Method variant with the following signature</span>:
23804         <pre class='signature'>ListOfCompartments(SBMLNamespaces sbmlns)</pre>
23805
23806        Creates a new ListOfCompartments object.
23807
23808        The object is constructed such that it is valid for the SBML Level and
23809        Version combination determined by the SBMLNamespaces object in @p
23810        sbmlns.
23811
23812        @param sbmlns an SBMLNamespaces object that is used to determine the
23813        characteristics of the ListOfCompartments object to be created.
23814
23815        @throws SBMLConstructorException
23816        Thrown if the given @p sbmlns is inconsistent or incompatible
23817        with this object.
23818
23819        @note Attempting to add an object to an SBMLDocument having a different
23820        combination of SBML Level, Version and XML namespaces than the object
23821        itself will result in an error at the time a caller attempts to make the
23822        addition.  A parent object must have compatible Level, Version and XML
23823        namespaces.  (Strictly speaking, a parent may also have more XML
23824        namespaces than a child, but the reverse is not permitted.)  The
23825        restriction is necessary to ensure that an SBML model has a consistent
23826        overall structure.  This requires callers to manage their objects
23827        carefully, but the benefit is increased flexibility in how models can be
23828        created by permitting callers to create objects bottom-up if desired.  In
23829        situations where objects are not yet attached to parents (e.g.,
23830        SBMLDocument), knowledge of the intented SBML Level and Version help
23831        libSBML determine such things as whether it is valid to assign a
23832        particular value to an attribute.
23833
23834
23835        @par
23836        <hr>
23837        <span class='variant-sig-heading'>Method variant with the following signature</span>:
23838         <pre class='signature'>ListOfCompartments(long level, long version)</pre>
23839
23840        Creates a new ListOfCompartments object.
23841
23842        The object is constructed such that it is valid for the given SBML
23843        Level and Version combination.
23844
23845        @param level the SBML Level.
23846
23847        @param version the Version within the SBML Level.
23848
23849        @throws SBMLConstructorException
23850        Thrown if the given @p level and @p version combination are invalid
23851        or if this object is incompatible with the given level and version.
23852
23853        @note Attempting to add an object to an SBMLDocument having a different
23854        combination of SBML Level, Version and XML namespaces than the object
23855        itself will result in an error at the time a caller attempts to make the
23856        addition.  A parent object must have compatible Level, Version and XML
23857        namespaces.  (Strictly speaking, a parent may also have more XML
23858        namespaces than a child, but the reverse is not permitted.)  The
23859        restriction is necessary to ensure that an SBML model has a consistent
23860        overall structure.  This requires callers to manage their objects
23861        carefully, but the benefit is increased flexibility in how models can be
23862        created by permitting callers to create objects bottom-up if desired.  In
23863        situations where objects are not yet attached to parents (e.g.,
23864        SBMLDocument), knowledge of the intented SBML Level and Version help
23865        libSBML determine such things as whether it is valid to assign a
23866        particular value to an attribute.
23867
23868        """
23869        _libsbml.ListOfCompartments_swiginit(self, _libsbml.new_ListOfCompartments(*args))
23870
23871    def clone(self):
23872        r"""
23873        clone(ListOfCompartments self) -> ListOfCompartments
23874
23875        Creates and returns a deep copy of this ListOfCompartments object.
23876
23877        @return the (deep) copy of this ListOfCompartments object.
23878
23879        """
23880        return _libsbml.ListOfCompartments_clone(self)
23881
23882    def getItemTypeCode(self):
23883        r"""
23884        getItemTypeCode(ListOfCompartments self) -> int
23885
23886        Returns the libSBML type code for the objects contained in this ListOf
23887        (i.e., Compartment objects, if the list is non-empty).
23888
23889        @par
23890        LibSBML attaches an identifying code to every kind of SBML object.  These
23891        are integer constants known as <em>SBML type codes</em>.  The names of all
23892        the codes begin with the characters <code>SBML_</code>.
23893        @if clike The set of possible type codes for core elements is defined in
23894        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
23895        SBML Level&nbsp;3 packages define their own extra enumerations of type
23896        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
23897        package).@endif@if java In the Java language interface for libSBML, the
23898        type codes are defined as static integer constants in the interface class
23899        {@link libsbmlConstants}.  @endif@if python In the Python language
23900        interface for libSBML, the type codes are defined as static integer
23901        constants in the interface class @link libsbml@endlink.@endif@if csharp In
23902        the C# language interface for libSBML, the type codes are defined as
23903        static integer constants in the interface class
23904        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
23905        package plug-ins may use overlapping type codes; to identify the package
23906        to which a given object belongs, call the
23907        <code>@if conly SBase_getPackageName()
23908        @else SBase.getPackageName()
23909        @endif</code>
23910        method on the object.
23911
23912        The exception to this is lists:  all SBML-style list elements have the type
23913        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
23914        are from.
23915
23916        @return the SBML type code for the objects contained in this ListOf
23917        instance: @link libsbml#SBML_COMPARTMENT SBML_COMPARTMENT@endlink (default).
23918
23919        @see getElementName()
23920        @see getPackageName()
23921
23922        """
23923        return _libsbml.ListOfCompartments_getItemTypeCode(self)
23924
23925    def getElementName(self):
23926        r"""
23927        getElementName(ListOfCompartments self) -> string
23928
23929        Returns the XML element name of this object.
23930
23931        For ListOfCompartments, the XML element name is always
23932        @c 'listOfCompartments'.
23933
23934        @return the name of this element.
23935
23936        """
23937        return _libsbml.ListOfCompartments_getElementName(self)
23938
23939    def get(self, *args):
23940        r"""
23941        get(ListOfCompartments self, unsigned int n) -> Compartment
23942        get(ListOfCompartments self, unsigned int n) -> Compartment
23943        get(ListOfCompartments self, string sid) -> Compartment
23944        get(ListOfCompartments self, string sid) -> Compartment
23945
23946        This method has multiple variants; they differ in the arguments
23947         they accept.  Each variant is described separately below.
23948
23949        @par
23950        <hr>
23951        <span class='variant-sig-heading'>Method variant with the following signature</span>:
23952         <pre class='signature'>get(long n)</pre>
23953
23954        Get a Compartment object from the ListOfCompartments.
23955
23956        @param n the index number of the Compartment object to get.
23957
23958        @return the nth Compartment object in this ListOfCompartments.
23959        If the index @p n is invalid, @c None is returned.
23960
23961        @see size()
23962
23963
23964        @par
23965        <hr>
23966        <span class='variant-sig-heading'>Method variant with the following signature</span>:
23967         <pre class='signature'>get(string sid)</pre>
23968
23969        Get a Compartment object from the ListOfCompartments
23970        based on its identifier.
23971
23972        @param sid a string representing the identifier
23973        of the Compartment object to get.
23974
23975        @return Compartment object in this ListOfCompartments
23976        with the given @p sid or @c None if no such
23977        Compartment object exists.
23978
23979        @see get()
23980        @see size()
23981
23982        """
23983        return _libsbml.ListOfCompartments_get(self, *args)
23984
23985    def remove(self, *args):
23986        r"""
23987        remove(ListOfCompartments self, unsigned int n) -> Compartment
23988        remove(ListOfCompartments self, string sid) -> Compartment
23989
23990        This method has multiple variants; they differ in the arguments
23991         they accept.  Each variant is described separately below.
23992
23993        @par
23994        <hr>
23995        <span class='variant-sig-heading'>Method variant with the following signature</span>:
23996         <pre class='signature'>remove(long n)</pre>
23997
23998        Removes the nth item from this ListOfCompartments items and returns a pointer to
23999        it.
24000
24001        The caller owns the returned item and is responsible for deleting it.
24002
24003        @param n the index of the item to remove.
24004
24005        @see size()
24006
24007
24008        @par
24009        <hr>
24010        <span class='variant-sig-heading'>Method variant with the following signature</span>:
24011         <pre class='signature'>remove(string sid)</pre>
24012
24013        Removes item in this ListOfCompartments items with the given identifier.
24014
24015        The caller owns the returned item and is responsible for deleting it.
24016        If none of the items in this list have the identifier @p sid, then
24017        @c None is returned.
24018
24019        @param sid the identifier of the item to remove.
24020
24021        @return the item removed.  As mentioned above, the caller owns the
24022        returned item.
24023
24024        """
24025        return _libsbml.ListOfCompartments_remove(self, *args)
24026    __swig_destroy__ = _libsbml.delete_ListOfCompartments
24027
24028# Register ListOfCompartments in _libsbml:
24029_libsbml.ListOfCompartments_swigregister(ListOfCompartments)
24030
24031class Species(SBase):
24032    r"""
24033
24034    @sbmlpackage{core}
24035
24036    @htmlinclude pkg-marker-core.html An SBML <em>species</em> &ndash; a pool of entities.
24037
24038    A @em species in SBML refers to a pool of entities that (a) are
24039    considered indistinguishable from each other for the purposes of the
24040    model, (b) participate in reactions, and (c) are located in a specific
24041    @em compartment.  The SBML Species object class is intended to represent
24042    these pools.
24043
24044    As with other major constructs in SBML, Species has a mandatory
24045    attribute, 'id', used to give the species type an identifier in the
24046    model.  The identifier must be a text string conforming to the identifer
24047    syntax permitted in SBML.  Species also has an optional 'name'
24048    attribute, of type @c string.  The 'id' and 'name' must be used
24049    according to the guidelines described in the SBML specifications.
24050
24051    The required attribute 'compartment' is used to identify the compartment
24052    in which the species is located.  The attribute's value must be the
24053    identifier of an existing Compartment object.  It is important to note
24054    that there is no default value for the 'compartment' attribute on
24055    Species; every species in an SBML model must be assigned a compartment
24056    @em explicitly.  (This also implies that every model with one or more
24057    Species objects must define at least one Compartment object.)
24058
24059
24060    @section species-amounts The initial amount and concentration of a species
24061
24062    The optional attributes 'initialAmount' and 'initialConcentration', both
24063    having a data type of @c float, can be used to set the @em initial
24064    quantity of the species in the compartment where the species is located.
24065    These attributes are mutually exclusive; i.e., <em>only one</em> can
24066    have a value on any given instance of a Species object.  Missing
24067    'initialAmount' and 'initialConcentration' values implies that their
24068    values either are unknown, or to be obtained from an external source, or
24069    determined by an InitialAssignment or other SBML construct elsewhere in
24070    the model.
24071
24072    A species' initial quantity in SBML is set by the 'initialAmount' or
24073    'initialConcentration' attribute exactly once.  If the 'constant'
24074    attribute is @c True, then the value of the species' quantity is fixed
24075    and cannot be changed except by an InitialAssignment.  These methods
24076    differ in that the 'initialAmount' and 'initialConcentration' attributes
24077    can only be used to set the species quantity to a literal floating-point
24078    number, whereas the use of an InitialAssignment object allows the value
24079    to be set using an arbitrary mathematical expression (which, thanks to
24080    MathML's expressiveness, may evaluate to a rational number).  If the
24081    species' 'constant' attribute is @c False, the species' quantity value
24082    may be overridden by an InitialAssignment or changed by AssignmentRule
24083    or AlgebraicRule, and in addition, for <em>t &gt; 0</em>, it may also be
24084    changed by a RateRule, Event objects, and as a result of being a
24085    reactant or product in one or more Reaction objects.  (However, some
24086    constructs are mutually exclusive; see the SBML specifications for the
24087    precise details.)  It is not an error to define 'initialAmount' or
24088    'initialConcentration' on a species and also redefine the value using an
24089    InitialAssignment, but the 'initialAmount' or 'initialConcentration'
24090    setting in that case is ignored.  The SBML specifications provide
24091    additional information about the semantics of assignments, rules and
24092    values for simulation time <em>t</em> <= <em>0</em>.
24093
24094    SBML Level&nbsp;2 additionally stipulates that in cases where a species'
24095    compartment has a 'spatialDimensions' value of @c 0 (zero), the species
24096    cannot have a value for 'initialConcentration' because the concepts of
24097    concentration and density break down when a container has zero
24098    dimensions.
24099
24100    @section species-units The units of a species' amount or concentration
24101
24102    When the attribute 'initialAmount' is set, the unit of measurement
24103    associated with the value of 'initialAmount' is specified by the Species
24104    attribute 'substanceUnits'.  When the 'initialConcentration' attribute
24105    is set, the unit of measurement associated with this concentration value
24106    is {<em>unit of amount</em>} divided by {<em>unit of size</em>}, where
24107    the {<em>unit of amount</em>} is specified by the Species
24108    'substanceUnits' attribute, and the {<em>unit of size</em>} is specified
24109    by the 'units' attribute of the Compartment object in which the species
24110    is located.  Note that in either case, a unit of <em>amount</em> is
24111    involved and determined by the 'substanceUnits' attribute.  Note
24112    <strong>these two attributes alone do not determine the units of the
24113    species when the species identifier appears in a mathematical
24114    expression</strong>; <em>that</em> aspect is determined by the attribute
24115    'hasOnlySubstanceUnits' discussed below.
24116
24117    In SBML Level&nbsp;3, if the 'substanceUnits' attribute is not set on a
24118    given Species object instance, then the unit of <em>amount</em> for that
24119    species is inherited from the 'substanceUnits' attribute on the
24120    enclosing Model object instance.  If that attribute on Model is not set
24121    either, then the unit associated with the species' quantity is
24122    undefined.
24123
24124    In SBML Level&nbsp;2, if the 'substanceUnits' attribute is not set on a
24125    given Species object instance, then the unit of <em>amount</em> for that
24126    species is taken from the predefined SBML unit identifier
24127    @c 'substance'.  The value assigned to 'substanceUnits' must be chosen from
24128    one of the following possibilities: one of the base unit identifiers
24129    defined in SBML, the built-in unit identifier @c 'substance', or the
24130    identifier of a new unit defined in the list of unit definitions in the
24131    enclosing Model object.  The chosen units for 'substanceUnits' must be
24132    be @c 'dimensionless', @c 'mole', @c 'item', @c 'kilogram', @c 'gram',
24133    or units derived from these.
24134
24135    As noted at the beginning of this section, simply setting
24136    'initialAmount' or 'initialConcentration' alone does @em not determine
24137    whether a species identifier represents an amount or a concentration
24138    when it appears elsewhere in an SBML model.  The role of the attribute
24139    'hasOnlySubstanceUnits' is to indicate whether the units of the species,
24140    when the species identifier appears in mathematical formulas, are
24141    intended to be concentration or amount.  The attribute takes on a
24142    boolean value.  In SBML Level&nbsp;3, the attribute has no default value
24143    and must always be set in a model; in SBML Level&nbsp;2, it has a
24144    default value of @c False.
24145
24146    The <em>units of the species</em> are used in the following ways:
24147    <ul>
24148    <li> When the species' identifier appears in a MathML formula, it
24149    represents the species' quantity, and the unit of measurement associated
24150    with the quantity is as described above.
24151
24152    <li> The 'math' elements of AssignmentRule, InitialAssignment and
24153    EventAssignment objects referring to this species should all have the
24154    same units as the unit of measurement associated with the species
24155    quantity.
24156
24157    <li> In a RateRule object that defines the rate of change of the
24158    species' quantity, the unit associated with the rule's 'math' element
24159    should be equal to the unit of the species' quantity divided by the
24160    model-wide unit of <em>time</em>; in other words, {<em>unit of species
24161    quantity</em>}/{<em>unit of time</em>}.
24162
24163    </ul>
24164
24165
24166    @section species-constant The 'constant' and 'boundaryCondition' attributes
24167
24168    The Species object class has two boolean attributes named 'constant' and
24169    'boundaryCondition', used to indicate whether and how the quantity of
24170    that species can vary during a simulation.  In SBML Level&nbsp;2 they
24171    are optional; in SBML Level&nbsp;3 they are mandatory.  The following
24172    table shows how to interpret the combined values of these attributes.
24173
24174    @htmlinclude species-boundarycondition.html
24175
24176    By default, when a species is a product or reactant of one or more
24177    reactions, its quantity is determined by those reactions.  In SBML, it
24178    is possible to indicate that a given species' quantity is <em>not</em>
24179    determined by the set of reactions even when that species occurs as a
24180    product or reactant; i.e., the species is on the <em>boundary</em> of
24181    the reaction system, and its quantity is not determined by the
24182    reactions.  The boolean attribute 'boundaryCondition' can be used to
24183    indicate this.  A value of @c False indicates that the species @em is
24184    part of the reaction system.  In SBML Level&nbsp;2, the attribute has a
24185    default value of @c False, while in SBML Level&nbsp;3, it has no
24186    default.
24187
24188    The 'constant' attribute indicates whether the species' quantity can be
24189    changed at all, regardless of whether by reactions, rules, or constructs
24190    other than InitialAssignment.  A value of @c False indicates that the
24191    species' quantity can be changed.  (This is also a common value because
24192    the purpose of most simulations is precisely to calculate changes in
24193    species quantities.)  In SBML Level&nbsp;2, the attribute has a default
24194    value of @c False, while in SBML Level&nbsp;3, it has no default.  Note
24195    that the initial quantity of a species can be set by an
24196    InitialAssignment irrespective of the value of the 'constant' attribute.
24197
24198    In practice, a 'boundaryCondition' value of @c True means a differential
24199    equation derived from the reaction definitions should not be generated
24200    for the species.  However, the species' quantity may still be changed by
24201    AssignmentRule, RateRule, AlgebraicRule, Event, and InitialAssignment
24202    constructs if its 'constant' attribute is @c False.  Conversely, if the
24203    species' 'constant' attribute is @c True, then its value cannot be
24204    changed by anything except InitialAssignment.
24205
24206    A species having 'boundaryCondition'=@c False and 'constant'=@c False
24207    can appear as a product and/or reactant of one or more reactions in the
24208    model.  If the species is a reactant or product of a reaction, it must
24209    @em not also appear as the target of any AssignmentRule or RateRule
24210    object in the model.  If instead the species has 'boundaryCondition'=
24211    @c False and 'constant'=@c True, then it cannot appear as a reactant or
24212    product, or as the target of any AssignmentRule, RateRule or
24213    EventAssignment object in the model.
24214
24215    Finally, it is worth clarifying that while the constant and
24216    boundaryCondition attributes restrict whether and how the species
24217    amount changes, the same is not true of a species' concentration. In
24218    SBML, the concentration of a species is a quantity that depends on the
24219    size of the compartment in which it is located. A compartment's size
24220    may change, and therefore, so can the concentration of a species even
24221    if the amount of the species remains unchanged. A species' concentration
24222    may therefore vary even if the Species object's constant attribute is
24223    set to @c True in a model.
24224
24225    @section species-l2-convfactor The conversionFactor attribute in SBML Level&nbsp;3
24226
24227    In SBML Level&nbsp;3, Species has an additional optional attribute,
24228    'conversionFactor', that defines a conversion factor that applies to a
24229    particular species.  The value must be the identifier of a Parameter
24230    object instance defined in the model.  That Parameter object must be a
24231    constant, meaning its 'constant' attribute must be set to @c True.
24232    If a given Species object definition defines a value for its
24233    'conversionFactor' attribute, it takes precedence over any factor
24234    defined by the Model object's 'conversionFactor' attribute.
24235
24236    The unit of measurement associated with a species' quantity can be
24237    different from the unit of extent of reactions in the model.  SBML
24238    Level&nbsp;3 avoids implicit unit conversions by providing an explicit
24239    way to indicate any unit conversion that might be required.  The use of
24240    a conversion factor in computing the effects of reactions on a species'
24241    quantity is explained in detail in the SBML Level&nbsp;3 specification
24242    document.  Because the value of the 'conversionFactor' attribute is the
24243    identifier of a Parameter object, and because parameters can have units
24244    attached to them, the transformation from reaction extent units to
24245    species units can be completely specified using this approach.
24246
24247    Note that the unit conversion factor is <strong>only applied when
24248    calculating the effect of a reaction on a species</strong>.  It is not
24249    used in any rules or other SBML constructs that affect the species, and
24250    it is also not used when the value of the species is referenced in a
24251    mathematical expression.
24252
24253
24254    @section species-l2-type The speciesType attribute in SBML Level&nbsp;2 Versions&nbsp;2&ndash;4
24255
24256    In SBML Level&nbsp;2 Versions&nbsp;2&ndash;4, each species in a model
24257    may optionally be designated as belonging to a particular species type.
24258    The optional attribute 'speciesType' is used to identify the species
24259    type of the chemical entities that make up the pool represented by the
24260    Species objects.  The attribute's value must be the identifier of an
24261    existing SpeciesType object in the model.  If the 'speciesType'
24262    attribute is not present on a particular species definition, it means
24263    the pool contains chemical entities of a type unique to that pool; in
24264    effect, a virtual species type is assumed for that species, and no other
24265    species can belong to that species type.  The value of 'speciesType'
24266    attributes on species have no effect on the numerical interpretation of
24267    a model; simulators and other numerical analysis software may ignore
24268    'speciesType' attributes.
24269
24270    There can be only one species of a given species type in any given
24271    compartment of a model.  More specifically, for all Species objects
24272    having a value for the 'speciesType' attribute, the pair
24273    <center>
24274    ('speciesType' attribute value, 'compartment' attribute value)
24275    </center>
24276
24277    must be unique across the set of all Species object in a model.
24278
24279
24280    @section species-other The spatialSizeUnits attribute in SBML Level&nbsp;2 Versions&nbsp;1&ndash;2
24281
24282    In versions of SBML Level&nbsp;2 before Version&nbsp;3, the class
24283    Species included an attribute called 'spatialSizeUnits', which allowed
24284    explicitly setting the units of size for initial concentration.  LibSBML
24285    retains this attribute for compatibility with older definitions of
24286    Level&nbsp;2, but its use is strongly discouraged because many software
24287    tools do no properly interpret this unit declaration and it is
24288    incompatible with all SBML specifications after Level&nbsp;2
24289    Version&nbsp;3.
24290
24291
24292    @section species-math Additional considerations for interpreting the numerical value of a species
24293
24294    Species are unique in SBML in that they have a kind of duality: a
24295    species identifier may stand for either substance amount (meaning, a
24296    count of the number of individual entities) or a concentration or
24297    density (meaning, amount divided by a compartment size).  The previous
24298    sections explain the meaning of a species identifier when it is
24299    referenced in a mathematical formula or in rules or other SBML
24300    constructs; however, it remains to specify what happens to a species
24301    when the compartment in which it is located changes in size.
24302
24303    When a species definition has a 'hasOnlySubstanceUnits' attribute value
24304    of @c False and the size of the compartment in which the species is
24305    located changes, the default in SBML is to assume that it is the
24306    concentration that must be updated to account for the size change.  This
24307    follows from the principle that, all other things held constant, if a
24308    compartment simply changes in size, the size change does not in itself
24309    cause an increase or decrease in the number of entities of any species
24310    in that compartment.  In a sense, the default is that the @em amount of
24311    a species is preserved across compartment size changes.  Upon such size
24312    changes, the value of the concentration or density must be recalculated
24313    from the simple relationship <em>concentration = amount / size</em> if
24314    the value of the concentration is needed (for example, if the species
24315    identifier appears in a mathematical formula or is otherwise referenced
24316    in an SBML construct).  There is one exception: if the species' quantity
24317    is determined by an AssignmentRule, RateRule, AlgebraicRule, or an
24318    EventAssignment and the species has a 'hasOnlySubstanceUnits' attribute
24319    value of @c False, it means that the <em>concentration</em> is assigned
24320    by the rule or event; in that case, the <em>amount</em> must be
24321    calculated when the compartment size changes.  (Events also require
24322    additional care in this situation, because an event with multiple
24323    assignments could conceivably reassign both a species quantity and a
24324    compartment size simultaneously.  Please refer to the SBML
24325    specifications for the details.)
24326
24327    Note that the above only matters if a species has a
24328    'hasOnlySubstanceUnits' attribute value of @c False, meaning that the
24329    species identifier refers to a concentration wherever the identifier
24330    appears in a mathematical formula.  If instead the attribute's value is
24331    @c True, then the identifier of the species <em>always</em> stands for
24332    an amount wherever it appears in a mathematical formula or is referenced
24333    by an SBML construct.  In that case, there is never a question about
24334    whether an assignment or event is meant to affect the amount or
24335    concentration: it is always the amount.
24336
24337    A particularly confusing situation can occur when the species has
24338    'constant' attribute value of @c True in combination with a
24339    'hasOnlySubstanceUnits' attribute value of @c False.  Suppose this
24340    species is given a value for 'initialConcentration'.  Does a 'constant'
24341    value of @c True mean that the concentration is held constant if the
24342    compartment size changes?  No; it is still the amount that is kept
24343    constant across a compartment size change.  The fact that the species
24344    was initialized using a concentration value is irrelevant.
24345
24346    """
24347
24348    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
24349    __repr__ = _swig_repr
24350    __swig_destroy__ = _libsbml.delete_Species
24351
24352    def __init__(self, *args):
24353        r"""
24354        __init__(Species self, unsigned int level, unsigned int version) -> Species
24355        __init__(Species self, SBMLNamespaces sbmlns) -> Species
24356        __init__(Species self, Species orig) -> Species
24357
24358        This method has multiple variants; they differ in the arguments
24359         they accept.  Each variant is described separately below.
24360
24361        @par
24362        <hr>
24363        <span class='variant-sig-heading'>Method variant with the following signature</span>:
24364         <pre class='signature'>Species(SBMLNamespaces sbmlns)</pre>
24365
24366        Creates a new Species using the given SBMLNamespaces object
24367        @p sbmlns.
24368
24369        @par
24370        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
24371        information.  It is used to communicate the SBML Level, Version, and (in
24372        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
24373        common approach to using libSBML's SBMLNamespaces facilities is to create an
24374        SBMLNamespaces object somewhere in a program once, then hand that object
24375        as needed to object constructors that accept SBMLNamespaces as arguments.
24376
24377        It is worth emphasizing that although this constructor does not take
24378        an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
24379        (identifier) attribute of a Species is required to have a value.
24380        Thus, callers are cautioned to assign a value after calling this
24381        constructor.  Setting the identifier can be accomplished using the
24382        method Species.setId().
24383
24384        @param sbmlns an SBMLNamespaces object.
24385
24386        @throws SBMLConstructorException
24387        Thrown if the given @p sbmlns is inconsistent or incompatible
24388        with this object.
24389
24390        @note Attempting to add an object to an SBMLDocument having a different
24391        combination of SBML Level, Version and XML namespaces than the object
24392        itself will result in an error at the time a caller attempts to make the
24393        addition.  A parent object must have compatible Level, Version and XML
24394        namespaces.  (Strictly speaking, a parent may also have more XML
24395        namespaces than a child, but the reverse is not permitted.)  The
24396        restriction is necessary to ensure that an SBML model has a consistent
24397        overall structure.  This requires callers to manage their objects
24398        carefully, but the benefit is increased flexibility in how models can be
24399        created by permitting callers to create objects bottom-up if desired.  In
24400        situations where objects are not yet attached to parents (e.g.,
24401        SBMLDocument), knowledge of the intented SBML Level and Version help
24402        libSBML determine such things as whether it is valid to assign a
24403        particular value to an attribute.
24404
24405
24406        @par
24407        <hr>
24408        <span class='variant-sig-heading'>Method variant with the following signature</span>:
24409         <pre class='signature'>Species(long level, long version)</pre>
24410
24411        Creates a new Species using the given SBML @p level and @p version
24412        values.
24413
24414        @param level a long integer, the SBML Level to assign to this Species.
24415
24416        @param version a long integer, the SBML Version to assign to this
24417        Species.
24418
24419        @throws SBMLConstructorException
24420        Thrown if the given @p level and @p version combination are invalid
24421        or if this object is incompatible with the given level and version.
24422
24423        @note Attempting to add an object to an SBMLDocument having a different
24424        combination of SBML Level, Version and XML namespaces than the object
24425        itself will result in an error at the time a caller attempts to make the
24426        addition.  A parent object must have compatible Level, Version and XML
24427        namespaces.  (Strictly speaking, a parent may also have more XML
24428        namespaces than a child, but the reverse is not permitted.)  The
24429        restriction is necessary to ensure that an SBML model has a consistent
24430        overall structure.  This requires callers to manage their objects
24431        carefully, but the benefit is increased flexibility in how models can be
24432        created by permitting callers to create objects bottom-up if desired.  In
24433        situations where objects are not yet attached to parents (e.g.,
24434        SBMLDocument), knowledge of the intented SBML Level and Version help
24435        libSBML determine such things as whether it is valid to assign a
24436        particular value to an attribute.
24437
24438
24439        @par
24440        <hr>
24441        <span class='variant-sig-heading'>Method variant with the following signature</span>:
24442         <pre class='signature'>Species(Species orig)</pre>
24443
24444        Copy constructor; creates a copy of this Species object.
24445
24446        @param orig the object to copy.
24447
24448        """
24449        _libsbml.Species_swiginit(self, _libsbml.new_Species(*args))
24450
24451    def clone(self):
24452        r"""
24453        clone(Species self) -> Species
24454
24455        Creates and returns a deep copy of this Species object.
24456
24457        @return the (deep) copy of this Species object.
24458
24459        """
24460        return _libsbml.Species_clone(self)
24461
24462    def initDefaults(self):
24463        r"""
24464        initDefaults(Species self)
24465
24466        Initializes the fields of this Species object to 'typical' defaults
24467        values.
24468
24469        The SBML Species component has slightly different aspects and
24470        default attribute values in different SBML Levels and Versions.
24471        This method sets the values to certain common defaults, based
24472        mostly on what they are in SBML Level&nbsp;2.  Specifically:
24473        <ul>
24474        <li> Sets 'boundaryCondition' to @c False
24475        <li> Sets 'constant' to @c False
24476        <li> sets 'hasOnlySubstanceUnits' to @c False
24477        <li> (Applies to Level&nbsp;3 models only) Sets attribute 'substanceUnits' to @c mole
24478        </ul>
24479
24480        """
24481        return _libsbml.Species_initDefaults(self)
24482
24483    def getId(self):
24484        r"""
24485        getId(Species self) -> string
24486
24487        Returns the value of the 'id' attribute of this Species.
24488
24489        @note Because of the inconsistent behavior of this function with
24490        respect to assignments and rules, it is now recommended to
24491        use the getIdAttribute() function instead.
24492
24493        @par
24494        The identifier given by an object's 'id' attribute value
24495        is used to identify the object within the SBML model definition.
24496        Other objects can refer to the component using this identifier.  The
24497        data type of 'id' is always <code>SId</code> or a type derived
24498        from that, such as <code>UnitSId</code>, depending on the object in
24499        question.  All data types are defined as follows:
24500        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
24501        letter ::= 'a'..'z','A'..'Z'
24502        digit  ::= '0'..'9'
24503        idChar ::= letter | digit | '_'
24504        SId    ::= ( letter | '_' ) idChar*
24505        </pre>
24506        The characters <code>(</code> and <code>)</code> are used for grouping,
24507        the character <code>*</code> 'zero or more times', and the character
24508        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
24509        is determined by an exact character sequence match; i.e., comparisons must
24510        be performed in a case-sensitive manner.  This applies to all uses of
24511        <code>SId</code>, <code>SIdRef</code>, and derived types.
24512
24513        Users need to be aware of some important API issues that are the result of
24514        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
24515        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
24516        of SBML objects.  To simplify the work of programmers, libSBML's API
24517        provided get, set, check, and unset on the SBase object class itself
24518        instead of on individual subobject classes. This made the
24519        get/set/etc. methods uniformly available on all objects in the libSBML
24520        API.  LibSBML simply returned empty strings or otherwise did not act when
24521        the methods were applied to SBML objects that were not defined by the SBML
24522        specification to have 'id' or 'name' attributes.  Additional complications
24523        arose with the rule and assignment objects: InitialAssignment,
24524        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
24525        the rule object hierarchy was different, and in addition, then as now,
24526        they possess different attributes: 'variable' (for the rules and event
24527        assignments), 'symbol' (for initial assignments), or neither (for
24528        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
24529        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
24530
24531        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
24532        Version&nbsp;2, it became necessary to introduce a new way to interact
24533        with the attributes more consistently in libSBML to avoid breaking
24534        backward compatibility in the behavior of the original 'id' methods.  For
24535        this reason, libSBML provides four functions (getIdAttribute(),
24536        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
24537        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
24538        from SBase, regardless of the object's type.  <strong>These new methods
24539        should be used instead of the older getId()/setId()/etc. methods</strong>
24540        unless the old behavior is somehow necessary.  Regardless of the Level and
24541        Version of the SBML, these functions allow client applications to use more
24542        generalized code in some situations (for instance, when manipulating
24543        objects that are all known to have identifiers).  If the object in
24544        question does not posess an 'id' attribute according to the SBML
24545        specification for the Level and Version in use, libSBML will not allow the
24546        identifier to be set, nor will it read or write 'id' attributes for those
24547        objects.
24548
24549        @return the id of this Species.
24550
24551        @see getIdAttribute()
24552        @see setIdAttribute()
24553        @see isSetIdAttribute()
24554        @see unsetIdAttribute()
24555
24556        """
24557        return _libsbml.Species_getId(self)
24558
24559    def getName(self):
24560        r"""
24561        getName(Species self) -> string
24562
24563        Returns the value of the 'name' attribute of this Species object.
24564
24565        @par
24566        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
24567        moved to SBase directly, instead of being defined individually for many
24568        (but not all) objects.  LibSBML has for a long time provided functions
24569        defined on SBase itself to get, set, and unset those attributes, which
24570        would fail or otherwise return empty strings if executed on any object
24571        for which those attributes were not defined.  Now that all SBase objects
24572        define those attributes, those functions now succeed for any object with
24573        the appropriate level and version.
24574
24575        The 'name' attribute is
24576        optional and is not intended to be used for cross-referencing purposes
24577        within a model.  Its purpose instead is to provide a human-readable
24578        label for the component.  The data type of 'name' is the type
24579        <code>string</code> defined in XML Schema.  SBML imposes no
24580        restrictions as to the content of 'name' attributes beyond those
24581        restrictions defined by the <code>string</code> type in XML Schema.
24582
24583        The recommended practice for handling 'name' is as follows.  If a
24584        software tool has the capability for displaying the content of 'name'
24585        attributes, it should display this content to the user as a
24586        component's label instead of the component's 'id'.  If the user
24587        interface does not have this capability (e.g., because it cannot
24588        display or use special characters in symbol names), or if the 'name'
24589        attribute is missing on a given component, then the user interface
24590        should display the value of the 'id' attribute instead.  (Script
24591        language interpreters are especially likely to display 'id' instead of
24592        'name'.)
24593
24594        As a consequence of the above, authors of systems that automatically
24595        generate the values of 'id' attributes should be aware some systems
24596        may display the 'id''s to the user.  Authors therefore may wish to
24597        take some care to have their software create 'id' values that are: (a)
24598        reasonably easy for humans to type and read; and (b) likely to be
24599        meaningful, for example by making the 'id' attribute be an abbreviated
24600        form of the name attribute value.
24601
24602        An additional point worth mentioning is although there are
24603        restrictions on the uniqueness of 'id' values, there are no
24604        restrictions on the uniqueness of 'name' values in a model.  This
24605        allows software applications leeway in assigning component identifiers.
24606
24607        Regardless of the level and version of the SBML, these functions allow
24608        client applications to use more generalized code in some situations
24609        (for instance, when manipulating objects that are all known to have
24610        names).  If the object in question does not posess a 'name' attribute
24611        according to the SBML specification for the Level and Version in use,
24612        libSBML will not allow the name to be set, nor will it read or
24613        write 'name' attributes for those objects.
24614
24615        @return the name of this SBML object, or the empty string if not set or unsettable.
24616
24617        @see getIdAttribute()
24618        @see isSetName()
24619        @see setName()
24620        @see unsetName()
24621
24622        """
24623        return _libsbml.Species_getName(self)
24624
24625    def getSpeciesType(self):
24626        r"""
24627        getSpeciesType(Species self) -> string
24628
24629        Get the type of this Species object object.
24630
24631        @return the value of the 'speciesType' attribute of this
24632        Species as a string.
24633
24634        @note The 'speciesType' attribute is only available in SBML
24635        Level&nbsp;2 Versions&nbsp;2&ndash;4.
24636
24637        """
24638        return _libsbml.Species_getSpeciesType(self)
24639
24640    def getCompartment(self):
24641        r"""
24642        getCompartment(Species self) -> string
24643
24644        Get the compartment in which this species is located.
24645
24646        The compartment is designated by its identifier.
24647
24648        @return the value of the 'compartment' attribute of this Species
24649        object, as a string.
24650
24651        """
24652        return _libsbml.Species_getCompartment(self)
24653
24654    def getInitialAmount(self):
24655        r"""
24656        getInitialAmount(Species self) -> double
24657
24658        Get the value of the 'initialAmount' attribute.
24659
24660        @return the initialAmount of this Species, as a floating point number.
24661
24662        """
24663        return _libsbml.Species_getInitialAmount(self)
24664
24665    def getInitialConcentration(self):
24666        r"""
24667        getInitialConcentration(Species self) -> double
24668
24669        Get the value of the 'initialConcentration' attribute.
24670
24671        @return the initialConcentration of this Species,, as a floating point
24672        number.
24673
24674        @note The attribute 'initialConcentration' is only available in SBML
24675        Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
24676
24677        """
24678        return _libsbml.Species_getInitialConcentration(self)
24679
24680    def getSubstanceUnits(self):
24681        r"""
24682        getSubstanceUnits(Species self) -> string
24683
24684        Get the value of the 'substanceUnits' attribute.
24685
24686        @return the value of the 'substanceUnits' attribute of this Species,
24687        as a string.  An empty string indicates that no units have been
24688        assigned.
24689
24690        @note There is an important distinction to be made between <em>no units
24691        assigned</em>, and assuming a value without units has any specific unit
24692        such as <code>dimensionless</code>.  In SBML, default units are never
24693        attributed to numbers, and numbers without units are not automatically
24694        assumed to have the unit <code>dimensionless</code>.  Please consult the
24695        relevant SBML specification document for a more in-depth explanation of
24696        this topic and the SBML unit system.
24697
24698        @see isSetSubstanceUnits()
24699        @see setSubstanceUnits()
24700
24701        """
24702        return _libsbml.Species_getSubstanceUnits(self)
24703
24704    def getSpatialSizeUnits(self):
24705        r"""
24706        getSpatialSizeUnits(Species self) -> string
24707
24708        Get the value of the 'spatialSizeUnits' attribute.
24709
24710        @return the value of the 'spatialSizeUnits' attribute of this Species
24711        object, as a string.
24712
24713        @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
24714        Version&nbsp;3, the class Species included an attribute called
24715        'spatialSizeUnits', which allowed explicitly setting the units of size for
24716        initial concentration.  This attribute was removed in SBML Level&nbsp;2
24717        Version&nbsp;3.  LibSBML retains this attribute for compatibility with
24718        older definitions of Level&nbsp;2, but its use is strongly discouraged
24719        because it is incompatible with levels and versions of SBML beyond
24720        Level&nbsp;2 Version&nbsp;2.</span>
24721
24722        """
24723        return _libsbml.Species_getSpatialSizeUnits(self)
24724
24725    def getUnits(self):
24726        r"""
24727        getUnits(Species self) -> string
24728
24729        Get the value of the 'units' attribute.
24730
24731        @return the units of this Species (L1 only).
24732
24733        @note The 'units' attribute is defined only in SBML Level&nbsp;1.  In
24734        SBML Level&nbsp;2 and Level&nbsp;3, it has been replaced by a
24735        combination of 'substanceUnits' and the units of the Compartment
24736        object in which a species is located.  In SBML Level&nbsp;2
24737        Versions&nbsp;1&ndash;2, an additional attribute 'spatialSizeUnits'
24738        helps determine the units of the species quantity, but this attribute
24739        was removed in later versions of SBML Level&nbsp;2.
24740
24741        """
24742        return _libsbml.Species_getUnits(self)
24743
24744    def getHasOnlySubstanceUnits(self):
24745        r"""
24746        getHasOnlySubstanceUnits(Species self) -> bool
24747
24748        Get the value of the 'hasOnlySubstanceUnits' attribute.
24749
24750        @return @c True if this Species' 'hasOnlySubstanceUnits' attribute
24751        value is @c True, @c False otherwise.
24752
24753        @note The 'hasOnlySubstanceUnits' attribute does not exist in SBML
24754        Level&nbsp;1.
24755
24756        """
24757        return _libsbml.Species_getHasOnlySubstanceUnits(self)
24758
24759    def getBoundaryCondition(self):
24760        r"""
24761        getBoundaryCondition(Species self) -> bool
24762
24763        Get the value of the 'boundaryCondition' attribute.
24764
24765        @return @c True if this Species' 'boundaryCondition' attribute value
24766        is @c True, @c False otherwise.
24767
24768        """
24769        return _libsbml.Species_getBoundaryCondition(self)
24770
24771    def getCharge(self):
24772        r"""
24773        getCharge(Species self) -> int
24774
24775        Get the value of the 'charge' attribute.
24776
24777        @return the charge of this Species object.
24778
24779        @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
24780        attribute on Species is deprecated and in SBML Level&nbsp;3 it does
24781        not exist at all.  Its use strongly discouraged.  Its presence is
24782        considered a misfeature in earlier definitions of SBML because its
24783        implications for the mathematics of a model were never defined, and in
24784        any case, no known modeling system ever used it.  Instead, models take
24785        account of charge values directly in their definitions of species by
24786        (for example) having separate species identities for the charged and
24787        uncharged versions of the same species.  This allows the condition to
24788        affect model mathematics directly.  LibSBML retains this method for
24789        easier compatibility with SBML Level&nbsp;1.
24790
24791        """
24792        return _libsbml.Species_getCharge(self)
24793
24794    def getConstant(self):
24795        r"""
24796        getConstant(Species self) -> bool
24797
24798        Get the value of the 'constant' attribute.
24799
24800        @return @c True if this Species's 'constant' attribute value is
24801        @c True, @c False otherwise.
24802
24803        @note The attribute 'constant' is only available in SBML Levels&nbsp;2
24804        and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
24805
24806        """
24807        return _libsbml.Species_getConstant(self)
24808
24809    def getConversionFactor(self):
24810        r"""
24811        getConversionFactor(Species self) -> string
24812
24813        Get the value of the 'conversionFactor' attribute.
24814
24815        @return the conversionFactor of this Species, as a string.
24816
24817        @note The 'conversionFactor' attribute was introduced in SBML
24818        Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
24819        and&nbsp;2.
24820
24821        """
24822        return _libsbml.Species_getConversionFactor(self)
24823
24824    def isSetId(self):
24825        r"""
24826        isSetId(Species self) -> bool
24827
24828        Predicate returning @c True if this
24829        Species object's 'id' attribute is set.
24830
24831        @par
24832        The identifier given by an object's 'id' attribute value
24833        is used to identify the object within the SBML model definition.
24834        Other objects can refer to the component using this identifier.  The
24835        data type of 'id' is always <code>SId</code> or a type derived
24836        from that, such as <code>UnitSId</code>, depending on the object in
24837        question.  All data types are defined as follows:
24838        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
24839        letter ::= 'a'..'z','A'..'Z'
24840        digit  ::= '0'..'9'
24841        idChar ::= letter | digit | '_'
24842        SId    ::= ( letter | '_' ) idChar*
24843        </pre>
24844        The characters <code>(</code> and <code>)</code> are used for grouping,
24845        the character <code>*</code> 'zero or more times', and the character
24846        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
24847        is determined by an exact character sequence match; i.e., comparisons must
24848        be performed in a case-sensitive manner.  This applies to all uses of
24849        <code>SId</code>, <code>SIdRef</code>, and derived types.
24850
24851        Users need to be aware of some important API issues that are the result of
24852        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
24853        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
24854        of SBML objects.  To simplify the work of programmers, libSBML's API
24855        provided get, set, check, and unset on the SBase object class itself
24856        instead of on individual subobject classes. This made the
24857        get/set/etc. methods uniformly available on all objects in the libSBML
24858        API.  LibSBML simply returned empty strings or otherwise did not act when
24859        the methods were applied to SBML objects that were not defined by the SBML
24860        specification to have 'id' or 'name' attributes.  Additional complications
24861        arose with the rule and assignment objects: InitialAssignment,
24862        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
24863        the rule object hierarchy was different, and in addition, then as now,
24864        they possess different attributes: 'variable' (for the rules and event
24865        assignments), 'symbol' (for initial assignments), or neither (for
24866        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
24867        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
24868
24869        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
24870        Version&nbsp;2, it became necessary to introduce a new way to interact
24871        with the attributes more consistently in libSBML to avoid breaking
24872        backward compatibility in the behavior of the original 'id' methods.  For
24873        this reason, libSBML provides four functions (getIdAttribute(),
24874        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
24875        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
24876        from SBase, regardless of the object's type.  <strong>These new methods
24877        should be used instead of the older getId()/setId()/etc. methods</strong>
24878        unless the old behavior is somehow necessary.  Regardless of the Level and
24879        Version of the SBML, these functions allow client applications to use more
24880        generalized code in some situations (for instance, when manipulating
24881        objects that are all known to have identifiers).  If the object in
24882        question does not posess an 'id' attribute according to the SBML
24883        specification for the Level and Version in use, libSBML will not allow the
24884        identifier to be set, nor will it read or write 'id' attributes for those
24885        objects.
24886
24887        @return @c True if the 'id' attribute of this SBML object is
24888        set, @c False otherwise.
24889
24890        @note Because of the inconsistent behavior of this function with
24891        respect to assignments and rules, it is recommended that callers
24892        use isSetIdAttribute() instead.
24893
24894        @see getIdAttribute()
24895        @see setIdAttribute()
24896        @see unsetIdAttribute()
24897        @see isSetIdAttribute()
24898
24899        """
24900        return _libsbml.Species_isSetId(self)
24901
24902    def isSetName(self):
24903        r"""
24904        isSetName(Species self) -> bool
24905
24906        Predicate returning @c True if this
24907        Species object's 'name' attribute is set.
24908
24909        @par
24910        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
24911        moved to SBase directly, instead of being defined individually for many
24912        (but not all) objects.  LibSBML has for a long time provided functions
24913        defined on SBase itself to get, set, and unset those attributes, which
24914        would fail or otherwise return empty strings if executed on any object
24915        for which those attributes were not defined.  Now that all SBase objects
24916        define those attributes, those functions now succeed for any object with
24917        the appropriate level and version.
24918
24919        The 'name' attribute is
24920        optional and is not intended to be used for cross-referencing purposes
24921        within a model.  Its purpose instead is to provide a human-readable
24922        label for the component.  The data type of 'name' is the type
24923        <code>string</code> defined in XML Schema.  SBML imposes no
24924        restrictions as to the content of 'name' attributes beyond those
24925        restrictions defined by the <code>string</code> type in XML Schema.
24926
24927        The recommended practice for handling 'name' is as follows.  If a
24928        software tool has the capability for displaying the content of 'name'
24929        attributes, it should display this content to the user as a
24930        component's label instead of the component's 'id'.  If the user
24931        interface does not have this capability (e.g., because it cannot
24932        display or use special characters in symbol names), or if the 'name'
24933        attribute is missing on a given component, then the user interface
24934        should display the value of the 'id' attribute instead.  (Script
24935        language interpreters are especially likely to display 'id' instead of
24936        'name'.)
24937
24938        As a consequence of the above, authors of systems that automatically
24939        generate the values of 'id' attributes should be aware some systems
24940        may display the 'id''s to the user.  Authors therefore may wish to
24941        take some care to have their software create 'id' values that are: (a)
24942        reasonably easy for humans to type and read; and (b) likely to be
24943        meaningful, for example by making the 'id' attribute be an abbreviated
24944        form of the name attribute value.
24945
24946        An additional point worth mentioning is although there are
24947        restrictions on the uniqueness of 'id' values, there are no
24948        restrictions on the uniqueness of 'name' values in a model.  This
24949        allows software applications leeway in assigning component identifiers.
24950
24951        Regardless of the level and version of the SBML, these functions allow
24952        client applications to use more generalized code in some situations
24953        (for instance, when manipulating objects that are all known to have
24954        names).  If the object in question does not posess a 'name' attribute
24955        according to the SBML specification for the Level and Version in use,
24956        libSBML will not allow the name to be set, nor will it read or
24957        write 'name' attributes for those objects.
24958
24959        @return @c True if the 'name' attribute of this SBML object is
24960        set, @c False otherwise.
24961
24962        @see getName()
24963        @see setName()
24964        @see unsetName()
24965
24966        """
24967        return _libsbml.Species_isSetName(self)
24968
24969    def isSetSpeciesType(self):
24970        r"""
24971        isSetSpeciesType(Species self) -> bool
24972
24973        Predicate returning @c True if this Species object's
24974        'speciesType' attribute is set.
24975
24976        @return @c True if the 'speciesType' attribute of this Species is
24977        set, @c False otherwise.
24978
24979        @note The 'speciesType' attribute is only available in SBML
24980        Level&nbsp;2 Versions&nbsp;2&ndash;4.
24981
24982        """
24983        return _libsbml.Species_isSetSpeciesType(self)
24984
24985    def isSetCompartment(self):
24986        r"""
24987        isSetCompartment(Species self) -> bool
24988
24989        Predicate returning @c True if this
24990        Species object's 'compartment' attribute is set.
24991
24992        @return @c True if the 'compartment' attribute of this Species is
24993        set, @c False otherwise.
24994
24995        """
24996        return _libsbml.Species_isSetCompartment(self)
24997
24998    def isSetInitialAmount(self):
24999        r"""
25000        isSetInitialAmount(Species self) -> bool
25001
25002        Predicate returning @c True if this
25003        Species object's 'initialAmount' attribute is set.
25004
25005        @return @c True if the 'initialAmount' attribute of this Species is
25006        set, @c False otherwise.
25007
25008        @note In SBML Level&nbsp;1, Species' 'initialAmount' is required and
25009        therefore <em>should always be set</em>.  (However, in Level&nbsp;1, the
25010        attribute has no default value either, so this method will not return
25011        @c True until a value has been assigned.)  In SBML Level&nbsp;2,
25012        'initialAmount' is optional and as such may or may not be set.
25013
25014        """
25015        return _libsbml.Species_isSetInitialAmount(self)
25016
25017    def isSetInitialConcentration(self):
25018        r"""
25019        isSetInitialConcentration(Species self) -> bool
25020
25021        Predicate returning @c True if this
25022        Species object's 'initialConcentration' attribute is set.
25023
25024        @return @c True if the 'initialConcentration' attribute of this Species is
25025        set, @c False otherwise.
25026
25027        @note The attribute 'initialConcentration' is only available in SBML
25028        Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
25029
25030        """
25031        return _libsbml.Species_isSetInitialConcentration(self)
25032
25033    def isSetSubstanceUnits(self):
25034        r"""
25035        isSetSubstanceUnits(Species self) -> bool
25036
25037        Predicate returning @c True if this
25038        Species object's 'substanceUnits' attribute is set.
25039
25040        @return @c True if the 'substanceUnits' attribute of this Species is
25041        set, @c False otherwise.
25042
25043        """
25044        return _libsbml.Species_isSetSubstanceUnits(self)
25045
25046    def isSetSpatialSizeUnits(self):
25047        r"""
25048        isSetSpatialSizeUnits(Species self) -> bool
25049
25050        Predicate returning @c True if this
25051        Species object's 'spatialSizeUnits' attribute is set.
25052
25053        @return @c True if the 'spatialSizeUnits' attribute of this Species is
25054        set, @c False otherwise.
25055
25056        @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
25057        Version&nbsp;3, the class Species included an attribute called
25058        'spatialSizeUnits', which allowed explicitly setting the units of size for
25059        initial concentration.  This attribute was removed in SBML Level&nbsp;2
25060        Version&nbsp;3.  LibSBML retains this attribute for compatibility with
25061        older definitions of Level&nbsp;2, but its use is strongly discouraged
25062        because it is incompatible with levels and versions of SBML beyond
25063        Level&nbsp;2 Version&nbsp;2.</span>
25064
25065        """
25066        return _libsbml.Species_isSetSpatialSizeUnits(self)
25067
25068    def isSetUnits(self):
25069        r"""
25070        isSetUnits(Species self) -> bool
25071
25072        Predicate returning @c True if
25073        this Species object's 'units' attribute is set.
25074
25075        @return @c True if the 'units' attribute of this Species is
25076        set, @c False otherwise.
25077
25078        """
25079        return _libsbml.Species_isSetUnits(self)
25080
25081    def isSetCharge(self):
25082        r"""
25083        isSetCharge(Species self) -> bool
25084
25085        Predicate returning @c True if this
25086        Species object's 'charge' attribute is set.
25087
25088        @return @c True if the 'charge' attribute of this Species is
25089        set, @c False otherwise.
25090
25091        @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
25092        attribute on Species is deprecated and in SBML Level&nbsp;3 it does
25093        not exist at all.  Its use strongly discouraged.  Its presence is
25094        considered a misfeature in earlier definitions of SBML because its
25095        implications for the mathematics of a model were never defined, and in
25096        any case, no known modeling system ever used it.  Instead, models take
25097        account of charge values directly in their definitions of species by
25098        (for example) having separate species identities for the charged and
25099        uncharged versions of the same species.  This allows the condition to
25100        affect model mathematics directly.  LibSBML retains this method for
25101        easier compatibility with SBML Level&nbsp;1.
25102
25103        """
25104        return _libsbml.Species_isSetCharge(self)
25105
25106    def isSetConversionFactor(self):
25107        r"""
25108        isSetConversionFactor(Species self) -> bool
25109
25110        Predicate returning @c True if this
25111        Species object's 'conversionFactor' attribute is set.
25112
25113        @return @c True if the 'conversionFactor' attribute of this Species is
25114        set, @c False otherwise.
25115
25116        @note The 'conversionFactor' attribute was introduced in SBML
25117        Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
25118        and&nbsp;2.
25119
25120        """
25121        return _libsbml.Species_isSetConversionFactor(self)
25122
25123    def isSetBoundaryCondition(self):
25124        r"""
25125        isSetBoundaryCondition(Species self) -> bool
25126
25127        Predicate returning @c True if this
25128        Species object's 'boundaryCondition' attribute is set.
25129
25130        @return @c True if the 'boundaryCondition' attribute of this Species is
25131        set, @c False otherwise.
25132
25133        """
25134        return _libsbml.Species_isSetBoundaryCondition(self)
25135
25136    def isSetHasOnlySubstanceUnits(self):
25137        r"""
25138        isSetHasOnlySubstanceUnits(Species self) -> bool
25139
25140        Predicate returning @c True if this
25141        Species object's 'hasOnlySubstanceUnits' attribute is set.
25142
25143        @return @c True if the 'hasOnlySubstanceUnits' attribute of this Species is
25144        set, @c False otherwise.
25145
25146        @note The 'hasOnlySubstanceUnits' attribute does not exist in SBML
25147        Level&nbsp;1.
25148
25149        """
25150        return _libsbml.Species_isSetHasOnlySubstanceUnits(self)
25151
25152    def isSetConstant(self):
25153        r"""
25154        isSetConstant(Species self) -> bool
25155
25156        Predicate returning @c True if this
25157        Species object's 'constant' attribute is set.
25158
25159        @return @c True if the 'constant' attribute of this Species is
25160        set, @c False otherwise.
25161
25162        @note The attribute 'constant' is only available in SBML Levels&nbsp;2
25163        and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
25164
25165        """
25166        return _libsbml.Species_isSetConstant(self)
25167
25168    def setId(self, sid):
25169        r"""
25170        setId(Species self, string sid) -> int
25171
25172        Sets the value of the 'id' attribute of this Species.
25173
25174        @par
25175        The string @p sid is copied.
25176
25177        @par
25178        The identifier given by an object's 'id' attribute value
25179        is used to identify the object within the SBML model definition.
25180        Other objects can refer to the component using this identifier.  The
25181        data type of 'id' is always <code>SId</code> or a type derived
25182        from that, such as <code>UnitSId</code>, depending on the object in
25183        question.  All data types are defined as follows:
25184        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
25185        letter ::= 'a'..'z','A'..'Z'
25186        digit  ::= '0'..'9'
25187        idChar ::= letter | digit | '_'
25188        SId    ::= ( letter | '_' ) idChar*
25189        </pre>
25190        The characters <code>(</code> and <code>)</code> are used for grouping,
25191        the character <code>*</code> 'zero or more times', and the character
25192        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
25193        is determined by an exact character sequence match; i.e., comparisons must
25194        be performed in a case-sensitive manner.  This applies to all uses of
25195        <code>SId</code>, <code>SIdRef</code>, and derived types.
25196
25197        Users need to be aware of some important API issues that are the result of
25198        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
25199        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
25200        of SBML objects.  To simplify the work of programmers, libSBML's API
25201        provided get, set, check, and unset on the SBase object class itself
25202        instead of on individual subobject classes. This made the
25203        get/set/etc. methods uniformly available on all objects in the libSBML
25204        API.  LibSBML simply returned empty strings or otherwise did not act when
25205        the methods were applied to SBML objects that were not defined by the SBML
25206        specification to have 'id' or 'name' attributes.  Additional complications
25207        arose with the rule and assignment objects: InitialAssignment,
25208        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
25209        the rule object hierarchy was different, and in addition, then as now,
25210        they possess different attributes: 'variable' (for the rules and event
25211        assignments), 'symbol' (for initial assignments), or neither (for
25212        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
25213        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
25214
25215        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
25216        Version&nbsp;2, it became necessary to introduce a new way to interact
25217        with the attributes more consistently in libSBML to avoid breaking
25218        backward compatibility in the behavior of the original 'id' methods.  For
25219        this reason, libSBML provides four functions (getIdAttribute(),
25220        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
25221        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
25222        from SBase, regardless of the object's type.  <strong>These new methods
25223        should be used instead of the older getId()/setId()/etc. methods</strong>
25224        unless the old behavior is somehow necessary.  Regardless of the Level and
25225        Version of the SBML, these functions allow client applications to use more
25226        generalized code in some situations (for instance, when manipulating
25227        objects that are all known to have identifiers).  If the object in
25228        question does not posess an 'id' attribute according to the SBML
25229        specification for the Level and Version in use, libSBML will not allow the
25230        identifier to be set, nor will it read or write 'id' attributes for those
25231        objects.
25232
25233        @param sid the string to use as the identifier of this object.
25234
25235        @return integer value indicating success/failure of the
25236        function.  @if clike The value is drawn from the
25237        enumeration #OperationReturnValues_t. @endif@~ The possible values
25238        returned by this function are:
25239        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25240        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25241        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25242
25243        @see getIdAttribute()
25244        @see setIdAttribute()
25245        @see isSetIdAttribute()
25246        @see unsetIdAttribute()
25247
25248        """
25249        return _libsbml.Species_setId(self, sid)
25250
25251    def setName(self, name):
25252        r"""
25253        setName(Species self, string name) -> int
25254
25255        Sets the value of the 'name' attribute of this Species.
25256
25257        @par
25258
25259        The string in @p name is copied.
25260
25261        @param name the new name for the SBML object.
25262
25263        @return integer value indicating success/failure of the
25264        function.  @if clike The value is drawn from the
25265        enumeration #OperationReturnValues_t. @endif@~ The possible values
25266        returned by this function are:
25267        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25268        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25269
25270        """
25271        return _libsbml.Species_setName(self, name)
25272
25273    def setSpeciesType(self, sid):
25274        r"""
25275        setSpeciesType(Species self, string sid) -> int
25276
25277        Sets the 'speciesType' attribute of this Species object.
25278
25279        @param sid the identifier of a SpeciesType object defined elsewhere
25280        in this Model.
25281
25282        @return integer value indicating success/failure of the
25283        function.  @if clike The value is drawn from the
25284        enumeration #OperationReturnValues_t. @endif@~ The possible values
25285        returned by this function are:
25286        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25287        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25288        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25289
25290        @note The 'speciesType' attribute is only available in SBML
25291        Level&nbsp;2 Versions&nbsp;2&ndash;4.
25292
25293        """
25294        return _libsbml.Species_setSpeciesType(self, sid)
25295
25296    def setCompartment(self, sid):
25297        r"""
25298        setCompartment(Species self, string sid) -> int
25299
25300        Sets the 'compartment' attribute of this Species object.
25301
25302        @param sid the identifier of a Compartment object defined elsewhere
25303        in this Model.
25304
25305        @return integer value indicating success/failure of the
25306        function.  @if clike The value is drawn from the
25307        enumeration #OperationReturnValues_t. @endif@~ The possible values
25308        returned by this function are:
25309        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25310        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25311
25312        """
25313        return _libsbml.Species_setCompartment(self, sid)
25314
25315    def setInitialAmount(self, value):
25316        r"""
25317        setInitialAmount(Species self, double value) -> int
25318
25319        Sets the 'initialAmount' attribute of this Species and marks the field
25320        as set.
25321
25322        This method also unsets the 'initialConcentration' attribute.
25323
25324        @param value the value to which the 'initialAmount' attribute should
25325        be set.
25326
25327        @return integer value indicating success/failure of the
25328        function.  @if clike The value is drawn from the
25329        enumeration #OperationReturnValues_t. @endif@~ The possible values
25330        returned by this function are:
25331        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25332
25333        """
25334        return _libsbml.Species_setInitialAmount(self, value)
25335
25336    def setInitialConcentration(self, value):
25337        r"""
25338        setInitialConcentration(Species self, double value) -> int
25339
25340        Sets the 'initialConcentration' attribute of this Species and marks
25341        the field as set.
25342
25343        This method also unsets the 'initialAmount' attribute.
25344
25345        @param value the value to which the 'initialConcentration' attribute
25346        should be set.
25347
25348        @return integer value indicating success/failure of the
25349        function.  @if clike The value is drawn from the
25350        enumeration #OperationReturnValues_t. @endif@~ The possible values
25351        returned by this function are:
25352        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25353        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25354
25355        @note The attribute 'initialConcentration' is only available in SBML
25356        Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
25357
25358        """
25359        return _libsbml.Species_setInitialConcentration(self, value)
25360
25361    def setSubstanceUnits(self, sid):
25362        r"""
25363        setSubstanceUnits(Species self, string sid) -> int
25364
25365        Sets the 'substanceUnits' attribute of this Species object.
25366
25367        @param sid the identifier of the unit to use.
25368
25369        @return integer value indicating success/failure of the
25370        function.  @if clike The value is drawn from the
25371        enumeration #OperationReturnValues_t. @endif@~ The possible values
25372        returned by this function are:
25373        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25374        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25375
25376        """
25377        return _libsbml.Species_setSubstanceUnits(self, sid)
25378
25379    def setSpatialSizeUnits(self, sid):
25380        r"""
25381        setSpatialSizeUnits(Species self, string sid) -> int
25382
25383        (SBML Level&nbsp;2 Versions&nbsp;1&ndash;2) Sets the 'spatialSizeUnits' attribute of this Species object.
25384
25385        @param sid the identifier of the unit to use.
25386
25387        @return integer value indicating success/failure of the
25388        function.  @if clike The value is drawn from the
25389        enumeration #OperationReturnValues_t. @endif@~ The possible values
25390        returned by this function are:
25391        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25392        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25393        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25394
25395        @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
25396        Version&nbsp;3, the class Species included an attribute called
25397        'spatialSizeUnits', which allowed explicitly setting the units of size for
25398        initial concentration.  This attribute was removed in SBML Level&nbsp;2
25399        Version&nbsp;3.  LibSBML retains this attribute for compatibility with
25400        older definitions of Level&nbsp;2, but its use is strongly discouraged
25401        because it is incompatible with levels and versions of SBML beyond
25402        Level&nbsp;2 Version&nbsp;2.</span>
25403
25404        """
25405        return _libsbml.Species_setSpatialSizeUnits(self, sid)
25406
25407    def setUnits(self, sname):
25408        r"""
25409        setUnits(Species self, string sname) -> int
25410
25411        (SBML Level&nbsp;1 only) Sets the units of this Species object.
25412
25413        @param sname the identifier of the unit to use.
25414
25415        @return integer value indicating success/failure of the
25416        function.  @if clike The value is drawn from the
25417        enumeration #OperationReturnValues_t. @endif@~ The possible values
25418        returned by this function are:
25419        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25420        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25421
25422        """
25423        return _libsbml.Species_setUnits(self, sname)
25424
25425    def setHasOnlySubstanceUnits(self, value):
25426        r"""
25427        setHasOnlySubstanceUnits(Species self, bool value) -> int
25428
25429        Sets the 'hasOnlySubstanceUnits' attribute of this Species object.
25430
25431        @param value boolean value for the 'hasOnlySubstanceUnits' attribute.
25432
25433        @return integer value indicating success/failure of the
25434        function.  @if clike The value is drawn from the
25435        enumeration #OperationReturnValues_t. @endif@~ The possible values
25436        returned by this function are:
25437        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25438        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25439
25440        @note The 'hasOnlySubstanceUnits' attribute does not exist in SBML
25441        Level&nbsp;1.
25442
25443        """
25444        return _libsbml.Species_setHasOnlySubstanceUnits(self, value)
25445
25446    def setBoundaryCondition(self, value):
25447        r"""
25448        setBoundaryCondition(Species self, bool value) -> int
25449
25450        Sets the 'boundaryCondition' attribute of this Species object.
25451
25452        @param value boolean value for the 'boundaryCondition' attribute.
25453
25454        @return integer value indicating success/failure of the
25455        function.  @if clike The value is drawn from the
25456        enumeration #OperationReturnValues_t. @endif@~ The possible values
25457        returned by this function are:
25458        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25459
25460        """
25461        return _libsbml.Species_setBoundaryCondition(self, value)
25462
25463    def setCharge(self, value):
25464        r"""
25465        setCharge(Species self, int value) -> int
25466
25467        Sets the 'charge' attribute of this Species object.
25468
25469        @param value an integer to which to set the 'charge' to.
25470
25471        @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
25472        attribute on Species is deprecated and in SBML Level&nbsp;3 it does
25473        not exist at all.  Its use strongly discouraged.  Its presence is
25474        considered a misfeature in earlier definitions of SBML because its
25475        implications for the mathematics of a model were never defined, and in
25476        any case, no known modeling system ever used it.  Instead, models take
25477        account of charge values directly in their definitions of species by
25478        (for example) having separate species identities for the charged and
25479        uncharged versions of the same species.  This allows the condition to
25480        affect model mathematics directly.  LibSBML retains this method for
25481        easier compatibility with SBML Level&nbsp;1.
25482
25483        @return integer value indicating success/failure of the
25484        function.  @if clike The value is drawn from the
25485        enumeration #OperationReturnValues_t. @endif@~ The possible values
25486        returned by this function are:
25487        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25488        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25489
25490        """
25491        return _libsbml.Species_setCharge(self, value)
25492
25493    def setConstant(self, value):
25494        r"""
25495        setConstant(Species self, bool value) -> int
25496
25497        Sets the 'constant' attribute of this Species object.
25498
25499        @param value a boolean value for the 'constant' attribute.
25500
25501        @return integer value indicating success/failure of the
25502        function.  @if clike The value is drawn from the
25503        enumeration #OperationReturnValues_t. @endif@~ The possible values
25504        returned by this function are:
25505        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25506        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25507
25508        @note The attribute 'constant' is only available in SBML Levels&nbsp;2
25509        and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
25510
25511        """
25512        return _libsbml.Species_setConstant(self, value)
25513
25514    def setConversionFactor(self, sid):
25515        r"""
25516        setConversionFactor(Species self, string sid) -> int
25517
25518        Sets the value of the 'conversionFactor' attribute of this Species object.
25519
25520        The string in @p sid is copied.
25521
25522        @param sid the new conversionFactor for the Species.
25523
25524        @return integer value indicating success/failure of the
25525        function.  @if clike The value is drawn from the
25526        enumeration #OperationReturnValues_t. @endif@~ The possible values
25527        returned by this function are:
25528        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25529        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25530        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
25531
25532        @note The 'conversionFactor' attribute was introduced in SBML
25533        Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
25534        and&nbsp;2.
25535
25536        """
25537        return _libsbml.Species_setConversionFactor(self, sid)
25538
25539    def unsetName(self):
25540        r"""
25541        unsetName(Species self) -> int
25542
25543        Unsets the value of the 'name' attribute of this Species object.
25544
25545        @par
25546        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
25547        moved to SBase directly, instead of being defined individually for many
25548        (but not all) objects.  LibSBML has for a long time provided functions
25549        defined on SBase itself to get, set, and unset those attributes, which
25550        would fail or otherwise return empty strings if executed on any object
25551        for which those attributes were not defined.  Now that all SBase objects
25552        define those attributes, those functions now succeed for any object with
25553        the appropriate level and version.
25554
25555        The 'name' attribute is
25556        optional and is not intended to be used for cross-referencing purposes
25557        within a model.  Its purpose instead is to provide a human-readable
25558        label for the component.  The data type of 'name' is the type
25559        <code>string</code> defined in XML Schema.  SBML imposes no
25560        restrictions as to the content of 'name' attributes beyond those
25561        restrictions defined by the <code>string</code> type in XML Schema.
25562
25563        The recommended practice for handling 'name' is as follows.  If a
25564        software tool has the capability for displaying the content of 'name'
25565        attributes, it should display this content to the user as a
25566        component's label instead of the component's 'id'.  If the user
25567        interface does not have this capability (e.g., because it cannot
25568        display or use special characters in symbol names), or if the 'name'
25569        attribute is missing on a given component, then the user interface
25570        should display the value of the 'id' attribute instead.  (Script
25571        language interpreters are especially likely to display 'id' instead of
25572        'name'.)
25573
25574        As a consequence of the above, authors of systems that automatically
25575        generate the values of 'id' attributes should be aware some systems
25576        may display the 'id''s to the user.  Authors therefore may wish to
25577        take some care to have their software create 'id' values that are: (a)
25578        reasonably easy for humans to type and read; and (b) likely to be
25579        meaningful, for example by making the 'id' attribute be an abbreviated
25580        form of the name attribute value.
25581
25582        An additional point worth mentioning is although there are
25583        restrictions on the uniqueness of 'id' values, there are no
25584        restrictions on the uniqueness of 'name' values in a model.  This
25585        allows software applications leeway in assigning component identifiers.
25586
25587        Regardless of the level and version of the SBML, these functions allow
25588        client applications to use more generalized code in some situations
25589        (for instance, when manipulating objects that are all known to have
25590        names).  If the object in question does not posess a 'name' attribute
25591        according to the SBML specification for the Level and Version in use,
25592        libSBML will not allow the name to be set, nor will it read or
25593        write 'name' attributes for those objects.
25594
25595        @return integer value indicating success/failure of the
25596        function.  @if clike The value is drawn from the
25597        enumeration #OperationReturnValues_t. @endif@~ The possible values
25598        returned by this function are:
25599        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25600        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25601
25602        @see getName()
25603        @see setName()
25604        @see isSetName()
25605
25606        """
25607        return _libsbml.Species_unsetName(self)
25608
25609    def unsetConstant(self):
25610        r"""
25611        unsetConstant(Species self) -> int
25612
25613        Unsets the value of the 'constant' attribute of this Species object.
25614
25615        @return integer value indicating success/failure of the
25616        function.  @if clike The value is drawn from the
25617        enumeration #OperationReturnValues_t. @endif@~ The possible values
25618        returned by this function are:
25619        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25620        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25621
25622        @see isSetConstant()
25623        @see setConstant()
25624        @see getConstant()
25625
25626        """
25627        return _libsbml.Species_unsetConstant(self)
25628
25629    def unsetSpeciesType(self):
25630        r"""
25631        unsetSpeciesType(Species self) -> int
25632
25633        Unsets the 'speciesType' attribute value of this Species object.
25634
25635        @return integer value indicating success/failure of the
25636        function.  @if clike The value is drawn from the
25637        enumeration #OperationReturnValues_t. @endif@~ The possible values
25638        returned by this function are:
25639        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25640        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25641
25642        @note The attribute 'speciesType' is only available in SBML
25643        Level&nbsp;2 Versions&nbsp;2&ndash;4.
25644
25645        """
25646        return _libsbml.Species_unsetSpeciesType(self)
25647
25648    def unsetInitialAmount(self):
25649        r"""
25650        unsetInitialAmount(Species self) -> int
25651
25652        Unsets the 'initialAmount' attribute value of this Species object.
25653
25654        @return integer value indicating success/failure of the
25655        function.  @if clike The value is drawn from the
25656        enumeration #OperationReturnValues_t. @endif@~ The possible values
25657        returned by this function are:
25658        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25659        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25660
25661        """
25662        return _libsbml.Species_unsetInitialAmount(self)
25663
25664    def unsetInitialConcentration(self):
25665        r"""
25666        unsetInitialConcentration(Species self) -> int
25667
25668        Unsets the 'initialConcentration' attribute value of this Species object.
25669
25670        @return integer value indicating success/failure of the
25671        function.  @if clike The value is drawn from the
25672        enumeration #OperationReturnValues_t. @endif@~ The possible values
25673        returned by this function are:
25674        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25675        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25676
25677        @note The attribute 'initialConcentration' is only available in SBML
25678        Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
25679
25680        """
25681        return _libsbml.Species_unsetInitialConcentration(self)
25682
25683    def unsetSubstanceUnits(self):
25684        r"""
25685        unsetSubstanceUnits(Species self) -> int
25686
25687        Unsets the 'substanceUnits' attribute value of this Species object.
25688
25689        @return integer value indicating success/failure of the
25690        function.  @if clike The value is drawn from the
25691        enumeration #OperationReturnValues_t. @endif@~ The possible values
25692        returned by this function are:
25693        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25694        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25695
25696        """
25697        return _libsbml.Species_unsetSubstanceUnits(self)
25698
25699    def unsetSpatialSizeUnits(self):
25700        r"""
25701        unsetSpatialSizeUnits(Species self) -> int
25702
25703        Unsets the 'spatialSizeUnits' attribute value of this Species object.
25704
25705        @return integer value indicating success/failure of the
25706        function.  @if clike The value is drawn from the
25707        enumeration #OperationReturnValues_t. @endif@~ The possible values
25708        returned by this function are:
25709        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25710        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25711
25712        @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
25713        Version&nbsp;3, the class Species included an attribute called
25714        'spatialSizeUnits', which allowed explicitly setting the units of size for
25715        initial concentration.  This attribute was removed in SBML Level&nbsp;2
25716        Version&nbsp;3.  LibSBML retains this attribute for compatibility with
25717        older definitions of Level&nbsp;2, but its use is strongly discouraged
25718        because it is incompatible with levels and versions of SBML beyond
25719        Level&nbsp;2 Version&nbsp;2.</span>
25720
25721        """
25722        return _libsbml.Species_unsetSpatialSizeUnits(self)
25723
25724    def unsetUnits(self):
25725        r"""
25726        unsetUnits(Species self) -> int
25727
25728        Unsets the 'units' attribute value of this Species object.
25729
25730        @return integer value indicating success/failure of the
25731        function.  @if clike The value is drawn from the
25732        enumeration #OperationReturnValues_t. @endif@~ The possible values
25733        returned by this function are:
25734        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25735        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25736
25737        """
25738        return _libsbml.Species_unsetUnits(self)
25739
25740    def unsetCharge(self):
25741        r"""
25742        unsetCharge(Species self) -> int
25743
25744        Unsets the 'charge' attribute
25745        value of this Species object.
25746
25747        @return integer value indicating success/failure of the
25748        function.  @if clike The value is drawn from the
25749        enumeration #OperationReturnValues_t. @endif@~ The possible values
25750        returned by this function are:
25751        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25752        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25753        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25754
25755        @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
25756        attribute on Species is deprecated and in SBML Level&nbsp;3 it does
25757        not exist at all.  Its use strongly discouraged.  Its presence is
25758        considered a misfeature in earlier definitions of SBML because its
25759        implications for the mathematics of a model were never defined, and in
25760        any case, no known modeling system ever used it.  Instead, models take
25761        account of charge values directly in their definitions of species by
25762        (for example) having separate species identities for the charged and
25763        uncharged versions of the same species.  This allows the condition to
25764        affect model mathematics directly.  LibSBML retains this method for
25765        easier compatibility with SBML Level&nbsp;1.
25766
25767        """
25768        return _libsbml.Species_unsetCharge(self)
25769
25770    def unsetConversionFactor(self):
25771        r"""
25772        unsetConversionFactor(Species self) -> int
25773
25774        Unsets the 'conversionFactor' attribute value of this Species object.
25775
25776        @return integer value indicating success/failure of the
25777        function.  @if clike The value is drawn from the
25778        enumeration #OperationReturnValues_t. @endif@~ The possible values
25779        returned by this function are:
25780        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25781        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
25782        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25783
25784        @note The 'conversionFactor' attribute was introduced in SBML
25785        Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
25786        and&nbsp;2.
25787
25788        """
25789        return _libsbml.Species_unsetConversionFactor(self)
25790
25791    def unsetCompartment(self):
25792        r"""
25793        unsetCompartment(Species self) -> int
25794
25795        Unsets the 'compartment' attribute value of this Species object.
25796
25797        @return integer value indicating success/failure of the
25798        function.  @if clike The value is drawn from the
25799        enumeration #OperationReturnValues_t. @endif@~ The possible values
25800        returned by this function are:
25801        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25802        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25803
25804        """
25805        return _libsbml.Species_unsetCompartment(self)
25806
25807    def unsetBoundaryCondition(self):
25808        r"""
25809        unsetBoundaryCondition(Species self) -> int
25810
25811        Unsets the 'boundaryCondition' attribute value of this Species object.
25812
25813        @return integer value indicating success/failure of the
25814        function.  @if clike The value is drawn from the
25815        enumeration #OperationReturnValues_t. @endif@~ The possible values
25816        returned by this function are:
25817        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25818        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25819
25820        """
25821        return _libsbml.Species_unsetBoundaryCondition(self)
25822
25823    def unsetHasOnlySubstanceUnits(self):
25824        r"""
25825        unsetHasOnlySubstanceUnits(Species self) -> int
25826
25827        Unsets the 'hasOnlySubstanceUnits' attribute value of this Species object.
25828
25829        @return integer value indicating success/failure of the
25830        function.  @if clike The value is drawn from the
25831        enumeration #OperationReturnValues_t. @endif@~ The possible values
25832        returned by this function are:
25833        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
25834        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
25835
25836        """
25837        return _libsbml.Species_unsetHasOnlySubstanceUnits(self)
25838
25839    def getDerivedUnitDefinition(self, *args):
25840        r"""
25841        getDerivedUnitDefinition(Species self) -> UnitDefinition
25842        getDerivedUnitDefinition(Species self) -> UnitDefinition
25843
25844        Constructs and returns a UnitDefinition that corresponds to the units
25845        of this Species' amount or concentration.
25846
25847        Species in SBML have an attribute ('substanceUnits') for declaring the
25848        units of measurement intended for the species' amount or concentration
25849        (depending on which one applies).  In the absence of a value given for
25850        'substanceUnits', the units are taken from the enclosing Model's
25851        definition of @c 'substance' or @c 'substance'/<em>(size of the
25852        compartment)</em> in which the species is located, or finally, if
25853        these are not redefined by the Model, the relevant SBML default units
25854        for those quantities.  Following that procedure, the method
25855        @if java Species.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~
25856        returns a UnitDefinition based on the
25857        interpreted units of this species's amount or concentration.
25858
25859        Note that the functionality that facilitates unit analysis depends
25860        on the model as a whole.  Thus, in cases where the object has not
25861        been added to a model or the model itself is incomplete,
25862        unit analysis is not possible and this method will return @c None.
25863
25864        Note also that unit declarations for Species are in terms of the @em
25865        identifier of a unit, but this method returns a UnitDefinition object,
25866        not a unit identifier.  It does this by constructing an appropriate
25867        UnitDefinition.  Callers may find this particularly useful when used
25868        in conjunction with the helper methods on UnitDefinition for comparing
25869        different UnitDefinition objects.
25870
25871        In SBML Level&nbsp;2 specifications prior to Version&nbsp;3, Species
25872        includes an additional attribute named 'spatialSizeUnits', which
25873        allows explicitly setting the units of size for initial concentration.
25874        The @if java Species.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~
25875        takes this into account for models
25876        expressed in SBML Level&nbsp;2 Versions&nbsp;1 and&nbsp;2.
25877
25878        @return a UnitDefinition that expresses the units of this
25879        Species, or @c None if one cannot be constructed.
25880
25881        @see getSubstanceUnits()
25882
25883        """
25884        return _libsbml.Species_getDerivedUnitDefinition(self, *args)
25885
25886    def getTypeCode(self):
25887        r"""
25888        getTypeCode(Species self) -> int
25889
25890        Returns the libSBML type code for this SBML object.
25891
25892        @par
25893        LibSBML attaches an identifying code to every kind of SBML object.  These
25894        are integer constants known as <em>SBML type codes</em>.  The names of all
25895        the codes begin with the characters <code>SBML_</code>.
25896        @if clike The set of possible type codes for core elements is defined in
25897        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
25898        SBML Level&nbsp;3 packages define their own extra enumerations of type
25899        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
25900        package).@endif@if java In the Java language interface for libSBML, the
25901        type codes are defined as static integer constants in the interface class
25902        {@link libsbmlConstants}.  @endif@if python In the Python language
25903        interface for libSBML, the type codes are defined as static integer
25904        constants in the interface class @link libsbml@endlink.@endif@if csharp In
25905        the C# language interface for libSBML, the type codes are defined as
25906        static integer constants in the interface class
25907        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
25908        package plug-ins may use overlapping type codes; to identify the package
25909        to which a given object belongs, call the
25910        <code>@if conly SBase_getPackageName()
25911        @else SBase.getPackageName()
25912        @endif</code>
25913        method on the object.
25914
25915        The exception to this is lists:  all SBML-style list elements have the type
25916        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
25917        are from.
25918
25919        @return the SBML type code for this object:
25920        @link libsbml#SBML_SPECIES SBML_SPECIES@endlink (default).
25921
25922        @warning <span class='warning'>The specific integer values of the possible
25923        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
25924        packages,  To fully identify the correct code, <strong>it is necessary to
25925        invoke both getPackageName() and getTypeCode()</strong> (or
25926        ListOf.getItemTypeCode()).</span>
25927
25928        @see getElementName()
25929        @see getPackageName()
25930
25931        """
25932        return _libsbml.Species_getTypeCode(self)
25933
25934    def getElementName(self):
25935        r"""
25936        getElementName(Species self) -> string
25937
25938        Returns the XML element name of this object, which for Species, is
25939        always @c 'species'.
25940
25941        @return the name of this element, i.e., @c 'species'.
25942
25943        """
25944        return _libsbml.Species_getElementName(self)
25945
25946    def hasRequiredAttributes(self):
25947        r"""
25948        hasRequiredAttributes(Species self) -> bool
25949
25950        Predicate returning @c True if
25951        all the required attributes for this Species object
25952        have been set.
25953
25954        The required attributes for a Species object are:
25955        @li 'id' (or 'name' in SBML Level&nbsp;1)
25956        @li 'compartment'
25957        @li 'initialAmount' (required in SBML Level&nbsp;1 only; optional otherwise)
25958        @li 'hasOnlySubstanceUnits' (required in SBML Level&nbsp;3; optional in SBML Level&nbsp;2)
25959        @li 'boundaryCondition' (required in SBML Level&nbsp;3; optional in Levels&nbsp;1 and&nbsp;2)
25960        @li 'constant' (required in SBML Level&nbsp;3; optional in SBML Level&nbsp;2)
25961
25962        @return @c True if the required attributes have been set, @c False
25963        otherwise.
25964
25965        """
25966        return _libsbml.Species_hasRequiredAttributes(self)
25967
25968    def renameSIdRefs(self, oldid, newid):
25969        r"""
25970        renameSIdRefs(Species self, string oldid, string newid)
25971
25972        Replaces all uses of a given @c SIdRef type attribute value with another
25973        value.
25974
25975        @par
25976        In SBML, object identifiers are of a data type called <code>SId</code>.
25977        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
25978        introduced for attribute values that refer to <code>SId</code> values; in
25979        previous Levels of SBML, this data type did not exist and attributes were
25980        simply described to as 'referring to an identifier', but the effective
25981        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
25982        other methods of libSBML refer to the type <code>SIdRef</code> for all
25983        Levels of SBML, even if the corresponding SBML specification did not
25984        explicitly name the data type.
25985
25986        This method works by looking at all attributes and (if appropriate)
25987        mathematical formulas in MathML content, comparing the referenced
25988        identifiers to the value of @p oldid.  If any matches are found, the
25989        matching values are replaced with @p newid.  The method does @em not
25990        descend into child elements.
25991
25992        @param oldid the old identifier.
25993        @param newid the new identifier.
25994
25995        """
25996        return _libsbml.Species_renameSIdRefs(self, oldid, newid)
25997
25998    def renameUnitSIdRefs(self, oldid, newid):
25999        r"""
26000        renameUnitSIdRefs(Species self, string oldid, string newid)
26001
26002        Replaces all uses of a given @c UnitSIdRef type attribute value with
26003        another value.
26004
26005        @par
26006        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
26007        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
26008        introduced for attribute values that refer to <code>UnitSId</code> values; in
26009        previous Levels of SBML, this data type did not exist and attributes were
26010        simply described to as 'referring to a unit identifier', but the effective
26011        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
26012        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
26013        Levels of SBML, even if the corresponding SBML specification did not
26014        explicitly name the data type.
26015
26016        This method works by looking at all unit identifier attribute values
26017        (including, if appropriate, inside mathematical formulas), comparing the
26018        referenced unit identifiers to the value of @p oldid.  If any matches
26019        are found, the matching values are replaced with @p newid.  The method
26020        does @em not descend into child elements.
26021
26022        @param oldid the old identifier.
26023        @param newid the new identifier.
26024
26025        """
26026        return _libsbml.Species_renameUnitSIdRefs(self, oldid, newid)
26027
26028# Register Species in _libsbml:
26029_libsbml.Species_swigregister(Species)
26030
26031class ListOfSpecies(ListOf):
26032    r"""
26033
26034    @sbmlpackage{core}
26035
26036    @htmlinclude pkg-marker-core.html A list of Species objects.
26037
26038    @par
26039    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
26040    are merely containers used for organizing the main components of an SBML
26041    model.  In libSBML's implementation, ListOf___
26042    @if conly data structures @else classes@endif@~ are derived from the
26043    intermediate utility @if conly structure @else class@endif@~ ListOf, which
26044    is not defined by the SBML specifications but serves as a useful
26045    programmatic construct.  ListOf is itself is in turn derived from SBase,
26046    which provides all of the various ListOf___
26047    @if conly data structures @else classes@endif@~ with common features
26048    defined by the SBML specification, such as 'metaid' attributes and
26049    annotations.
26050
26051    The relationship between the lists and the rest of an SBML model is
26052    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
26053
26054    @htmlinclude listof-illustration.html
26055
26056    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
26057    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
26058    Version&nbsp;2 allows
26059    containers to contain zero or more of the relevant object, instead of
26060    requiring at least one.  As such, libsbml will write out an
26061    otherwise-empty ListOf___ element that has any optional attribute set
26062    (such as 'id' or 'metaid'), that has an optional child (such
26063    as a 'notes' or 'annotation'), or that has attributes or children set
26064    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
26065    any other children.
26066
26067    Readers may wonder about the motivations for using the ListOf___
26068    containers in SBML.  A simpler approach in XML might be to place the
26069    components all directly at the top level of the model definition.  The
26070    choice made in SBML is to group them within XML elements named after
26071    %ListOf<em>Classname</em>, in part because it helps organize the
26072    components.  More importantly, the fact that the container classes are
26073    derived from SBase means that software tools can add information @em about
26074    the lists themselves into each list container's 'annotation'.
26075
26076    @see ListOfFunctionDefinitions
26077    @see ListOfUnitDefinitions
26078    @see ListOfCompartmentTypes
26079    @see ListOfSpeciesTypes
26080    @see ListOfCompartments
26081    @see ListOfSpecies
26082    @see ListOfParameters
26083    @see ListOfInitialAssignments
26084    @see ListOfRules
26085    @see ListOfConstraints
26086    @see ListOfReactions
26087    @see ListOfEvents
26088
26089    @if conly
26090    @note In the C API for libSBML, functions that in other language APIs
26091    would be inherited by the various ListOf___ structures not shown in the
26092    pages for the individual ListOf___'s.  Instead, the functions are defined
26093    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
26094    the many common functions available for manipulating ListOf___
26095    structures</strong>.  The documentation for the individual ListOf___
26096    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
26097    all of the functionality available. @endif@~
26098
26099    """
26100
26101    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
26102    __repr__ = _swig_repr
26103
26104    def __init__(self, *args):
26105        r"""
26106        __init__(ListOfSpecies self, unsigned int level, unsigned int version) -> ListOfSpecies
26107        __init__(ListOfSpecies self, SBMLNamespaces sbmlns) -> ListOfSpecies
26108
26109        This method has multiple variants; they differ in the arguments
26110         they accept.  Each variant is described separately below.
26111
26112        @par
26113        <hr>
26114        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26115         <pre class='signature'>ListOfSpecies(SBMLNamespaces sbmlns)</pre>
26116
26117        Creates a new ListOfSpecies object.
26118
26119        The object is constructed such that it is valid for the SBML Level and
26120        Version combination determined by the SBMLNamespaces object in @p
26121        sbmlns.
26122
26123        @param sbmlns an SBMLNamespaces object that is used to determine the
26124        characteristics of the ListOfSpecies object to be created.
26125
26126        @throws SBMLConstructorException
26127        Thrown if the given @p sbmlns is inconsistent or incompatible
26128        with this object.
26129
26130        @note Attempting to add an object to an SBMLDocument having a different
26131        combination of SBML Level, Version and XML namespaces than the object
26132        itself will result in an error at the time a caller attempts to make the
26133        addition.  A parent object must have compatible Level, Version and XML
26134        namespaces.  (Strictly speaking, a parent may also have more XML
26135        namespaces than a child, but the reverse is not permitted.)  The
26136        restriction is necessary to ensure that an SBML model has a consistent
26137        overall structure.  This requires callers to manage their objects
26138        carefully, but the benefit is increased flexibility in how models can be
26139        created by permitting callers to create objects bottom-up if desired.  In
26140        situations where objects are not yet attached to parents (e.g.,
26141        SBMLDocument), knowledge of the intented SBML Level and Version help
26142        libSBML determine such things as whether it is valid to assign a
26143        particular value to an attribute.
26144
26145
26146        @par
26147        <hr>
26148        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26149         <pre class='signature'>ListOfSpecies(long level, long version)</pre>
26150
26151        Creates a new ListOfSpecies object.
26152
26153        The object is constructed such that it is valid for the given SBML
26154        Level and Version combination.
26155
26156        @param level the SBML Level.
26157
26158        @param version the Version within the SBML Level.
26159
26160        @throws SBMLConstructorException
26161        Thrown if the given @p level and @p version combination are invalid
26162        or if this object is incompatible with the given level and version.
26163
26164        @note Attempting to add an object to an SBMLDocument having a different
26165        combination of SBML Level, Version and XML namespaces than the object
26166        itself will result in an error at the time a caller attempts to make the
26167        addition.  A parent object must have compatible Level, Version and XML
26168        namespaces.  (Strictly speaking, a parent may also have more XML
26169        namespaces than a child, but the reverse is not permitted.)  The
26170        restriction is necessary to ensure that an SBML model has a consistent
26171        overall structure.  This requires callers to manage their objects
26172        carefully, but the benefit is increased flexibility in how models can be
26173        created by permitting callers to create objects bottom-up if desired.  In
26174        situations where objects are not yet attached to parents (e.g.,
26175        SBMLDocument), knowledge of the intented SBML Level and Version help
26176        libSBML determine such things as whether it is valid to assign a
26177        particular value to an attribute.
26178
26179        """
26180        _libsbml.ListOfSpecies_swiginit(self, _libsbml.new_ListOfSpecies(*args))
26181
26182    def clone(self):
26183        r"""
26184        clone(ListOfSpecies self) -> ListOfSpecies
26185
26186        Creates and returns a deep copy of this ListOfSpecies object.
26187
26188        @return the (deep) copy of this ListOfSpecies object.
26189
26190        """
26191        return _libsbml.ListOfSpecies_clone(self)
26192
26193    def getItemTypeCode(self):
26194        r"""
26195        getItemTypeCode(ListOfSpecies self) -> int
26196
26197        Returns the libSBML type code for the objects contained in this ListOf
26198        (i.e., Species objects, if the list is non-empty).
26199
26200        @par
26201        LibSBML attaches an identifying code to every kind of SBML object.  These
26202        are integer constants known as <em>SBML type codes</em>.  The names of all
26203        the codes begin with the characters <code>SBML_</code>.
26204        @if clike The set of possible type codes for core elements is defined in
26205        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
26206        SBML Level&nbsp;3 packages define their own extra enumerations of type
26207        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
26208        package).@endif@if java In the Java language interface for libSBML, the
26209        type codes are defined as static integer constants in the interface class
26210        {@link libsbmlConstants}.  @endif@if python In the Python language
26211        interface for libSBML, the type codes are defined as static integer
26212        constants in the interface class @link libsbml@endlink.@endif@if csharp In
26213        the C# language interface for libSBML, the type codes are defined as
26214        static integer constants in the interface class
26215        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
26216        package plug-ins may use overlapping type codes; to identify the package
26217        to which a given object belongs, call the
26218        <code>@if conly SBase_getPackageName()
26219        @else SBase.getPackageName()
26220        @endif</code>
26221        method on the object.
26222
26223        The exception to this is lists:  all SBML-style list elements have the type
26224        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
26225        are from.
26226
26227        @return the SBML type code for objects contained in this list:
26228        @link libsbml#SBML_SPECIES SBML_SPECIES@endlink (default).
26229
26230        @see getElementName()
26231        @see getPackageName()
26232
26233        """
26234        return _libsbml.ListOfSpecies_getItemTypeCode(self)
26235
26236    def getElementName(self):
26237        r"""
26238        getElementName(ListOfSpecies self) -> string
26239
26240        Returns the XML element name of this object.
26241
26242        For ListOfSpeciess, the XML element name is @c 'listOfSpeciess'.
26243
26244        @return the name of this element, i.e., @c 'listOfSpeciess'.
26245
26246        """
26247        return _libsbml.ListOfSpecies_getElementName(self)
26248
26249    def get(self, *args):
26250        r"""
26251        get(ListOfSpecies self, unsigned int n) -> Species
26252        get(ListOfSpecies self, unsigned int n) -> Species
26253        get(ListOfSpecies self, string sid) -> Species
26254        get(ListOfSpecies self, string sid) -> Species
26255
26256        This method has multiple variants; they differ in the arguments
26257         they accept.  Each variant is described separately below.
26258
26259        @par
26260        <hr>
26261        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26262         <pre class='signature'>get(long n)</pre>
26263
26264        Get a Species from the ListOfSpecies.
26265
26266        @param n the index number of the Species to get.
26267
26268        @return the nth Species in this ListOfSpecies.
26269        If the index @p n is invalid, @c None is returned.
26270
26271        @see size()
26272
26273
26274        @par
26275        <hr>
26276        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26277         <pre class='signature'>get(string sid)</pre>
26278
26279        Get a Species from the ListOfSpecies
26280        based on its identifier.
26281
26282        @param sid a string representing the identifier
26283        of the Species to get.
26284
26285        @return Species in this ListOfSpecies
26286        with the given @p sid or @c None if no such
26287        Species exists.
26288
26289        @see get()
26290        @see size()
26291
26292        """
26293        return _libsbml.ListOfSpecies_get(self, *args)
26294
26295    def remove(self, *args):
26296        r"""
26297        remove(ListOfSpecies self, unsigned int n) -> Species
26298        remove(ListOfSpecies self, string sid) -> Species
26299
26300        This method has multiple variants; they differ in the arguments
26301         they accept.  Each variant is described separately below.
26302
26303        @par
26304        <hr>
26305        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26306         <pre class='signature'>remove(long n)</pre>
26307
26308        Removes the nth item from this ListOfSpeciess items and returns a pointer to
26309        it.
26310
26311        The caller owns the returned item and is responsible for deleting it.
26312
26313        @param n the index of the item to remove.
26314
26315        @see size()
26316
26317
26318        @par
26319        <hr>
26320        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26321         <pre class='signature'>remove(string sid)</pre>
26322
26323        Removes item in this ListOfSpeciess items with the given identifier.
26324
26325        The caller owns the returned item and is responsible for deleting it.
26326        If none of the items in this list have the identifier @p sid, then
26327        @c None is returned.
26328
26329        @param sid the identifier of the item to remove.
26330
26331        @return the item removed.  As mentioned above, the caller owns the
26332        returned item.
26333
26334        """
26335        return _libsbml.ListOfSpecies_remove(self, *args)
26336    __swig_destroy__ = _libsbml.delete_ListOfSpecies
26337
26338# Register ListOfSpecies in _libsbml:
26339_libsbml.ListOfSpecies_swigregister(ListOfSpecies)
26340
26341class Parameter(SBase):
26342    r"""
26343
26344    @sbmlpackage{core}
26345
26346    @htmlinclude pkg-marker-core.html An SBML parameter: a named symbol with a value.
26347
26348    A Parameter is used in SBML to define a symbol associated with a value;
26349    this symbol can then be used in mathematical formulas in a model.  By
26350    default, parameters have constant value for the duration of a
26351    simulation, and for this reason are called @em parameters instead of @em
26352    variables in SBML, although it is crucial to understand that <em>SBML
26353    parameters represent both concepts</em>.  Whether a given SBML
26354    parameter is intended to be constant or variable is indicated by the
26355    value of its 'constant' attribute.
26356
26357    SBML's Parameter has a required attribute, 'id', that gives the
26358    parameter a unique identifier by which other parts of an SBML model
26359    definition can refer to it.  A parameter can also have an optional
26360    'name' attribute of type @c string.  Identifiers and names must be used
26361    according to the guidelines described in the SBML specifications.
26362
26363    The optional attribute 'value' determines the value (of type @c float)
26364    assigned to the parameter.  A missing value for 'value' implies that
26365    the value either is unknown, or to be obtained from an external source,
26366    or determined by an initial assignment.  The unit of measurement
26367    associated with the value of the parameter can be specified using the
26368    optional attribute 'units'.  Here we only mention briefly some notable
26369    points about the possible unit choices, but readers are urged to consult
26370    the SBML specification documents for more information:
26371    <ul>
26372
26373    <li> In SBML Level&nbsp;3, there are no constraints on the units that
26374    can be assigned to parameters in a model; there are also no units to
26375    inherit from the enclosing Model object (unlike the case for, e.g.,
26376    Species and Compartment).
26377
26378    <li> In SBML Level&nbsp;2, the value assigned to the parameter's 'units'
26379    attribute must be chosen from one of the following possibilities: one of
26380    the base unit identifiers defined in SBML; one of the built-in unit
26381    identifiers @c 'substance', @c 'time', @c 'volume', @c 'area' or
26382    @c 'length'; or the identifier of a new unit defined in the list of unit
26383    definitions in the enclosing Model structure.  There are no constraints
26384    on the units that can be chosen from these sets.  There are no default
26385    units for parameters.
26386    </ul>
26387
26388    The Parameter structure has another boolean attribute named 'constant'
26389    that is used to indicate whether the parameter's value can vary during a
26390    simulation.  (In SBML Level&nbsp;3, the attribute is mandatory and must
26391    be given a value; in SBML Levels below Level&nbsp;3, the attribute is
26392    optional.)  A value of @c True indicates the parameter's value cannot be
26393    changed by any construct except InitialAssignment.  Conversely, if the
26394    value of 'constant' is @c False, other constructs in SBML, such as rules
26395    and events, can change the value of the parameter.
26396
26397    SBML Level&nbsp;3 uses a separate object class, LocalParameter, for
26398    parameters that are local to a Reaction's KineticLaw.  In Levels prior
26399    to SBML Level&nbsp;3, the Parameter class is used both for definitions
26400    of global parameters, as well as reaction-local parameters stored in a
26401    list within KineticLaw objects.  Parameter objects that are local to a
26402    reaction (that is, those defined within the KineticLaw structure of a
26403    Reaction) cannot be changed by rules and therefore are <em>implicitly
26404    always constant</em>; consequently, in SBML Level&nbsp;2, parameter
26405    definitions within Reaction structures should @em not have their
26406    'constant' attribute set to @c False.
26407
26408    What if a global parameter has its 'constant' attribute set to @c False,
26409    but the model does not contain any rules, events or other constructs
26410    that ever change its value over time?  Although the model may be
26411    suspect, this situation is not strictly an error.  A value of @c False
26412    for 'constant' only indicates that a parameter @em can change value, not
26413    that it @em must.
26414
26415    As with all other major SBML components, Parameter is derived from
26416    SBase, and the methods defined on SBase are available on Parameter.
26417
26418    @note The use of the term @em parameter in SBML sometimes leads to
26419    confusion among readers who have a particular notion of what something
26420    called 'parameter' should be.  It has been the source of heated debate,
26421    but despite this, no one has yet found an adequate replacement term that
26422    does not have different connotations to different people and hence leads
26423    to confusion among @em some subset of users.  Perhaps it would have been
26424    better to have two constructs, one called @em constants and the other
26425    called @em variables.  The current approach in SBML is simply more
26426    parsimonious, using a single Parameter construct with the boolean flag
26427    'constant' indicating which flavor it is.  In any case, readers are
26428    implored to look past their particular definition of a @em parameter and
26429    simply view SBML's Parameter as a single mechanism for defining both
26430    constants and (additional) variables in a model.  (We write @em
26431    additional because the species in a model are usually considered to be
26432    the central variables.)  After all, software tools are not required to
26433    expose to users the actual names of particular SBML constructs, and
26434    thus tools can present to their users whatever terms their designers
26435    feel best matches their target audience.
26436
26437    In SBML Level&nbsp;3 Version&nbsp;2, many restrictions were lifted
26438    requiring only Boolean values in Boolean contexts, and numeric
26439    values in numeric contexts.  This means that a Parameter may now
26440    be used as a Boolean, despite canonically having a numeric value.
26441    To be consistent, one should always assign it a value of @c True
26442    or @c False, and use it in Boolean contexts exclusively.  It would
26443    be appropriate to give it an SBO value of 602 ('Logical parameter')
26444    if one chooses to do this.
26445
26446    @see ListOfParameters
26447
26448    """
26449
26450    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
26451    __repr__ = _swig_repr
26452    __swig_destroy__ = _libsbml.delete_Parameter
26453
26454    def __init__(self, *args):
26455        r"""
26456        __init__(Parameter self, unsigned int level, unsigned int version) -> Parameter
26457        __init__(Parameter self, SBMLNamespaces sbmlns) -> Parameter
26458        __init__(Parameter self, Parameter orig) -> Parameter
26459
26460        This method has multiple variants; they differ in the arguments
26461         they accept.  Each variant is described separately below.
26462
26463        @par
26464        <hr>
26465        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26466         <pre class='signature'>Parameter(SBMLNamespaces sbmlns)</pre>
26467
26468        Creates a new Parameter using the given SBMLNamespaces object
26469        @p sbmlns.
26470
26471        @par
26472        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
26473        information.  It is used to communicate the SBML Level, Version, and (in
26474        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
26475        common approach to using libSBML's SBMLNamespaces facilities is to create an
26476        SBMLNamespaces object somewhere in a program once, then hand that object
26477        as needed to object constructors that accept SBMLNamespaces as arguments.
26478
26479        It is worth emphasizing that although this constructor does not take
26480        an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
26481        (identifier) attribute of a Parameter is required to have a value.
26482        Thus, callers are cautioned to assign a value after calling this
26483        constructor if no identifier is provided as an argument.  Setting the
26484        identifier can be accomplished using the method
26485        @if java setId(String id)@else setId()@endif.
26486
26487        @param sbmlns an SBMLNamespaces object.
26488
26489        @throws SBMLConstructorException
26490        Thrown if the given @p sbmlns is inconsistent or incompatible
26491        with this object.
26492
26493        @note Attempting to add an object to an SBMLDocument having a different
26494        combination of SBML Level, Version and XML namespaces than the object
26495        itself will result in an error at the time a caller attempts to make the
26496        addition.  A parent object must have compatible Level, Version and XML
26497        namespaces.  (Strictly speaking, a parent may also have more XML
26498        namespaces than a child, but the reverse is not permitted.)  The
26499        restriction is necessary to ensure that an SBML model has a consistent
26500        overall structure.  This requires callers to manage their objects
26501        carefully, but the benefit is increased flexibility in how models can be
26502        created by permitting callers to create objects bottom-up if desired.  In
26503        situations where objects are not yet attached to parents (e.g.,
26504        SBMLDocument), knowledge of the intented SBML Level and Version help
26505        libSBML determine such things as whether it is valid to assign a
26506        particular value to an attribute.
26507
26508
26509        @par
26510        <hr>
26511        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26512         <pre class='signature'>Parameter(long level, long version)</pre>
26513
26514        Creates a new Parameter using the given SBML @p level and @p version
26515        values.
26516
26517        @param level a long integer, the SBML Level to assign to this Parameter.
26518
26519        @param version a long integer, the SBML Version to assign to this
26520        Parameter.
26521
26522        @throws SBMLConstructorException
26523        Thrown if the given @p level and @p version combination are invalid
26524        or if this object is incompatible with the given level and version.
26525
26526        @note Attempting to add an object to an SBMLDocument having a different
26527        combination of SBML Level, Version and XML namespaces than the object
26528        itself will result in an error at the time a caller attempts to make the
26529        addition.  A parent object must have compatible Level, Version and XML
26530        namespaces.  (Strictly speaking, a parent may also have more XML
26531        namespaces than a child, but the reverse is not permitted.)  The
26532        restriction is necessary to ensure that an SBML model has a consistent
26533        overall structure.  This requires callers to manage their objects
26534        carefully, but the benefit is increased flexibility in how models can be
26535        created by permitting callers to create objects bottom-up if desired.  In
26536        situations where objects are not yet attached to parents (e.g.,
26537        SBMLDocument), knowledge of the intented SBML Level and Version help
26538        libSBML determine such things as whether it is valid to assign a
26539        particular value to an attribute.
26540
26541
26542        @par
26543        <hr>
26544        <span class='variant-sig-heading'>Method variant with the following signature</span>:
26545         <pre class='signature'>Parameter(Parameter orig)</pre>
26546
26547        Copy constructor; creates a copy of a Parameter.
26548
26549        @param orig the Parameter instance to copy.
26550
26551        """
26552        _libsbml.Parameter_swiginit(self, _libsbml.new_Parameter(*args))
26553
26554    def clone(self):
26555        r"""
26556        clone(Parameter self) -> Parameter
26557
26558        Creates and returns a deep copy of this Parameter object.
26559
26560        @return the (deep) copy of this Parameter object.
26561
26562        """
26563        return _libsbml.Parameter_clone(self)
26564
26565    def initDefaults(self):
26566        r"""
26567        initDefaults(Parameter self)
26568
26569        Initializes the fields of this Parameter object to 'typical' defaults
26570        values.
26571
26572        The SBML Parameter component has slightly different aspects and
26573        default attribute values in different SBML Levels and Versions.  Many
26574        SBML object classes defined by libSBML have an initDefaults() method
26575        to set the values to certain common defaults, based mostly on what
26576        they are in SBML Level&nbsp;2.  In the case of Parameter, this method
26577        only sets the value of the 'constant' attribute to @c True.
26578
26579        @see getConstant()
26580        @see isSetConstant()
26581        @see setConstant()
26582
26583        """
26584        return _libsbml.Parameter_initDefaults(self)
26585
26586    def getId(self):
26587        r"""
26588        getId(Parameter self) -> string
26589
26590        Returns the value of the 'id' attribute of this Parameter.
26591
26592        @note Because of the inconsistent behavior of this function with
26593        respect to assignments and rules, it is now recommended to
26594        use the getIdAttribute() function instead.
26595
26596        @par
26597        The identifier given by an object's 'id' attribute value
26598        is used to identify the object within the SBML model definition.
26599        Other objects can refer to the component using this identifier.  The
26600        data type of 'id' is always <code>SId</code> or a type derived
26601        from that, such as <code>UnitSId</code>, depending on the object in
26602        question.  All data types are defined as follows:
26603        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
26604        letter ::= 'a'..'z','A'..'Z'
26605        digit  ::= '0'..'9'
26606        idChar ::= letter | digit | '_'
26607        SId    ::= ( letter | '_' ) idChar*
26608        </pre>
26609        The characters <code>(</code> and <code>)</code> are used for grouping,
26610        the character <code>*</code> 'zero or more times', and the character
26611        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
26612        is determined by an exact character sequence match; i.e., comparisons must
26613        be performed in a case-sensitive manner.  This applies to all uses of
26614        <code>SId</code>, <code>SIdRef</code>, and derived types.
26615
26616        Users need to be aware of some important API issues that are the result of
26617        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
26618        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
26619        of SBML objects.  To simplify the work of programmers, libSBML's API
26620        provided get, set, check, and unset on the SBase object class itself
26621        instead of on individual subobject classes. This made the
26622        get/set/etc. methods uniformly available on all objects in the libSBML
26623        API.  LibSBML simply returned empty strings or otherwise did not act when
26624        the methods were applied to SBML objects that were not defined by the SBML
26625        specification to have 'id' or 'name' attributes.  Additional complications
26626        arose with the rule and assignment objects: InitialAssignment,
26627        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
26628        the rule object hierarchy was different, and in addition, then as now,
26629        they possess different attributes: 'variable' (for the rules and event
26630        assignments), 'symbol' (for initial assignments), or neither (for
26631        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
26632        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
26633
26634        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
26635        Version&nbsp;2, it became necessary to introduce a new way to interact
26636        with the attributes more consistently in libSBML to avoid breaking
26637        backward compatibility in the behavior of the original 'id' methods.  For
26638        this reason, libSBML provides four functions (getIdAttribute(),
26639        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
26640        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
26641        from SBase, regardless of the object's type.  <strong>These new methods
26642        should be used instead of the older getId()/setId()/etc. methods</strong>
26643        unless the old behavior is somehow necessary.  Regardless of the Level and
26644        Version of the SBML, these functions allow client applications to use more
26645        generalized code in some situations (for instance, when manipulating
26646        objects that are all known to have identifiers).  If the object in
26647        question does not posess an 'id' attribute according to the SBML
26648        specification for the Level and Version in use, libSBML will not allow the
26649        identifier to be set, nor will it read or write 'id' attributes for those
26650        objects.
26651
26652        @return the id of this Parameter.
26653
26654        @see getIdAttribute()
26655        @see setIdAttribute()
26656        @see isSetIdAttribute()
26657        @see unsetIdAttribute()
26658
26659        """
26660        return _libsbml.Parameter_getId(self)
26661
26662    def getName(self):
26663        r"""
26664        getName(Parameter self) -> string
26665
26666        Returns the value of the 'name' attribute of this Parameter object.
26667
26668        @par
26669        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
26670        moved to SBase directly, instead of being defined individually for many
26671        (but not all) objects.  LibSBML has for a long time provided functions
26672        defined on SBase itself to get, set, and unset those attributes, which
26673        would fail or otherwise return empty strings if executed on any object
26674        for which those attributes were not defined.  Now that all SBase objects
26675        define those attributes, those functions now succeed for any object with
26676        the appropriate level and version.
26677
26678        The 'name' attribute is
26679        optional and is not intended to be used for cross-referencing purposes
26680        within a model.  Its purpose instead is to provide a human-readable
26681        label for the component.  The data type of 'name' is the type
26682        <code>string</code> defined in XML Schema.  SBML imposes no
26683        restrictions as to the content of 'name' attributes beyond those
26684        restrictions defined by the <code>string</code> type in XML Schema.
26685
26686        The recommended practice for handling 'name' is as follows.  If a
26687        software tool has the capability for displaying the content of 'name'
26688        attributes, it should display this content to the user as a
26689        component's label instead of the component's 'id'.  If the user
26690        interface does not have this capability (e.g., because it cannot
26691        display or use special characters in symbol names), or if the 'name'
26692        attribute is missing on a given component, then the user interface
26693        should display the value of the 'id' attribute instead.  (Script
26694        language interpreters are especially likely to display 'id' instead of
26695        'name'.)
26696
26697        As a consequence of the above, authors of systems that automatically
26698        generate the values of 'id' attributes should be aware some systems
26699        may display the 'id''s to the user.  Authors therefore may wish to
26700        take some care to have their software create 'id' values that are: (a)
26701        reasonably easy for humans to type and read; and (b) likely to be
26702        meaningful, for example by making the 'id' attribute be an abbreviated
26703        form of the name attribute value.
26704
26705        An additional point worth mentioning is although there are
26706        restrictions on the uniqueness of 'id' values, there are no
26707        restrictions on the uniqueness of 'name' values in a model.  This
26708        allows software applications leeway in assigning component identifiers.
26709
26710        Regardless of the level and version of the SBML, these functions allow
26711        client applications to use more generalized code in some situations
26712        (for instance, when manipulating objects that are all known to have
26713        names).  If the object in question does not posess a 'name' attribute
26714        according to the SBML specification for the Level and Version in use,
26715        libSBML will not allow the name to be set, nor will it read or
26716        write 'name' attributes for those objects.
26717
26718        @return the name of this SBML object, or the empty string if not set or unsettable.
26719
26720        @see getIdAttribute()
26721        @see isSetName()
26722        @see setName()
26723        @see unsetName()
26724
26725        """
26726        return _libsbml.Parameter_getName(self)
26727
26728    def getValue(self):
26729        r"""
26730        getValue(Parameter self) -> double
26731
26732        Returns the numerical value of this Parameter.
26733
26734        @return the value of the 'value' attribute of this Parameter, as a
26735        number of type @c float.
26736
26737        @note <b>It is crucial</b> that callers not blindly call
26738        Parameter.getValue() without first using Parameter.isSetValue() to
26739        determine whether a value has ever been set.  Otherwise, the value
26740        return by Parameter.getValue() may not actually represent a value
26741        assigned to the parameter.  The reason is simply that the data type
26742        @c float in a program always has @em some value.  A separate test is
26743        needed to determine whether the value is a true model value, or
26744        uninitialized data in a computer's memory location.
26745
26746        @see isSetValue()
26747        @see setValue()
26748        @see getUnits()
26749
26750        """
26751        return _libsbml.Parameter_getValue(self)
26752
26753    def getUnits(self):
26754        r"""
26755        getUnits(Parameter self) -> string
26756
26757        Returns the units defined for this Parameter.
26758
26759        The value of an SBML parameter's 'units' attribute establishes the
26760        unit of measurement associated with the parameter's value.
26761
26762        @return the value of the 'units' attribute of this Parameter, as a
26763        string.  An empty string indicates that no units have been assigned.
26764
26765        @note There is an important distinction to be made between <em>no units
26766        assigned</em>, and assuming a value without units has any specific unit
26767        such as <code>dimensionless</code>.  In SBML, default units are never
26768        attributed to numbers, and numbers without units are not automatically
26769        assumed to have the unit <code>dimensionless</code>.  Please consult the
26770        relevant SBML specification document for a more in-depth explanation of
26771        this topic and the SBML unit system.
26772
26773        @see isSetUnits()
26774        @see setUnits()
26775        @see getValue()
26776
26777        """
26778        return _libsbml.Parameter_getUnits(self)
26779
26780    def getConstant(self):
26781        r"""
26782        getConstant(Parameter self) -> bool
26783
26784        Returns the value of the 'constant' attribute of this Parameter instance.
26785
26786        @return @c True if this Parameter is declared as being constant,
26787        @c False otherwise.
26788
26789        @note Readers who view the documentation for LocalParameter may be
26790        confused about the presence of this method.  LibSBML derives
26791        LocalParameter from Parameter; however, this does not precisely match
26792        the object hierarchy defined by SBML Level&nbsp;3, where
26793        LocalParameter is derived directly from SBase and not Parameter.  We
26794        believe this arrangement makes it easier for libSBML users to program
26795        applications that work with both SBML Level&nbsp;2 and SBML
26796        Level&nbsp;3, but programmers should also keep in mind this difference
26797        exists.  A side-effect of libSBML's scheme is that certain methods on
26798        LocalParameter that are inherited from Parameter do not actually have
26799        relevance to LocalParameter objects.  An example of this is the
26800        methods pertaining to Parameter's attribute 'constant' (i.e.,
26801        isSetConstant(), setConstant(), and getConstant()).
26802
26803        @see isSetConstant()
26804        @see setConstant()
26805
26806        """
26807        return _libsbml.Parameter_getConstant(self)
26808
26809    def isSetId(self):
26810        r"""
26811        isSetId(Parameter self) -> bool
26812
26813        Predicate returning @c True if this
26814        Parameter's 'id' attribute is set.
26815
26816        @par
26817        The identifier given by an object's 'id' attribute value
26818        is used to identify the object within the SBML model definition.
26819        Other objects can refer to the component using this identifier.  The
26820        data type of 'id' is always <code>SId</code> or a type derived
26821        from that, such as <code>UnitSId</code>, depending on the object in
26822        question.  All data types are defined as follows:
26823        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
26824        letter ::= 'a'..'z','A'..'Z'
26825        digit  ::= '0'..'9'
26826        idChar ::= letter | digit | '_'
26827        SId    ::= ( letter | '_' ) idChar*
26828        </pre>
26829        The characters <code>(</code> and <code>)</code> are used for grouping,
26830        the character <code>*</code> 'zero or more times', and the character
26831        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
26832        is determined by an exact character sequence match; i.e., comparisons must
26833        be performed in a case-sensitive manner.  This applies to all uses of
26834        <code>SId</code>, <code>SIdRef</code>, and derived types.
26835
26836        Users need to be aware of some important API issues that are the result of
26837        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
26838        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
26839        of SBML objects.  To simplify the work of programmers, libSBML's API
26840        provided get, set, check, and unset on the SBase object class itself
26841        instead of on individual subobject classes. This made the
26842        get/set/etc. methods uniformly available on all objects in the libSBML
26843        API.  LibSBML simply returned empty strings or otherwise did not act when
26844        the methods were applied to SBML objects that were not defined by the SBML
26845        specification to have 'id' or 'name' attributes.  Additional complications
26846        arose with the rule and assignment objects: InitialAssignment,
26847        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
26848        the rule object hierarchy was different, and in addition, then as now,
26849        they possess different attributes: 'variable' (for the rules and event
26850        assignments), 'symbol' (for initial assignments), or neither (for
26851        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
26852        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
26853
26854        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
26855        Version&nbsp;2, it became necessary to introduce a new way to interact
26856        with the attributes more consistently in libSBML to avoid breaking
26857        backward compatibility in the behavior of the original 'id' methods.  For
26858        this reason, libSBML provides four functions (getIdAttribute(),
26859        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
26860        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
26861        from SBase, regardless of the object's type.  <strong>These new methods
26862        should be used instead of the older getId()/setId()/etc. methods</strong>
26863        unless the old behavior is somehow necessary.  Regardless of the Level and
26864        Version of the SBML, these functions allow client applications to use more
26865        generalized code in some situations (for instance, when manipulating
26866        objects that are all known to have identifiers).  If the object in
26867        question does not posess an 'id' attribute according to the SBML
26868        specification for the Level and Version in use, libSBML will not allow the
26869        identifier to be set, nor will it read or write 'id' attributes for those
26870        objects.
26871
26872        @return @c True if the 'id' attribute of this SBML object is
26873        set, @c False otherwise.
26874
26875        @note Because of the inconsistent behavior of this function with
26876        respect to assignments and rules, it is recommended that callers
26877        use isSetIdAttribute() instead.
26878
26879        @see getIdAttribute()
26880        @see setIdAttribute()
26881        @see unsetIdAttribute()
26882        @see isSetIdAttribute()
26883
26884        """
26885        return _libsbml.Parameter_isSetId(self)
26886
26887    def isSetName(self):
26888        r"""
26889        isSetName(Parameter self) -> bool
26890
26891        Predicate returning @c True if this
26892        Parameter's 'name' attribute is set.
26893
26894        @par
26895        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
26896        moved to SBase directly, instead of being defined individually for many
26897        (but not all) objects.  LibSBML has for a long time provided functions
26898        defined on SBase itself to get, set, and unset those attributes, which
26899        would fail or otherwise return empty strings if executed on any object
26900        for which those attributes were not defined.  Now that all SBase objects
26901        define those attributes, those functions now succeed for any object with
26902        the appropriate level and version.
26903
26904        The 'name' attribute is
26905        optional and is not intended to be used for cross-referencing purposes
26906        within a model.  Its purpose instead is to provide a human-readable
26907        label for the component.  The data type of 'name' is the type
26908        <code>string</code> defined in XML Schema.  SBML imposes no
26909        restrictions as to the content of 'name' attributes beyond those
26910        restrictions defined by the <code>string</code> type in XML Schema.
26911
26912        The recommended practice for handling 'name' is as follows.  If a
26913        software tool has the capability for displaying the content of 'name'
26914        attributes, it should display this content to the user as a
26915        component's label instead of the component's 'id'.  If the user
26916        interface does not have this capability (e.g., because it cannot
26917        display or use special characters in symbol names), or if the 'name'
26918        attribute is missing on a given component, then the user interface
26919        should display the value of the 'id' attribute instead.  (Script
26920        language interpreters are especially likely to display 'id' instead of
26921        'name'.)
26922
26923        As a consequence of the above, authors of systems that automatically
26924        generate the values of 'id' attributes should be aware some systems
26925        may display the 'id''s to the user.  Authors therefore may wish to
26926        take some care to have their software create 'id' values that are: (a)
26927        reasonably easy for humans to type and read; and (b) likely to be
26928        meaningful, for example by making the 'id' attribute be an abbreviated
26929        form of the name attribute value.
26930
26931        An additional point worth mentioning is although there are
26932        restrictions on the uniqueness of 'id' values, there are no
26933        restrictions on the uniqueness of 'name' values in a model.  This
26934        allows software applications leeway in assigning component identifiers.
26935
26936        Regardless of the level and version of the SBML, these functions allow
26937        client applications to use more generalized code in some situations
26938        (for instance, when manipulating objects that are all known to have
26939        names).  If the object in question does not posess a 'name' attribute
26940        according to the SBML specification for the Level and Version in use,
26941        libSBML will not allow the name to be set, nor will it read or
26942        write 'name' attributes for those objects.
26943
26944        @return @c True if the 'name' attribute of this SBML object is
26945        set, @c False otherwise.
26946
26947        @see getName()
26948        @see setName()
26949        @see unsetName()
26950
26951        """
26952        return _libsbml.Parameter_isSetName(self)
26953
26954    def isSetValue(self):
26955        r"""
26956        isSetValue(Parameter self) -> bool
26957
26958        Predicate returning @c True if the
26959        'value' attribute of this Parameter is set.
26960
26961        In SBML definitions after SBML Level&nbsp;1 Version&nbsp;1,
26962        parameter values are optional and have no defaults.  If a model read
26963        from a file does not contain a setting for the 'value' attribute of a
26964        parameter, its value is considered unset; it does not default to any
26965        particular value.  Similarly, when a Parameter object is created in
26966        libSBML, it has no value until given a value.  The
26967        Parameter.isSetValue() method allows calling applications to
26968        determine whether a given parameter's value has ever been set.
26969
26970        In SBML Level&nbsp;1 Version&nbsp;1, parameters are required to have
26971        values and therefore, the value of a Parameter <b>should always be
26972        set</b>.  In Level&nbsp;1 Version&nbsp;2 and beyond, the value is
26973        optional and as such, the 'value' attribute may or may not be set.
26974
26975        @return @c True if the value of this Parameter is set,
26976        @c False otherwise.
26977
26978        @see getValue()
26979        @see setValue()
26980
26981        """
26982        return _libsbml.Parameter_isSetValue(self)
26983
26984    def isSetUnits(self):
26985        r"""
26986        isSetUnits(Parameter self) -> bool
26987
26988        Predicate returning @c True if the
26989        'units' attribute of this Parameter is set.
26990
26991        @return @c True if the 'units' attribute of this Parameter is
26992        set, @c False otherwise.
26993
26994        @note There is an important distinction to be made between <em>no units
26995        assigned</em>, and assuming a value without units has any specific unit
26996        such as <code>dimensionless</code>.  In SBML, default units are never
26997        attributed to numbers, and numbers without units are not automatically
26998        assumed to have the unit <code>dimensionless</code>.  Please consult the
26999        relevant SBML specification document for a more in-depth explanation of
27000        this topic and the SBML unit system.
27001
27002        """
27003        return _libsbml.Parameter_isSetUnits(self)
27004
27005    def isSetConstant(self):
27006        r"""
27007        isSetConstant(Parameter self) -> bool
27008
27009        Predicate returning @c True if the
27010        'constant' attribute of this Parameter is set.
27011
27012        @return @c True if the 'constant' attribute of this Parameter is
27013        set, @c False otherwise.
27014
27015        @note Readers who view the documentation for LocalParameter may be
27016        confused about the presence of this method.  LibSBML derives
27017        LocalParameter from Parameter; however, this does not precisely match
27018        the object hierarchy defined by SBML Level&nbsp;3, where
27019        LocalParameter is derived directly from SBase and not Parameter.  We
27020        believe this arrangement makes it easier for libSBML users to program
27021        applications that work with both SBML Level&nbsp;2 and SBML
27022        Level&nbsp;3, but programmers should also keep in mind this difference
27023        exists.  A side-effect of libSBML's scheme is that certain methods on
27024        LocalParameter that are inherited from Parameter do not actually have
27025        relevance to LocalParameter objects.  An example of this is the
27026        methods pertaining to Parameter's attribute 'constant' (i.e.,
27027        isSetConstant(), setConstant(), and getConstant()).
27028
27029        @see getConstant()
27030        @see setConstant()
27031
27032        """
27033        return _libsbml.Parameter_isSetConstant(self)
27034
27035    def setId(self, sid):
27036        r"""
27037        setId(Parameter self, string sid) -> int
27038
27039        Sets the value of the 'id' attribute of this Parameter.
27040
27041        @par
27042        The string @p sid is copied.
27043
27044        @par
27045        The identifier given by an object's 'id' attribute value
27046        is used to identify the object within the SBML model definition.
27047        Other objects can refer to the component using this identifier.  The
27048        data type of 'id' is always <code>SId</code> or a type derived
27049        from that, such as <code>UnitSId</code>, depending on the object in
27050        question.  All data types are defined as follows:
27051        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
27052        letter ::= 'a'..'z','A'..'Z'
27053        digit  ::= '0'..'9'
27054        idChar ::= letter | digit | '_'
27055        SId    ::= ( letter | '_' ) idChar*
27056        </pre>
27057        The characters <code>(</code> and <code>)</code> are used for grouping,
27058        the character <code>*</code> 'zero or more times', and the character
27059        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
27060        is determined by an exact character sequence match; i.e., comparisons must
27061        be performed in a case-sensitive manner.  This applies to all uses of
27062        <code>SId</code>, <code>SIdRef</code>, and derived types.
27063
27064        Users need to be aware of some important API issues that are the result of
27065        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
27066        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
27067        of SBML objects.  To simplify the work of programmers, libSBML's API
27068        provided get, set, check, and unset on the SBase object class itself
27069        instead of on individual subobject classes. This made the
27070        get/set/etc. methods uniformly available on all objects in the libSBML
27071        API.  LibSBML simply returned empty strings or otherwise did not act when
27072        the methods were applied to SBML objects that were not defined by the SBML
27073        specification to have 'id' or 'name' attributes.  Additional complications
27074        arose with the rule and assignment objects: InitialAssignment,
27075        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
27076        the rule object hierarchy was different, and in addition, then as now,
27077        they possess different attributes: 'variable' (for the rules and event
27078        assignments), 'symbol' (for initial assignments), or neither (for
27079        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
27080        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
27081
27082        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
27083        Version&nbsp;2, it became necessary to introduce a new way to interact
27084        with the attributes more consistently in libSBML to avoid breaking
27085        backward compatibility in the behavior of the original 'id' methods.  For
27086        this reason, libSBML provides four functions (getIdAttribute(),
27087        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
27088        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
27089        from SBase, regardless of the object's type.  <strong>These new methods
27090        should be used instead of the older getId()/setId()/etc. methods</strong>
27091        unless the old behavior is somehow necessary.  Regardless of the Level and
27092        Version of the SBML, these functions allow client applications to use more
27093        generalized code in some situations (for instance, when manipulating
27094        objects that are all known to have identifiers).  If the object in
27095        question does not posess an 'id' attribute according to the SBML
27096        specification for the Level and Version in use, libSBML will not allow the
27097        identifier to be set, nor will it read or write 'id' attributes for those
27098        objects.
27099
27100        @param sid the string to use as the identifier of this object.
27101
27102        @return integer value indicating success/failure of the
27103        function.  @if clike The value is drawn from the
27104        enumeration #OperationReturnValues_t. @endif@~ The possible values
27105        returned by this function are:
27106        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27107        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
27108        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
27109
27110        @see getIdAttribute()
27111        @see setIdAttribute()
27112        @see isSetIdAttribute()
27113        @see unsetIdAttribute()
27114
27115        """
27116        return _libsbml.Parameter_setId(self, sid)
27117
27118    def setName(self, name):
27119        r"""
27120        setName(Parameter self, string name) -> int
27121
27122        Sets the value of the 'name' attribute of this Parameter.
27123
27124        The string in @p name is copied.
27125
27126        @param name the new name for the Parameter.
27127
27128        @return integer value indicating success/failure of the
27129        function.  @if clike The value is drawn from the
27130        enumeration #OperationReturnValues_t. @endif@~ The possible values
27131        returned by this function are:
27132        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27133        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
27134
27135        """
27136        return _libsbml.Parameter_setName(self, name)
27137
27138    def setValue(self, value):
27139        r"""
27140        setValue(Parameter self, double value) -> int
27141
27142        Sets the 'value' attribute of this Parameter to the given @c float
27143        value and marks the attribute as set.
27144
27145        @param value a @c float, the value to assign.
27146
27147        @return integer value indicating success/failure of the
27148        function.  @if clike The value is drawn from the
27149        enumeration #OperationReturnValues_t. @endif@~ The possible values
27150        returned by this function are:
27151        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27152
27153        """
27154        return _libsbml.Parameter_setValue(self, value)
27155
27156    def setUnits(self, units):
27157        r"""
27158        setUnits(Parameter self, string units) -> int
27159
27160        Sets the 'units' attribute of this Parameter to a copy of the given
27161        units identifier @p units.
27162
27163        @param units a string, the identifier of the units to assign to this
27164        Parameter instance.
27165
27166        @return integer value indicating success/failure of the
27167        function.  @if clike The value is drawn from the
27168        enumeration #OperationReturnValues_t. @endif@~ The possible values
27169        returned by this function are:
27170        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27171        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
27172
27173        """
27174        return _libsbml.Parameter_setUnits(self, units)
27175
27176    def setConstant(self, flag):
27177        r"""
27178        setConstant(Parameter self, bool flag) -> int
27179
27180        Sets the 'constant' attribute of this Parameter to the given boolean
27181        @p flag.
27182
27183        @param flag a boolean, the value for the 'constant' attribute of this
27184        Parameter instance.
27185
27186        @return integer value indicating success/failure of the
27187        function.  @if clike The value is drawn from the
27188        enumeration #OperationReturnValues_t. @endif@~ The possible values
27189        returned by this function are:
27190        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27191        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
27192
27193        @note Readers who view the documentation for LocalParameter may be
27194        confused about the presence of this method.  LibSBML derives
27195        LocalParameter from Parameter; however, this does not precisely match
27196        the object hierarchy defined by SBML Level&nbsp;3, where
27197        LocalParameter is derived directly from SBase and not Parameter.  We
27198        believe this arrangement makes it easier for libSBML users to program
27199        applications that work with both SBML Level&nbsp;2 and SBML
27200        Level&nbsp;3, but programmers should also keep in mind this difference
27201        exists.  A side-effect of libSBML's scheme is that certain methods on
27202        LocalParameter that are inherited from Parameter do not actually have
27203        relevance to LocalParameter objects.  An example of this is the
27204        methods pertaining to Parameter's attribute 'constant' (i.e.,
27205        isSetConstant(), setConstant(), and getConstant()).
27206
27207        @see getConstant()
27208        @see isSetConstant()
27209
27210        """
27211        return _libsbml.Parameter_setConstant(self, flag)
27212
27213    def unsetName(self):
27214        r"""
27215        unsetName(Parameter self) -> int
27216
27217        Unsets the value of the 'name' attribute of this Parameter.
27218
27219        @par
27220        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
27221        moved to SBase directly, instead of being defined individually for many
27222        (but not all) objects.  LibSBML has for a long time provided functions
27223        defined on SBase itself to get, set, and unset those attributes, which
27224        would fail or otherwise return empty strings if executed on any object
27225        for which those attributes were not defined.  Now that all SBase objects
27226        define those attributes, those functions now succeed for any object with
27227        the appropriate level and version.
27228
27229        The 'name' attribute is
27230        optional and is not intended to be used for cross-referencing purposes
27231        within a model.  Its purpose instead is to provide a human-readable
27232        label for the component.  The data type of 'name' is the type
27233        <code>string</code> defined in XML Schema.  SBML imposes no
27234        restrictions as to the content of 'name' attributes beyond those
27235        restrictions defined by the <code>string</code> type in XML Schema.
27236
27237        The recommended practice for handling 'name' is as follows.  If a
27238        software tool has the capability for displaying the content of 'name'
27239        attributes, it should display this content to the user as a
27240        component's label instead of the component's 'id'.  If the user
27241        interface does not have this capability (e.g., because it cannot
27242        display or use special characters in symbol names), or if the 'name'
27243        attribute is missing on a given component, then the user interface
27244        should display the value of the 'id' attribute instead.  (Script
27245        language interpreters are especially likely to display 'id' instead of
27246        'name'.)
27247
27248        As a consequence of the above, authors of systems that automatically
27249        generate the values of 'id' attributes should be aware some systems
27250        may display the 'id''s to the user.  Authors therefore may wish to
27251        take some care to have their software create 'id' values that are: (a)
27252        reasonably easy for humans to type and read; and (b) likely to be
27253        meaningful, for example by making the 'id' attribute be an abbreviated
27254        form of the name attribute value.
27255
27256        An additional point worth mentioning is although there are
27257        restrictions on the uniqueness of 'id' values, there are no
27258        restrictions on the uniqueness of 'name' values in a model.  This
27259        allows software applications leeway in assigning component identifiers.
27260
27261        Regardless of the level and version of the SBML, these functions allow
27262        client applications to use more generalized code in some situations
27263        (for instance, when manipulating objects that are all known to have
27264        names).  If the object in question does not posess a 'name' attribute
27265        according to the SBML specification for the Level and Version in use,
27266        libSBML will not allow the name to be set, nor will it read or
27267        write 'name' attributes for those objects.
27268
27269        @return integer value indicating success/failure of the
27270        function.  @if clike The value is drawn from the
27271        enumeration #OperationReturnValues_t. @endif@~ The possible values
27272        returned by this function are:
27273        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27274        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
27275
27276        @see getName()
27277        @see setName()
27278        @see isSetName()
27279
27280        """
27281        return _libsbml.Parameter_unsetName(self)
27282
27283    def unsetConstant(self):
27284        r"""
27285        unsetConstant(Parameter self) -> int
27286
27287        Unsets the value of the 'constant' attribute of this Parameter object.
27288
27289        @return integer value indicating success/failure of the
27290        function.  @if clike The value is drawn from the
27291        enumeration #OperationReturnValues_t. @endif@~ The possible values
27292        returned by this function are:
27293        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27294        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
27295
27296        @see isSetConstant()
27297        @see setConstant()
27298        @see getConstant()
27299
27300        """
27301        return _libsbml.Parameter_unsetConstant(self)
27302
27303    def unsetValue(self):
27304        r"""
27305        unsetValue(Parameter self) -> int
27306
27307        Unsets the 'value' attribute of this Parameter instance.
27308
27309        @return integer value indicating success/failure of the
27310        function.  @if clike The value is drawn from the
27311        enumeration #OperationReturnValues_t. @endif@~ This particular
27312        function only does one thing irrespective of user input or
27313        object state, and thus will only return a single value:
27314        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27315
27316        In SBML Level&nbsp;1 Version&nbsp;1, parameters are required to have
27317        values and therefore, the value of a Parameter <b>should always be
27318        set</b>.  In SBML Level&nbsp;1 Version&nbsp;2 and beyond, the value
27319        is optional and as such, the 'value' attribute may or may not be set.
27320
27321        """
27322        return _libsbml.Parameter_unsetValue(self)
27323
27324    def unsetUnits(self):
27325        r"""
27326        unsetUnits(Parameter self) -> int
27327
27328        Unsets the 'units' attribute of this Parameter instance.
27329
27330        @return integer value indicating success/failure of the
27331        function.  @if clike The value is drawn from the
27332        enumeration #OperationReturnValues_t. @endif@~ The possible values
27333        returned by this function are:
27334        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
27335        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
27336
27337        """
27338        return _libsbml.Parameter_unsetUnits(self)
27339
27340    def getDerivedUnitDefinition(self, *args):
27341        r"""
27342        getDerivedUnitDefinition(Parameter self) -> UnitDefinition
27343        getDerivedUnitDefinition(Parameter self) -> UnitDefinition
27344
27345        Constructs and returns a UnitDefinition that corresponds to the units
27346        of this Parameter's value.
27347
27348        Parameters in SBML have an attribute ('units') for declaring the units
27349        of measurement intended for the parameter's value.  <b>No defaults are
27350        defined</b> by SBML in the absence of a definition for 'units'.  This
27351        method returns a UnitDefinition object based on the units declared for
27352        this Parameter using its 'units' attribute, or it returns @c None if
27353        no units have been declared.
27354
27355        Note that unit declarations for Parameter objects are specified in
27356        terms of the @em identifier of a unit (e.g., using setUnits()), but
27357        @em this method returns a UnitDefinition object, not a unit
27358        identifier.  It does this by constructing an appropriate
27359        UnitDefinition.For SBML Level&nbsp;2 models, it will do this even when
27360        the value of the 'units' attribute is one of the special SBML
27361        Level&nbsp;2 unit identifiers @c 'substance', @c 'volume', @c 'area',
27362        @c 'length' or @c 'time'.  Callers may find this useful in conjunction
27363        with the helper methods provided by the UnitDefinition class for
27364        comparing different UnitDefinition objects.
27365
27366        @return a UnitDefinition that expresses the units of this
27367        Parameter, or @c None if one cannot be constructed.
27368
27369        @note The libSBML system for unit analysis depends on the model as a
27370        whole.  In cases where the Parameter object has not yet been added to
27371        a model, or the model itself is incomplete, unit analysis is not
27372        possible, and consequently this method will return @c None.
27373
27374        @see isSetUnits()
27375
27376        """
27377        return _libsbml.Parameter_getDerivedUnitDefinition(self, *args)
27378
27379    def getTypeCode(self):
27380        r"""
27381        getTypeCode(Parameter self) -> int
27382
27383        Returns the libSBML type code for this SBML object.
27384
27385        @par
27386        LibSBML attaches an identifying code to every kind of SBML object.  These
27387        are integer constants known as <em>SBML type codes</em>.  The names of all
27388        the codes begin with the characters <code>SBML_</code>.
27389        @if clike The set of possible type codes for core elements is defined in
27390        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
27391        SBML Level&nbsp;3 packages define their own extra enumerations of type
27392        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
27393        package).@endif@if java In the Java language interface for libSBML, the
27394        type codes are defined as static integer constants in the interface class
27395        {@link libsbmlConstants}.  @endif@if python In the Python language
27396        interface for libSBML, the type codes are defined as static integer
27397        constants in the interface class @link libsbml@endlink.@endif@if csharp In
27398        the C# language interface for libSBML, the type codes are defined as
27399        static integer constants in the interface class
27400        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
27401        package plug-ins may use overlapping type codes; to identify the package
27402        to which a given object belongs, call the
27403        <code>@if conly SBase_getPackageName()
27404        @else SBase.getPackageName()
27405        @endif</code>
27406        method on the object.
27407
27408        The exception to this is lists:  all SBML-style list elements have the type
27409        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
27410        are from.
27411
27412        @return the SBML type code for this object:
27413        @link libsbml#SBML_PARAMETER SBML_PARAMETER@endlink (default).
27414
27415        @warning <span class='warning'>The specific integer values of the possible
27416        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
27417        packages,  To fully identify the correct code, <strong>it is necessary to
27418        invoke both getPackageName() and getTypeCode()</strong> (or
27419        ListOf.getItemTypeCode()).</span>
27420
27421        @see getElementName()
27422        @see getPackageName()
27423
27424        """
27425        return _libsbml.Parameter_getTypeCode(self)
27426
27427    def getElementName(self):
27428        r"""
27429        getElementName(Parameter self) -> string
27430
27431        Returns the XML element name of this object, which for Parameter, is
27432        always @c 'parameter'.
27433
27434        @return the name of this element, i.e., @c 'parameter'.
27435
27436        """
27437        return _libsbml.Parameter_getElementName(self)
27438
27439    def hasRequiredAttributes(self):
27440        r"""
27441        hasRequiredAttributes(Parameter self) -> bool
27442
27443        Predicate returning @c True if
27444        all the required attributes for this Parameter object
27445        have been set.
27446
27447        The required attributes for a Parameter object are:
27448        @li 'id' (or 'name' in SBML Level&nbsp;1)
27449        @li 'value' (required in Level&nbsp;1, optional otherwise)
27450
27451        @return @c True if the required attributes have been set, @c False
27452        otherwise.
27453
27454        """
27455        return _libsbml.Parameter_hasRequiredAttributes(self)
27456
27457    def renameUnitSIdRefs(self, oldid, newid):
27458        r"""
27459        renameUnitSIdRefs(Parameter self, string oldid, string newid)
27460
27461        Renames all the @c UnitSIdRef attributes on this element.
27462
27463        @par
27464        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
27465        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
27466        introduced for attribute values that refer to <code>UnitSId</code> values; in
27467        previous Levels of SBML, this data type did not exist and attributes were
27468        simply described to as 'referring to a unit identifier', but the effective
27469        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
27470        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
27471        Levels of SBML, even if the corresponding SBML specification did not
27472        explicitly name the data type.
27473
27474        This method works by looking at all unit identifier attribute values
27475        (including, if appropriate, inside mathematical formulas), comparing the
27476        unit identifiers to the value of @p oldid.  If any matches are found,
27477        the matching identifiers are replaced with @p newid.  The method does
27478        @em not descend into child elements.
27479
27480        @param oldid the old identifier.
27481        @param newid the new identifier.
27482
27483        """
27484        return _libsbml.Parameter_renameUnitSIdRefs(self, oldid, newid)
27485
27486    def setCalculatingUnits(self, calculatingUnits):
27487        r"""
27488        setCalculatingUnits(Parameter self, bool calculatingUnits)
27489
27490        @internal
27491
27492        @internal
27493
27494        """
27495        return _libsbml.Parameter_setCalculatingUnits(self, calculatingUnits)
27496
27497# Register Parameter in _libsbml:
27498_libsbml.Parameter_swigregister(Parameter)
27499
27500class ListOfParameters(ListOf):
27501    r"""
27502
27503    @sbmlpackage{core}
27504
27505    @htmlinclude pkg-marker-core.html A list of Parameter objects.
27506
27507    @par
27508    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
27509    are merely containers used for organizing the main components of an SBML
27510    model.  In libSBML's implementation, ListOf___
27511    @if conly data structures @else classes@endif@~ are derived from the
27512    intermediate utility @if conly structure @else class@endif@~ ListOf, which
27513    is not defined by the SBML specifications but serves as a useful
27514    programmatic construct.  ListOf is itself is in turn derived from SBase,
27515    which provides all of the various ListOf___
27516    @if conly data structures @else classes@endif@~ with common features
27517    defined by the SBML specification, such as 'metaid' attributes and
27518    annotations.
27519
27520    The relationship between the lists and the rest of an SBML model is
27521    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
27522
27523    @htmlinclude listof-illustration.html
27524
27525    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
27526    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
27527    Version&nbsp;2 allows
27528    containers to contain zero or more of the relevant object, instead of
27529    requiring at least one.  As such, libsbml will write out an
27530    otherwise-empty ListOf___ element that has any optional attribute set
27531    (such as 'id' or 'metaid'), that has an optional child (such
27532    as a 'notes' or 'annotation'), or that has attributes or children set
27533    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
27534    any other children.
27535
27536    Readers may wonder about the motivations for using the ListOf___
27537    containers in SBML.  A simpler approach in XML might be to place the
27538    components all directly at the top level of the model definition.  The
27539    choice made in SBML is to group them within XML elements named after
27540    %ListOf<em>Classname</em>, in part because it helps organize the
27541    components.  More importantly, the fact that the container classes are
27542    derived from SBase means that software tools can add information @em about
27543    the lists themselves into each list container's 'annotation'.
27544
27545    @see ListOfFunctionDefinitions
27546    @see ListOfUnitDefinitions
27547    @see ListOfCompartmentTypes
27548    @see ListOfSpeciesTypes
27549    @see ListOfCompartments
27550    @see ListOfSpecies
27551    @see ListOfParameters
27552    @see ListOfInitialAssignments
27553    @see ListOfRules
27554    @see ListOfConstraints
27555    @see ListOfReactions
27556    @see ListOfEvents
27557
27558    @if conly
27559    @note In the C API for libSBML, functions that in other language APIs
27560    would be inherited by the various ListOf___ structures not shown in the
27561    pages for the individual ListOf___'s.  Instead, the functions are defined
27562    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
27563    the many common functions available for manipulating ListOf___
27564    structures</strong>.  The documentation for the individual ListOf___
27565    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
27566    all of the functionality available. @endif@~
27567
27568    """
27569
27570    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
27571    __repr__ = _swig_repr
27572
27573    def __init__(self, *args):
27574        r"""
27575        __init__(ListOfParameters self, unsigned int level, unsigned int version) -> ListOfParameters
27576        __init__(ListOfParameters self, SBMLNamespaces sbmlns) -> ListOfParameters
27577
27578        This method has multiple variants; they differ in the arguments
27579         they accept.  Each variant is described separately below.
27580
27581        @par
27582        <hr>
27583        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27584         <pre class='signature'>ListOfParameters(SBMLNamespaces sbmlns)</pre>
27585
27586        Creates a new ListOfParameters object.
27587
27588        The object is constructed such that it is valid for the SBML Level and
27589        Version combination determined by the SBMLNamespaces object in @p
27590        sbmlns.
27591
27592        @param sbmlns an SBMLNamespaces object that is used to determine the
27593        characteristics of the ListOfParameters object to be created.
27594
27595        @throws SBMLConstructorException
27596        Thrown if the given @p sbmlns is inconsistent or incompatible
27597        with this object.
27598
27599        @note Attempting to add an object to an SBMLDocument having a different
27600        combination of SBML Level, Version and XML namespaces than the object
27601        itself will result in an error at the time a caller attempts to make the
27602        addition.  A parent object must have compatible Level, Version and XML
27603        namespaces.  (Strictly speaking, a parent may also have more XML
27604        namespaces than a child, but the reverse is not permitted.)  The
27605        restriction is necessary to ensure that an SBML model has a consistent
27606        overall structure.  This requires callers to manage their objects
27607        carefully, but the benefit is increased flexibility in how models can be
27608        created by permitting callers to create objects bottom-up if desired.  In
27609        situations where objects are not yet attached to parents (e.g.,
27610        SBMLDocument), knowledge of the intented SBML Level and Version help
27611        libSBML determine such things as whether it is valid to assign a
27612        particular value to an attribute.
27613
27614
27615        @par
27616        <hr>
27617        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27618         <pre class='signature'>ListOfParameters(long level, long version)</pre>
27619
27620        Creates a new ListOfParameters object.
27621
27622        The object is constructed such that it is valid for the given SBML
27623        Level and Version combination.
27624
27625        @param level the SBML Level.
27626
27627        @param version the Version within the SBML Level.
27628
27629        @throws SBMLConstructorException
27630        Thrown if the given @p level and @p version combination are invalid
27631        or if this object is incompatible with the given level and version.
27632
27633        @note Attempting to add an object to an SBMLDocument having a different
27634        combination of SBML Level, Version and XML namespaces than the object
27635        itself will result in an error at the time a caller attempts to make the
27636        addition.  A parent object must have compatible Level, Version and XML
27637        namespaces.  (Strictly speaking, a parent may also have more XML
27638        namespaces than a child, but the reverse is not permitted.)  The
27639        restriction is necessary to ensure that an SBML model has a consistent
27640        overall structure.  This requires callers to manage their objects
27641        carefully, but the benefit is increased flexibility in how models can be
27642        created by permitting callers to create objects bottom-up if desired.  In
27643        situations where objects are not yet attached to parents (e.g.,
27644        SBMLDocument), knowledge of the intented SBML Level and Version help
27645        libSBML determine such things as whether it is valid to assign a
27646        particular value to an attribute.
27647
27648        """
27649        _libsbml.ListOfParameters_swiginit(self, _libsbml.new_ListOfParameters(*args))
27650
27651    def clone(self):
27652        r"""
27653        clone(ListOfParameters self) -> ListOfParameters
27654
27655        Creates and returns a deep copy of this ListOfParameters object.
27656
27657        @return the (deep) copy of this ListOfParameters object.
27658
27659        """
27660        return _libsbml.ListOfParameters_clone(self)
27661
27662    def getItemTypeCode(self):
27663        r"""
27664        getItemTypeCode(ListOfParameters self) -> int
27665
27666        Returns the libSBML type code for the objects contained in this ListOf
27667        (i.e., Parameter objects, if the list is non-empty).
27668
27669        @par
27670        LibSBML attaches an identifying code to every kind of SBML object.  These
27671        are integer constants known as <em>SBML type codes</em>.  The names of all
27672        the codes begin with the characters <code>SBML_</code>.
27673        @if clike The set of possible type codes for core elements is defined in
27674        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
27675        SBML Level&nbsp;3 packages define their own extra enumerations of type
27676        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
27677        package).@endif@if java In the Java language interface for libSBML, the
27678        type codes are defined as static integer constants in the interface class
27679        {@link libsbmlConstants}.  @endif@if python In the Python language
27680        interface for libSBML, the type codes are defined as static integer
27681        constants in the interface class @link libsbml@endlink.@endif@if csharp In
27682        the C# language interface for libSBML, the type codes are defined as
27683        static integer constants in the interface class
27684        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
27685        package plug-ins may use overlapping type codes; to identify the package
27686        to which a given object belongs, call the
27687        <code>@if conly SBase_getPackageName()
27688        @else SBase.getPackageName()
27689        @endif</code>
27690        method on the object.
27691
27692        The exception to this is lists:  all SBML-style list elements have the type
27693        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
27694        are from.
27695
27696        @return the SBML type code for this objects contained in this list:
27697        @link libsbml#SBML_PARAMETER SBML_PARAMETER@endlink (default).
27698
27699        @see getElementName()
27700        @see getPackageName()
27701
27702        """
27703        return _libsbml.ListOfParameters_getItemTypeCode(self)
27704
27705    def getElementName(self):
27706        r"""
27707        getElementName(ListOfParameters self) -> string
27708
27709        Returns the XML element name of this object.
27710
27711        For ListOfParameters, the XML element name is @c 'listOfParameters'.
27712
27713        @return the name of this element, i.e., @c 'listOfParameters'.
27714
27715        """
27716        return _libsbml.ListOfParameters_getElementName(self)
27717
27718    def get(self, *args):
27719        r"""
27720        get(ListOfParameters self, unsigned int n) -> Parameter
27721        get(ListOfParameters self, unsigned int n) -> Parameter
27722        get(ListOfParameters self, string sid) -> Parameter
27723        get(ListOfParameters self, string sid) -> Parameter
27724
27725        This method has multiple variants; they differ in the arguments
27726         they accept.  Each variant is described separately below.
27727
27728        @par
27729        <hr>
27730        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27731         <pre class='signature'>get(long n)</pre>
27732
27733        Returns the Parameter object located at position @p n within this
27734        ListOfParameters instance.
27735
27736        @param n the index number of the Parameter to get.
27737
27738        @return the nth Parameter in this ListOfParameters.  If the index @p n
27739        is out of bounds for the length of the list, then @c None is returned.
27740
27741        @see size()
27742        @see get()
27743
27744
27745        @par
27746        <hr>
27747        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27748         <pre class='signature'>get(string sid)</pre>
27749
27750        Returns the first Parameter object matching the given identifier.
27751
27752        @param sid a string representing the identifier of the Parameter to
27753        get.
27754
27755        @return the Parameter object found.  The caller owns the returned
27756        object and is responsible for deleting it.  If none of the items have
27757        an identifier matching @p sid, then @c None is returned.
27758
27759        @see get()
27760        @see size()
27761
27762        """
27763        return _libsbml.ListOfParameters_get(self, *args)
27764
27765    def remove(self, *args):
27766        r"""
27767        remove(ListOfParameters self, unsigned int n) -> Parameter
27768        remove(ListOfParameters self, string sid) -> Parameter
27769
27770        This method has multiple variants; they differ in the arguments
27771         they accept.  Each variant is described separately below.
27772
27773        @par
27774        <hr>
27775        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27776         <pre class='signature'>remove(long n)</pre>
27777
27778        Removes the nth item from this ListOfParameters, and returns a pointer
27779        to it.
27780
27781        @param n the index of the item to remove.
27782
27783        @return the item removed.  The caller owns the returned object and is
27784        responsible for deleting it.  If the index number @p n is out of
27785        bounds for the length of the list, then @c None is returned.
27786
27787        @see size()
27788
27789
27790        @par
27791        <hr>
27792        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27793         <pre class='signature'>remove(string sid)</pre>
27794
27795        Removes the first Parameter object in this ListOfParameters
27796        matching the given identifier, and returns a pointer to it.
27797
27798        @param sid the identifier of the item to remove.
27799
27800        @return the item removed.  The caller owns the returned object and is
27801        responsible for deleting it.  If none of the items have an identifier
27802        matching @p sid, then @c None is returned.
27803
27804        """
27805        return _libsbml.ListOfParameters_remove(self, *args)
27806    __swig_destroy__ = _libsbml.delete_ListOfParameters
27807
27808# Register ListOfParameters in _libsbml:
27809_libsbml.ListOfParameters_swigregister(ListOfParameters)
27810
27811class LocalParameter(Parameter):
27812    r"""
27813
27814    @sbmlpackage{core}
27815
27816    @htmlinclude pkg-marker-core.html A parameter inside an SBML <em>reaction</em> definition.
27817
27818    LocalParameter has been introduced in SBML Level&nbsp;3 to serve as the
27819    object class for parameter definitions that are intended to be local to
27820    a Reaction.  Objects of class LocalParameter never appear at the Model
27821    level; they are always contained within ListOfLocalParameters lists
27822    which are in turn contained within KineticLaw objects.
27823
27824    Like its global Parameter counterpart, the LocalParameter object class
27825    is used to define a symbol associated with a value; this symbol can then
27826    be used in a model's mathematical formulas (and specifically, for
27827    LocalParameter, reaction rate formulas).  Unlike Parameter, the
27828    LocalParameter class does not have a 'constant' attribute: local
27829    parameters within reactions are @em always constant.
27830
27831    LocalParameter has one required attribute, 'id', to give the
27832    parameter a unique identifier by which other parts of an SBML model
27833    definition can refer to it.  A parameter can also have an optional
27834    'name' attribute of type @c string.  Identifiers and names must be used
27835    according to the guidelines described in the SBML specifications.
27836
27837    The optional attribute 'value' determines the value (of type @c float)
27838    assigned to the parameter.  A missing value for 'value' implies that
27839    the value either is unknown, or to be obtained from an external source,
27840    or determined by an initial assignment.  The unit of measurement
27841    associated with the value of the parameter can be specified using the
27842    optional attribute 'units'.  Here we only mention briefly some notable
27843    points about the possible unit choices, but readers are urged to consult
27844    the SBML specification documents for more information:
27845    <ul>
27846
27847    <li> In SBML Level&nbsp;3, there are no constraints on the units that
27848    can be assigned to parameters in a model; there are also no units to
27849    inherit from the enclosing Model object.
27850
27851    <li> In SBML Level&nbsp;2, the value assigned to the parameter's 'units'
27852    attribute must be chosen from one of the following possibilities: one of
27853    the base unit identifiers defined in SBML; one of the built-in unit
27854    identifiers @c 'substance', @c 'time', @c 'volume', @c 'area' or
27855    @c 'length'; or the identifier of a new unit defined in the list of unit
27856    definitions in the enclosing Model structure.  There are no constraints
27857    on the units that can be chosen from these sets.  There are no default
27858    units for local parameters.
27859    </ul>
27860
27861    As with all other major SBML components, LocalParameter is derived from
27862    SBase, and the methods defined on SBase are available on LocalParameter.
27863
27864    In SBML Level&nbsp;3 Version&nbsp;2, the scope of the LocalParameter
27865    was expanded slightly to officially encompass the entire Reaction
27866    instead of just the KineticLaw in which it appears.  This has no
27867    effect on models using only SBML Level&nbsp;3 Core constructs,
27868    but has the potential to allow SBML Level&nbsp;3 Packages to
27869    include elements in a Reaction that could reference a
27870    LocalParameter from that Reaction's KineticLaw.  It also means that
27871    no LocalParameter may have the same @c 'id' as a referenced Species
27872    in any SimpleSpeciesReference in that Reaction.
27873
27874    @warning <span class='warning'>LibSBML derives LocalParameter from
27875    Parameter; however, this does not precisely match the object hierarchy
27876    defined by SBML Level&nbsp;3, where LocalParameter is derived directly
27877    from SBase and not Parameter.  We believe this arrangement makes it easier
27878    for libSBML users to program applications that work with both SBML
27879    Level&nbsp;2 and SBML Level&nbsp;3, but programmers should also keep in
27880    mind this difference exists.  A side-effect of libSBML's scheme is that
27881    certain methods on LocalParameter that are inherited from Parameter do not
27882    actually have relevance to LocalParameter objects.  An example of this is
27883    the methods pertaining to Parameter's attribute 'constant' (i.e.,
27884    isSetConstant(), setConstant(), and getConstant()).</span>
27885
27886    @see ListOfLocalParameters
27887    @see KineticLaw
27888
27889    """
27890
27891    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
27892    __repr__ = _swig_repr
27893    __swig_destroy__ = _libsbml.delete_LocalParameter
27894
27895    def __init__(self, *args):
27896        r"""
27897        __init__(LocalParameter self, unsigned int level, unsigned int version) -> LocalParameter
27898        __init__(LocalParameter self, SBMLNamespaces sbmlns) -> LocalParameter
27899        __init__(LocalParameter self, LocalParameter orig) -> LocalParameter
27900        __init__(LocalParameter self, Parameter orig) -> LocalParameter
27901
27902        This method has multiple variants; they differ in the arguments
27903         they accept.  Each variant is described separately below.
27904
27905        @par
27906        <hr>
27907        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27908         <pre class='signature'>LocalParameter(SBMLNamespaces sbmlns)</pre>
27909
27910        Creates a new LocalParameter object with the given SBMLNamespaces
27911        object @p sbmlns.
27912
27913        @par
27914        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
27915        information.  It is used to communicate the SBML Level, Version, and (in
27916        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
27917        common approach to using libSBML's SBMLNamespaces facilities is to create an
27918        SBMLNamespaces object somewhere in a program once, then hand that object
27919        as needed to object constructors that accept SBMLNamespaces as arguments.
27920
27921        It is worth emphasizing that although this constructor does not take
27922        an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
27923        (identifier) attribute of a LocalParameter is required to have a value.
27924        Thus, callers are cautioned to assign a value after calling this
27925        constructor if no identifier is provided as an argument.  Setting the
27926        identifier can be accomplished using the method
27927        @if java setId(String id)@else setId()@endif.
27928
27929        @param sbmlns an SBMLNamespaces object.
27930
27931        @throws SBMLConstructorException
27932        Thrown if the given @p sbmlns is inconsistent or incompatible
27933        with this object.
27934
27935        @note Attempting to add an object to an SBMLDocument having a different
27936        combination of SBML Level, Version and XML namespaces than the object
27937        itself will result in an error at the time a caller attempts to make the
27938        addition.  A parent object must have compatible Level, Version and XML
27939        namespaces.  (Strictly speaking, a parent may also have more XML
27940        namespaces than a child, but the reverse is not permitted.)  The
27941        restriction is necessary to ensure that an SBML model has a consistent
27942        overall structure.  This requires callers to manage their objects
27943        carefully, but the benefit is increased flexibility in how models can be
27944        created by permitting callers to create objects bottom-up if desired.  In
27945        situations where objects are not yet attached to parents (e.g.,
27946        SBMLDocument), knowledge of the intented SBML Level and Version help
27947        libSBML determine such things as whether it is valid to assign a
27948        particular value to an attribute.
27949
27950
27951        @par
27952        <hr>
27953        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27954         <pre class='signature'>LocalParameter(long level, long version)</pre>
27955
27956        Creates a new LocalParameter object with the given SBML @p level and
27957        @p version values.
27958
27959        @param level a long integer, the SBML Level to assign to this
27960        LocalParameter.
27961
27962        @param version a long integer, the SBML Version to assign to this
27963        LocalParameter.
27964
27965        @throws SBMLConstructorException
27966        Thrown if the given @p level and @p version combination are invalid
27967        or if this object is incompatible with the given level and version.
27968
27969        @note Attempting to add an object to an SBMLDocument having a different
27970        combination of SBML Level, Version and XML namespaces than the object
27971        itself will result in an error at the time a caller attempts to make the
27972        addition.  A parent object must have compatible Level, Version and XML
27973        namespaces.  (Strictly speaking, a parent may also have more XML
27974        namespaces than a child, but the reverse is not permitted.)  The
27975        restriction is necessary to ensure that an SBML model has a consistent
27976        overall structure.  This requires callers to manage their objects
27977        carefully, but the benefit is increased flexibility in how models can be
27978        created by permitting callers to create objects bottom-up if desired.  In
27979        situations where objects are not yet attached to parents (e.g.,
27980        SBMLDocument), knowledge of the intented SBML Level and Version help
27981        libSBML determine such things as whether it is valid to assign a
27982        particular value to an attribute.
27983
27984
27985        @par
27986        <hr>
27987        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27988         <pre class='signature'>LocalParameter(LocalParameter orig)</pre>
27989
27990        Copy constructor; creates a copy of a given LocalParameter object.
27991
27992        @param orig the LocalParameter instance to copy.
27993
27994
27995        @par
27996        <hr>
27997        <span class='variant-sig-heading'>Method variant with the following signature</span>:
27998         <pre class='signature'>LocalParameter(Parameter orig)</pre>
27999
28000        Copy constructor; creates a LocalParameter object by copying
28001        the attributes of a given Parameter object.
28002
28003        @param orig the Parameter instance to copy.
28004
28005        """
28006        _libsbml.LocalParameter_swiginit(self, _libsbml.new_LocalParameter(*args))
28007
28008    def clone(self):
28009        r"""
28010        clone(LocalParameter self) -> LocalParameter
28011
28012        Creates and returns a deep copy of this LocalParameter object.
28013
28014        @return the (deep) copy of this LocalParameter object.
28015
28016        """
28017        return _libsbml.LocalParameter_clone(self)
28018
28019    def getDerivedUnitDefinition(self, *args):
28020        r"""
28021        getDerivedUnitDefinition(LocalParameter self) -> UnitDefinition
28022        getDerivedUnitDefinition(LocalParameter self) -> UnitDefinition
28023
28024        Constructs and returns a UnitDefinition that corresponds to the units
28025        of this LocalParameter's value.
28026
28027        @par
28028        LocalParameters in SBML have an attribute ('units') for declaring the
28029        units of measurement intended for the parameter's value.  <b>No
28030        defaults are defined</b> by SBML in the absence of a definition for
28031        'units'.  This method returns a UnitDefinition object based on the
28032        units declared for this LocalParameter using its 'units' attribute, or
28033        it returns @c None if no units have been declared.
28034
28035        Note that unit declarations for LocalParameter objects are specified
28036        in terms of the @em identifier of a unit (e.g., using setUnits()), but
28037        @em this method returns a UnitDefinition object, not a unit
28038        identifier.  It does this by constructing an appropriate
28039        UnitDefinition.  For SBML Level&nbsp;2 models, it will do this even
28040        when the value of the 'units' attribute is one of the predefined SBML
28041        units @c 'substance', @c 'volume', @c 'area', @c 'length' or
28042        @c 'time'.  Callers may find this useful in conjunction with the helper
28043        methods provided by the UnitDefinition class for comparing different
28044        UnitDefinition objects.
28045
28046        @return a UnitDefinition that expresses the units of this
28047        LocalParameter, or @c None if one cannot be constructed.
28048
28049        @note The libSBML system for unit analysis depends on the model as a
28050        whole.  In cases where the LocalParameter object has not yet been
28051        added to a model, or the model itself is incomplete, unit analysis is
28052        not possible, and consequently this method will return @c None.
28053
28054        @see isSetUnits()
28055
28056        """
28057        return _libsbml.LocalParameter_getDerivedUnitDefinition(self, *args)
28058
28059    def getTypeCode(self):
28060        r"""
28061        getTypeCode(LocalParameter self) -> int
28062
28063        Returns the libSBML type code for this SBML object.
28064
28065        @par
28066        LibSBML attaches an identifying code to every kind of SBML object.  These
28067        are integer constants known as <em>SBML type codes</em>.  The names of all
28068        the codes begin with the characters <code>SBML_</code>.
28069        @if clike The set of possible type codes for core elements is defined in
28070        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
28071        SBML Level&nbsp;3 packages define their own extra enumerations of type
28072        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
28073        package).@endif@if java In the Java language interface for libSBML, the
28074        type codes are defined as static integer constants in the interface class
28075        {@link libsbmlConstants}.  @endif@if python In the Python language
28076        interface for libSBML, the type codes are defined as static integer
28077        constants in the interface class @link libsbml@endlink.@endif@if csharp In
28078        the C# language interface for libSBML, the type codes are defined as
28079        static integer constants in the interface class
28080        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
28081        package plug-ins may use overlapping type codes; to identify the package
28082        to which a given object belongs, call the
28083        <code>@if conly SBase_getPackageName()
28084        @else SBase.getPackageName()
28085        @endif</code>
28086        method on the object.
28087
28088        The exception to this is lists:  all SBML-style list elements have the type
28089        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
28090        are from.
28091
28092        @return the SBML type code for this object:
28093        @link libsbml#SBML_LOCAL_PARAMETER SBML_LOCAL_PARAMETER@endlink (default).
28094
28095        @warning <span class='warning'>The specific integer values of the possible
28096        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
28097        packages,  To fully identify the correct code, <strong>it is necessary to
28098        invoke both getPackageName() and getTypeCode()</strong> (or
28099        ListOf.getItemTypeCode()).</span>
28100
28101        @see getElementName()
28102        @see getPackageName()
28103
28104        """
28105        return _libsbml.LocalParameter_getTypeCode(self)
28106
28107    def getElementName(self):
28108        r"""
28109        getElementName(LocalParameter self) -> string
28110
28111        Returns the XML element name of this object, which for LocalParameter,
28112        is always @c 'localParameter'.
28113
28114        @return the name of this element, i.e., @c 'localParameter'.
28115
28116        """
28117        return _libsbml.LocalParameter_getElementName(self)
28118
28119    def hasRequiredAttributes(self):
28120        r"""
28121        hasRequiredAttributes(LocalParameter self) -> bool
28122
28123        Predicate returning @c True if all the required attributes for this
28124        LocalParameter object have been set.
28125
28126        The required attributes for a LocalParameter object are:
28127        @li 'id'
28128        @li 'value'
28129
28130        @return @c True if the required attributes have been set, @c False
28131        otherwise.
28132
28133        """
28134        return _libsbml.LocalParameter_hasRequiredAttributes(self)
28135
28136    def getConstant(self):
28137        r"""
28138        getConstant(LocalParameter self) -> bool
28139
28140        @internal
28141
28142        @internal
28143
28144        """
28145        return _libsbml.LocalParameter_getConstant(self)
28146
28147    def isSetConstant(self):
28148        r"""
28149        isSetConstant(LocalParameter self) -> bool
28150
28151        @internal
28152
28153        @internal
28154
28155        """
28156        return _libsbml.LocalParameter_isSetConstant(self)
28157
28158    def setConstant(self, flag):
28159        r"""
28160        setConstant(LocalParameter self, bool flag) -> int
28161
28162        @internal
28163
28164        @internal
28165
28166        """
28167        return _libsbml.LocalParameter_setConstant(self, flag)
28168
28169    def unsetConstant(self):
28170        r"""
28171        unsetConstant(LocalParameter self) -> int
28172
28173        @internal
28174
28175        @internal
28176
28177        """
28178        return _libsbml.LocalParameter_unsetConstant(self)
28179
28180# Register LocalParameter in _libsbml:
28181_libsbml.LocalParameter_swigregister(LocalParameter)
28182
28183class ListOfLocalParameters(ListOfParameters):
28184    r"""
28185
28186    @sbmlpackage{core}
28187
28188    @htmlinclude pkg-marker-core.html A list of LocalParameter objects.
28189
28190    @par
28191    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
28192    are merely containers used for organizing the main components of an SBML
28193    model.  In libSBML's implementation, ListOf___
28194    @if conly data structures @else classes@endif@~ are derived from the
28195    intermediate utility @if conly structure @else class@endif@~ ListOf, which
28196    is not defined by the SBML specifications but serves as a useful
28197    programmatic construct.  ListOf is itself is in turn derived from SBase,
28198    which provides all of the various ListOf___
28199    @if conly data structures @else classes@endif@~ with common features
28200    defined by the SBML specification, such as 'metaid' attributes and
28201    annotations.
28202
28203    The relationship between the lists and the rest of an SBML model is
28204    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
28205
28206    @htmlinclude listof-illustration.html
28207
28208    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
28209    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
28210    Version&nbsp;2 allows
28211    containers to contain zero or more of the relevant object, instead of
28212    requiring at least one.  As such, libsbml will write out an
28213    otherwise-empty ListOf___ element that has any optional attribute set
28214    (such as 'id' or 'metaid'), that has an optional child (such
28215    as a 'notes' or 'annotation'), or that has attributes or children set
28216    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
28217    any other children.
28218
28219    Readers may wonder about the motivations for using the ListOf___
28220    containers in SBML.  A simpler approach in XML might be to place the
28221    components all directly at the top level of the model definition.  The
28222    choice made in SBML is to group them within XML elements named after
28223    %ListOf<em>Classname</em>, in part because it helps organize the
28224    components.  More importantly, the fact that the container classes are
28225    derived from SBase means that software tools can add information @em about
28226    the lists themselves into each list container's 'annotation'.
28227
28228    @see ListOfFunctionDefinitions
28229    @see ListOfUnitDefinitions
28230    @see ListOfCompartmentTypes
28231    @see ListOfSpeciesTypes
28232    @see ListOfCompartments
28233    @see ListOfSpecies
28234    @see ListOfParameters
28235    @see ListOfInitialAssignments
28236    @see ListOfRules
28237    @see ListOfConstraints
28238    @see ListOfReactions
28239    @see ListOfEvents
28240
28241    @if conly
28242    @note In the C API for libSBML, functions that in other language APIs
28243    would be inherited by the various ListOf___ structures not shown in the
28244    pages for the individual ListOf___'s.  Instead, the functions are defined
28245    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
28246    the many common functions available for manipulating ListOf___
28247    structures</strong>.  The documentation for the individual ListOf___
28248    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
28249    all of the functionality available. @endif@~
28250
28251    """
28252
28253    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
28254    __repr__ = _swig_repr
28255
28256    def __init__(self, *args):
28257        r"""
28258        __init__(ListOfLocalParameters self, unsigned int level, unsigned int version) -> ListOfLocalParameters
28259        __init__(ListOfLocalParameters self, SBMLNamespaces sbmlns) -> ListOfLocalParameters
28260
28261        This method has multiple variants; they differ in the arguments
28262         they accept.  Each variant is described separately below.
28263
28264        @par
28265        <hr>
28266        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28267         <pre class='signature'>ListOfLocalParameters(SBMLNamespaces sbmlns)</pre>
28268
28269        Creates a new ListOfLocalParameters object.
28270
28271        The object is constructed such that it is valid for the SBML Level and
28272        Version combination determined by the SBMLNamespaces object in @p
28273        sbmlns.
28274
28275        @param sbmlns an SBMLNamespaces object that is used to determine the
28276        characteristics of the ListOfLocalParameters object to be created.
28277
28278        @throws SBMLConstructorException
28279        Thrown if the given @p sbmlns is inconsistent or incompatible
28280        with this object.
28281
28282        @note Attempting to add an object to an SBMLDocument having a different
28283        combination of SBML Level, Version and XML namespaces than the object
28284        itself will result in an error at the time a caller attempts to make the
28285        addition.  A parent object must have compatible Level, Version and XML
28286        namespaces.  (Strictly speaking, a parent may also have more XML
28287        namespaces than a child, but the reverse is not permitted.)  The
28288        restriction is necessary to ensure that an SBML model has a consistent
28289        overall structure.  This requires callers to manage their objects
28290        carefully, but the benefit is increased flexibility in how models can be
28291        created by permitting callers to create objects bottom-up if desired.  In
28292        situations where objects are not yet attached to parents (e.g.,
28293        SBMLDocument), knowledge of the intented SBML Level and Version help
28294        libSBML determine such things as whether it is valid to assign a
28295        particular value to an attribute.
28296
28297
28298        @par
28299        <hr>
28300        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28301         <pre class='signature'>ListOfLocalParameters(long level, long version)</pre>
28302
28303        Creates a new ListOfLocalParameters object.
28304
28305        The object is constructed such that it is valid for the given SBML
28306        Level and Version combination.
28307
28308        @param level the SBML Level.
28309
28310        @param version the Version within the SBML Level.
28311
28312        @throws SBMLConstructorException
28313        Thrown if the given @p level and @p version combination are invalid
28314        or if this object is incompatible with the given level and version.
28315
28316        @note Attempting to add an object to an SBMLDocument having a different
28317        combination of SBML Level, Version and XML namespaces than the object
28318        itself will result in an error at the time a caller attempts to make the
28319        addition.  A parent object must have compatible Level, Version and XML
28320        namespaces.  (Strictly speaking, a parent may also have more XML
28321        namespaces than a child, but the reverse is not permitted.)  The
28322        restriction is necessary to ensure that an SBML model has a consistent
28323        overall structure.  This requires callers to manage their objects
28324        carefully, but the benefit is increased flexibility in how models can be
28325        created by permitting callers to create objects bottom-up if desired.  In
28326        situations where objects are not yet attached to parents (e.g.,
28327        SBMLDocument), knowledge of the intented SBML Level and Version help
28328        libSBML determine such things as whether it is valid to assign a
28329        particular value to an attribute.
28330
28331        """
28332        _libsbml.ListOfLocalParameters_swiginit(self, _libsbml.new_ListOfLocalParameters(*args))
28333
28334    def clone(self):
28335        r"""
28336        clone(ListOfLocalParameters self) -> ListOfLocalParameters
28337
28338        Creates and returns a deep copy of this ListOfLocalParameters object.
28339
28340        @return the (deep) copy of this ListOfLocalParameters object.
28341
28342        """
28343        return _libsbml.ListOfLocalParameters_clone(self)
28344
28345    def getItemTypeCode(self):
28346        r"""
28347        getItemTypeCode(ListOfLocalParameters self) -> int
28348
28349        Returns the libSBML type code for the objects contained in this ListOf
28350        (i.e., LocalParameter objects, if the list is non-empty).
28351
28352        @par
28353        LibSBML attaches an identifying code to every kind of SBML object.  These
28354        are integer constants known as <em>SBML type codes</em>.  The names of all
28355        the codes begin with the characters <code>SBML_</code>.
28356        @if clike The set of possible type codes for core elements is defined in
28357        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
28358        SBML Level&nbsp;3 packages define their own extra enumerations of type
28359        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
28360        package).@endif@if java In the Java language interface for libSBML, the
28361        type codes are defined as static integer constants in the interface class
28362        {@link libsbmlConstants}.  @endif@if python In the Python language
28363        interface for libSBML, the type codes are defined as static integer
28364        constants in the interface class @link libsbml@endlink.@endif@if csharp In
28365        the C# language interface for libSBML, the type codes are defined as
28366        static integer constants in the interface class
28367        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
28368        package plug-ins may use overlapping type codes; to identify the package
28369        to which a given object belongs, call the
28370        <code>@if conly SBase_getPackageName()
28371        @else SBase.getPackageName()
28372        @endif</code>
28373        method on the object.
28374
28375        The exception to this is lists:  all SBML-style list elements have the type
28376        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
28377        are from.
28378
28379        @return the SBML type code for the objects contained in this ListOf:
28380        @link libsbml#SBML_LOCAL_PARAMETER SBML_LOCAL_PARAMETER@endlink (default).
28381
28382        @see getElementName()
28383        @see getPackageName()
28384
28385        """
28386        return _libsbml.ListOfLocalParameters_getItemTypeCode(self)
28387
28388    def getElementName(self):
28389        r"""
28390        getElementName(ListOfLocalParameters self) -> string
28391
28392        Returns the XML element name of this object.
28393
28394        For ListOfLocalParameters, the XML element name is @c 'listOfLocalParameters'.
28395
28396        @return the name of this element, i.e., @c 'listOfLocalParameters'.
28397
28398        """
28399        return _libsbml.ListOfLocalParameters_getElementName(self)
28400
28401    def get(self, *args):
28402        r"""
28403        get(ListOfLocalParameters self, unsigned int n) -> LocalParameter
28404        get(ListOfLocalParameters self, unsigned int n) -> LocalParameter
28405        get(ListOfLocalParameters self, string sid) -> LocalParameter
28406        get(ListOfLocalParameters self, string sid) -> LocalParameter
28407
28408        This method has multiple variants; they differ in the arguments
28409         they accept.  Each variant is described separately below.
28410
28411        @par
28412        <hr>
28413        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28414         <pre class='signature'>get(long n)</pre>
28415
28416        Returns the LocalParameter object located at position @p n within this
28417        ListOfLocalParameters instance.
28418
28419        @param n the index number of the LocalParameter to get.
28420
28421        @return the item at position @p n.  The caller owns the returned
28422        object and is responsible for deleting it.  If the index number @p n
28423        is out of bounds for the length of the list, then @c None is returned.
28424
28425        @see size()
28426        @see get()
28427
28428
28429        @par
28430        <hr>
28431        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28432         <pre class='signature'>get(string sid)</pre>
28433
28434        Returns the first LocalParameter object matching the given identifier.
28435
28436        @param sid a string representing the identifier of the LocalParameter
28437        to get.
28438
28439        @return the LocalParameter object found.  The caller owns the returned
28440        object and is responsible for deleting it.  If none of the items have
28441        an identifier matching @p sid, then @c None is returned.
28442
28443        @see get()
28444        @see size()
28445
28446        """
28447        return _libsbml.ListOfLocalParameters_get(self, *args)
28448
28449    def getElementBySId(self, id):
28450        r"""
28451        getElementBySId(ListOfLocalParameters self, string id) -> SBase
28452
28453        Returns the first child element found that has the given @p id in the
28454        model-wide SId namespace, or @c None if no such object is found.
28455
28456        Note that LocalParameters, while they use the SId namespace, are not in
28457        the model-wide SId namespace, so no LocalParameter object will be
28458        returned from this function (and is the reason we override the base
28459        ListOf::getElementBySId function here).
28460
28461        @param id string representing the id of the object to find.
28462
28463        @return pointer to the first element found with the given @p id.
28464
28465        """
28466        return _libsbml.ListOfLocalParameters_getElementBySId(self, id)
28467
28468    def remove(self, *args):
28469        r"""
28470        remove(ListOfLocalParameters self, unsigned int n) -> LocalParameter
28471        remove(ListOfLocalParameters self, string sid) -> LocalParameter
28472
28473        This method has multiple variants; they differ in the arguments
28474         they accept.  Each variant is described separately below.
28475
28476        @par
28477        <hr>
28478        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28479         <pre class='signature'>remove(long n)</pre>
28480
28481        Removes the nth item from this ListOfLocalParameters, and returns a
28482        pointer to it.
28483
28484        @param n the index of the item to remove.
28485
28486        @return the item removed.  The caller owns the returned object and is
28487        responsible for deleting it.  If the index number @p n is out of
28488        bounds for the length of the list, then @c None is returned.
28489
28490        @see size()
28491        @see remove()
28492
28493
28494        @par
28495        <hr>
28496        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28497         <pre class='signature'>remove(string sid)</pre>
28498
28499        Removes the first LocalParameter object in this ListOfLocalParameters
28500        matching the given identifier, and returns a pointer to it.
28501
28502        @param sid the identifier of the item to remove.
28503
28504        @return the item removed.  The caller owns the returned object and is
28505        responsible for deleting it.  If none of the items have an identifier
28506        matching @p sid, then @c None is returned.
28507
28508        """
28509        return _libsbml.ListOfLocalParameters_remove(self, *args)
28510    __swig_destroy__ = _libsbml.delete_ListOfLocalParameters
28511
28512# Register ListOfLocalParameters in _libsbml:
28513_libsbml.ListOfLocalParameters_swigregister(ListOfLocalParameters)
28514
28515class InitialAssignment(SBase):
28516    r"""
28517
28518    @sbmlpackage{core}
28519
28520    @htmlinclude pkg-marker-core.html An SBML <em>initial assignment</em>, evaluated once only.
28521
28522    SBML Level 2 Versions 2&ndash;4 and SBML Level&nbsp;3 provide two ways of assigning initial
28523    values to entities in a model.  The simplest and most basic is to set
28524    the values of the appropriate attributes in the relevant components; for
28525    example, the initial value of a model parameter (whether it is a
28526    constant or a variable) can be assigned by setting its 'value' attribute
28527    directly in the model definition.  However, this approach is not
28528    suitable when the value must be calculated, because the initial value
28529    attributes on different components such as species, compartments, and
28530    parameters are single values and not mathematical expressions.  In those
28531    situations, the InitialAssignment construct can be used; it permits the
28532    calculation of the value of a constant or the initial value of a
28533    variable from the values of @em other quantities in a model.
28534
28535    As explained below, the provision of InitialAssignment does not mean
28536    that models necessarily must use this construct when defining initial
28537    values of quantities in a model.  If a value can be set directly using
28538    the relevant attribute of a component in a model, then that
28539    approach may be more efficient and more portable to other software
28540    tools.  InitialAssignment should be used when the other mechanism is
28541    insufficient for the needs of a particular model.
28542
28543    The InitialAssignment construct has some similarities to AssignmentRule.
28544    The main differences are: (a) an InitialAssignment can set the value of
28545    a constant whereas an AssignmentRule cannot, and (b) unlike
28546    AssignmentRule, an InitialAssignment definition only applies up to and
28547    including the beginning of simulation time, i.e., <em>t <= 0</em>,
28548    while an AssignmentRule applies at all times.
28549
28550    InitialAssignment has a required attribute, 'symbol', whose value must
28551    follow the guidelines for identifiers described in the %SBML
28552    specification (e.g., Section 3.3 in the Level 2 Version 4
28553    specification).  The value of this attribute in an InitialAssignment
28554    object can be the identifier of a Compartment, Species, SpeciesReference
28555    (in SBML Level&nbsp;3),  global Parameter, or (as of SBML
28556    Level&nbsp;3 Version&nbsp;2) the identifier of a SBML Level&nbsp;3
28557    package element with mathematical meaning.  The InitialAssignment defines the
28558    initial value of the constant or variable referred to by the 'symbol'
28559    attribute.  (The attribute's name is 'symbol' rather than 'variable'
28560    because it may assign values to constants as well as variables in a
28561    model.)  Note that an initial assignment cannot be made to reaction
28562    identifiers, that is, the 'symbol' attribute value of an
28563    InitialAssignment cannot be an identifier that is the 'id' attribute
28564    value of a Reaction object in the model.  This is identical to a
28565    restriction placed on rules.
28566
28567    InitialAssignment also has a 'math' subelement that contains a
28568    MathML expression used to calculate the value of the constant or the
28569    initial value of the variable.  This subelement is required in SBML
28570    Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1, but the requirement
28571    was relaxed in SBML Level&nbsp;3 Version&nbsp;2, making it optional.
28572    The units of the value computed by the formula in the 'math' subelement
28573    should (in SBML Level&nbsp;2 Version&nbsp;4 and in SBML Level&nbsp;3)
28574    or must (in previous Versions) be identical to be the
28575    units associated with the identifier given in the 'symbol' attribute.
28576    (That is, the units are the units of the species, compartment, or
28577    parameter, as appropriate for the kind of object identified by the value
28578    of 'symbol'.)
28579
28580    InitialAssignment was introduced in SBML Level 2 Version 2.  It is not
28581    available in SBML Level&nbsp;2 Version&nbsp;1 nor in any version of Level 1.
28582
28583    @section initassign-semantics Semantics of Initial Assignments
28584
28585    The value calculated by an InitialAssignment object overrides the value
28586    assigned to the given symbol by the object defining that symbol.  For
28587    example, if a compartment's 'size' attribute is set in its definition,
28588    and the model also contains an InitialAssignment having that
28589    compartment's identifier as its 'symbol' attribute value, then the
28590    interpretation is that the 'size' assigned in the Compartment object
28591    should be ignored and the value assigned based on the computation
28592    defined in the InitialAssignment.  Initial assignments can take place
28593    for Compartment, Species, global Parameter, SpeciesReference (in
28594    Level&nbsp;3), and SBML Level&nbsp;3 package elements (in
28595    Level&nbsp;3 Version&nbsp;2), regardless of the value of their
28596    'constant' attribute.
28597
28598    The actions of all InitialAssignment objects are in general terms
28599    the same, but differ in the precise details depending on the type
28600    of variable being set:
28601    <ul>
28602    <li> <em>In the case of a species</em>, an InitialAssignment sets the
28603    referenced species' initial quantity (concentration or amount of
28604    substance) to the value determined by the formula in the 'math'
28605    subelement.    The overall units of the formula should (in SBML
28606    Level&nbsp;2 Version&nbsp;4 and in SBML Level&nbsp;3) or must (in previous Versions) be the same
28607    as the units specified for the species.
28608
28609    <li> <em>In the case of a compartment</em>, an InitialAssignment sets
28610    the referenced compartment's initial size to the size determined by the
28611    formula in 'math'.  The overall units of the formula should (in SBML
28612    Level&nbsp;2 Version&nbsp;4 and in SBML Level&nbsp;3) or must (in previous Versions) be the same
28613    as the units specified for the size of the compartment.
28614
28615    <li> <em>In the case of a parameter</em>, an InitialAssignment sets the
28616    referenced parameter's initial value to that determined by the formula
28617    in 'math'.  The overall units of the formula should (in SBML
28618    Level&nbsp;2 Version&nbsp;4 and SBML Level&nbsp;3) or must (in previous Versions) be the same
28619    as the units defined for the parameter.
28620
28621    <li> (For SBML Level&nbsp;3 only) <em>In the case of a species
28622    reference</em>, an initial assignment sets the initial value of the
28623    stoichiometry of the referenced reactant or product to the value determined
28624    by the formula in 'math'.  The unit associated with the value produced by
28625    the 'math' formula should be consistent with the unit 'dimensionless',
28626    because reactant and product stoichiometries in reactions are dimensionless
28627    quantities.
28628
28629    <li>(For SBML Level&nbsp;3 Version&nbsp;2 only) <em>In the case
28630    of an object from an SBML Level&nbsp;3 package</em>, an InitialAssignment
28631    sets the referenced object's initial value (however such values are
28632    defined by the package) to the value of the formula in math. The unit
28633    of measurement associated with the value produced by the formula
28634    should be the same as that object's units attribute value (if it has
28635    such an attribute), or be equal to the units of model components of
28636    that type (if objects of that class are defined by the package as
28637    having the same units).
28638
28639    </ul>
28640
28641    If the symbol attribute of an InitialAssignment object references
28642    an object in an SBML namespace that is not understood by the
28643    interpreter reading a given SBML document (that is, if the object
28644    is defined by an SBML Level&nbsp;3 package that the software does
28645    not support), the assignment must be ignored--the object's initial
28646    value will not need to be set, as the interpreter could not understand
28647    that package. If an interpreter cannot establish whether a referenced
28648    object is missing from the model or instead is defined in an SBML
28649    namespace not understood by the interpreter, it may produce a
28650    warning to the user. (The latter situation may only arise if an SBML
28651    package is present in the SBML document with a package:required
28652    attribute of 'true'.)
28653
28654    In the context of a simulation, initial assignments establish values
28655    that are in effect prior to and including the start of simulation time,
28656    i.e., <em>t <= 0</em>.  Section 3.4.8 in the SBML Level&nbsp;2
28657    Version&nbsp;4  and SBML Level&nbsp;3 specifications
28658    provides information about the interpretation of
28659    assignments, rules, and entity values for simulation time up to and
28660    including the start time <em>t = 0</em>; this is important for
28661    establishing the initial conditions of a simulation if the model
28662    involves expressions containing the <em>delay</em> 'csymbol'.
28663
28664    There cannot be two initial assignments for the same symbol in a model;
28665    that is, a model must not contain two or more InitialAssignment objects
28666    that both have the same identifier as their 'symbol' attribute value.  A
28667    model must also not define initial assignments <em>and</em> assignment
28668    rules for the same entity.  That is, there cannot be <em>both</em> an
28669    InitialAssignment and an AssignmentRule for the same symbol in a model,
28670    because both kinds of constructs apply prior to and at the start of
28671    simulated time---allowing both to exist for a given symbol would
28672    result in indeterminism).
28673
28674    The ordering of InitialAssignment objects is not significant.  The
28675    combined set of InitialAssignment, AssignmentRule and KineticLaw
28676    objects form a set of assignment statements that must be considered as a
28677    whole.  The combined set of assignment statements should not contain
28678    algebraic loops: a chain of dependency between these statements should
28679    terminate.  (More formally, consider the directed graph of assignment
28680    statements where nodes are a model's assignment statements and directed
28681    arcs exist for each occurrence of a symbol in an assignment statement
28682    'math' attribute.  The directed arcs in this graph start from the
28683    statement assigning the symbol and end at the statement that contains
28684    the symbol in their math elements.  Such a graph must be acyclic.)
28685
28686    Finally, it is worth being explicit about the expected behavior in the
28687    following situation.  Suppose (1) a given symbol has a value <em>x</em>
28688    assigned to it in its definition, and (2) there is an initial assignment
28689    having the identifier as its 'symbol' value and reassigning the value to
28690    <em>y</em>, <em>and</em> (3) the identifier is also used in the
28691    mathematical formula of a second initial assignment.  What value should
28692    the second initial assignment use?  It is <em>y</em>, the value assigned
28693    to the symbol by the first initial assignment, not whatever value was
28694    given in the symbol's definition.  This follows directly from the
28695    behavior described above: if an InitialAssignment object exists for a
28696    given symbol, then the symbol's value is overridden by that initial
28697    assignment.
28698
28699    """
28700
28701    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
28702    __repr__ = _swig_repr
28703    __swig_destroy__ = _libsbml.delete_InitialAssignment
28704
28705    def __init__(self, *args):
28706        r"""
28707        __init__(InitialAssignment self, unsigned int level, unsigned int version) -> InitialAssignment
28708        __init__(InitialAssignment self, SBMLNamespaces sbmlns) -> InitialAssignment
28709        __init__(InitialAssignment self, InitialAssignment orig) -> InitialAssignment
28710
28711        This method has multiple variants; they differ in the arguments
28712         they accept.  Each variant is described separately below.
28713
28714        @par
28715        <hr>
28716        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28717         <pre class='signature'>InitialAssignment(SBMLNamespaces sbmlns)</pre>
28718
28719        Creates a new InitialAssignment using the given SBMLNamespaces object
28720        @p sbmlns.
28721
28722        @par
28723        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
28724        information.  It is used to communicate the SBML Level, Version, and (in
28725        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
28726        common approach to using libSBML's SBMLNamespaces facilities is to create an
28727        SBMLNamespaces object somewhere in a program once, then hand that object
28728        as needed to object constructors that accept SBMLNamespaces as arguments.
28729
28730        @param sbmlns an SBMLNamespaces object.
28731
28732        @throws SBMLConstructorException
28733        Thrown if the given @p sbmlns is inconsistent or incompatible
28734        with this object.
28735
28736        @note Attempting to add an object to an SBMLDocument having a different
28737        combination of SBML Level, Version and XML namespaces than the object
28738        itself will result in an error at the time a caller attempts to make the
28739        addition.  A parent object must have compatible Level, Version and XML
28740        namespaces.  (Strictly speaking, a parent may also have more XML
28741        namespaces than a child, but the reverse is not permitted.)  The
28742        restriction is necessary to ensure that an SBML model has a consistent
28743        overall structure.  This requires callers to manage their objects
28744        carefully, but the benefit is increased flexibility in how models can be
28745        created by permitting callers to create objects bottom-up if desired.  In
28746        situations where objects are not yet attached to parents (e.g.,
28747        SBMLDocument), knowledge of the intented SBML Level and Version help
28748        libSBML determine such things as whether it is valid to assign a
28749        particular value to an attribute.
28750
28751
28752        @par
28753        <hr>
28754        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28755         <pre class='signature'>InitialAssignment(long level, long version)</pre>
28756
28757        Creates a new InitialAssignment using the given SBML @p level and @p version
28758        values.
28759
28760        @param level a long integer, the SBML Level to assign to this InitialAssignment.
28761
28762        @param version a long integer, the SBML Version to assign to this
28763        InitialAssignment.
28764
28765        @throws SBMLConstructorException
28766        Thrown if the given @p level and @p version combination are invalid
28767        or if this object is incompatible with the given level and version.
28768
28769        @note Attempting to add an object to an SBMLDocument having a different
28770        combination of SBML Level, Version and XML namespaces than the object
28771        itself will result in an error at the time a caller attempts to make the
28772        addition.  A parent object must have compatible Level, Version and XML
28773        namespaces.  (Strictly speaking, a parent may also have more XML
28774        namespaces than a child, but the reverse is not permitted.)  The
28775        restriction is necessary to ensure that an SBML model has a consistent
28776        overall structure.  This requires callers to manage their objects
28777        carefully, but the benefit is increased flexibility in how models can be
28778        created by permitting callers to create objects bottom-up if desired.  In
28779        situations where objects are not yet attached to parents (e.g.,
28780        SBMLDocument), knowledge of the intented SBML Level and Version help
28781        libSBML determine such things as whether it is valid to assign a
28782        particular value to an attribute.
28783
28784
28785        @par
28786        <hr>
28787        <span class='variant-sig-heading'>Method variant with the following signature</span>:
28788         <pre class='signature'>InitialAssignment(InitialAssignment orig)</pre>
28789
28790        Copy constructor; creates a copy of this InitialAssignment.
28791
28792        @param orig the object to copy.
28793
28794        """
28795        _libsbml.InitialAssignment_swiginit(self, _libsbml.new_InitialAssignment(*args))
28796
28797    def clone(self):
28798        r"""
28799        clone(InitialAssignment self) -> InitialAssignment
28800
28801        Creates and returns a deep copy of this InitialAssignment object.
28802
28803        @return the (deep) copy of this InitialAssignment object.
28804
28805        """
28806        return _libsbml.InitialAssignment_clone(self)
28807
28808    def getSymbol(self):
28809        r"""
28810        getSymbol(InitialAssignment self) -> string
28811
28812        Get the value of the 'symbol' attribute of this InitialAssignment.
28813
28814        @return the identifier string stored as the 'symbol' attribute value
28815        in this InitialAssignment.
28816
28817        """
28818        return _libsbml.InitialAssignment_getSymbol(self)
28819
28820    def getMath(self):
28821        r"""
28822        getMath(InitialAssignment self) -> ASTNode
28823
28824        Get the mathematical formula of this InitialAssignment.
28825
28826        @return an ASTNode, the value of the 'math' subelement of this
28827        InitialAssignment, or @c None if the math is not set.
28828
28829        """
28830        return _libsbml.InitialAssignment_getMath(self)
28831
28832    def isSetSymbol(self):
28833        r"""
28834        isSetSymbol(InitialAssignment self) -> bool
28835
28836        Predicate returning @c True if this
28837        InitialAssignment's 'symbol' attribute is set.
28838
28839        @return @c True if the 'symbol' attribute of this InitialAssignment
28840        is set, @c False otherwise.
28841
28842        """
28843        return _libsbml.InitialAssignment_isSetSymbol(self)
28844
28845    def isSetMath(self):
28846        r"""
28847        isSetMath(InitialAssignment self) -> bool
28848
28849        Predicate returning @c True if this
28850        InitialAssignment's 'math' subelement contains a value.
28851
28852        @return @c True if the 'math' for this InitialAssignment is set,
28853        @c False otherwise.
28854
28855        """
28856        return _libsbml.InitialAssignment_isSetMath(self)
28857
28858    def setSymbol(self, sid):
28859        r"""
28860        setSymbol(InitialAssignment self, string sid) -> int
28861
28862        Sets the 'symbol' attribute value of this InitialAssignment.
28863
28864        @param sid the identifier of an element defined in this model whose
28865        value can be set.
28866
28867        @return integer value indicating success/failure of the
28868        function.  @if clike The value is drawn from the
28869        enumeration #OperationReturnValues_t. @endif@~ The possible values
28870        returned by this function are:
28871        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
28872        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
28873
28874        """
28875        return _libsbml.InitialAssignment_setSymbol(self, sid)
28876
28877    def unsetSymbol(self):
28878        r"""
28879        unsetSymbol(InitialAssignment self) -> int
28880
28881        Unsets the 'symbol' attribute value of this InitialAssignment.
28882
28883        @return integer value indicating success/failure of the
28884        function.  @if clike The value is drawn from the
28885        enumeration #OperationReturnValues_t. @endif@~ The possible values
28886        returned by this function are:
28887        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
28888        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
28889
28890        """
28891        return _libsbml.InitialAssignment_unsetSymbol(self)
28892
28893    def setMath(self, math):
28894        r"""
28895        setMath(InitialAssignment self, ASTNode math) -> int
28896
28897        Sets the 'math' subelement of this InitialAssignment.
28898
28899        The AST passed in @p math is copied.
28900
28901        @param math an AST containing the mathematical expression to
28902        be used as the formula for this InitialAssignment.
28903
28904        @return integer value indicating success/failure of the
28905        function.  @if clike The value is drawn from the
28906        enumeration #OperationReturnValues_t. @endif@~ The possible values
28907        returned by this function are:
28908        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
28909        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
28910
28911        """
28912        return _libsbml.InitialAssignment_setMath(self, math)
28913
28914    def getDerivedUnitDefinition(self, *args):
28915        r"""
28916        getDerivedUnitDefinition(InitialAssignment self) -> UnitDefinition
28917        getDerivedUnitDefinition(InitialAssignment self) -> UnitDefinition
28918
28919        Calculates and returns a UnitDefinition that expresses the units
28920        of measurement assumed for the 'math' expression of this
28921        InitialAssignment.
28922
28923        @par
28924        The units are calculated based on the mathematical expression in the
28925        InitialAssignment and the model quantities referenced by
28926        <code>&lt;ci&gt;</code> elements used within that expression.  The method
28927        InitialAssignment.getDerivedUnitDefinition() returns the calculated
28928        units, to the extent that libSBML can compute them.
28929
28930        @note The functionality that facilitates unit analysis depends on the
28931        model as a whole.  Thus, in cases where the object has not been added to
28932        a model or the model itself is incomplete, unit analysis is not possible
28933        and this method will return @c None.
28934
28935        @warning <span class='warning'>Note that it is possible the 'math'
28936        expression in the InitialAssignment contains literal numbers or parameters
28937        with undeclared units.  In those cases, it is not possible to calculate
28938        the units of the overall expression without making assumptions.  LibSBML
28939        does not make assumptions about the units, and
28940        InitialAssignment.getDerivedUnitDefinition() only returns the units as
28941        far as it is able to determine them.  For example, in an expression <em>X
28942        + Y</em>, if <em>X</em> has unambiguously-defined units and <em>Y</em>
28943        does not, it will return the units of <em>X</em>.  When using this method,
28944        <strong>it is critical that callers also invoke the method</strong>
28945        InitialAssignment.containsUndeclaredUnits() <strong>to determine whether
28946        this situation holds</strong>.  Callers should take suitable action in
28947        those situations.</span>
28948
28949        @return a UnitDefinition that expresses the units of the math
28950        expression of this InitialAssignment, or @c None if one cannot be constructed.
28951
28952        @see containsUndeclaredUnits()
28953
28954        """
28955        return _libsbml.InitialAssignment_getDerivedUnitDefinition(self, *args)
28956
28957    def containsUndeclaredUnits(self, *args):
28958        r"""
28959        containsUndeclaredUnits(InitialAssignment self) -> bool
28960        containsUndeclaredUnits(InitialAssignment self) -> bool
28961
28962        Predicate returning @c True if the math expression of this
28963        InitialAssignment contains parameters/numbers with undeclared units.
28964
28965        @return @c True if the math expression of this InitialAssignment
28966        includes parameters/numbers
28967        with undeclared units, @c False otherwise.
28968
28969        @note A return value of @c True indicates that the UnitDefinition
28970        returned by InitialAssignment::getDerivedUnitDefinition may not
28971        accurately represent the units of the expression.
28972
28973        @see getDerivedUnitDefinition()
28974
28975        """
28976        return _libsbml.InitialAssignment_containsUndeclaredUnits(self, *args)
28977
28978    def getTypeCode(self):
28979        r"""
28980        getTypeCode(InitialAssignment self) -> int
28981
28982        Returns the libSBML type code for this %SBML object.
28983
28984        @par
28985        LibSBML attaches an identifying code to every kind of SBML object.  These
28986        are integer constants known as <em>SBML type codes</em>.  The names of all
28987        the codes begin with the characters <code>SBML_</code>.
28988        @if clike The set of possible type codes for core elements is defined in
28989        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
28990        SBML Level&nbsp;3 packages define their own extra enumerations of type
28991        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
28992        package).@endif@if java In the Java language interface for libSBML, the
28993        type codes are defined as static integer constants in the interface class
28994        {@link libsbmlConstants}.  @endif@if python In the Python language
28995        interface for libSBML, the type codes are defined as static integer
28996        constants in the interface class @link libsbml@endlink.@endif@if csharp In
28997        the C# language interface for libSBML, the type codes are defined as
28998        static integer constants in the interface class
28999        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
29000        package plug-ins may use overlapping type codes; to identify the package
29001        to which a given object belongs, call the
29002        <code>@if conly SBase_getPackageName()
29003        @else SBase.getPackageName()
29004        @endif</code>
29005        method on the object.
29006
29007        The exception to this is lists:  all SBML-style list elements have the type
29008        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
29009        are from.
29010
29011        @return the SBML type code for this object:
29012        @link libsbml#SBML_INITIAL_ASSIGNMENT SBML_INITIAL_ASSIGNMENT@endlink (default).
29013
29014        @warning <span class='warning'>The specific integer values of the possible
29015        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
29016        packages,  To fully identify the correct code, <strong>it is necessary to
29017        invoke both getPackageName() and getTypeCode()</strong> (or
29018        ListOf.getItemTypeCode()).</span>
29019
29020        @see getElementName()
29021        @see getPackageName()
29022
29023        """
29024        return _libsbml.InitialAssignment_getTypeCode(self)
29025
29026    def getElementName(self):
29027        r"""
29028        getElementName(InitialAssignment self) -> string
29029
29030        Returns the XML element name of this object, which for
29031        InitialAssignment, is always @c 'initialAssignment'.
29032
29033        @return the name of this element, i.e., @c 'initialAssignment'.
29034
29035        """
29036        return _libsbml.InitialAssignment_getElementName(self)
29037
29038    def hasRequiredAttributes(self):
29039        r"""
29040        hasRequiredAttributes(InitialAssignment self) -> bool
29041
29042        Predicate returning @c True if all the required attributes for this
29043        InitialAssignment object have been set.
29044
29045        The required attributes for an InitialAssignment object are:
29046        @li 'symbol'
29047
29048        @return @c True if the required attributes have been set, @c False
29049        otherwise.
29050
29051        """
29052        return _libsbml.InitialAssignment_hasRequiredAttributes(self)
29053
29054    def hasRequiredElements(self):
29055        r"""
29056        hasRequiredElements(InitialAssignment self) -> bool
29057
29058        Predicate returning @c True if all the required elements for this
29059        InitialAssignment object have been set.
29060
29061        @note The required elements for a InitialAssignment object are:
29062        @li 'math' inSBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
29063        (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
29064
29065        @return a boolean value indicating whether all the required
29066        elements for this object have been defined.
29067
29068        """
29069        return _libsbml.InitialAssignment_hasRequiredElements(self)
29070
29071    def getId(self):
29072        r"""
29073        getId(InitialAssignment self) -> string
29074
29075        Returns the value of the 'symbol' attribute of this InitialAssignment (NOT the 'id').
29076
29077        @note Because of the inconsistent behavior of this function with
29078        respect to assignments and rules, it is now recommended to
29079        use the getIdAttribute() or InitialAssignment.getSymbol()
29080        functions instead.
29081
29082        The 'symbol' attribute of an InitialAssignment indicates the element which
29083        the results of the 'math' are to be applied.
29084
29085        @return the symbol of this InitialAssignment.
29086
29087        @see getIdAttribute()
29088        @see setIdAttribute()
29089        @see isSetIdAttribute()
29090        @see unsetIdAttribute()
29091        @see getSymbol()
29092
29093        """
29094        return _libsbml.InitialAssignment_getId(self)
29095
29096    def renameSIdRefs(self, oldid, newid):
29097        r"""
29098        renameSIdRefs(InitialAssignment self, string oldid, string newid)
29099
29100        Replaces all uses of a given @c SIdRef type attribute value with another
29101        value.
29102
29103        @par
29104        In SBML, object identifiers are of a data type called <code>SId</code>.
29105        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
29106        introduced for attribute values that refer to <code>SId</code> values; in
29107        previous Levels of SBML, this data type did not exist and attributes were
29108        simply described to as 'referring to an identifier', but the effective
29109        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
29110        other methods of libSBML refer to the type <code>SIdRef</code> for all
29111        Levels of SBML, even if the corresponding SBML specification did not
29112        explicitly name the data type.
29113
29114        This method works by looking at all attributes and (if appropriate)
29115        mathematical formulas in MathML content, comparing the referenced
29116        identifiers to the value of @p oldid.  If any matches are found, the
29117        matching values are replaced with @p newid.  The method does @em not
29118        descend into child elements.
29119
29120        @param oldid the old identifier.
29121        @param newid the new identifier.
29122
29123        """
29124        return _libsbml.InitialAssignment_renameSIdRefs(self, oldid, newid)
29125
29126    def renameUnitSIdRefs(self, oldid, newid):
29127        r"""
29128        renameUnitSIdRefs(InitialAssignment self, string oldid, string newid)
29129
29130        Replaces all uses of a given @c UnitSIdRef type attribute value with
29131        another value.
29132
29133        @par
29134        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
29135        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
29136        introduced for attribute values that refer to <code>UnitSId</code> values; in
29137        previous Levels of SBML, this data type did not exist and attributes were
29138        simply described to as 'referring to a unit identifier', but the effective
29139        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
29140        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
29141        Levels of SBML, even if the corresponding SBML specification did not
29142        explicitly name the data type.
29143
29144        This method works by looking at all unit identifier attribute values
29145        (including, if appropriate, inside mathematical formulas), comparing the
29146        referenced unit identifiers to the value of @p oldid.  If any matches
29147        are found, the matching values are replaced with @p newid.  The method
29148        does @em not descend into child elements.
29149
29150        @param oldid the old identifier.
29151        @param newid the new identifier.
29152
29153        """
29154        return _libsbml.InitialAssignment_renameUnitSIdRefs(self, oldid, newid)
29155
29156    def replaceSIDWithFunction(self, id, function):
29157        r"""
29158        replaceSIDWithFunction(InitialAssignment self, string id, ASTNode function)
29159
29160        @internal
29161
29162        @internal
29163
29164        """
29165        return _libsbml.InitialAssignment_replaceSIDWithFunction(self, id, function)
29166
29167    def divideAssignmentsToSIdByFunction(self, id, function):
29168        r"""
29169        divideAssignmentsToSIdByFunction(InitialAssignment self, string id, ASTNode function)
29170
29171        @internal
29172
29173        @internal
29174
29175        """
29176        return _libsbml.InitialAssignment_divideAssignmentsToSIdByFunction(self, id, function)
29177
29178    def multiplyAssignmentsToSIdByFunction(self, id, function):
29179        r"""
29180        multiplyAssignmentsToSIdByFunction(InitialAssignment self, string id, ASTNode function)
29181
29182        @internal
29183
29184        @internal
29185
29186        """
29187        return _libsbml.InitialAssignment_multiplyAssignmentsToSIdByFunction(self, id, function)
29188
29189# Register InitialAssignment in _libsbml:
29190_libsbml.InitialAssignment_swigregister(InitialAssignment)
29191
29192class ListOfInitialAssignments(ListOf):
29193    r"""
29194
29195    @sbmlpackage{core}
29196
29197    @htmlinclude pkg-marker-core.html A list of InitialAssignment objects.
29198
29199    @par
29200    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
29201    are merely containers used for organizing the main components of an SBML
29202    model.  In libSBML's implementation, ListOf___
29203    @if conly data structures @else classes@endif@~ are derived from the
29204    intermediate utility @if conly structure @else class@endif@~ ListOf, which
29205    is not defined by the SBML specifications but serves as a useful
29206    programmatic construct.  ListOf is itself is in turn derived from SBase,
29207    which provides all of the various ListOf___
29208    @if conly data structures @else classes@endif@~ with common features
29209    defined by the SBML specification, such as 'metaid' attributes and
29210    annotations.
29211
29212    The relationship between the lists and the rest of an SBML model is
29213    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
29214
29215    @htmlinclude listof-illustration.html
29216
29217    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
29218    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
29219    Version&nbsp;2 allows
29220    containers to contain zero or more of the relevant object, instead of
29221    requiring at least one.  As such, libsbml will write out an
29222    otherwise-empty ListOf___ element that has any optional attribute set
29223    (such as 'id' or 'metaid'), that has an optional child (such
29224    as a 'notes' or 'annotation'), or that has attributes or children set
29225    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
29226    any other children.
29227
29228    Readers may wonder about the motivations for using the ListOf___
29229    containers in SBML.  A simpler approach in XML might be to place the
29230    components all directly at the top level of the model definition.  The
29231    choice made in SBML is to group them within XML elements named after
29232    %ListOf<em>Classname</em>, in part because it helps organize the
29233    components.  More importantly, the fact that the container classes are
29234    derived from SBase means that software tools can add information @em about
29235    the lists themselves into each list container's 'annotation'.
29236
29237    @see ListOfFunctionDefinitions
29238    @see ListOfUnitDefinitions
29239    @see ListOfCompartmentTypes
29240    @see ListOfSpeciesTypes
29241    @see ListOfCompartments
29242    @see ListOfSpecies
29243    @see ListOfParameters
29244    @see ListOfInitialAssignments
29245    @see ListOfRules
29246    @see ListOfConstraints
29247    @see ListOfReactions
29248    @see ListOfEvents
29249
29250    @if conly
29251    @note In the C API for libSBML, functions that in other language APIs
29252    would be inherited by the various ListOf___ structures not shown in the
29253    pages for the individual ListOf___'s.  Instead, the functions are defined
29254    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
29255    the many common functions available for manipulating ListOf___
29256    structures</strong>.  The documentation for the individual ListOf___
29257    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
29258    all of the functionality available. @endif@~
29259
29260    """
29261
29262    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
29263    __repr__ = _swig_repr
29264
29265    def __init__(self, *args):
29266        r"""
29267        __init__(ListOfInitialAssignments self, unsigned int level, unsigned int version) -> ListOfInitialAssignments
29268        __init__(ListOfInitialAssignments self, SBMLNamespaces sbmlns) -> ListOfInitialAssignments
29269
29270        This method has multiple variants; they differ in the arguments
29271         they accept.  Each variant is described separately below.
29272
29273        @par
29274        <hr>
29275        <span class='variant-sig-heading'>Method variant with the following signature</span>:
29276         <pre class='signature'>ListOfInitialAssignments(SBMLNamespaces sbmlns)</pre>
29277
29278        Creates a new ListOfInitialAssignments object.
29279
29280        The object is constructed such that it is valid for the SBML Level and
29281        Version combination determined by the SBMLNamespaces object in @p
29282        sbmlns.
29283
29284        @param sbmlns an SBMLNamespaces object that is used to determine the
29285        characteristics of the ListOfInitialAssignments object to be created.
29286
29287        @throws SBMLConstructorException
29288        Thrown if the given @p sbmlns is inconsistent or incompatible
29289        with this object.
29290
29291        @note Attempting to add an object to an SBMLDocument having a different
29292        combination of SBML Level, Version and XML namespaces than the object
29293        itself will result in an error at the time a caller attempts to make the
29294        addition.  A parent object must have compatible Level, Version and XML
29295        namespaces.  (Strictly speaking, a parent may also have more XML
29296        namespaces than a child, but the reverse is not permitted.)  The
29297        restriction is necessary to ensure that an SBML model has a consistent
29298        overall structure.  This requires callers to manage their objects
29299        carefully, but the benefit is increased flexibility in how models can be
29300        created by permitting callers to create objects bottom-up if desired.  In
29301        situations where objects are not yet attached to parents (e.g.,
29302        SBMLDocument), knowledge of the intented SBML Level and Version help
29303        libSBML determine such things as whether it is valid to assign a
29304        particular value to an attribute.
29305
29306
29307        @par
29308        <hr>
29309        <span class='variant-sig-heading'>Method variant with the following signature</span>:
29310         <pre class='signature'>ListOfInitialAssignments(long level, long version)</pre>
29311
29312        Creates a new ListOfInitialAssignments object.
29313
29314        The object is constructed such that it is valid for the given SBML
29315        Level and Version combination.
29316
29317        @param level the SBML Level.
29318
29319        @param version the Version within the SBML Level.
29320
29321        @throws SBMLConstructorException
29322        Thrown if the given @p level and @p version combination are invalid
29323        or if this object is incompatible with the given level and version.
29324
29325        @note Attempting to add an object to an SBMLDocument having a different
29326        combination of SBML Level, Version and XML namespaces than the object
29327        itself will result in an error at the time a caller attempts to make the
29328        addition.  A parent object must have compatible Level, Version and XML
29329        namespaces.  (Strictly speaking, a parent may also have more XML
29330        namespaces than a child, but the reverse is not permitted.)  The
29331        restriction is necessary to ensure that an SBML model has a consistent
29332        overall structure.  This requires callers to manage their objects
29333        carefully, but the benefit is increased flexibility in how models can be
29334        created by permitting callers to create objects bottom-up if desired.  In
29335        situations where objects are not yet attached to parents (e.g.,
29336        SBMLDocument), knowledge of the intented SBML Level and Version help
29337        libSBML determine such things as whether it is valid to assign a
29338        particular value to an attribute.
29339
29340        """
29341        _libsbml.ListOfInitialAssignments_swiginit(self, _libsbml.new_ListOfInitialAssignments(*args))
29342
29343    def clone(self):
29344        r"""
29345        clone(ListOfInitialAssignments self) -> ListOfInitialAssignments
29346
29347        Creates and returns a deep copy of this ListOfInitialAssignments object.
29348
29349        @return the (deep) copy of this ListOfInitialAssignments object.
29350
29351        """
29352        return _libsbml.ListOfInitialAssignments_clone(self)
29353
29354    def getItemTypeCode(self):
29355        r"""
29356        getItemTypeCode(ListOfInitialAssignments self) -> int
29357
29358        Returns the libSBML type code for the objects contained in this ListOf
29359        (i.e., InitialAssignment objects, if the list is non-empty).
29360
29361        @par
29362        LibSBML attaches an identifying code to every kind of SBML object.  These
29363        are integer constants known as <em>SBML type codes</em>.  The names of all
29364        the codes begin with the characters <code>SBML_</code>.
29365        @if clike The set of possible type codes for core elements is defined in
29366        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
29367        SBML Level&nbsp;3 packages define their own extra enumerations of type
29368        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
29369        package).@endif@if java In the Java language interface for libSBML, the
29370        type codes are defined as static integer constants in the interface class
29371        {@link libsbmlConstants}.  @endif@if python In the Python language
29372        interface for libSBML, the type codes are defined as static integer
29373        constants in the interface class @link libsbml@endlink.@endif@if csharp In
29374        the C# language interface for libSBML, the type codes are defined as
29375        static integer constants in the interface class
29376        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
29377        package plug-ins may use overlapping type codes; to identify the package
29378        to which a given object belongs, call the
29379        <code>@if conly SBase_getPackageName()
29380        @else SBase.getPackageName()
29381        @endif</code>
29382        method on the object.
29383
29384        The exception to this is lists:  all SBML-style list elements have the type
29385        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
29386        are from.
29387
29388        @return the SBML type code for the objects contained in this ListOf:
29389        @link libsbml#SBML_INITIAL_ASSIGNMENT SBML_INITIAL_ASSIGNMENT@endlink (default).
29390
29391        @see getElementName()
29392        @see getPackageName()
29393
29394        """
29395        return _libsbml.ListOfInitialAssignments_getItemTypeCode(self)
29396
29397    def getElementName(self):
29398        r"""
29399        getElementName(ListOfInitialAssignments self) -> string
29400
29401        Returns the XML element name of this object.
29402
29403        For ListOfInitialAssignments, the XML element name is
29404        @c 'listOfInitialAssignments'.
29405
29406        @return the name of this element, i.e., @c 'listOfInitialAssignments'.
29407
29408        """
29409        return _libsbml.ListOfInitialAssignments_getElementName(self)
29410
29411    def get(self, *args):
29412        r"""
29413        get(ListOfInitialAssignments self, unsigned int n) -> InitialAssignment
29414        get(ListOfInitialAssignments self, unsigned int n) -> InitialAssignment
29415        get(ListOfInitialAssignments self, string sid) -> InitialAssignment
29416        get(ListOfInitialAssignments self, string sid) -> InitialAssignment
29417
29418        This method has multiple variants; they differ in the arguments
29419         they accept.  Each variant is described separately below.
29420
29421        @par
29422        <hr>
29423        <span class='variant-sig-heading'>Method variant with the following signature</span>:
29424         <pre class='signature'>get(long n)</pre>
29425
29426        Get a InitialAssignment from the ListOfInitialAssignments.
29427
29428        @param n the index number of the InitialAssignment to get.
29429
29430        @return the nth InitialAssignment in this ListOfInitialAssignments.
29431        If the index @p n is invalid, @c None is returned.
29432
29433        @see size()
29434
29435
29436        @par
29437        <hr>
29438        <span class='variant-sig-heading'>Method variant with the following signature</span>:
29439         <pre class='signature'>get(string sid)</pre>
29440
29441        Get a InitialAssignment from the ListOfInitialAssignments
29442        based on its identifier.
29443
29444        @param sid a string representing the identifier
29445        of the InitialAssignment to get.
29446
29447        @return InitialAssignment in this ListOfInitialAssignments
29448        with the given @p sid or @c None if no such
29449        InitialAssignment exists.
29450
29451        @see get()
29452        @see size()
29453
29454        """
29455        return _libsbml.ListOfInitialAssignments_get(self, *args)
29456
29457    def remove(self, *args):
29458        r"""
29459        remove(ListOfInitialAssignments self, unsigned int n) -> InitialAssignment
29460        remove(ListOfInitialAssignments self, string sid) -> InitialAssignment
29461
29462        This method has multiple variants; they differ in the arguments
29463         they accept.  Each variant is described separately below.
29464
29465        @par
29466        <hr>
29467        <span class='variant-sig-heading'>Method variant with the following signature</span>:
29468         <pre class='signature'>remove(long n)</pre>
29469
29470        Removes the nth item from this ListOfInitialAssignments items and returns a pointer to
29471        it.
29472
29473        The caller owns the returned item and is responsible for deleting it.
29474
29475        @param n the index of the item to remove.
29476
29477        @see size()
29478
29479
29480        @par
29481        <hr>
29482        <span class='variant-sig-heading'>Method variant with the following signature</span>:
29483         <pre class='signature'>remove(string sid)</pre>
29484
29485        Removes item in this ListOfInitialAssignments items with the given identifier.
29486
29487        The caller owns the returned item and is responsible for deleting it.
29488        If none of the items in this list have the identifier @p sid, then
29489        @c None is returned.
29490
29491        @param sid the identifier of the item to remove.
29492
29493        @return the item removed.  As mentioned above, the caller owns the
29494        returned item.
29495
29496        """
29497        return _libsbml.ListOfInitialAssignments_remove(self, *args)
29498
29499    def getElementBySId(self, id):
29500        r"""
29501        getElementBySId(ListOfInitialAssignments self, string id) -> SBase
29502
29503        Returns the first child element found that has the given @p id in the
29504        model-wide SId namespace, or @c None if no such object is found.
29505
29506        Note that InitialAssignments do not actually have IDs, though the
29507        libsbml interface pretends that they do: no initial assignment is
29508        returned by this function.
29509
29510        @param id string representing the id of the object to find.
29511
29512        @return pointer to the first element found with the given @p id.
29513
29514        """
29515        return _libsbml.ListOfInitialAssignments_getElementBySId(self, id)
29516    __swig_destroy__ = _libsbml.delete_ListOfInitialAssignments
29517
29518# Register ListOfInitialAssignments in _libsbml:
29519_libsbml.ListOfInitialAssignments_swigregister(ListOfInitialAssignments)
29520
29521RULE_TYPE_RATE = _libsbml.RULE_TYPE_RATE
29522
29523RULE_TYPE_SCALAR = _libsbml.RULE_TYPE_SCALAR
29524
29525RULE_TYPE_INVALID = _libsbml.RULE_TYPE_INVALID
29526
29527class Rule(SBase):
29528    r"""
29529
29530    @sbmlpackage{core}
29531
29532    @htmlinclude pkg-marker-core.html Parent class for SBML <em>rules</em> in libSBML.
29533
29534    In SBML, @em rules provide additional ways to define the values of
29535    variables in a model, their relationships, and the dynamical behaviors
29536    of those variables.  They enable encoding relationships that cannot be
29537    expressed using Reaction nor InitialAssignment objects alone.
29538
29539    The libSBML implementation of rules mirrors the SBML Level&nbsp;3
29540    definition (which is in turn is very similar to the
29541    Level&nbsp;2 Version&nbsp;4 definition), with Rule being the parent
29542    class of three subclasses as explained below.  The Rule class itself
29543    cannot be instantiated by user programs and has no constructor; only the
29544    subclasses AssignmentRule, AlgebraicRule and RateRule can be
29545    instantiated directly.
29546
29547    @section rules-general General summary of SBML rules
29548
29549    In SBML Level&nbsp;3 as well as Level&nbsp;2, rules are separated into three
29550    subclasses for the benefit of model analysis software.  The three
29551    subclasses are based on the following three different possible functional
29552    forms (where <em>x</em> is a variable, <em>f</em> is some arbitrary
29553    function returning a numerical result, <b><em>V</em></b> is a vector of
29554    variables that does not include <em>x</em>, and <b><em>W</em></b> is a
29555    vector of variables that may include <em>x</em>):
29556
29557    <table border='0' cellpadding='0' class='centered' style='font-size: small'>
29558    <tr><td width='120px'><em>Algebraic:</em></td><td width='250px'>left-hand side is zero</td><td><em>0 = f(<b>W</b>)</em></td></tr>
29559    <tr><td><em>Assignment:</em></td><td>left-hand side is a scalar:</td><td><em>x = f(<b>V</b>)</em></td></tr>
29560    <tr><td><em>Rate:</em></td><td>left-hand side is a rate-of-change:</td><td><em>dx/dt = f(<b>W</b>)</em></td></tr>
29561    </table>
29562
29563    In their general form given above, there is little to distinguish
29564    between <em>assignment</em> and <em>algebraic</em> rules.  They are treated as
29565    separate cases for the following reasons:
29566
29567    @li <em>Assignment</em> rules can simply be evaluated to calculate
29568    intermediate values for use in numerical methods.  They are statements
29569    of equality that hold at all times.  (For assignments that are only
29570    performed once, see InitialAssignment.)
29571    @li SBML needs to place restrictions on assignment rules, for example
29572    the restriction that assignment rules cannot contain algebraic loops.
29573
29574    @li Some simulators do not contain numerical solvers capable of solving
29575    unconstrained algebraic equations, and providing more direct forms such
29576    as assignment rules may enable those simulators to process models they
29577    could not process if the same assignments were put in the form of
29578    general algebraic equations;
29579
29580    @li Those simulators that <em>can</em> solve these algebraic equations make a
29581    distinction between the different categories listed above; and
29582
29583    @li Some specialized numerical analyses of models may only be applicable
29584    to models that do not contain <em>algebraic</em> rules.
29585
29586    The approach taken to covering these cases in SBML is to define an
29587    abstract Rule structure containing a subelement, 'math', to hold the
29588    right-hand side expression, then to derive subtypes of Rule that add
29589    attributes to distinguish the cases of algebraic, assignment and rate
29590    rules.  The 'math' subelement must contain a MathML expression defining the
29591    mathematical formula of the rule.  This MathML formula must return a
29592    numerical value.  The formula can be an arbitrary expression referencing
29593    the variables and other entities in an SBML model.
29594
29595    Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule,
29596    RateRule) inherit the the 'math' subelement and other fields from SBase.
29597    The AssignmentRule and RateRule classes add an additional attribute,
29598    'variable'.  See the definitions of AssignmentRule, AlgebraicRule and
29599    RateRule for details about the structure and interpretation of each one.
29600
29601    @section rules-restrictions Additional restrictions on SBML rules
29602
29603    An important design goal of SBML rule semantics is to ensure that a
29604    model's simulation and analysis results will not be dependent on when or
29605    how often rules are evaluated.  To achieve this, SBML needs to place two
29606    restrictions on rule use.  The first concerns algebraic loops in the system
29607    of assignments in a model, and the second concerns overdetermined systems.
29608
29609    @subsection rules-no-loops A model must not contain algebraic loops
29610
29611    The combined set of InitialAssignment, AssignmentRule and KineticLaw
29612    objects in a model constitute a set of assignment statements that should be
29613    considered as a whole.  (A KineticLaw object is counted as an assignment
29614    because it assigns a value to the symbol contained in the 'id' attribute of
29615    the Reaction object in which it is defined.)  This combined set of
29616    assignment statements must not contain algebraic loops---dependency
29617    chains between these statements must terminate.  To put this more formally,
29618    consider a directed graph in which nodes are assignment statements and
29619    directed arcs exist for each occurrence of an SBML species, compartment or
29620    parameter symbol in an assignment statement's 'math' subelement.  Let the
29621    directed arcs point from the statement assigning the symbol to the
29622    statements that contain the symbol in their 'math' subelement expressions.
29623    This graph must be acyclic.
29624
29625    Similarly, the combined set of RateRule and Reaction objects constitute
29626    a set of definitions for the rates of change of various model entities
29627    (namely, the objects identified by the values of the 'variable' attributes
29628    of the RateRule objects, and the 'species' attributes of the SpeciesReference
29629    objects in each Reaction).  In SBML Level&nbsp;3 Version&nbsp;2, these rates
29630    of change may be referenced directly
29631    using the <em>rateOf</em> csymbol, but may not thereby contain algebraic
29632    loops---dependency chains between these statements must terminate.  More
29633    formally, consider a directed graph in which the nodes are the definitions
29634    of different variables' rates of change, and directed arcs exist for each
29635    occurrence of a variable referenced by a <em>rateOf</em> csymbol from any
29636    RateRule or KineticLaw object in the model.  Let the directed arcs point
29637    from the variable referenced by the <em>rateOf</em> csymbol (call it
29638    <em>x</em>) to the variable(s) determined by the 'math' expression in which
29639    <em>x</em> appears.  This graph must be acyclic.
29640
29641    SBML does not specify when or how often rules should be evaluated.
29642    Eliminating algebraic loops ensures that assignment statements can be
29643    evaluated any number of times without the result of those evaluations
29644    changing.  As an example, consider the set of equations <em>x = x + 1</em>,
29645    <em>y = z + 200</em> and <em>z = y + 100</em>.  If this set of equations
29646    were interpreted as a set of assignment statements, it would be invalid
29647    because the rule for <em>x</em> refers to <em>x</em> (exhibiting one type
29648    of loop), and the rule for <em>y</em> refers to <em>z</em> while the rule
29649    for <em>z</em> refers back to <em>y</em> (exhibiting another type of loop).
29650    Conversely, the following set of equations would constitute a valid set of
29651    assignment statements: <em>x = 10</em>, <em>y = z + 200</em>, and <em>z = x
29652    + 100</em>.
29653
29654    @subsection rules-not-overdetermined A model must not be overdetermined
29655
29656    An SBML model must not be overdetermined; that is, a model must not
29657    define more equations than there are unknowns in a model.  A valid SBML model
29658    that does not contain AlgebraicRule structures cannot be overdetermined.
29659
29660    LibSBML implements the static analysis procedure described in
29661    Appendix&nbsp;B of the SBML Level&nbsp;3
29662    specification for assessing whether a model is overdetermined.
29663
29664    (In summary, assessing whether a given continuous, deterministic,
29665    mathematical model is overdetermined does not require dynamic analysis; it
29666    can be done by analyzing the system of equations created from the model.
29667    One approach is to construct a bipartite graph in which one set of vertices
29668    represents the variables and the other the set of vertices represents the
29669    equations.  Place edges between vertices such that variables in the system
29670    are linked to the equations that determine them.  For algebraic equations,
29671    there will be edges between the equation and each variable occurring in the
29672    equation.  For ordinary differential equations (such as those defined by
29673    rate rules or implied by the reaction rate definitions), there will be a
29674    single edge between the equation and the variable determined by that
29675    differential equation.  A mathematical model is overdetermined if the
29676    maximal matchings of the bipartite graph contain disconnected vertexes
29677    representing equations.  If one maximal matching has this property, then
29678    all the maximal matchings will have this property; i.e., it is only
29679    necessary to find one maximal matching.)
29680
29681    @section RuleType_t Rule types for SBML Level 1
29682
29683    SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for
29684    distinguishing rules; specifically, it uses an attribute whose value is
29685    drawn from an enumeration of 3 values.  LibSBML supports this using methods
29686    that work @if clike a libSBML enumeration type,
29687    @link Rule::RuleType_t RuleType_t@endlink, whose values
29688    are @else with the enumeration values @endif@~ listed below.
29689
29690    @li @link libsbml#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
29691    the rule is a 'rate' rule.
29692    @li @link libsbml#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
29693    Indicates the rule is a 'scalar' rule.
29694    @li @link libsbml#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
29695    Indicates the rule type is unknown or not yet set.
29696
29697    """
29698
29699    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
29700    __repr__ = _swig_repr
29701    __swig_destroy__ = _libsbml.delete_Rule
29702
29703    def __init__(self, orig):
29704        r"""
29705        __init__(Rule self, Rule orig) -> Rule
29706
29707        @internal
29708
29709        """
29710        _libsbml.Rule_swiginit(self, _libsbml.new_Rule(orig))
29711
29712    def clone(self):
29713        r"""
29714        clone(Rule self) -> Rule
29715
29716        Creates and returns a deep copy of this Rule object.
29717
29718        @return the (deep) copy of this Rule object.
29719
29720        """
29721        return _libsbml.Rule_clone(self)
29722
29723    def getFormula(self):
29724        r"""
29725        getFormula(Rule self) -> string
29726
29727        Returns the mathematical expression of this Rule in text-string form.
29728
29729        The text string is produced by @sbmlfunction{formulaToString, ASTNode}; please consult
29730        the documentation for that function to find out more about the format
29731        of the text-string formula.
29732
29733        @return the formula text string for this Rule.
29734
29735        @note The attribute 'formula' is specific to SBML Level&nbsp;1; in
29736        higher Levels of SBML, it has been replaced with a subelement named
29737        'math'.  However, libSBML provides a unified interface to the
29738        underlying math expression and this method can be used for models
29739        of all Levels of SBML.
29740
29741        @see getMath()
29742        @see @sbmlfunction{formulaToL3String, ASTNode}
29743
29744        """
29745        return _libsbml.Rule_getFormula(self)
29746
29747    def getMath(self):
29748        r"""
29749        getMath(Rule self) -> ASTNode
29750
29751        Get the mathematical formula of this Rule as an ASTNode tree.
29752
29753        @return an ASTNode, the value of the 'math' subelement of this Rule,
29754        or @c None if the math is not set.
29755
29756        @note The subelement 'math' is present in SBML Levels&nbsp;2
29757        and&nbsp;3.  In SBML Level&nbsp;1, the equivalent construct is the
29758        attribute named 'formula'.  LibSBML provides a unified interface to
29759        the underlying math expression and this method can be used for models
29760        of all Levels of SBML.
29761
29762        @see getFormula()
29763
29764        """
29765        return _libsbml.Rule_getMath(self)
29766
29767    def getVariable(self):
29768        r"""
29769        getVariable(Rule self) -> string
29770
29771        Get the value of the 'variable' attribute of this Rule object.
29772
29773        @par
29774        In SBML Level&nbsp;1, the different rule types each have a different
29775        name for the attribute holding the reference to the object constituting
29776        the left-hand side of the rule.  (E.g., for SBML Level&nbsp;1's
29777        SpeciesConcentrationRule the attribute is 'species', for
29778        CompartmentVolumeRule it is 'compartment', etc.)  In SBML Levels&nbsp;2
29779        and&nbsp;3, the only two types of Rule objects with a left-hand side
29780        object reference are AssignmentRule and RateRule, and both of them use the
29781        same name for attribute: 'variable'.  In order to make it easier for
29782        application developers to work with all Levels of SBML, libSBML uses a
29783        uniform name for all such attributes, and it is 'variable', regardless of
29784        whether Level&nbsp;1 rules or Level&nbsp;2&ndash;3 rules are being used.
29785
29786        The 'variable' attribute of a Rule indicates the element which
29787        the results of the 'math' are to be applied.  An AlgebraicRule has
29788        no 'variable', and will always return an empty string.
29789
29790        @return the identifier string stored as the 'variable' attribute value
29791        in this Rule, or @c None if this object is an AlgebraicRule object, or if
29792        the attribute is unset.
29793
29794        """
29795        return _libsbml.Rule_getVariable(self)
29796
29797    def getUnits(self):
29798        r"""
29799        getUnits(Rule self) -> string
29800
29801        Returns the units for the
29802        mathematical formula of this Rule.
29803
29804        @return the identifier of the units for the expression of this Rule.
29805
29806        @note The attribute 'units' exists on SBML Level&nbsp;1 ParameterRule
29807        objects only.  It is not present in SBML Levels&nbsp;2 and&nbsp;3.
29808
29809        """
29810        return _libsbml.Rule_getUnits(self)
29811
29812    def isSetFormula(self):
29813        r"""
29814        isSetFormula(Rule self) -> bool
29815
29816        Predicate returning @c True if this Rule's mathematical expression is
29817        set.
29818
29819        This method is equivalent to isSetMath().  This version is present for
29820        easier compatibility with SBML Level&nbsp;1, in which mathematical
29821        formulas were written in text-string form.
29822
29823        @return @c True if the mathematical formula for this Rule is
29824        set, @c False otherwise.
29825
29826        @note The attribute 'formula' is specific to SBML Level&nbsp;1; in
29827        higher Levels of SBML, it has been replaced with a subelement named
29828        'math'.  However, libSBML provides a unified interface to the
29829        underlying math expression and this method can be used for models
29830        of all Levels of SBML.
29831
29832        @see isSetMath()
29833
29834        """
29835        return _libsbml.Rule_isSetFormula(self)
29836
29837    def isSetMath(self):
29838        r"""
29839        isSetMath(Rule self) -> bool
29840
29841        Predicate returning @c True if this Rule's mathematical expression is
29842        set.
29843
29844        This method is equivalent to isSetFormula().
29845
29846        @return @c True if the formula (or equivalently the math) for this
29847        Rule is set, @c False otherwise.
29848
29849        @note The subelement 'math' is present in SBML Levels&nbsp;2
29850        and&nbsp;3.  In SBML Level&nbsp;1, the equivalent construct is the
29851        attribute named 'formula'.  LibSBML provides a unified interface to
29852        the underlying math expression and this method can be used for models
29853        of all Levels of SBML.
29854
29855        @see isSetFormula()
29856
29857        """
29858        return _libsbml.Rule_isSetMath(self)
29859
29860    def isSetVariable(self):
29861        r"""
29862        isSetVariable(Rule self) -> bool
29863
29864        Predicate returning @c True if this Rule's 'variable' attribute is set.
29865
29866        @par
29867        In SBML Level&nbsp;1, the different rule types each have a different
29868        name for the attribute holding the reference to the object constituting
29869        the left-hand side of the rule.  (E.g., for SBML Level&nbsp;1's
29870        SpeciesConcentrationRule the attribute is 'species', for
29871        CompartmentVolumeRule it is 'compartment', etc.)  In SBML Levels&nbsp;2
29872        and&nbsp;3, the only two types of Rule objects with a left-hand side
29873        object reference are AssignmentRule and RateRule, and both of them use the
29874        same name for attribute: 'variable'.  In order to make it easier for
29875        application developers to work with all Levels of SBML, libSBML uses a
29876        uniform name for all such attributes, and it is 'variable', regardless of
29877        whether Level&nbsp;1 rules or Level&nbsp;2&ndash;3 rules are being used.
29878
29879        @return @c True if the 'variable' attribute value of this Rule is
29880        set, @c False otherwise.
29881
29882        """
29883        return _libsbml.Rule_isSetVariable(self)
29884
29885    def isSetUnits(self):
29886        r"""
29887        isSetUnits(Rule self) -> bool
29888
29889        Predicate returning @c True if this Rule's 'units' attribute is set.
29890
29891        @return @c True if the units for this Rule is set, @c False
29892        otherwise.
29893
29894        @note The attribute 'units' exists on SBML Level&nbsp;1 ParameterRule
29895        objects only.  It is not present in SBML Levels&nbsp;2 and&nbsp;3.
29896
29897        """
29898        return _libsbml.Rule_isSetUnits(self)
29899
29900    def setFormula(self, formula):
29901        r"""
29902        setFormula(Rule self, string formula) -> int
29903
29904        Sets the 'math' subelement of this Rule to an expression in text-string
29905        form.
29906
29907        This is equivalent to setMath(ASTNode math).  The provision of
29908        using text-string formulas is retained for easier SBML Level&nbsp;1
29909        compatibility.  The formula is converted to an ASTNode internally.
29910
29911        @param formula a mathematical formula in text-string form.
29912
29913        @return integer value indicating success/failure of the
29914        function.  @if clike The value is drawn from the
29915        enumeration #OperationReturnValues_t. @endif@~ The possible values
29916        returned by this function are:
29917        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
29918        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
29919
29920        @note The attribute 'formula' is specific to SBML Level&nbsp;1; in
29921        higher Levels of SBML, it has been replaced with a subelement named
29922        'math'.  However, libSBML provides a unified interface to the
29923        underlying math expression and this method can be used for models
29924        of all Levels of SBML.
29925
29926        @see setMath()
29927
29928        """
29929        return _libsbml.Rule_setFormula(self, formula)
29930
29931    def setMath(self, math):
29932        r"""
29933        setMath(Rule self, ASTNode math) -> int
29934
29935        Sets the 'math' subelement of this Rule to a copy of the given
29936        ASTNode.
29937
29938        @param math the AST structure of the mathematical formula.
29939
29940        @return integer value indicating success/failure of the
29941        function.  @if clike The value is drawn from the
29942        enumeration #OperationReturnValues_t. @endif@~ The possible values
29943        returned by this function are:
29944        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
29945        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
29946
29947        @note The subelement 'math' is present in SBML Levels&nbsp;2
29948        and&nbsp;3.  In SBML Level&nbsp;1, the equivalent construct is the
29949        attribute named 'formula'.  LibSBML provides a unified interface to
29950        the underlying math expression and this method can be used for models
29951        of all Levels of SBML.
29952
29953        @see setFormula()
29954
29955        """
29956        return _libsbml.Rule_setMath(self, math)
29957
29958    def setVariable(self, sid):
29959        r"""
29960        setVariable(Rule self, string sid) -> int
29961
29962        Sets the 'variable' attribute value of this Rule object.
29963
29964        @par
29965        In SBML Level&nbsp;1, the different rule types each have a different
29966        name for the attribute holding the reference to the object constituting
29967        the left-hand side of the rule.  (E.g., for SBML Level&nbsp;1's
29968        SpeciesConcentrationRule the attribute is 'species', for
29969        CompartmentVolumeRule it is 'compartment', etc.)  In SBML Levels&nbsp;2
29970        and&nbsp;3, the only two types of Rule objects with a left-hand side
29971        object reference are AssignmentRule and RateRule, and both of them use the
29972        same name for attribute: 'variable'.  In order to make it easier for
29973        application developers to work with all Levels of SBML, libSBML uses a
29974        uniform name for all such attributes, and it is 'variable', regardless of
29975        whether Level&nbsp;1 rules or Level&nbsp;2&ndash;3 rules are being used.
29976
29977        @param sid the identifier of a Compartment, Species or Parameter
29978        elsewhere in the enclosing Model object.
29979
29980        @return integer value indicating success/failure of the
29981        function.  @if clike The value is drawn from the
29982        enumeration #OperationReturnValues_t. @endif@~ The possible values
29983        returned by this function are:
29984        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
29985        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
29986        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
29987
29988        """
29989        return _libsbml.Rule_setVariable(self, sid)
29990
29991    def setUnits(self, sname):
29992        r"""
29993        setUnits(Rule self, string sname) -> int
29994
29995        Sets the units for this Rule.
29996
29997        @param sname the identifier of the units.
29998
29999        @return integer value indicating success/failure of the
30000        function.  @if clike The value is drawn from the
30001        enumeration #OperationReturnValues_t. @endif@~ The possible values
30002        returned by this function are:
30003        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
30004        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
30005        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
30006
30007        @note The attribute 'units' exists on SBML Level&nbsp;1 ParameterRule
30008        objects only.  It is not present in SBML Levels&nbsp;2 and&nbsp;3.
30009
30010        """
30011        return _libsbml.Rule_setUnits(self, sname)
30012
30013    def unsetVariable(self):
30014        r"""
30015        unsetVariable(Rule self) -> int
30016
30017        Unsets the value of the 'variable' attribute of this Rule object.
30018
30019        @return integer value indicating success/failure of the
30020        function.  @if clike The value is drawn from the
30021        enumeration #OperationReturnValues_t. @endif@~ The possible values
30022        returned by this function are:
30023        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
30024        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
30025        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
30026
30027        @see setVariable()
30028        @see isSetVariable()
30029        @see getVariable()
30030
30031        """
30032        return _libsbml.Rule_unsetVariable(self)
30033
30034    def unsetUnits(self):
30035        r"""
30036        unsetUnits(Rule self) -> int
30037
30038        Unsets the 'units' for this Rule.
30039
30040        @return integer value indicating success/failure of the
30041        function.  @if clike The value is drawn from the
30042        enumeration #OperationReturnValues_t. @endif@~ The possible values
30043        returned by this function are:
30044        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
30045        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
30046        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
30047
30048        @note The attribute 'units' exists on SBML Level&nbsp;1 ParameterRule
30049        objects only.  It is not present in SBML Levels&nbsp;2 and&nbsp;3.
30050
30051        """
30052        return _libsbml.Rule_unsetUnits(self)
30053
30054    def getDerivedUnitDefinition(self, *args):
30055        r"""
30056        getDerivedUnitDefinition(Rule self) -> UnitDefinition
30057        getDerivedUnitDefinition(Rule self) -> UnitDefinition
30058
30059        Calculates and returns a UnitDefinition that expresses the units of
30060        measurement assumed for the 'math' expression of this Rule.
30061
30062        @par
30063        The units are calculated based on the mathematical expression in the
30064        Rule and the model quantities referenced by <code>&lt;ci&gt;</code>
30065        elements used within that expression.  The method
30066        Rule.getDerivedUnitDefinition() returns the calculated units, to the
30067        extent that libSBML can compute them.
30068
30069        @note The functionality that facilitates unit analysis depends on the
30070        model as a whole.  Thus, in cases where the object has not been added to
30071        a model or the model itself is incomplete, unit analysis is not possible
30072        and this method will return @c None.
30073
30074        @warning <span class='warning'>Note that it is possible the 'math'
30075        expression in the Rule contains pure numbers or parameters with undeclared
30076        units.  In those cases, it is not possible to calculate the units of the
30077        overall expression without making assumptions.  LibSBML does not make
30078        assumptions about the units, and Rule.getDerivedUnitDefinition() only
30079        returns the units as far as it is able to determine them.  For example, in
30080        an expression <em>X + Y</em>, if <em>X</em> has unambiguously-defined
30081        units and <em>Y</em> does not, it will return the units of <em>X</em>.
30082        <strong>It is important that callers also invoke the method</strong>
30083        Rule.containsUndeclaredUnits() <strong>to determine whether this
30084        situation holds</strong>.  Callers may wish to take suitable actions in
30085        those scenarios.</span>
30086
30087        @return a UnitDefinition that expresses the units of the math
30088        expression of this Rule, or @c None if one cannot be constructed.
30089
30090        @see containsUndeclaredUnits()
30091
30092        """
30093        return _libsbml.Rule_getDerivedUnitDefinition(self, *args)
30094
30095    def containsUndeclaredUnits(self, *args):
30096        r"""
30097        containsUndeclaredUnits(Rule self) -> bool
30098        containsUndeclaredUnits(Rule self) -> bool
30099
30100        Predicate returning @c True if the math expression of this Rule contains
30101        parameters/numbers with undeclared units.
30102
30103        @return @c True if the math expression of this Rule includes
30104        parameters/numbers with undeclared units, @c False otherwise.
30105
30106        @note A return value of @c True indicates that the UnitDefinition
30107        returned by getDerivedUnitDefinition() may not accurately represent
30108        the units of the expression.
30109
30110        @see getDerivedUnitDefinition()
30111
30112        """
30113        return _libsbml.Rule_containsUndeclaredUnits(self, *args)
30114
30115    def getType(self):
30116        r"""
30117        getType(Rule self) -> RuleType_t
30118
30119        Returns a code representing the type of rule this is.
30120
30121        @return the rule type, which will be one of the following three possible
30122        values:
30123        @li @link libsbml#RULE_TYPE_RATE RULE_TYPE_RATE@endlink
30124        @li @link libsbml#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink
30125        @li @link libsbml#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink
30126
30127        @note The attribute 'type' on Rule objects is present only in SBML
30128        Level&nbsp;1.  In SBML Level&nbsp;2 and later, the type has been
30129        replaced by subclassing the Rule object.
30130
30131        """
30132        return _libsbml.Rule_getType(self)
30133
30134    def isAlgebraic(self):
30135        r"""
30136        isAlgebraic(Rule self) -> bool
30137
30138        Predicate returning @c True if this Rule is an AlgebraicRule.
30139
30140        @return @c True if this Rule is an AlgebraicRule, @c False otherwise.
30141
30142        """
30143        return _libsbml.Rule_isAlgebraic(self)
30144
30145    def isAssignment(self):
30146        r"""
30147        isAssignment(Rule self) -> bool
30148
30149        Predicate returning @c True if this Rule is an AssignmentRule.
30150
30151        @return @c True if this Rule is an AssignmentRule, @c False otherwise.
30152
30153        """
30154        return _libsbml.Rule_isAssignment(self)
30155
30156    def isCompartmentVolume(self):
30157        r"""
30158        isCompartmentVolume(Rule self) -> bool
30159
30160        Predicate returning @c True if this Rule is an CompartmentVolumeRule
30161        or equivalent.
30162
30163        This libSBML method works for SBML Level&nbsp;1 models (where there is
30164        such a thing as an explicit CompartmentVolumeRule), as well as other Levels of
30165        SBML.  For Levels above Level&nbsp;1, this method checks the symbol
30166        being affected by the rule, and returns @c True if the symbol is the
30167        identifier of a Compartment object defined in the model.
30168
30169        @return @c True if this Rule is a CompartmentVolumeRule, @c False
30170        otherwise.
30171
30172        """
30173        return _libsbml.Rule_isCompartmentVolume(self)
30174
30175    def isParameter(self):
30176        r"""
30177        isParameter(Rule self) -> bool
30178
30179        Predicate returning @c True if this Rule is an ParameterRule or
30180        equivalent.
30181
30182        This libSBML method works for SBML Level&nbsp;1 models (where there is
30183        such a thing as an explicit ParameterRule), as well as other Levels of
30184        SBML.  For Levels above Level&nbsp;1, this method checks the symbol
30185        being affected by the rule, and returns @c True if the symbol is the
30186        identifier of a Parameter object defined in the model.
30187
30188        @return @c True if this Rule is a ParameterRule, @c False
30189        otherwise.
30190
30191        """
30192        return _libsbml.Rule_isParameter(self)
30193
30194    def isRate(self):
30195        r"""
30196        isRate(Rule self) -> bool
30197
30198        Predicate returning @c True if this Rule is a RateRule (SBML
30199        Levels&nbsp;2&ndash;3) or has a 'type' attribute value of @c 'rate'
30200        (SBML Level&nbsp;1).
30201
30202        @return @c True if this Rule is a RateRule (Level&nbsp;2) or has
30203        type 'rate' (Level&nbsp;1), @c False otherwise.
30204
30205        """
30206        return _libsbml.Rule_isRate(self)
30207
30208    def isScalar(self):
30209        r"""
30210        isScalar(Rule self) -> bool
30211
30212        Predicate returning @c True if this Rule is an AssignmentRule (SBML
30213        Levels&nbsp;2&ndash;3) or has a 'type' attribute value of @c 'scalar'
30214        (SBML Level&nbsp;1).
30215
30216        @return @c True if this Rule is an AssignmentRule (Level&nbsp;2) or has
30217        type 'scalar' (Level&nbsp;1), @c False otherwise.
30218
30219        """
30220        return _libsbml.Rule_isScalar(self)
30221
30222    def isSpeciesConcentration(self):
30223        r"""
30224        isSpeciesConcentration(Rule self) -> bool
30225
30226        Predicate returning @c True if this Rule is a SpeciesConcentrationRule
30227        or equivalent.
30228
30229        This libSBML method works for SBML Level&nbsp;1 models (where there is
30230        such a thing as an explicit SpeciesConcentrationRule), as well as
30231        other Levels of SBML.  For Levels above Level&nbsp;1, this method
30232        checks the symbol being affected by the rule, and returns @c True if
30233        the symbol is the identifier of a Species object defined in the model.
30234
30235        @return @c True if this Rule is a SpeciesConcentrationRule, @c False
30236        otherwise.
30237
30238        """
30239        return _libsbml.Rule_isSpeciesConcentration(self)
30240
30241    def getTypeCode(self):
30242        r"""
30243        getTypeCode(Rule self) -> int
30244
30245        Returns the libSBML type code for this %SBML object.
30246
30247        @par
30248        LibSBML attaches an identifying code to every kind of SBML object.  These
30249        are integer constants known as <em>SBML type codes</em>.  The names of all
30250        the codes begin with the characters <code>SBML_</code>.
30251        @if clike The set of possible type codes for core elements is defined in
30252        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
30253        SBML Level&nbsp;3 packages define their own extra enumerations of type
30254        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
30255        package).@endif@if java In the Java language interface for libSBML, the
30256        type codes are defined as static integer constants in the interface class
30257        {@link libsbmlConstants}.  @endif@if python In the Python language
30258        interface for libSBML, the type codes are defined as static integer
30259        constants in the interface class @link libsbml@endlink.@endif@if csharp In
30260        the C# language interface for libSBML, the type codes are defined as
30261        static integer constants in the interface class
30262        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
30263        package plug-ins may use overlapping type codes; to identify the package
30264        to which a given object belongs, call the
30265        <code>@if conly SBase_getPackageName()
30266        @else SBase.getPackageName()
30267        @endif</code>
30268        method on the object.
30269
30270        The exception to this is lists:  all SBML-style list elements have the type
30271        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
30272        are from.
30273
30274        @return the SBML type code for this object, either
30275        @link libsbml#SBML_ASSIGNMENT_RULE SBML_ASSIGNMENT_RULE@endlink,
30276        @link libsbml#SBML_RATE_RULE SBML_RATE_RULE@endlink, or
30277        @link libsbml#SBML_ALGEBRAIC_RULE SBML_ALGEBRAIC_RULE@endlink
30278        for %SBML Core.
30279
30280        @warning <span class='warning'>The specific integer values of the possible
30281        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
30282        packages,  To fully identify the correct code, <strong>it is necessary to
30283        invoke both getPackageName() and getTypeCode()</strong> (or
30284        ListOf.getItemTypeCode()).</span>
30285
30286        @see getElementName()
30287        @see getPackageName()
30288
30289        """
30290        return _libsbml.Rule_getTypeCode(self)
30291
30292    def getL1TypeCode(self):
30293        r"""
30294        getL1TypeCode(Rule self) -> int
30295
30296        Returns the SBML Level&nbsp;1 type code for this Rule object.
30297
30298        This method only applies to SBML Level&nbsp;1 model objects.  If this is
30299        not an SBML Level&nbsp;1 rule object, this method will return
30300        @link libsbml#SBML_UNKNOWN SBML_UNKNOWN@endlink.
30301
30302        @return the SBML Level&nbsp;1 type code for this Rule (namely,
30303        @link libsbml#SBML_COMPARTMENT_VOLUME_RULE SBML_COMPARTMENT_VOLUME_RULE@endlink,
30304        @link libsbml#SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink,
30305        @link libsbml#SBML_SPECIES_CONCENTRATION_RULE SBML_SPECIES_CONCENTRATION_RULE@endlink, or
30306        @link libsbml#SBML_UNKNOWN SBML_UNKNOWN@endlink).
30307
30308        """
30309        return _libsbml.Rule_getL1TypeCode(self)
30310
30311    def getElementName(self):
30312        r"""
30313        getElementName(Rule self) -> string
30314
30315        Returns the XML element name of this object.
30316
30317        The returned value can be any of a number of different strings,
30318        depending on the SBML Level in use and the kind of Rule object this
30319        is.  The rules as of libSBML version @htmlinclude libsbml-version.html
30320        are the following:
30321        <ul>
30322        <li> (Level&nbsp;2 and&nbsp;3) RateRule: returns @c 'rateRule'
30323        <li> (Level&nbsp;2 and&nbsp;3) AssignmentRule: returns @c 'assignmentRule'
30324        <li> (Level&nbsp;2 and&nbsp;3) AlgebraicRule: returns @c 'algebraicRule'
30325        <li> (Level&nbsp;1 Version&nbsp;1) SpecieConcentrationRule: returns @c 'specieConcentrationRule'
30326        <li> (Level&nbsp;1 Version&nbsp;2) SpeciesConcentrationRule: returns @c 'speciesConcentrationRule'
30327        <li> (Level&nbsp;1) CompartmentVolumeRule: returns @c 'compartmentVolumeRule'
30328        <li> (Level&nbsp;1) ParameterRule: returns @c 'parameterRule'
30329        <li> Unknown rule type: returns @c 'unknownRule'
30330        </ul>
30331
30332        Beware that the last (@c 'unknownRule') is not a valid SBML element
30333        name.
30334
30335        @return the name of this element.
30336
30337        """
30338        return _libsbml.Rule_getElementName(self)
30339
30340    def setL1TypeCode(self, type):
30341        r"""
30342        setL1TypeCode(Rule self, int type) -> int
30343
30344        Sets the SBML Level&nbsp;1 type code for this Rule.
30345
30346        @param type the SBML Level&nbsp;1 type code for this Rule. The allowable
30347        values are @link libsbml#SBML_COMPARTMENT_VOLUME_RULE SBML_COMPARTMENT_VOLUME_RULE@endlink,
30348        @link libsbml#SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink, and
30349        @link libsbml#SBML_SPECIES_CONCENTRATION_RULE SBML_SPECIES_CONCENTRATION_RULE@endlink.
30350
30351        @return integer value indicating success/failure of the
30352        function.  @if clike The value is drawn from the
30353        enumeration #OperationReturnValues_t. @endif@~ The possible values
30354        returned by this function are:
30355        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
30356        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
30357        if given @p type value is not one of the above.
30358
30359        """
30360        return _libsbml.Rule_setL1TypeCode(self, type)
30361
30362    def hasRequiredElements(self):
30363        r"""
30364        hasRequiredElements(Rule self) -> bool
30365
30366        Predicate returning @c True if all the required elements for this Rule
30367        object have been set.
30368
30369        The only required element for a Rule object is the 'math' subelement in
30370        SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.  In SBML Level&nbsp;3
30371        Version&nbsp;2+, it is no longer required.
30372
30373        @return a boolean value indicating whether all the required
30374        elements for this object have been defined.
30375
30376        """
30377        return _libsbml.Rule_hasRequiredElements(self)
30378
30379    def hasRequiredAttributes(self):
30380        r"""
30381        hasRequiredAttributes(Rule self) -> bool
30382
30383        Predicate returning @c True if all the required attributes for this Rule
30384        object have been set.
30385
30386        The required attributes for a Rule object depend on the type of Rule
30387        it is.  For AssignmentRule and RateRule objects (and SBML
30388        Level&nbsp;1's SpeciesConcentrationRule, CompartmentVolumeRule, and
30389        ParameterRule objects), the required attribute is 'variable'; for
30390        AlgebraicRule objects, there is no required attribute.
30391
30392        @return @c True if the required attributes have been set, @c False
30393        otherwise.
30394
30395        """
30396        return _libsbml.Rule_hasRequiredAttributes(self)
30397
30398    def renameSIdRefs(self, oldid, newid):
30399        r"""
30400        renameSIdRefs(Rule self, string oldid, string newid)
30401
30402        Replaces all uses of a given @c SIdRef type attribute value with another
30403        value.
30404
30405        @par
30406        In SBML, object identifiers are of a data type called <code>SId</code>.
30407        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
30408        introduced for attribute values that refer to <code>SId</code> values; in
30409        previous Levels of SBML, this data type did not exist and attributes were
30410        simply described to as 'referring to an identifier', but the effective
30411        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
30412        other methods of libSBML refer to the type <code>SIdRef</code> for all
30413        Levels of SBML, even if the corresponding SBML specification did not
30414        explicitly name the data type.
30415
30416        This method works by looking at all attributes and (if appropriate)
30417        mathematical formulas in MathML content, comparing the referenced
30418        identifiers to the value of @p oldid.  If any matches are found, the
30419        matching values are replaced with @p newid.  The method does @em not
30420        descend into child elements.
30421
30422        @param oldid the old identifier.
30423        @param newid the new identifier.
30424
30425        """
30426        return _libsbml.Rule_renameSIdRefs(self, oldid, newid)
30427
30428    def renameUnitSIdRefs(self, oldid, newid):
30429        r"""
30430        renameUnitSIdRefs(Rule self, string oldid, string newid)
30431
30432        Replaces all uses of a given @c UnitSIdRef type attribute value with
30433        another value.
30434
30435        @par
30436        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
30437        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
30438        introduced for attribute values that refer to <code>UnitSId</code> values; in
30439        previous Levels of SBML, this data type did not exist and attributes were
30440        simply described to as 'referring to a unit identifier', but the effective
30441        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
30442        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
30443        Levels of SBML, even if the corresponding SBML specification did not
30444        explicitly name the data type.
30445
30446        This method works by looking at all unit identifier attribute values
30447        (including, if appropriate, inside mathematical formulas), comparing the
30448        referenced unit identifiers to the value of @p oldid.  If any matches
30449        are found, the matching values are replaced with @p newid.  The method
30450        does @em not descend into child elements.
30451
30452        @param oldid the old identifier.
30453        @param newid the new identifier.
30454
30455        """
30456        return _libsbml.Rule_renameUnitSIdRefs(self, oldid, newid)
30457
30458    def getId(self):
30459        r"""
30460        getId(Rule self) -> string
30461
30462        Returns the value of the 'variable' attribute of this Rule (NOT the 'id').
30463
30464        @note Because of the inconsistent behavior of this function with
30465        respect to assignments and rules, it is now recommended to
30466        use the getIdAttribute() or the getVariable() function instead.
30467
30468        The 'variable' attribute of a Rule indicates the element which
30469        the results of the 'math' are to be applied.  An AlgebraicRule has
30470        no 'variable', and will always return an empty string.
30471
30472        @return the variable of this Rule.
30473
30474        @see getIdAttribute()
30475        @see setIdAttribute()
30476        @see isSetIdAttribute()
30477        @see unsetIdAttribute()
30478        @see getVariable()
30479
30480        """
30481        return _libsbml.Rule_getId(self)
30482
30483    def replaceSIDWithFunction(self, id, function):
30484        r"""
30485        replaceSIDWithFunction(Rule self, string id, ASTNode function)
30486
30487        @internal
30488
30489        @internal
30490
30491        """
30492        return _libsbml.Rule_replaceSIDWithFunction(self, id, function)
30493
30494    def divideAssignmentsToSIdByFunction(self, id, function):
30495        r"""
30496        divideAssignmentsToSIdByFunction(Rule self, string id, ASTNode function)
30497
30498        @internal
30499
30500        @internal
30501
30502        """
30503        return _libsbml.Rule_divideAssignmentsToSIdByFunction(self, id, function)
30504
30505    def multiplyAssignmentsToSIdByFunction(self, id, function):
30506        r"""
30507        multiplyAssignmentsToSIdByFunction(Rule self, string id, ASTNode function)
30508
30509        @internal
30510
30511        @internal
30512
30513        """
30514        return _libsbml.Rule_multiplyAssignmentsToSIdByFunction(self, id, function)
30515
30516# Register Rule in _libsbml:
30517_libsbml.Rule_swigregister(Rule)
30518
30519class ListOfRules(ListOf):
30520    r"""
30521
30522    @sbmlpackage{core}
30523
30524    @htmlinclude pkg-marker-core.html A list of Rule objects.
30525
30526    @par
30527    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
30528    are merely containers used for organizing the main components of an SBML
30529    model.  In libSBML's implementation, ListOf___
30530    @if conly data structures @else classes@endif@~ are derived from the
30531    intermediate utility @if conly structure @else class@endif@~ ListOf, which
30532    is not defined by the SBML specifications but serves as a useful
30533    programmatic construct.  ListOf is itself is in turn derived from SBase,
30534    which provides all of the various ListOf___
30535    @if conly data structures @else classes@endif@~ with common features
30536    defined by the SBML specification, such as 'metaid' attributes and
30537    annotations.
30538
30539    The relationship between the lists and the rest of an SBML model is
30540    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
30541
30542    @htmlinclude listof-illustration.html
30543
30544    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
30545    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
30546    Version&nbsp;2 allows
30547    containers to contain zero or more of the relevant object, instead of
30548    requiring at least one.  As such, libsbml will write out an
30549    otherwise-empty ListOf___ element that has any optional attribute set
30550    (such as 'id' or 'metaid'), that has an optional child (such
30551    as a 'notes' or 'annotation'), or that has attributes or children set
30552    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
30553    any other children.
30554
30555    Readers may wonder about the motivations for using the ListOf___
30556    containers in SBML.  A simpler approach in XML might be to place the
30557    components all directly at the top level of the model definition.  The
30558    choice made in SBML is to group them within XML elements named after
30559    %ListOf<em>Classname</em>, in part because it helps organize the
30560    components.  More importantly, the fact that the container classes are
30561    derived from SBase means that software tools can add information @em about
30562    the lists themselves into each list container's 'annotation'.
30563
30564    @see ListOfFunctionDefinitions
30565    @see ListOfUnitDefinitions
30566    @see ListOfCompartmentTypes
30567    @see ListOfSpeciesTypes
30568    @see ListOfCompartments
30569    @see ListOfSpecies
30570    @see ListOfParameters
30571    @see ListOfInitialAssignments
30572    @see ListOfRules
30573    @see ListOfConstraints
30574    @see ListOfReactions
30575    @see ListOfEvents
30576
30577    @if conly
30578    @note In the C API for libSBML, functions that in other language APIs
30579    would be inherited by the various ListOf___ structures not shown in the
30580    pages for the individual ListOf___'s.  Instead, the functions are defined
30581    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
30582    the many common functions available for manipulating ListOf___
30583    structures</strong>.  The documentation for the individual ListOf___
30584    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
30585    all of the functionality available. @endif@~
30586
30587    """
30588
30589    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
30590    __repr__ = _swig_repr
30591
30592    def __init__(self, *args):
30593        r"""
30594        __init__(ListOfRules self, unsigned int level, unsigned int version) -> ListOfRules
30595        __init__(ListOfRules self, SBMLNamespaces sbmlns) -> ListOfRules
30596
30597        This method has multiple variants; they differ in the arguments
30598         they accept.  Each variant is described separately below.
30599
30600        @par
30601        <hr>
30602        <span class='variant-sig-heading'>Method variant with the following signature</span>:
30603         <pre class='signature'>ListOfRules(SBMLNamespaces sbmlns)</pre>
30604
30605        Creates a new ListOfRules object.
30606
30607        The object is constructed such that it is valid for the SBML Level and
30608        Version combination determined by the SBMLNamespaces object in @p
30609        sbmlns.
30610
30611        @param sbmlns an SBMLNamespaces object that is used to determine the
30612        characteristics of the ListOfRules object to be created.
30613
30614        @throws SBMLConstructorException
30615        Thrown if the given @p sbmlns is inconsistent or incompatible
30616        with this object.
30617
30618        @note Attempting to add an object to an SBMLDocument having a different
30619        combination of SBML Level, Version and XML namespaces than the object
30620        itself will result in an error at the time a caller attempts to make the
30621        addition.  A parent object must have compatible Level, Version and XML
30622        namespaces.  (Strictly speaking, a parent may also have more XML
30623        namespaces than a child, but the reverse is not permitted.)  The
30624        restriction is necessary to ensure that an SBML model has a consistent
30625        overall structure.  This requires callers to manage their objects
30626        carefully, but the benefit is increased flexibility in how models can be
30627        created by permitting callers to create objects bottom-up if desired.  In
30628        situations where objects are not yet attached to parents (e.g.,
30629        SBMLDocument), knowledge of the intented SBML Level and Version help
30630        libSBML determine such things as whether it is valid to assign a
30631        particular value to an attribute.
30632
30633
30634        @par
30635        <hr>
30636        <span class='variant-sig-heading'>Method variant with the following signature</span>:
30637         <pre class='signature'>ListOfRules(long level, long version)</pre>
30638
30639        Creates a new ListOfRules object.
30640
30641        The object is constructed such that it is valid for the given SBML
30642        Level and Version combination.
30643
30644        @param level the SBML Level.
30645
30646        @param version the Version within the SBML Level.
30647
30648        @throws SBMLConstructorException
30649        Thrown if the given @p level and @p version combination are invalid
30650        or if this object is incompatible with the given level and version.
30651
30652        @note Attempting to add an object to an SBMLDocument having a different
30653        combination of SBML Level, Version and XML namespaces than the object
30654        itself will result in an error at the time a caller attempts to make the
30655        addition.  A parent object must have compatible Level, Version and XML
30656        namespaces.  (Strictly speaking, a parent may also have more XML
30657        namespaces than a child, but the reverse is not permitted.)  The
30658        restriction is necessary to ensure that an SBML model has a consistent
30659        overall structure.  This requires callers to manage their objects
30660        carefully, but the benefit is increased flexibility in how models can be
30661        created by permitting callers to create objects bottom-up if desired.  In
30662        situations where objects are not yet attached to parents (e.g.,
30663        SBMLDocument), knowledge of the intented SBML Level and Version help
30664        libSBML determine such things as whether it is valid to assign a
30665        particular value to an attribute.
30666
30667        """
30668        _libsbml.ListOfRules_swiginit(self, _libsbml.new_ListOfRules(*args))
30669
30670    def clone(self):
30671        r"""
30672        clone(ListOfRules self) -> ListOfRules
30673
30674        Creates and returns a deep copy of this ListOfRules object.
30675
30676        @return the (deep) copy of this ListOfRules object.
30677
30678        """
30679        return _libsbml.ListOfRules_clone(self)
30680
30681    def getItemTypeCode(self):
30682        r"""
30683        getItemTypeCode(ListOfRules self) -> int
30684
30685        Returns the libSBML type code for the objects contained in this ListOf
30686        (i.e., Rule objects, if the list is non-empty).
30687
30688        @par
30689        LibSBML attaches an identifying code to every kind of SBML object.  These
30690        are integer constants known as <em>SBML type codes</em>.  The names of all
30691        the codes begin with the characters <code>SBML_</code>.
30692        @if clike The set of possible type codes for core elements is defined in
30693        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
30694        SBML Level&nbsp;3 packages define their own extra enumerations of type
30695        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
30696        package).@endif@if java In the Java language interface for libSBML, the
30697        type codes are defined as static integer constants in the interface class
30698        {@link libsbmlConstants}.  @endif@if python In the Python language
30699        interface for libSBML, the type codes are defined as static integer
30700        constants in the interface class @link libsbml@endlink.@endif@if csharp In
30701        the C# language interface for libSBML, the type codes are defined as
30702        static integer constants in the interface class
30703        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
30704        package plug-ins may use overlapping type codes; to identify the package
30705        to which a given object belongs, call the
30706        <code>@if conly SBase_getPackageName()
30707        @else SBase.getPackageName()
30708        @endif</code>
30709        method on the object.
30710
30711        The exception to this is lists:  all SBML-style list elements have the type
30712        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
30713        are from.
30714
30715        @return the SBML type code for objects contained in this list:
30716        @link libsbml#SBML_RULE SBML_RULE@endlink (default).
30717
30718        @see getElementName()
30719        @see getPackageName()
30720
30721        """
30722        return _libsbml.ListOfRules_getItemTypeCode(self)
30723
30724    def getElementName(self):
30725        r"""
30726        getElementName(ListOfRules self) -> string
30727
30728        Returns the XML element name of this object.
30729
30730        For ListOfRules, the XML element name is @c 'listOfRules'.
30731
30732        @return the name of this element, i.e., @c 'listOfRules'.
30733
30734        """
30735        return _libsbml.ListOfRules_getElementName(self)
30736
30737    def get(self, *args):
30738        r"""
30739        get(ListOfRules self, unsigned int n) -> Rule
30740        get(ListOfRules self, unsigned int n) -> Rule
30741        get(ListOfRules self, string sid) -> Rule
30742        get(ListOfRules self, string sid) -> Rule
30743
30744        This method has multiple variants; they differ in the arguments
30745         they accept.  Each variant is described separately below.
30746
30747        @par
30748        <hr>
30749        <span class='variant-sig-heading'>Method variant with the following signature</span>:
30750         <pre class='signature'>get(long n)</pre>
30751
30752        Get a Rule from the ListOfRules.
30753
30754        @param n the index number of the Rule to get.
30755
30756        @return the nth Rule in this ListOfRules.
30757        If the index @p n is invalid, @c None is returned.
30758
30759        @see size()
30760
30761
30762        @par
30763        <hr>
30764        <span class='variant-sig-heading'>Method variant with the following signature</span>:
30765         <pre class='signature'>get(string sid)</pre>
30766
30767        Get a Rule from the ListOfRules based on its identifier.
30768
30769        @param sid a string representing the identifier of the Rule to get.
30770
30771        @return Rule in this ListOfRules with the given @p sid or @c None if no
30772        such Rule exists.
30773
30774        @see get()
30775        @see size()
30776
30777        """
30778        return _libsbml.ListOfRules_get(self, *args)
30779
30780    def getElementBySId(self, id):
30781        r"""
30782        getElementBySId(ListOfRules self, string id) -> SBase
30783
30784        Returns the first child element found that has the given @p id in the
30785        model-wide SId namespace, or @c None if no such object is found.
30786
30787        Note that AssignmentRules and RateRules do not actually have IDs, but
30788        the libsbml interface pretends that they do: no assignment rule or rate
30789        rule is returned by this function.
30790
30791        @param id string representing the id of the object to find.
30792
30793        @return pointer to the first element found with the given @p id.
30794
30795        """
30796        return _libsbml.ListOfRules_getElementBySId(self, id)
30797
30798    def remove(self, *args):
30799        r"""
30800        remove(ListOfRules self, unsigned int n) -> Rule
30801        remove(ListOfRules self, string sid) -> Rule
30802
30803        This method has multiple variants; they differ in the arguments
30804         they accept.  Each variant is described separately below.
30805
30806        @par
30807        <hr>
30808        <span class='variant-sig-heading'>Method variant with the following signature</span>:
30809         <pre class='signature'>remove(long n)</pre>
30810
30811        Removes the nth item from this ListOfRules items and returns a pointer to
30812        it.
30813
30814        The caller owns the returned item and is responsible for deleting it.
30815
30816        @param n the index of the item to remove.
30817
30818        @see size()
30819
30820
30821        @par
30822        <hr>
30823        <span class='variant-sig-heading'>Method variant with the following signature</span>:
30824         <pre class='signature'>remove(string sid)</pre>
30825
30826        Removes item in this ListOfRules items with the given identifier.
30827
30828        The caller owns the returned item and is responsible for deleting it.
30829        If none of the items in this list have the identifier @p sid, then
30830        @c None is returned.
30831
30832        @param sid the identifier of the item to remove.
30833
30834        @return the item removed.  As mentioned above, the caller owns the
30835        returned item.
30836
30837        """
30838        return _libsbml.ListOfRules_remove(self, *args)
30839    __swig_destroy__ = _libsbml.delete_ListOfRules
30840
30841# Register ListOfRules in _libsbml:
30842_libsbml.ListOfRules_swigregister(ListOfRules)
30843
30844class AlgebraicRule(Rule):
30845    r"""
30846
30847    @sbmlpackage{core}
30848
30849    @htmlinclude pkg-marker-core.html An SBML <em>algebraic rule</em> representing <em>0 = f(<b>W</b>)</em>.
30850
30851    The rule type AlgebraicRule is derived from the parent class Rule.  It
30852    is used to express equations that are neither assignments of model
30853    variables nor rates of change.  AlgebraicRule does not add any
30854    attributes to the basic Rule; its role is simply to distinguish this
30855    case from the other cases.
30856
30857    In the context of a simulation, algebraic rules are in effect at all
30858    times, <em>t</em> >= <em>0</em>.  For purposes of evaluating
30859    expressions that involve the delay 'csymbol' (see the SBML
30860    specification), algebraic rules are considered to apply also at
30861    <em>t</em> <= <em>0</em>.  Please consult the relevant SBML
30862    specification for additional information about the semantics of
30863    assignments, rules, and entity values for simulation time <em>t</em>
30864    <= <em>0</em>.
30865
30866    An SBML model must not be overdetermined.  The ability to define
30867    arbitrary algebraic expressions in an SBML model introduces the
30868    possibility that a model is mathematically overdetermined by the overall
30869    system of equations constructed from its rules, reactions and events.
30870    Therefore, if an algebraic rule is introduced in a model, for at least
30871    one of the entities referenced in the rule's 'math' element the value of
30872    that entity must not be completely determined by other constructs in the
30873    model.  This means that at least this entity must not have the attribute
30874    'constant'=@c True and there must also not be a rate rule or assignment
30875    rule for it.  Furthermore, if the entity is a Species object, its value
30876    must not be determined by reactions, which means that it must either
30877    have the attribute 'boundaryCondition'=@c True or else not be involved
30878    in any reaction at all.  These restrictions are explained in more detail
30879    in the SBML specification documents.
30880
30881    In SBML Levels 2 and&nbsp;3, Reaction object identifiers can be
30882    referenced in the 'math' expression of an algebraic rule, but reaction
30883    rates can never be <em>determined</em> by algebraic rules.  This is true
30884    even when a reaction does not contain a KineticLaw
30885    @if conly structure @else object@endif.  (In such cases of missing
30886    kinetic law definitions, the model is valid but incomplete; the rates of
30887    reactions lacking kinetic laws are simply undefined, and not determined by
30888    the algebraic rule.)
30889
30890    In SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1, the 'math'
30891    subelement of the AlgebraicRule is required.  In SBML Level&nbsp;3
30892    Version&nbsp;2, this rule is relaxed, and the subelement is
30893    optional.  If an AlgebraicRule with no 'math' child is present
30894    in the model, no additional mathematical constraints on the model are
30895    added by the rule.  This may represent a situation where the model itself
30896    is unfinished, or the missing information may be provided by an
30897    SBML Level&nbsp;3 package.
30898
30899    Finally, any symbol that appears as the target of a rateOf csymbol
30900    (@link libsbml#AST_FUNCTION_RATE_OF AST_FUNCTION_RATE_OF@endlink, introduced in
30901    SBML Level&nbsp;3 Version&nbsp;2) may
30902    not be determined by an AlgebraicRule. This is because the rateOf
30903    csymbol is defined as applying only to symbols whose rates of change
30904    are easily determinable.
30905
30906    Users should note that these rules about what symbols may not be
30907    determined by an AlgebraicRule may be used to discover what symbol
30908    is being determined by an AlgebraicRule. If three symbols appear in
30909    the math element of an AlgebraicRule, the first of which is flagged
30910    constant=@c True, and the second of which appears as the target of a
30911    rateOf csymbol, one may conclude that the AlgebraicRule must be used
30912    to determine the value of the third symbol. This is, in fact, a
30913    principle use (outside of validation) of the constant attribute: its
30914    use in allowing software to properly identify the dependent variable
30915    in an AlgebraicRule.
30916
30917    @section rules-general General summary of SBML rules
30918
30919    In SBML Level&nbsp;3 as well as Level&nbsp;2, rules are separated into three
30920    subclasses for the benefit of model analysis software.  The three
30921    subclasses are based on the following three different possible functional
30922    forms (where <em>x</em> is a variable, <em>f</em> is some arbitrary
30923    function returning a numerical result, <b><em>V</em></b> is a vector of
30924    variables that does not include <em>x</em>, and <b><em>W</em></b> is a
30925    vector of variables that may include <em>x</em>):
30926
30927    <table border='0' cellpadding='0' class='centered' style='font-size: small'>
30928    <tr><td width='120px'><em>Algebraic:</em></td><td width='250px'>left-hand side is zero</td><td><em>0 = f(<b>W</b>)</em></td></tr>
30929    <tr><td><em>Assignment:</em></td><td>left-hand side is a scalar:</td><td><em>x = f(<b>V</b>)</em></td></tr>
30930    <tr><td><em>Rate:</em></td><td>left-hand side is a rate-of-change:</td><td><em>dx/dt = f(<b>W</b>)</em></td></tr>
30931    </table>
30932
30933    In their general form given above, there is little to distinguish
30934    between <em>assignment</em> and <em>algebraic</em> rules.  They are treated as
30935    separate cases for the following reasons:
30936
30937    @li <em>Assignment</em> rules can simply be evaluated to calculate
30938    intermediate values for use in numerical methods.  They are statements
30939    of equality that hold at all times.  (For assignments that are only
30940    performed once, see InitialAssignment.)
30941    @li SBML needs to place restrictions on assignment rules, for example
30942    the restriction that assignment rules cannot contain algebraic loops.
30943
30944    @li Some simulators do not contain numerical solvers capable of solving
30945    unconstrained algebraic equations, and providing more direct forms such
30946    as assignment rules may enable those simulators to process models they
30947    could not process if the same assignments were put in the form of
30948    general algebraic equations;
30949
30950    @li Those simulators that <em>can</em> solve these algebraic equations make a
30951    distinction between the different categories listed above; and
30952
30953    @li Some specialized numerical analyses of models may only be applicable
30954    to models that do not contain <em>algebraic</em> rules.
30955
30956    The approach taken to covering these cases in SBML is to define an
30957    abstract Rule structure containing a subelement, 'math', to hold the
30958    right-hand side expression, then to derive subtypes of Rule that add
30959    attributes to distinguish the cases of algebraic, assignment and rate
30960    rules.  The 'math' subelement must contain a MathML expression defining the
30961    mathematical formula of the rule.  This MathML formula must return a
30962    numerical value.  The formula can be an arbitrary expression referencing
30963    the variables and other entities in an SBML model.
30964
30965    Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule,
30966    RateRule) inherit the the 'math' subelement and other fields from SBase.
30967    The AssignmentRule and RateRule classes add an additional attribute,
30968    'variable'.  See the definitions of AssignmentRule, AlgebraicRule and
30969    RateRule for details about the structure and interpretation of each one.
30970
30971    @section rules-restrictions Additional restrictions on SBML rules
30972
30973    An important design goal of SBML rule semantics is to ensure that a
30974    model's simulation and analysis results will not be dependent on when or
30975    how often rules are evaluated.  To achieve this, SBML needs to place two
30976    restrictions on rule use.  The first concerns algebraic loops in the system
30977    of assignments in a model, and the second concerns overdetermined systems.
30978
30979    @subsection rules-no-loops A model must not contain algebraic loops
30980
30981    The combined set of InitialAssignment, AssignmentRule and KineticLaw
30982    objects in a model constitute a set of assignment statements that should be
30983    considered as a whole.  (A KineticLaw object is counted as an assignment
30984    because it assigns a value to the symbol contained in the 'id' attribute of
30985    the Reaction object in which it is defined.)  This combined set of
30986    assignment statements must not contain algebraic loops---dependency
30987    chains between these statements must terminate.  To put this more formally,
30988    consider a directed graph in which nodes are assignment statements and
30989    directed arcs exist for each occurrence of an SBML species, compartment or
30990    parameter symbol in an assignment statement's 'math' subelement.  Let the
30991    directed arcs point from the statement assigning the symbol to the
30992    statements that contain the symbol in their 'math' subelement expressions.
30993    This graph must be acyclic.
30994
30995    Similarly, the combined set of RateRule and Reaction objects constitute
30996    a set of definitions for the rates of change of various model entities
30997    (namely, the objects identified by the values of the 'variable' attributes
30998    of the RateRule objects, and the 'species' attributes of the SpeciesReference
30999    objects in each Reaction).  In SBML Level&nbsp;3 Version&nbsp;2, these rates
31000    of change may be referenced directly
31001    using the <em>rateOf</em> csymbol, but may not thereby contain algebraic
31002    loops---dependency chains between these statements must terminate.  More
31003    formally, consider a directed graph in which the nodes are the definitions
31004    of different variables' rates of change, and directed arcs exist for each
31005    occurrence of a variable referenced by a <em>rateOf</em> csymbol from any
31006    RateRule or KineticLaw object in the model.  Let the directed arcs point
31007    from the variable referenced by the <em>rateOf</em> csymbol (call it
31008    <em>x</em>) to the variable(s) determined by the 'math' expression in which
31009    <em>x</em> appears.  This graph must be acyclic.
31010
31011    SBML does not specify when or how often rules should be evaluated.
31012    Eliminating algebraic loops ensures that assignment statements can be
31013    evaluated any number of times without the result of those evaluations
31014    changing.  As an example, consider the set of equations <em>x = x + 1</em>,
31015    <em>y = z + 200</em> and <em>z = y + 100</em>.  If this set of equations
31016    were interpreted as a set of assignment statements, it would be invalid
31017    because the rule for <em>x</em> refers to <em>x</em> (exhibiting one type
31018    of loop), and the rule for <em>y</em> refers to <em>z</em> while the rule
31019    for <em>z</em> refers back to <em>y</em> (exhibiting another type of loop).
31020    Conversely, the following set of equations would constitute a valid set of
31021    assignment statements: <em>x = 10</em>, <em>y = z + 200</em>, and <em>z = x
31022    + 100</em>.
31023
31024    @subsection rules-not-overdetermined A model must not be overdetermined
31025
31026    An SBML model must not be overdetermined; that is, a model must not
31027    define more equations than there are unknowns in a model.  A valid SBML model
31028    that does not contain AlgebraicRule structures cannot be overdetermined.
31029
31030    LibSBML implements the static analysis procedure described in
31031    Appendix&nbsp;B of the SBML Level&nbsp;3
31032    specification for assessing whether a model is overdetermined.
31033
31034    (In summary, assessing whether a given continuous, deterministic,
31035    mathematical model is overdetermined does not require dynamic analysis; it
31036    can be done by analyzing the system of equations created from the model.
31037    One approach is to construct a bipartite graph in which one set of vertices
31038    represents the variables and the other the set of vertices represents the
31039    equations.  Place edges between vertices such that variables in the system
31040    are linked to the equations that determine them.  For algebraic equations,
31041    there will be edges between the equation and each variable occurring in the
31042    equation.  For ordinary differential equations (such as those defined by
31043    rate rules or implied by the reaction rate definitions), there will be a
31044    single edge between the equation and the variable determined by that
31045    differential equation.  A mathematical model is overdetermined if the
31046    maximal matchings of the bipartite graph contain disconnected vertexes
31047    representing equations.  If one maximal matching has this property, then
31048    all the maximal matchings will have this property; i.e., it is only
31049    necessary to find one maximal matching.)
31050
31051    @section RuleType_t Rule types for SBML Level 1
31052
31053    SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for
31054    distinguishing rules; specifically, it uses an attribute whose value is
31055    drawn from an enumeration of 3 values.  LibSBML supports this using methods
31056    that work @if clike a libSBML enumeration type,
31057    @link Rule::RuleType_t RuleType_t@endlink, whose values
31058    are @else with the enumeration values @endif@~ listed below.
31059
31060    @li @link libsbml#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
31061    the rule is a 'rate' rule.
31062    @li @link libsbml#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
31063    Indicates the rule is a 'scalar' rule.
31064    @li @link libsbml#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
31065    Indicates the rule type is unknown or not yet set.
31066
31067    """
31068
31069    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
31070    __repr__ = _swig_repr
31071
31072    def __init__(self, *args):
31073        r"""
31074        __init__(AlgebraicRule self, unsigned int level, unsigned int version) -> AlgebraicRule
31075        __init__(AlgebraicRule self, SBMLNamespaces sbmlns) -> AlgebraicRule
31076
31077        This method has multiple variants; they differ in the arguments
31078         they accept.  Each variant is described separately below.
31079
31080        @par
31081        <hr>
31082        <span class='variant-sig-heading'>Method variant with the following signature</span>:
31083         <pre class='signature'>AlgebraicRule(SBMLNamespaces sbmlns)</pre>
31084
31085        Creates a new AlgebraicRule object using the given SBMLNamespaces object
31086        @p sbmlns.
31087
31088        @par
31089        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
31090        information.  It is used to communicate the SBML Level, Version, and (in
31091        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
31092        common approach to using libSBML's SBMLNamespaces facilities is to create an
31093        SBMLNamespaces object somewhere in a program once, then hand that object
31094        as needed to object constructors that accept SBMLNamespaces as arguments.
31095
31096        @param sbmlns an SBMLNamespaces object.
31097
31098        @throws SBMLConstructorException
31099        Thrown if the given @p sbmlns is inconsistent or incompatible
31100        with this object.
31101
31102        @note Attempting to add an object to an SBMLDocument having a different
31103        combination of SBML Level, Version and XML namespaces than the object
31104        itself will result in an error at the time a caller attempts to make the
31105        addition.  A parent object must have compatible Level, Version and XML
31106        namespaces.  (Strictly speaking, a parent may also have more XML
31107        namespaces than a child, but the reverse is not permitted.)  The
31108        restriction is necessary to ensure that an SBML model has a consistent
31109        overall structure.  This requires callers to manage their objects
31110        carefully, but the benefit is increased flexibility in how models can be
31111        created by permitting callers to create objects bottom-up if desired.  In
31112        situations where objects are not yet attached to parents (e.g.,
31113        SBMLDocument), knowledge of the intented SBML Level and Version help
31114        libSBML determine such things as whether it is valid to assign a
31115        particular value to an attribute.
31116
31117
31118        @par
31119        <hr>
31120        <span class='variant-sig-heading'>Method variant with the following signature</span>:
31121         <pre class='signature'>AlgebraicRule(long level, long version)</pre>
31122
31123        Creates a new AlgebraicRule object using the given SBML @p level and @p
31124        version values.
31125
31126        @param level the SBML Level to assign to this AlgebraicRule object.
31127
31128        @param version the SBML Version to assign to this AlgebraicRule object.
31129
31130        @throws SBMLConstructorException
31131        Thrown if the given @p level and @p version combination are invalid
31132        or if this object is incompatible with the given level and version.
31133
31134        @note Attempting to add an object to an SBMLDocument having a different
31135        combination of SBML Level, Version and XML namespaces than the object
31136        itself will result in an error at the time a caller attempts to make the
31137        addition.  A parent object must have compatible Level, Version and XML
31138        namespaces.  (Strictly speaking, a parent may also have more XML
31139        namespaces than a child, but the reverse is not permitted.)  The
31140        restriction is necessary to ensure that an SBML model has a consistent
31141        overall structure.  This requires callers to manage their objects
31142        carefully, but the benefit is increased flexibility in how models can be
31143        created by permitting callers to create objects bottom-up if desired.  In
31144        situations where objects are not yet attached to parents (e.g.,
31145        SBMLDocument), knowledge of the intented SBML Level and Version help
31146        libSBML determine such things as whether it is valid to assign a
31147        particular value to an attribute.
31148
31149        """
31150        _libsbml.AlgebraicRule_swiginit(self, _libsbml.new_AlgebraicRule(*args))
31151    __swig_destroy__ = _libsbml.delete_AlgebraicRule
31152
31153    def clone(self):
31154        r"""
31155        clone(AlgebraicRule self) -> AlgebraicRule
31156
31157        Creates and returns a deep copy of this AlgebraicRule object.
31158
31159        @return the (deep) copy of this Rule object.
31160
31161        """
31162        return _libsbml.AlgebraicRule_clone(self)
31163
31164    def hasRequiredAttributes(self):
31165        r"""
31166        hasRequiredAttributes(AlgebraicRule self) -> bool
31167
31168        Predicate returning @c True if all the required attributes for this
31169        AlgebraicRule object have been set.
31170
31171        In SBML Levels&nbsp;2&ndash;3, there is no required attribute
31172        for an AlgebraicRule object.  For Level&nbsp;1, the only required
31173        attribute is 'formula'.
31174
31175        @return @c True if the required attributes have been set, @c False
31176        otherwise.
31177
31178        """
31179        return _libsbml.AlgebraicRule_hasRequiredAttributes(self)
31180
31181# Register AlgebraicRule in _libsbml:
31182_libsbml.AlgebraicRule_swigregister(AlgebraicRule)
31183
31184class AssignmentRule(Rule):
31185    r"""
31186
31187    @sbmlpackage{core}
31188
31189    @htmlinclude pkg-marker-core.html An SBML <em>assignment rule</em> representing <em>x = f(<b>Y</b>)</em>.
31190
31191    The rule type AssignmentRule is derived from the parent class Rule.  It
31192    is used to express equations that set the values of variables.  The
31193    left-hand side (the attribute named 'variable') of an assignment rule
31194    must refer to the identifier of a Species, SpeciesReference (in SBML
31195    Level&nbsp;3), Compartment, or global Parameter
31196    @if conly structure @else object@endif@~ in the model (but not a
31197    Reaction).  In SBML Level&nbsp;3 Version&nbsp;2, it may also refer to
31198    the SId of an element defined in an SBML Level&nbsp;3 package with
31199    mathematical meaning and the ability to be assigned.
31200    The entity identified must have its 'constant' attribute set
31201    to @c False.  The effects of an assignment rule construct are in general
31202    terms the same, but differ in the precise details depending on the type of
31203    SBML component being set:
31204    <ul>
31205
31206    <li> <em>In the case of a species</em>, an SBML assignment rule sets the
31207    referenced species' quantity (whether a 'concentration' or 'amount') to
31208    the value determined by the formula in the MathML subelement 'math'.
31209    The unit associated with the value produced by the 'math' formula @em
31210    should (in SBML Level&nbsp;2 Version&nbsp;4 and in SBML Level&nbsp;3) or @em must (in
31211    SBML releases prior to Level&nbsp;2 version&nbsp;4) be equal to the unit
31212    associated with the species' quantity.  <em>Restrictions</em>: There
31213    must not be both an AssignmentRule 'variable' attribute and a
31214    SpeciesReference 'species' attribute having the same value in a model,
31215    unless the referenced Species @if conly structure @else object@endif@~ has
31216    its 'boundaryCondition' attribute set to @c True.  In other words, an
31217    assignment rule cannot be defined for a species that is created or
31218    destroyed in a reaction unless that species is defined as a boundary
31219    condition in the model.
31220
31221    <li> (For SBML Level&nbsp;3 only) <em>In the case of a species
31222    reference</em>, an assignment rule sets the stoichiometry of the
31223    referenced reactant or product to the value determined by the formula in
31224    'math'.  The unit associated with the value produced by the 'math'
31225    formula should be consistent with the unit 'dimensionless', because
31226    reactant and product stoichiometries in reactions are dimensionless
31227    quantities.
31228
31229    <li> <em>In the case of a compartment</em>, an SBML assignment rule sets
31230    the referenced compartment's size to the value determined by the formula
31231    in the 'math' subelement of the AssignmentRule
31232    @if conly structure @else object@endif@~.  The overall units of the
31233    formula in 'math' @em should (in SBML Level&nbsp;2 Version&nbsp;4 and in
31234    SBML Level&nbsp;3) or @em must (in SBML releases prior to Level&nbsp;2
31235    version&nbsp;4) be the same as the units of the size of the compartment.
31236
31237    <li> <em>In the case of a parameter</em>, an assignment rule sets the
31238    referenced parameter's value to that determined by the formula in the
31239    'math' subelement of the AssignmentRule
31240    @if conly structure @else object@endif@~.  The overall units of the
31241    formula in the 'math' subelement @em should (in SBML Level&nbsp;2
31242    Version&nbsp;4 and in SBML Level&nbsp;3) or @em must (in SBML releases
31243    prior to Level&nbsp;2 version&nbsp;4) be the same as the units defined for
31244    the parameter.
31245
31246    <li> (For SBML Level&nbsp;3 Version&nbsp;2 only) <em>In the case of
31247    an object from an SBML Level&nbsp;3 package</em>, an AssignmentRule sets
31248    the referenced object's value (as defined by that package) to the
31249    value of the formula in math. The unit of measurement associated
31250    with the value produced by the formula should be the same as that
31251    object's units attribute value (if it has such an attribute), or be
31252    equal to the units of model components of that type (if objects of
31253    that class are defined by the package as having the same units).
31254
31255    </ul>
31256
31257    In SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1, the 'math'
31258    subelement of the AssignmentRule is required.  In SBML Level&nbsp;3
31259    Version&nbsp;2, this rule is relaxed, and the subelement is
31260    optional.  If an AssignmentRule with no 'math' child is present
31261    in the model, the value of its referenced 'variable' is
31262    undefined.  This may represent a situation where the model itself
31263    is unfinished, or the missing information may be provided by an
31264    SBML Level&nbsp;3 package.
31265
31266    If the variable attribute of an AssignmentRule object references an
31267    object in an SBML namespace not understood by the interpreter reading
31268    a given SBML document (that is, if the object is defined by an SBML
31269    Level&nbsp;3 package that the software does not support), the assignment
31270    rule must be ignored--the object's value will not need to be set, as the
31271    interpreter could not understand that package. If an interpreter cannot
31272    establish whether a referenced object is missing from the model or
31273    instead is defined in an SBML namespace not understood by the interpreter,
31274    it may produce a warning to the user. (The latter situation may only
31275    arise if an SBML package is present in the SBML document with a
31276    package:required attribute of 'true'.)
31277
31278    In the context of a simulation, assignment rules are in effect at all
31279    times, <em>t</em> >= <em>0</em>.  For purposes of evaluating
31280    expressions that involve the <em>delay</em> 'csymbol' (see the SBML
31281    Level&nbsp;2 specification), assignment rules are considered to apply
31282    also at <em>t</em> <= <em>0</em>.  Please consult the relevant
31283    SBML specification for additional information about the semantics of
31284    assignments, rules, and entity values for simulation time <em>t</em>
31285    <= <em>0</em>.
31286
31287    A model must not contain more than one AssignmentRule or RateRule
31288    @if conly structure @else object@endif@~ having the same value of
31289    'variable'; in other words, in the set of all assignment rules and rate
31290    rules in an SBML model, each variable appearing in the left-hand sides can
31291    only appear once.  This simply follows from the fact that an indeterminate
31292    system would result if a model contained more than one assignment rule for
31293    the same variable or both an assignment rule and a rate rule for the same
31294    variable.
31295
31296    Similarly, a model must also not contain <em>both</em> an AssignmentRule
31297    and an InitialAssignment definition for the same variable, because both
31298    kinds of constructs apply prior to and at the start of simulation time,
31299    i.e., <em>t</em> <= <em>0</em>.  If a model contained both an
31300    initial assignment and an assignment rule for the same variable, an
31301    indeterminate system would result.
31302
31303    The value calculated by an AssignmentRule
31304    @if conly structure @else object@endif@~ overrides the value assigned to
31305    the given symbol by the model component defining that symbol.  For
31306    example, if a Compartment @if conly structure @else object@endif's
31307    'size' attribute value is set in its definition, and the model also
31308    contains an AssignmentRule @if conly structure @else object@endif@~
31309    having that compartment's 'id' as its 'variable' value, then the 'size'
31310    assigned in the Compartment @if conly structure @else object@endif@~
31311    definition is ignored and the value assigned based on the computation
31312    defined in the AssignmentRule.  This does <em>not</em> mean that a
31313    definition for a given symbol can be omitted if there is an AssignmentRule
31314    @if conly structure @else object@endif@~ involving it.  For example,
31315    there must be a Parameter @if conly structure @else object@endif@~
31316    definition for a given parameter if there is an AssignmentRule definition
31317    for that parameter.  It is only a question of which value definition takes
31318    precedence.
31319
31320    @section rules-general General summary of SBML rules
31321
31322    In SBML Level&nbsp;3 as well as Level&nbsp;2, rules are separated into three
31323    subclasses for the benefit of model analysis software.  The three
31324    subclasses are based on the following three different possible functional
31325    forms (where <em>x</em> is a variable, <em>f</em> is some arbitrary
31326    function returning a numerical result, <b><em>V</em></b> is a vector of
31327    variables that does not include <em>x</em>, and <b><em>W</em></b> is a
31328    vector of variables that may include <em>x</em>):
31329
31330    <table border='0' cellpadding='0' class='centered' style='font-size: small'>
31331    <tr><td width='120px'><em>Algebraic:</em></td><td width='250px'>left-hand side is zero</td><td><em>0 = f(<b>W</b>)</em></td></tr>
31332    <tr><td><em>Assignment:</em></td><td>left-hand side is a scalar:</td><td><em>x = f(<b>V</b>)</em></td></tr>
31333    <tr><td><em>Rate:</em></td><td>left-hand side is a rate-of-change:</td><td><em>dx/dt = f(<b>W</b>)</em></td></tr>
31334    </table>
31335
31336    In their general form given above, there is little to distinguish
31337    between <em>assignment</em> and <em>algebraic</em> rules.  They are treated as
31338    separate cases for the following reasons:
31339
31340    @li <em>Assignment</em> rules can simply be evaluated to calculate
31341    intermediate values for use in numerical methods.  They are statements
31342    of equality that hold at all times.  (For assignments that are only
31343    performed once, see InitialAssignment.)
31344    @li SBML needs to place restrictions on assignment rules, for example
31345    the restriction that assignment rules cannot contain algebraic loops.
31346
31347    @li Some simulators do not contain numerical solvers capable of solving
31348    unconstrained algebraic equations, and providing more direct forms such
31349    as assignment rules may enable those simulators to process models they
31350    could not process if the same assignments were put in the form of
31351    general algebraic equations;
31352
31353    @li Those simulators that <em>can</em> solve these algebraic equations make a
31354    distinction between the different categories listed above; and
31355
31356    @li Some specialized numerical analyses of models may only be applicable
31357    to models that do not contain <em>algebraic</em> rules.
31358
31359    The approach taken to covering these cases in SBML is to define an
31360    abstract Rule structure containing a subelement, 'math', to hold the
31361    right-hand side expression, then to derive subtypes of Rule that add
31362    attributes to distinguish the cases of algebraic, assignment and rate
31363    rules.  The 'math' subelement must contain a MathML expression defining the
31364    mathematical formula of the rule.  This MathML formula must return a
31365    numerical value.  The formula can be an arbitrary expression referencing
31366    the variables and other entities in an SBML model.
31367
31368    Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule,
31369    RateRule) inherit the the 'math' subelement and other fields from SBase.
31370    The AssignmentRule and RateRule classes add an additional attribute,
31371    'variable'.  See the definitions of AssignmentRule, AlgebraicRule and
31372    RateRule for details about the structure and interpretation of each one.
31373
31374    @section rules-restrictions Additional restrictions on SBML rules
31375
31376    An important design goal of SBML rule semantics is to ensure that a
31377    model's simulation and analysis results will not be dependent on when or
31378    how often rules are evaluated.  To achieve this, SBML needs to place two
31379    restrictions on rule use.  The first concerns algebraic loops in the system
31380    of assignments in a model, and the second concerns overdetermined systems.
31381
31382    @subsection rules-no-loops A model must not contain algebraic loops
31383
31384    The combined set of InitialAssignment, AssignmentRule and KineticLaw
31385    objects in a model constitute a set of assignment statements that should be
31386    considered as a whole.  (A KineticLaw object is counted as an assignment
31387    because it assigns a value to the symbol contained in the 'id' attribute of
31388    the Reaction object in which it is defined.)  This combined set of
31389    assignment statements must not contain algebraic loops---dependency
31390    chains between these statements must terminate.  To put this more formally,
31391    consider a directed graph in which nodes are assignment statements and
31392    directed arcs exist for each occurrence of an SBML species, compartment or
31393    parameter symbol in an assignment statement's 'math' subelement.  Let the
31394    directed arcs point from the statement assigning the symbol to the
31395    statements that contain the symbol in their 'math' subelement expressions.
31396    This graph must be acyclic.
31397
31398    Similarly, the combined set of RateRule and Reaction objects constitute
31399    a set of definitions for the rates of change of various model entities
31400    (namely, the objects identified by the values of the 'variable' attributes
31401    of the RateRule objects, and the 'species' attributes of the SpeciesReference
31402    objects in each Reaction).  In SBML Level&nbsp;3 Version&nbsp;2, these rates
31403    of change may be referenced directly
31404    using the <em>rateOf</em> csymbol, but may not thereby contain algebraic
31405    loops---dependency chains between these statements must terminate.  More
31406    formally, consider a directed graph in which the nodes are the definitions
31407    of different variables' rates of change, and directed arcs exist for each
31408    occurrence of a variable referenced by a <em>rateOf</em> csymbol from any
31409    RateRule or KineticLaw object in the model.  Let the directed arcs point
31410    from the variable referenced by the <em>rateOf</em> csymbol (call it
31411    <em>x</em>) to the variable(s) determined by the 'math' expression in which
31412    <em>x</em> appears.  This graph must be acyclic.
31413
31414    SBML does not specify when or how often rules should be evaluated.
31415    Eliminating algebraic loops ensures that assignment statements can be
31416    evaluated any number of times without the result of those evaluations
31417    changing.  As an example, consider the set of equations <em>x = x + 1</em>,
31418    <em>y = z + 200</em> and <em>z = y + 100</em>.  If this set of equations
31419    were interpreted as a set of assignment statements, it would be invalid
31420    because the rule for <em>x</em> refers to <em>x</em> (exhibiting one type
31421    of loop), and the rule for <em>y</em> refers to <em>z</em> while the rule
31422    for <em>z</em> refers back to <em>y</em> (exhibiting another type of loop).
31423    Conversely, the following set of equations would constitute a valid set of
31424    assignment statements: <em>x = 10</em>, <em>y = z + 200</em>, and <em>z = x
31425    + 100</em>.
31426
31427    @subsection rules-not-overdetermined A model must not be overdetermined
31428
31429    An SBML model must not be overdetermined; that is, a model must not
31430    define more equations than there are unknowns in a model.  A valid SBML model
31431    that does not contain AlgebraicRule structures cannot be overdetermined.
31432
31433    LibSBML implements the static analysis procedure described in
31434    Appendix&nbsp;B of the SBML Level&nbsp;3
31435    specification for assessing whether a model is overdetermined.
31436
31437    (In summary, assessing whether a given continuous, deterministic,
31438    mathematical model is overdetermined does not require dynamic analysis; it
31439    can be done by analyzing the system of equations created from the model.
31440    One approach is to construct a bipartite graph in which one set of vertices
31441    represents the variables and the other the set of vertices represents the
31442    equations.  Place edges between vertices such that variables in the system
31443    are linked to the equations that determine them.  For algebraic equations,
31444    there will be edges between the equation and each variable occurring in the
31445    equation.  For ordinary differential equations (such as those defined by
31446    rate rules or implied by the reaction rate definitions), there will be a
31447    single edge between the equation and the variable determined by that
31448    differential equation.  A mathematical model is overdetermined if the
31449    maximal matchings of the bipartite graph contain disconnected vertexes
31450    representing equations.  If one maximal matching has this property, then
31451    all the maximal matchings will have this property; i.e., it is only
31452    necessary to find one maximal matching.)
31453
31454    @section RuleType_t Rule types for SBML Level 1
31455
31456    SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for
31457    distinguishing rules; specifically, it uses an attribute whose value is
31458    drawn from an enumeration of 3 values.  LibSBML supports this using methods
31459    that work @if clike a libSBML enumeration type,
31460    @link Rule::RuleType_t RuleType_t@endlink, whose values
31461    are @else with the enumeration values @endif@~ listed below.
31462
31463    @li @link libsbml#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
31464    the rule is a 'rate' rule.
31465    @li @link libsbml#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
31466    Indicates the rule is a 'scalar' rule.
31467    @li @link libsbml#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
31468    Indicates the rule type is unknown or not yet set.
31469
31470    """
31471
31472    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
31473    __repr__ = _swig_repr
31474
31475    def __init__(self, *args):
31476        r"""
31477        __init__(AssignmentRule self, unsigned int level, unsigned int version) -> AssignmentRule
31478        __init__(AssignmentRule self, SBMLNamespaces sbmlns) -> AssignmentRule
31479
31480        This method has multiple variants; they differ in the arguments
31481         they accept.  Each variant is described separately below.
31482
31483        @par
31484        <hr>
31485        <span class='variant-sig-heading'>Method variant with the following signature</span>:
31486         <pre class='signature'>AssignmentRule(SBMLNamespaces sbmlns)</pre>
31487
31488        Creates a new AssignmentRule using the given SBMLNamespaces object
31489        @p sbmlns.
31490
31491        @par
31492        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
31493        information.  It is used to communicate the SBML Level, Version, and (in
31494        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
31495        common approach to using libSBML's SBMLNamespaces facilities is to create an
31496        SBMLNamespaces object somewhere in a program once, then hand that object
31497        as needed to object constructors that accept SBMLNamespaces as arguments.
31498
31499        @param sbmlns an SBMLNamespaces object.
31500
31501        @throws SBMLConstructorException
31502        Thrown if the given @p sbmlns is inconsistent or incompatible
31503        with this object.
31504
31505        @note Attempting to add an object to an SBMLDocument having a different
31506        combination of SBML Level, Version and XML namespaces than the object
31507        itself will result in an error at the time a caller attempts to make the
31508        addition.  A parent object must have compatible Level, Version and XML
31509        namespaces.  (Strictly speaking, a parent may also have more XML
31510        namespaces than a child, but the reverse is not permitted.)  The
31511        restriction is necessary to ensure that an SBML model has a consistent
31512        overall structure.  This requires callers to manage their objects
31513        carefully, but the benefit is increased flexibility in how models can be
31514        created by permitting callers to create objects bottom-up if desired.  In
31515        situations where objects are not yet attached to parents (e.g.,
31516        SBMLDocument), knowledge of the intented SBML Level and Version help
31517        libSBML determine such things as whether it is valid to assign a
31518        particular value to an attribute.
31519
31520
31521        @par
31522        <hr>
31523        <span class='variant-sig-heading'>Method variant with the following signature</span>:
31524         <pre class='signature'>AssignmentRule(long level, long version)</pre>
31525
31526        Creates a new AssignmentRule using the given SBML @p level and @p version
31527        values.
31528
31529        @param level a long integer, the SBML Level to assign to this AssignmentRule.
31530
31531        @param version a long integer, the SBML Version to assign to this
31532        AssignmentRule.
31533
31534        @throws SBMLConstructorException
31535        Thrown if the given @p level and @p version combination are invalid
31536        or if this object is incompatible with the given level and version.
31537
31538        @note Attempting to add an object to an SBMLDocument having a different
31539        combination of SBML Level, Version and XML namespaces than the object
31540        itself will result in an error at the time a caller attempts to make the
31541        addition.  A parent object must have compatible Level, Version and XML
31542        namespaces.  (Strictly speaking, a parent may also have more XML
31543        namespaces than a child, but the reverse is not permitted.)  The
31544        restriction is necessary to ensure that an SBML model has a consistent
31545        overall structure.  This requires callers to manage their objects
31546        carefully, but the benefit is increased flexibility in how models can be
31547        created by permitting callers to create objects bottom-up if desired.  In
31548        situations where objects are not yet attached to parents (e.g.,
31549        SBMLDocument), knowledge of the intented SBML Level and Version help
31550        libSBML determine such things as whether it is valid to assign a
31551        particular value to an attribute.
31552
31553        """
31554        _libsbml.AssignmentRule_swiginit(self, _libsbml.new_AssignmentRule(*args))
31555    __swig_destroy__ = _libsbml.delete_AssignmentRule
31556
31557    def clone(self):
31558        r"""
31559        clone(AssignmentRule self) -> AssignmentRule
31560
31561        Creates and returns a deep copy of this AssignmentRule object.
31562
31563        @return the (deep) copy of this Rule object.
31564
31565        """
31566        return _libsbml.AssignmentRule_clone(self)
31567
31568    def hasRequiredAttributes(self):
31569        r"""
31570        hasRequiredAttributes(AssignmentRule self) -> bool
31571
31572        Predicate returning @c True if all the required attributes for this
31573        AssignmentRule object have been set.
31574
31575        In SBML Levels&nbsp;2&ndash;3, the only required attribute for
31576        an AssignmentRule object is 'variable'.  For Level&nbsp;1, where the
31577        equivalent attribute is known by different names ('compartment',
31578        'species', or 'name', depending on the type of object), there is an
31579        additional required attribute called 'formula'.
31580
31581        @return @c True if the required attributes have been set, @c False
31582        otherwise.
31583
31584        """
31585        return _libsbml.AssignmentRule_hasRequiredAttributes(self)
31586
31587    def renameSIdRefs(self, oldid, newid):
31588        r"""
31589        renameSIdRefs(AssignmentRule self, string oldid, string newid)
31590
31591        Replaces all uses of a given @c SIdRef type attribute value with another
31592        value.
31593
31594        @par
31595        In SBML, object identifiers are of a data type called <code>SId</code>.
31596        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
31597        introduced for attribute values that refer to <code>SId</code> values; in
31598        previous Levels of SBML, this data type did not exist and attributes were
31599        simply described to as 'referring to an identifier', but the effective
31600        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
31601        other methods of libSBML refer to the type <code>SIdRef</code> for all
31602        Levels of SBML, even if the corresponding SBML specification did not
31603        explicitly name the data type.
31604
31605        This method works by looking at all attributes and (if appropriate)
31606        mathematical formulas in MathML content, comparing the referenced
31607        identifiers to the value of @p oldid.  If any matches are found, the
31608        matching values are replaced with @p newid.  The method does @em not
31609        descend into child elements.
31610
31611        @param oldid the old identifier.
31612        @param newid the new identifier.
31613
31614        """
31615        return _libsbml.AssignmentRule_renameSIdRefs(self, oldid, newid)
31616
31617# Register AssignmentRule in _libsbml:
31618_libsbml.AssignmentRule_swigregister(AssignmentRule)
31619
31620class RateRule(Rule):
31621    r"""
31622
31623    @sbmlpackage{core}
31624
31625    @htmlinclude pkg-marker-core.html An SBML <em>rate rule</em> representing <em>dx/dt = f(<b>Y</b>)</em>.
31626
31627    The rule type RateRule is derived from the parent class Rule.  It is
31628    used to express equations that determine the rates of change of
31629    variables.  The left-hand side (the 'variable' attribute) can refer to
31630    the identifier of a species, compartment, or parameter (but not a
31631    reaction).  The entity identified must have its 'constant' attribute set
31632    to @c False.  The effects of a RateRule are in general terms the same,
31633    but differ in the precise details depending on which variable is being
31634    set:
31635
31636    <ul> <li> <em>In the case of a species</em>, a RateRule sets the rate of
31637    change of the species' quantity (<em>concentration</em> or <em>amount of
31638    substance</em>) to the value determined by the formula in the 'math'
31639    subelement of the RateRule object.  The overall units of the formula in
31640    'math' @em should (in SBML Level&nbsp;2 Version&nbsp;4 and in SBML Level&nbsp;3) or @em
31641    must (in SBML releases prior to Level&nbsp;2 version&nbsp;4) be equal to
31642    the unit of <em>species quantity</em> divided by the model-wide unit of
31643    <em>time</em>.  <em>Restrictions</em>: There must not be both a RateRule
31644    'variable' attribute and a SpeciesReference 'species' attribute having
31645    the same value, unless that species has its 'boundaryCondition'
31646    attribute is set to @c True.  This means a rate rule cannot be defined
31647    for a species that is created or destroyed in a reaction, unless that
31648    species is defined as a boundary condition in the model.
31649
31650    <li> (For SBML Level&nbsp;3 only) <em>In the case of a species
31651    reference</em>, a RateRule sets the rate of change of the stoichiometry
31652    of the referenced reactant or product to the value determined by the
31653    formula in 'math'.  The unit associated with the value produced by the
31654    'math' formula should be consistent with the unit 'dimensionless'
31655    divided by the model-wide unit of <em>time</em>.
31656
31657    <li> <em>In the case of a compartment</em>, a RateRule sets the rate of
31658    change of the compartment's size to the value determined by the formula
31659    in the 'math' subelement of the RateRule object.  The overall units of
31660    the formula @em should (in SBML Level&nbsp;2 Version&nbsp;4 and in SBML
31661    Level&nbsp;3) or @em must (in SBML releases prior to Level&nbsp;2
31662    version&nbsp;4) be the units of the compartment's <em>size</em> divided
31663    by the model-wide unit of <em>time</em>.
31664
31665    <li> <em>In the case of a parameter</em>, a RateRule sets the rate of
31666    change of the parameter's value to that determined by the formula in the
31667    'math' subelement of the RateRule object.  The overall units of the
31668    formula @em should (in SBML Level&nbsp;2 Version&nbsp;4 and in SBML
31669    Level&nbsp;3) or @em must (in SBML releases prior to Level&nbsp;2
31670    version&nbsp;4) be the Parameter object's 'unit' attribute value divided
31671    by the model-wide unit of <em>time</em>.
31672
31673    <li> (For SBML Level&nbsp;3 Version&nbsp;2 only) <em>In the case of
31674    an object from an SBML Level&nbsp;3 package</em>, a RateRule sets the rate
31675    of change of the referenced object's value (as defined by that package)
31676    to the value of the formula in 'math'.  The unit of measurement associated
31677    with the value produced by the formula should be the same as that object's
31678    units attribute value (if it has such an attribute) divided by the
31679    model-wide unit of @em time, or be equal to the units of model components
31680    of that type (if objects of that class are defined by the package as having
31681    the same units) divided by the model-wide unit of @em time.
31682    </ul>
31683
31684    In SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1, the 'math'
31685    subelement of the RateRule is required.  In SBML Level&nbsp;3
31686    Version&nbsp;2, this rule is relaxed, and the subelement is
31687    optional.  If a RateRule with no 'math' child is present in the model,
31688    the rate at which its referenced 'variable' changes over time is
31689    undefined.  This may represent a situation where the model itself
31690    is unfinished, or the missing information may be provided by an
31691    SBML Level&nbsp;3 package.
31692
31693    If the variable attribute of a RateRule object references an object in
31694    an SBML namespace that is not understood by the interpreter reading a
31695    given SBML document (that is, if the object is defined by an SBML
31696    Level&nbsp;3 package that the software does not support), the rate rule
31697    must be ignored--the object's value will not need to be set, as the
31698    interpreter could not understand that package. If an interpreter cannot
31699    establish whether a referenced object is missing from the model or
31700    instead is defined in an SBML namespace not understood by the interpreter,
31701    it may produce a warning to the user. (The latter situation may only
31702    arise if an SBML package is present in the SBML document with a
31703    package:required attribute of 'true'.)
31704
31705    In the context of a simulation, rate rules are in effect for simulation
31706    time <em>t</em> &gt; <em>0</em>.  Please consult the relevant SBML
31707    specification for additional information about the semantics of
31708    assignments, rules, and entity values for simulation time <em>t</em>
31709    <= <em>0</em>.
31710
31711    As mentioned in the description of AssignmentRule, a model must not
31712    contain more than one RateRule or AssignmentRule object having the same
31713    value of 'variable'; in other words, in the set of all assignment rules
31714    and rate rules in an SBML model, each variable appearing in the
31715    left-hand sides can only appear once.  This simply follows from the fact
31716    that an indeterminate system would result if a model contained more than
31717    one assignment rule for the same variable or both an assignment rule and
31718    a rate rule for the same variable.
31719
31720    @section rules-general General summary of SBML rules
31721
31722    In SBML Level&nbsp;3 as well as Level&nbsp;2, rules are separated into three
31723    subclasses for the benefit of model analysis software.  The three
31724    subclasses are based on the following three different possible functional
31725    forms (where <em>x</em> is a variable, <em>f</em> is some arbitrary
31726    function returning a numerical result, <b><em>V</em></b> is a vector of
31727    variables that does not include <em>x</em>, and <b><em>W</em></b> is a
31728    vector of variables that may include <em>x</em>):
31729
31730    <table border='0' cellpadding='0' class='centered' style='font-size: small'>
31731    <tr><td width='120px'><em>Algebraic:</em></td><td width='250px'>left-hand side is zero</td><td><em>0 = f(<b>W</b>)</em></td></tr>
31732    <tr><td><em>Assignment:</em></td><td>left-hand side is a scalar:</td><td><em>x = f(<b>V</b>)</em></td></tr>
31733    <tr><td><em>Rate:</em></td><td>left-hand side is a rate-of-change:</td><td><em>dx/dt = f(<b>W</b>)</em></td></tr>
31734    </table>
31735
31736    In their general form given above, there is little to distinguish
31737    between <em>assignment</em> and <em>algebraic</em> rules.  They are treated as
31738    separate cases for the following reasons:
31739
31740    @li <em>Assignment</em> rules can simply be evaluated to calculate
31741    intermediate values for use in numerical methods.  They are statements
31742    of equality that hold at all times.  (For assignments that are only
31743    performed once, see InitialAssignment.)
31744    @li SBML needs to place restrictions on assignment rules, for example
31745    the restriction that assignment rules cannot contain algebraic loops.
31746
31747    @li Some simulators do not contain numerical solvers capable of solving
31748    unconstrained algebraic equations, and providing more direct forms such
31749    as assignment rules may enable those simulators to process models they
31750    could not process if the same assignments were put in the form of
31751    general algebraic equations;
31752
31753    @li Those simulators that <em>can</em> solve these algebraic equations make a
31754    distinction between the different categories listed above; and
31755
31756    @li Some specialized numerical analyses of models may only be applicable
31757    to models that do not contain <em>algebraic</em> rules.
31758
31759    The approach taken to covering these cases in SBML is to define an
31760    abstract Rule structure containing a subelement, 'math', to hold the
31761    right-hand side expression, then to derive subtypes of Rule that add
31762    attributes to distinguish the cases of algebraic, assignment and rate
31763    rules.  The 'math' subelement must contain a MathML expression defining the
31764    mathematical formula of the rule.  This MathML formula must return a
31765    numerical value.  The formula can be an arbitrary expression referencing
31766    the variables and other entities in an SBML model.
31767
31768    Each of the three subclasses of Rule (AssignmentRule, AlgebraicRule,
31769    RateRule) inherit the the 'math' subelement and other fields from SBase.
31770    The AssignmentRule and RateRule classes add an additional attribute,
31771    'variable'.  See the definitions of AssignmentRule, AlgebraicRule and
31772    RateRule for details about the structure and interpretation of each one.
31773
31774    @section rules-restrictions Additional restrictions on SBML rules
31775
31776    An important design goal of SBML rule semantics is to ensure that a
31777    model's simulation and analysis results will not be dependent on when or
31778    how often rules are evaluated.  To achieve this, SBML needs to place two
31779    restrictions on rule use.  The first concerns algebraic loops in the system
31780    of assignments in a model, and the second concerns overdetermined systems.
31781
31782    @subsection rules-no-loops A model must not contain algebraic loops
31783
31784    The combined set of InitialAssignment, AssignmentRule and KineticLaw
31785    objects in a model constitute a set of assignment statements that should be
31786    considered as a whole.  (A KineticLaw object is counted as an assignment
31787    because it assigns a value to the symbol contained in the 'id' attribute of
31788    the Reaction object in which it is defined.)  This combined set of
31789    assignment statements must not contain algebraic loops---dependency
31790    chains between these statements must terminate.  To put this more formally,
31791    consider a directed graph in which nodes are assignment statements and
31792    directed arcs exist for each occurrence of an SBML species, compartment or
31793    parameter symbol in an assignment statement's 'math' subelement.  Let the
31794    directed arcs point from the statement assigning the symbol to the
31795    statements that contain the symbol in their 'math' subelement expressions.
31796    This graph must be acyclic.
31797
31798    Similarly, the combined set of RateRule and Reaction objects constitute
31799    a set of definitions for the rates of change of various model entities
31800    (namely, the objects identified by the values of the 'variable' attributes
31801    of the RateRule objects, and the 'species' attributes of the SpeciesReference
31802    objects in each Reaction).  In SBML Level&nbsp;3 Version&nbsp;2, these rates
31803    of change may be referenced directly
31804    using the <em>rateOf</em> csymbol, but may not thereby contain algebraic
31805    loops---dependency chains between these statements must terminate.  More
31806    formally, consider a directed graph in which the nodes are the definitions
31807    of different variables' rates of change, and directed arcs exist for each
31808    occurrence of a variable referenced by a <em>rateOf</em> csymbol from any
31809    RateRule or KineticLaw object in the model.  Let the directed arcs point
31810    from the variable referenced by the <em>rateOf</em> csymbol (call it
31811    <em>x</em>) to the variable(s) determined by the 'math' expression in which
31812    <em>x</em> appears.  This graph must be acyclic.
31813
31814    SBML does not specify when or how often rules should be evaluated.
31815    Eliminating algebraic loops ensures that assignment statements can be
31816    evaluated any number of times without the result of those evaluations
31817    changing.  As an example, consider the set of equations <em>x = x + 1</em>,
31818    <em>y = z + 200</em> and <em>z = y + 100</em>.  If this set of equations
31819    were interpreted as a set of assignment statements, it would be invalid
31820    because the rule for <em>x</em> refers to <em>x</em> (exhibiting one type
31821    of loop), and the rule for <em>y</em> refers to <em>z</em> while the rule
31822    for <em>z</em> refers back to <em>y</em> (exhibiting another type of loop).
31823    Conversely, the following set of equations would constitute a valid set of
31824    assignment statements: <em>x = 10</em>, <em>y = z + 200</em>, and <em>z = x
31825    + 100</em>.
31826
31827    @subsection rules-not-overdetermined A model must not be overdetermined
31828
31829    An SBML model must not be overdetermined; that is, a model must not
31830    define more equations than there are unknowns in a model.  A valid SBML model
31831    that does not contain AlgebraicRule structures cannot be overdetermined.
31832
31833    LibSBML implements the static analysis procedure described in
31834    Appendix&nbsp;B of the SBML Level&nbsp;3
31835    specification for assessing whether a model is overdetermined.
31836
31837    (In summary, assessing whether a given continuous, deterministic,
31838    mathematical model is overdetermined does not require dynamic analysis; it
31839    can be done by analyzing the system of equations created from the model.
31840    One approach is to construct a bipartite graph in which one set of vertices
31841    represents the variables and the other the set of vertices represents the
31842    equations.  Place edges between vertices such that variables in the system
31843    are linked to the equations that determine them.  For algebraic equations,
31844    there will be edges between the equation and each variable occurring in the
31845    equation.  For ordinary differential equations (such as those defined by
31846    rate rules or implied by the reaction rate definitions), there will be a
31847    single edge between the equation and the variable determined by that
31848    differential equation.  A mathematical model is overdetermined if the
31849    maximal matchings of the bipartite graph contain disconnected vertexes
31850    representing equations.  If one maximal matching has this property, then
31851    all the maximal matchings will have this property; i.e., it is only
31852    necessary to find one maximal matching.)
31853
31854    @section RuleType_t Rule types for SBML Level 1
31855
31856    SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for
31857    distinguishing rules; specifically, it uses an attribute whose value is
31858    drawn from an enumeration of 3 values.  LibSBML supports this using methods
31859    that work @if clike a libSBML enumeration type,
31860    @link Rule::RuleType_t RuleType_t@endlink, whose values
31861    are @else with the enumeration values @endif@~ listed below.
31862
31863    @li @link libsbml#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
31864    the rule is a 'rate' rule.
31865    @li @link libsbml#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
31866    Indicates the rule is a 'scalar' rule.
31867    @li @link libsbml#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
31868    Indicates the rule type is unknown or not yet set.
31869
31870    """
31871
31872    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
31873    __repr__ = _swig_repr
31874
31875    def __init__(self, *args):
31876        r"""
31877        __init__(RateRule self, unsigned int level, unsigned int version) -> RateRule
31878        __init__(RateRule self, SBMLNamespaces sbmlns) -> RateRule
31879
31880        This method has multiple variants; they differ in the arguments
31881         they accept.  Each variant is described separately below.
31882
31883        @par
31884        <hr>
31885        <span class='variant-sig-heading'>Method variant with the following signature</span>:
31886         <pre class='signature'>RateRule(SBMLNamespaces sbmlns)</pre>
31887
31888        Creates a new RateRule using the given SBMLNamespaces object
31889        @p sbmlns.
31890
31891        @par
31892        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
31893        information.  It is used to communicate the SBML Level, Version, and (in
31894        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
31895        common approach to using libSBML's SBMLNamespaces facilities is to create an
31896        SBMLNamespaces object somewhere in a program once, then hand that object
31897        as needed to object constructors that accept SBMLNamespaces as arguments.
31898
31899        @param sbmlns an SBMLNamespaces object.
31900
31901        @throws SBMLConstructorException
31902        Thrown if the given @p sbmlns is inconsistent or incompatible
31903        with this object.
31904
31905        @note Attempting to add an object to an SBMLDocument having a different
31906        combination of SBML Level, Version and XML namespaces than the object
31907        itself will result in an error at the time a caller attempts to make the
31908        addition.  A parent object must have compatible Level, Version and XML
31909        namespaces.  (Strictly speaking, a parent may also have more XML
31910        namespaces than a child, but the reverse is not permitted.)  The
31911        restriction is necessary to ensure that an SBML model has a consistent
31912        overall structure.  This requires callers to manage their objects
31913        carefully, but the benefit is increased flexibility in how models can be
31914        created by permitting callers to create objects bottom-up if desired.  In
31915        situations where objects are not yet attached to parents (e.g.,
31916        SBMLDocument), knowledge of the intented SBML Level and Version help
31917        libSBML determine such things as whether it is valid to assign a
31918        particular value to an attribute.
31919
31920
31921        @par
31922        <hr>
31923        <span class='variant-sig-heading'>Method variant with the following signature</span>:
31924         <pre class='signature'>RateRule(long level, long version)</pre>
31925
31926        Creates a new RateRule using the given SBML @p level and @p version
31927        values.
31928
31929        @param level a long integer, the SBML Level to assign to this RateRule.
31930
31931        @param version a long integer, the SBML Version to assign to this
31932        RateRule.
31933
31934        @throws SBMLConstructorException
31935        Thrown if the given @p level and @p version combination are invalid
31936        or if this object is incompatible with the given level and version.
31937
31938        @note Attempting to add an object to an SBMLDocument having a different
31939        combination of SBML Level, Version and XML namespaces than the object
31940        itself will result in an error at the time a caller attempts to make the
31941        addition.  A parent object must have compatible Level, Version and XML
31942        namespaces.  (Strictly speaking, a parent may also have more XML
31943        namespaces than a child, but the reverse is not permitted.)  The
31944        restriction is necessary to ensure that an SBML model has a consistent
31945        overall structure.  This requires callers to manage their objects
31946        carefully, but the benefit is increased flexibility in how models can be
31947        created by permitting callers to create objects bottom-up if desired.  In
31948        situations where objects are not yet attached to parents (e.g.,
31949        SBMLDocument), knowledge of the intented SBML Level and Version help
31950        libSBML determine such things as whether it is valid to assign a
31951        particular value to an attribute.
31952
31953        """
31954        _libsbml.RateRule_swiginit(self, _libsbml.new_RateRule(*args))
31955    __swig_destroy__ = _libsbml.delete_RateRule
31956
31957    def clone(self):
31958        r"""
31959        clone(RateRule self) -> RateRule
31960
31961        Creates and returns a deep copy of this RateRule object.
31962
31963        @return the (deep) copy of this RateRule object.
31964
31965        """
31966        return _libsbml.RateRule_clone(self)
31967
31968    def hasRequiredAttributes(self):
31969        r"""
31970        hasRequiredAttributes(RateRule self) -> bool
31971
31972        Predicate returning @c True if
31973        all the required attributes for this RateRule object
31974        have been set.
31975
31976        In SBML Levels&nbsp;2&ndash;3, the only required attribute for a
31977        RateRule object is 'variable'.  For Level&nbsp;1, where the equivalent
31978        attribute is known by different names ('compartment', 'species', or
31979        'name', depending on the type of object), there is an additional
31980        required attribute called 'formula'.
31981
31982        @return @c True if the required attributes have been set, @c False
31983        otherwise.
31984
31985        """
31986        return _libsbml.RateRule_hasRequiredAttributes(self)
31987
31988    def renameSIdRefs(self, oldid, newid):
31989        r"""
31990        renameSIdRefs(RateRule self, string oldid, string newid)
31991
31992        Replaces all uses of a given @c SIdRef type attribute value with another
31993        value.
31994
31995        @par
31996        In SBML, object identifiers are of a data type called <code>SId</code>.
31997        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
31998        introduced for attribute values that refer to <code>SId</code> values; in
31999        previous Levels of SBML, this data type did not exist and attributes were
32000        simply described to as 'referring to an identifier', but the effective
32001        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
32002        other methods of libSBML refer to the type <code>SIdRef</code> for all
32003        Levels of SBML, even if the corresponding SBML specification did not
32004        explicitly name the data type.
32005
32006        This method works by looking at all attributes and (if appropriate)
32007        mathematical formulas in MathML content, comparing the referenced
32008        identifiers to the value of @p oldid.  If any matches are found, the
32009        matching values are replaced with @p newid.  The method does @em not
32010        descend into child elements.
32011
32012        @param oldid the old identifier.
32013        @param newid the new identifier.
32014
32015        """
32016        return _libsbml.RateRule_renameSIdRefs(self, oldid, newid)
32017
32018# Register RateRule in _libsbml:
32019_libsbml.RateRule_swigregister(RateRule)
32020
32021class Constraint(SBase):
32022    r"""
32023
32024    @sbmlpackage{core}
32025
32026    @htmlinclude pkg-marker-core.html An SBML <em>constraint</em>, for stating validity assumptions.
32027
32028    The Constraint object class was introduced in SBML Level&nbsp;2
32029    Version&nbsp;2 as a mechanism for stating the assumptions under which a
32030    model is designed to operate.  The <em>constraints</em> are statements
32031    about permissible values of different quantities in a model.
32032    Constraints are not used to compute dynamical values for simulation or
32033    analysis, but rather, they serve an advisory role for
32034    simulation/analysis tools.
32035
32036    SBML's Constraint object class has one required attribute, 'id', to
32037    give the parameter a unique identifier by which other parts of an SBML
32038    model definition can refer to it.  A Constraint object can also have an
32039    optional 'name' attribute of type @c string.  Identifiers and names must
32040    be used according to the guidelines described in the SBML specification
32041    (e.g., Section 3.3 in the Level&nbsp;2 Version 4 specification).
32042
32043    Constraint has one subelement, 'math', containing a MathML
32044    formula defining the condition of the constraint.  This formula will
32045    return a Boolean value of @c True when the model is a <em>valid</em>
32046    state.  The formula can be an arbitrary expression referencing the
32047    variables and other entities in an SBML model.  The evaluation of 'math'
32048    and behavior of constraints are described in more detail below.
32049
32050    In SBML Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1, the 'math'
32051    subelement is required, and its formula must be a Boolean value.  In
32052    SBML Level&nbsp;3 Version&nbsp;2, these restrictions were relaxed:
32053    the 'math' subelement is optional, and numeric values are allowed
32054    in Boolean contexts (a '0' is interpreted as @c False, and all other
32055    values are interpreted as @c True).  If a Constraint with no 'math'
32056    is present in a Model, no restriction on the Model's behavior is
32057    implied or enforced.
32058
32059    A Constraint structure also has an optional subelement called 'message'.
32060    This can contain a message in XHTML format that may be displayed to the
32061    user when the condition of the formula in the 'math' subelement
32062    evaluates to a value of @c False.  Software tools are not required to
32063    display the message, but it is recommended that they do so as a matter
32064    of best practice.  The XHTML content within a 'message' subelement must
32065    follow the same restrictions as for the 'notes' element on SBase
32066    described in in the SBML Level&nbsp;2 specification; please consult the
32067    <a target='_blank' href='http://sbml.org/Documents/Specifications'>SBML
32068    specification document</a> corresponding to the SBML Level and Version
32069    of your model for more information about the requirements for 'notes'
32070    content.
32071
32072    Constraint was introduced in SBML Level&nbsp;2 Version&nbsp;2.  It is
32073    not available in earlier versions of Level&nbsp;2 nor in any version of
32074    Level&nbsp;1.
32075
32076    @section constraint-semantics Semantics of Constraints
32077
32078    In the context of a simulation, a Constraint has effect at all times
32079    <em>t >= 0</em>.  Each Constraint's 'math' subelement is first
32080    evaluated after any InitialAssignment definitions in a model at <em>t =
32081    0</em> and can conceivably trigger at that point.  (In other words, a
32082    simulation could fail a constraint immediately.)
32083
32084    Constraint structures <em>cannot and should not</em> be used to compute
32085    the dynamical behavior of a model as part of, for example, simulation.
32086    Constraints may be used as input to non-dynamical analysis, for instance
32087    by expressing flux constraints for flux balance analysis.
32088
32089    The results of a simulation of a model containing a constraint are
32090    invalid from any simulation time at and after a point when the function
32091    given by the 'math' subelement returns a value of @c False.  Invalid
32092    simulation results do not make a prediction of the behavior of the
32093    biochemical reaction network represented by the model.  The precise
32094    behavior of simulation tools is left undefined with respect to
32095    constraints.  If invalid results are detected with respect to a given
32096    constraint, the 'message' subelement may optionally be displayed to the
32097    user.  The simulation tool may also halt the simulation or clearly
32098    delimit in output data the simulation time point at which the simulation
32099    results become invalid.
32100
32101    SBML does not impose restrictions on duplicate Constraint definitions or
32102    the order of evaluation of Constraint objects in a model.  It is
32103    possible for a model to define multiple constraints all with the same
32104    mathematical expression.  Since the failure of any constraint indicates
32105    that the model simulation has entered an invalid state, a system is not
32106    required to attempt to detect whether other constraints in the model
32107    have failed once any one constraint has failed.
32108
32109    """
32110
32111    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
32112    __repr__ = _swig_repr
32113    __swig_destroy__ = _libsbml.delete_Constraint
32114
32115    def __init__(self, *args):
32116        r"""
32117        __init__(Constraint self, unsigned int level, unsigned int version) -> Constraint
32118        __init__(Constraint self, SBMLNamespaces sbmlns) -> Constraint
32119        __init__(Constraint self, Constraint orig) -> Constraint
32120
32121        This method has multiple variants; they differ in the arguments
32122         they accept.  Each variant is described separately below.
32123
32124        @par
32125        <hr>
32126        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32127         <pre class='signature'>Constraint(SBMLNamespaces sbmlns)</pre>
32128
32129        Creates a new Constraint using the given SBMLNamespaces object
32130        @p sbmlns.
32131
32132        @par
32133        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
32134        information.  It is used to communicate the SBML Level, Version, and (in
32135        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
32136        common approach to using libSBML's SBMLNamespaces facilities is to create an
32137        SBMLNamespaces object somewhere in a program once, then hand that object
32138        as needed to object constructors that accept SBMLNamespaces as arguments.
32139
32140        @param sbmlns an SBMLNamespaces object.
32141
32142        @throws SBMLConstructorException
32143        Thrown if the given @p sbmlns is inconsistent or incompatible
32144        with this object.
32145
32146        @note Attempting to add an object to an SBMLDocument having a different
32147        combination of SBML Level, Version and XML namespaces than the object
32148        itself will result in an error at the time a caller attempts to make the
32149        addition.  A parent object must have compatible Level, Version and XML
32150        namespaces.  (Strictly speaking, a parent may also have more XML
32151        namespaces than a child, but the reverse is not permitted.)  The
32152        restriction is necessary to ensure that an SBML model has a consistent
32153        overall structure.  This requires callers to manage their objects
32154        carefully, but the benefit is increased flexibility in how models can be
32155        created by permitting callers to create objects bottom-up if desired.  In
32156        situations where objects are not yet attached to parents (e.g.,
32157        SBMLDocument), knowledge of the intented SBML Level and Version help
32158        libSBML determine such things as whether it is valid to assign a
32159        particular value to an attribute.
32160
32161
32162        @par
32163        <hr>
32164        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32165         <pre class='signature'>Constraint(long level, long version)</pre>
32166
32167        Creates a new Constraint using the given SBML @p level and @p version
32168        values.
32169
32170        @param level a long integer, the SBML Level to assign to this Constraint.
32171
32172        @param version a long integer, the SBML Version to assign to this
32173        Constraint.
32174
32175        @throws SBMLConstructorException
32176        Thrown if the given @p level and @p version combination are invalid
32177        or if this object is incompatible with the given level and version.
32178
32179        @note Attempting to add an object to an SBMLDocument having a different
32180        combination of SBML Level, Version and XML namespaces than the object
32181        itself will result in an error at the time a caller attempts to make the
32182        addition.  A parent object must have compatible Level, Version and XML
32183        namespaces.  (Strictly speaking, a parent may also have more XML
32184        namespaces than a child, but the reverse is not permitted.)  The
32185        restriction is necessary to ensure that an SBML model has a consistent
32186        overall structure.  This requires callers to manage their objects
32187        carefully, but the benefit is increased flexibility in how models can be
32188        created by permitting callers to create objects bottom-up if desired.  In
32189        situations where objects are not yet attached to parents (e.g.,
32190        SBMLDocument), knowledge of the intented SBML Level and Version help
32191        libSBML determine such things as whether it is valid to assign a
32192        particular value to an attribute.
32193
32194
32195        @par
32196        <hr>
32197        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32198         <pre class='signature'>Constraint( Constraint orig)</pre>
32199
32200        Copy constructor; creates a copy of this Constraint.
32201
32202        @param orig the object to copy.
32203
32204        """
32205        _libsbml.Constraint_swiginit(self, _libsbml.new_Constraint(*args))
32206
32207    def clone(self):
32208        r"""
32209        clone(Constraint self) -> Constraint
32210
32211        Creates and returns a deep copy of this Constraint object.
32212
32213        @return the (deep) copy of this Constraint object.
32214
32215        """
32216        return _libsbml.Constraint_clone(self)
32217
32218    def getMessage(self):
32219        r"""
32220        getMessage(Constraint self) -> XMLNode
32221
32222        Get the message, if any, associated with this Constraint
32223
32224        @return the message for this Constraint, as an XMLNode.
32225
32226        """
32227        return _libsbml.Constraint_getMessage(self)
32228
32229    def getMessageString(self):
32230        r"""
32231        getMessageString(Constraint self) -> string
32232
32233        Get the message string, if any, associated with this Constraint
32234
32235        @return the message for this Constraint, as a string.
32236
32237        """
32238        return _libsbml.Constraint_getMessageString(self)
32239
32240    def getMath(self):
32241        r"""
32242        getMath(Constraint self) -> ASTNode
32243
32244        Get the mathematical expression of this Constraint
32245
32246        @return the math for this Constraint, as an ASTNode, or @c None if the math is not set.
32247
32248        """
32249        return _libsbml.Constraint_getMath(self)
32250
32251    def isSetMessage(self):
32252        r"""
32253        isSetMessage(Constraint self) -> bool
32254
32255        Predicate returning @c True if a
32256        message is defined for this Constraint.
32257
32258        @return @c True if the message of this Constraint is set,
32259        @c False otherwise.
32260
32261        """
32262        return _libsbml.Constraint_isSetMessage(self)
32263
32264    def isSetMath(self):
32265        r"""
32266        isSetMath(Constraint self) -> bool
32267
32268        Predicate returning @c True if a
32269        mathematical formula is defined for this Constraint.
32270
32271        @return @c True if the 'math' subelement for this Constraint is
32272        set, @c False otherwise.
32273
32274        """
32275        return _libsbml.Constraint_isSetMath(self)
32276
32277    def setMessage(self, *args):
32278        r"""
32279        setMessage(Constraint self, XMLNode xhtml) -> int
32280        setMessage(Constraint self, string message, bool addXHTMLMarkup=False) -> int
32281
32282        This method has multiple variants; they differ in the arguments
32283         they accept.  Each variant is described separately below.
32284
32285        @par
32286        <hr>
32287        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32288         <pre class='signature'>setMessage(string message, bool addXHTMLMarkup = false)</pre>
32289
32290        Sets the message of this Constraint.
32291
32292        @param message an XML string that is to be used as the content of the
32293        'message' subelement of this object.
32294
32295        @param addXHTMLMarkup a boolean indicating whether to wrap the contents
32296        of the @p message argument with XHTML paragraph (<code>&lt;p&gt;</code>)
32297        tags.  This is appropriate when the string in @p message does not already
32298        containg the appropriate XHTML markup.
32299
32300        @return integer value indicating success/failure of the
32301        function.  @if clike The value is drawn from the
32302        enumeration #OperationReturnValues_t. @endif@~ The possible values
32303        returned by this function are:
32304        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
32305        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
32306
32307
32308
32309        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
32310
32311
32312        @par
32313        <hr>
32314        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32315         <pre class='signature'>setMessage(XMLNode xhtml)</pre>
32316
32317        Sets the message of this Constraint.
32318
32319        The XMLNode tree passed in @p xhtml is copied.
32320
32321        @param xhtml an XML tree containing XHTML content.
32322
32323        @return integer value indicating success/failure of the
32324        function.  @if clike The value is drawn from the
32325        enumeration #OperationReturnValues_t. @endif@~ The possible values
32326        returned by this function are:
32327        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
32328        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
32329
32330        """
32331        return _libsbml.Constraint_setMessage(self, *args)
32332
32333    def setMath(self, math):
32334        r"""
32335        setMath(Constraint self, ASTNode math) -> int
32336
32337        Sets the mathematical expression of this Constraint to a copy of the
32338        AST given as @p math.
32339
32340        @param math an ASTNode expression to be assigned as the 'math'
32341        subelement of this Constraint.
32342
32343        @return integer value indicating success/failure of the
32344        function.  @if clike The value is drawn from the
32345        enumeration #OperationReturnValues_t. @endif@~ The possible values
32346        returned by this function are:
32347        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
32348        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
32349
32350        """
32351        return _libsbml.Constraint_setMath(self, math)
32352
32353    def unsetMessage(self):
32354        r"""
32355        unsetMessage(Constraint self) -> int
32356
32357        Unsets the 'message' subelement of this Constraint.
32358
32359        @return integer value indicating success/failure of the
32360        function.  @if clike The value is drawn from the
32361        enumeration #OperationReturnValues_t. @endif@~ The possible values
32362        returned by this function are:
32363        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
32364        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
32365
32366        """
32367        return _libsbml.Constraint_unsetMessage(self)
32368
32369    def renameSIdRefs(self, oldid, newid):
32370        r"""
32371        renameSIdRefs(Constraint self, string oldid, string newid)
32372
32373        Replaces all uses of a given @c SIdRef type attribute value with another
32374        value.
32375
32376        @par
32377        In SBML, object identifiers are of a data type called <code>SId</code>.
32378        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
32379        introduced for attribute values that refer to <code>SId</code> values; in
32380        previous Levels of SBML, this data type did not exist and attributes were
32381        simply described to as 'referring to an identifier', but the effective
32382        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
32383        other methods of libSBML refer to the type <code>SIdRef</code> for all
32384        Levels of SBML, even if the corresponding SBML specification did not
32385        explicitly name the data type.
32386
32387        This method works by looking at all attributes and (if appropriate)
32388        mathematical formulas in MathML content, comparing the referenced
32389        identifiers to the value of @p oldid.  If any matches are found, the
32390        matching values are replaced with @p newid.  The method does @em not
32391        descend into child elements.
32392
32393        @param oldid the old identifier.
32394        @param newid the new identifier.
32395
32396        """
32397        return _libsbml.Constraint_renameSIdRefs(self, oldid, newid)
32398
32399    def renameUnitSIdRefs(self, oldid, newid):
32400        r"""
32401        renameUnitSIdRefs(Constraint self, string oldid, string newid)
32402
32403        Replaces all uses of a given @c UnitSIdRef type attribute value with
32404        another value.
32405
32406        @par
32407        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
32408        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
32409        introduced for attribute values that refer to <code>UnitSId</code> values; in
32410        previous Levels of SBML, this data type did not exist and attributes were
32411        simply described to as 'referring to a unit identifier', but the effective
32412        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
32413        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
32414        Levels of SBML, even if the corresponding SBML specification did not
32415        explicitly name the data type.
32416
32417        This method works by looking at all unit identifier attribute values
32418        (including, if appropriate, inside mathematical formulas), comparing the
32419        referenced unit identifiers to the value of @p oldid.  If any matches
32420        are found, the matching values are replaced with @p newid.  The method
32421        does @em not descend into child elements.
32422
32423        @param oldid the old identifier.
32424        @param newid the new identifier.
32425
32426        """
32427        return _libsbml.Constraint_renameUnitSIdRefs(self, oldid, newid)
32428
32429    def replaceSIDWithFunction(self, id, function):
32430        r"""
32431        replaceSIDWithFunction(Constraint self, string id, ASTNode function)
32432
32433        @internal
32434
32435        @internal
32436
32437        """
32438        return _libsbml.Constraint_replaceSIDWithFunction(self, id, function)
32439
32440    def getTypeCode(self):
32441        r"""
32442        getTypeCode(Constraint self) -> int
32443
32444        Returns the libSBML type code for this SBML object.
32445
32446        @par
32447        LibSBML attaches an identifying code to every kind of SBML object.  These
32448        are integer constants known as <em>SBML type codes</em>.  The names of all
32449        the codes begin with the characters <code>SBML_</code>.
32450        @if clike The set of possible type codes for core elements is defined in
32451        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
32452        SBML Level&nbsp;3 packages define their own extra enumerations of type
32453        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
32454        package).@endif@if java In the Java language interface for libSBML, the
32455        type codes are defined as static integer constants in the interface class
32456        {@link libsbmlConstants}.  @endif@if python In the Python language
32457        interface for libSBML, the type codes are defined as static integer
32458        constants in the interface class @link libsbml@endlink.@endif@if csharp In
32459        the C# language interface for libSBML, the type codes are defined as
32460        static integer constants in the interface class
32461        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
32462        package plug-ins may use overlapping type codes; to identify the package
32463        to which a given object belongs, call the
32464        <code>@if conly SBase_getPackageName()
32465        @else SBase.getPackageName()
32466        @endif</code>
32467        method on the object.
32468
32469        The exception to this is lists:  all SBML-style list elements have the type
32470        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
32471        are from.
32472
32473        @return the SBML type code for this object:
32474        @link libsbml#SBML_CONSTRAINT SBML_CONSTRAINT@endlink (default).
32475
32476        @warning <span class='warning'>The specific integer values of the possible
32477        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
32478        packages,  To fully identify the correct code, <strong>it is necessary to
32479        invoke both getPackageName() and getTypeCode()</strong> (or
32480        ListOf.getItemTypeCode()).</span>
32481
32482        @see getElementName()
32483        @see getPackageName()
32484
32485        """
32486        return _libsbml.Constraint_getTypeCode(self)
32487
32488    def getElementName(self):
32489        r"""
32490        getElementName(Constraint self) -> string
32491
32492        Returns the XML element name of this object, which for Constraint, is
32493        always @c 'constraint'.
32494
32495        @return the name of this element, i.e., @c 'constraint'.
32496
32497        """
32498        return _libsbml.Constraint_getElementName(self)
32499
32500    def hasRequiredElements(self):
32501        r"""
32502        hasRequiredElements(Constraint self) -> bool
32503
32504        Predicate returning @c True if
32505        all the required elements for this Constraint object
32506        have been set.
32507
32508        @note The required elements for a Constraint object are:
32509        @li 'math' (through SBML Level&nbsp;3 Version&nbsp;1 only; not
32510        required in Level&nbsp;3 Version&nbsp;2+.)
32511
32512        @return a boolean value indicating whether all the required
32513        elements for this object have been defined.
32514
32515        """
32516        return _libsbml.Constraint_hasRequiredElements(self)
32517
32518# Register Constraint in _libsbml:
32519_libsbml.Constraint_swigregister(Constraint)
32520
32521class ListOfConstraints(ListOf):
32522    r"""
32523
32524    @sbmlpackage{core}
32525
32526    @htmlinclude pkg-marker-core.html A list of Constraint objects.
32527
32528    @par
32529    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
32530    are merely containers used for organizing the main components of an SBML
32531    model.  In libSBML's implementation, ListOf___
32532    @if conly data structures @else classes@endif@~ are derived from the
32533    intermediate utility @if conly structure @else class@endif@~ ListOf, which
32534    is not defined by the SBML specifications but serves as a useful
32535    programmatic construct.  ListOf is itself is in turn derived from SBase,
32536    which provides all of the various ListOf___
32537    @if conly data structures @else classes@endif@~ with common features
32538    defined by the SBML specification, such as 'metaid' attributes and
32539    annotations.
32540
32541    The relationship between the lists and the rest of an SBML model is
32542    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
32543
32544    @htmlinclude listof-illustration.html
32545
32546    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
32547    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
32548    Version&nbsp;2 allows
32549    containers to contain zero or more of the relevant object, instead of
32550    requiring at least one.  As such, libsbml will write out an
32551    otherwise-empty ListOf___ element that has any optional attribute set
32552    (such as 'id' or 'metaid'), that has an optional child (such
32553    as a 'notes' or 'annotation'), or that has attributes or children set
32554    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
32555    any other children.
32556
32557    Readers may wonder about the motivations for using the ListOf___
32558    containers in SBML.  A simpler approach in XML might be to place the
32559    components all directly at the top level of the model definition.  The
32560    choice made in SBML is to group them within XML elements named after
32561    %ListOf<em>Classname</em>, in part because it helps organize the
32562    components.  More importantly, the fact that the container classes are
32563    derived from SBase means that software tools can add information @em about
32564    the lists themselves into each list container's 'annotation'.
32565
32566    @see ListOfFunctionDefinitions
32567    @see ListOfUnitDefinitions
32568    @see ListOfCompartmentTypes
32569    @see ListOfSpeciesTypes
32570    @see ListOfCompartments
32571    @see ListOfSpecies
32572    @see ListOfParameters
32573    @see ListOfInitialAssignments
32574    @see ListOfRules
32575    @see ListOfConstraints
32576    @see ListOfReactions
32577    @see ListOfEvents
32578
32579    @if conly
32580    @note In the C API for libSBML, functions that in other language APIs
32581    would be inherited by the various ListOf___ structures not shown in the
32582    pages for the individual ListOf___'s.  Instead, the functions are defined
32583    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
32584    the many common functions available for manipulating ListOf___
32585    structures</strong>.  The documentation for the individual ListOf___
32586    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
32587    all of the functionality available. @endif@~
32588
32589    """
32590
32591    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
32592    __repr__ = _swig_repr
32593
32594    def __init__(self, *args):
32595        r"""
32596        __init__(ListOfConstraints self, unsigned int level, unsigned int version) -> ListOfConstraints
32597        __init__(ListOfConstraints self, SBMLNamespaces sbmlns) -> ListOfConstraints
32598
32599        This method has multiple variants; they differ in the arguments
32600         they accept.  Each variant is described separately below.
32601
32602        @par
32603        <hr>
32604        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32605         <pre class='signature'>ListOfConstraints(SBMLNamespaces sbmlns)</pre>
32606
32607        Creates a new ListOfConstraints object.
32608
32609        The object is constructed such that it is valid for the SBML Level and
32610        Version combination determined by the SBMLNamespaces object in @p
32611        sbmlns.
32612
32613        @param sbmlns an SBMLNamespaces object that is used to determine the
32614        characteristics of the ListOfConstraints object to be created.
32615
32616        @throws SBMLConstructorException
32617        Thrown if the given @p sbmlns is inconsistent or incompatible
32618        with this object.
32619
32620        @note Attempting to add an object to an SBMLDocument having a different
32621        combination of SBML Level, Version and XML namespaces than the object
32622        itself will result in an error at the time a caller attempts to make the
32623        addition.  A parent object must have compatible Level, Version and XML
32624        namespaces.  (Strictly speaking, a parent may also have more XML
32625        namespaces than a child, but the reverse is not permitted.)  The
32626        restriction is necessary to ensure that an SBML model has a consistent
32627        overall structure.  This requires callers to manage their objects
32628        carefully, but the benefit is increased flexibility in how models can be
32629        created by permitting callers to create objects bottom-up if desired.  In
32630        situations where objects are not yet attached to parents (e.g.,
32631        SBMLDocument), knowledge of the intented SBML Level and Version help
32632        libSBML determine such things as whether it is valid to assign a
32633        particular value to an attribute.
32634
32635
32636        @par
32637        <hr>
32638        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32639         <pre class='signature'>ListOfConstraints(long level, long version)</pre>
32640
32641        Creates a new ListOfConstraints object.
32642
32643        The object is constructed such that it is valid for the given SBML
32644        Level and Version combination.
32645
32646        @param level the SBML Level.
32647
32648        @param version the Version within the SBML Level.
32649
32650        @throws SBMLConstructorException
32651        Thrown if the given @p level and @p version combination are invalid
32652        or if this object is incompatible with the given level and version.
32653
32654        @note Attempting to add an object to an SBMLDocument having a different
32655        combination of SBML Level, Version and XML namespaces than the object
32656        itself will result in an error at the time a caller attempts to make the
32657        addition.  A parent object must have compatible Level, Version and XML
32658        namespaces.  (Strictly speaking, a parent may also have more XML
32659        namespaces than a child, but the reverse is not permitted.)  The
32660        restriction is necessary to ensure that an SBML model has a consistent
32661        overall structure.  This requires callers to manage their objects
32662        carefully, but the benefit is increased flexibility in how models can be
32663        created by permitting callers to create objects bottom-up if desired.  In
32664        situations where objects are not yet attached to parents (e.g.,
32665        SBMLDocument), knowledge of the intented SBML Level and Version help
32666        libSBML determine such things as whether it is valid to assign a
32667        particular value to an attribute.
32668
32669        """
32670        _libsbml.ListOfConstraints_swiginit(self, _libsbml.new_ListOfConstraints(*args))
32671
32672    def clone(self):
32673        r"""
32674        clone(ListOfConstraints self) -> ListOfConstraints
32675
32676        Creates and returns a deep copy of this ListOfConstraints object.
32677
32678        @return the (deep) copy of this ListOfConstraints object.
32679
32680        """
32681        return _libsbml.ListOfConstraints_clone(self)
32682
32683    def getItemTypeCode(self):
32684        r"""
32685        getItemTypeCode(ListOfConstraints self) -> int
32686
32687        Returns the libSBML type code for the objects contained in this ListOf
32688        (i.e., Constraint objects, if the list is non-empty).
32689
32690        @par
32691        LibSBML attaches an identifying code to every kind of SBML object.  These
32692        are integer constants known as <em>SBML type codes</em>.  The names of all
32693        the codes begin with the characters <code>SBML_</code>.
32694        @if clike The set of possible type codes for core elements is defined in
32695        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
32696        SBML Level&nbsp;3 packages define their own extra enumerations of type
32697        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
32698        package).@endif@if java In the Java language interface for libSBML, the
32699        type codes are defined as static integer constants in the interface class
32700        {@link libsbmlConstants}.  @endif@if python In the Python language
32701        interface for libSBML, the type codes are defined as static integer
32702        constants in the interface class @link libsbml@endlink.@endif@if csharp In
32703        the C# language interface for libSBML, the type codes are defined as
32704        static integer constants in the interface class
32705        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
32706        package plug-ins may use overlapping type codes; to identify the package
32707        to which a given object belongs, call the
32708        <code>@if conly SBase_getPackageName()
32709        @else SBase.getPackageName()
32710        @endif</code>
32711        method on the object.
32712
32713        The exception to this is lists:  all SBML-style list elements have the type
32714        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
32715        are from.
32716
32717        @return the SBML type code for the objects contained in this ListOf
32718        instance: @link libsbml#SBML_CONSTRAINT SBML_CONSTRAINT@endlink (default).
32719
32720        @see getElementName()
32721        @see getPackageName()
32722
32723        """
32724        return _libsbml.ListOfConstraints_getItemTypeCode(self)
32725
32726    def getElementName(self):
32727        r"""
32728        getElementName(ListOfConstraints self) -> string
32729
32730        Returns the XML element name of this object.
32731
32732        For ListOfConstraints, the XML element name is @c 'listOfConstraints'.
32733
32734        @return the name of this element.
32735
32736        """
32737        return _libsbml.ListOfConstraints_getElementName(self)
32738
32739    def get(self, *args):
32740        r"""
32741        get(ListOfConstraints self, unsigned int n) -> Constraint
32742        get(ListOfConstraints self, unsigned int n) -> Constraint
32743
32744        Get a Constraint from the ListOfConstraints.
32745
32746        @param n the index number of the Constraint to get.
32747
32748        @return the nth Constraint in this ListOfConstraints.
32749        If the index @p n is invalid, @c None is returned.
32750
32751        @see size()
32752
32753        """
32754        return _libsbml.ListOfConstraints_get(self, *args)
32755
32756    def remove(self, n):
32757        r"""
32758        remove(ListOfConstraints self, unsigned int n) -> Constraint
32759
32760        Removes the nth item from this ListOfConstraints items and returns a
32761        pointer to it.
32762
32763        The caller owns the returned item and is responsible for deleting it.
32764
32765        @param n the index of the item to remove.
32766
32767        @see size()
32768
32769        """
32770        return _libsbml.ListOfConstraints_remove(self, n)
32771    __swig_destroy__ = _libsbml.delete_ListOfConstraints
32772
32773# Register ListOfConstraints in _libsbml:
32774_libsbml.ListOfConstraints_swigregister(ListOfConstraints)
32775
32776class Reaction(SBase):
32777    r"""
32778
32779    @sbmlpackage{core}
32780
32781    @htmlinclude pkg-marker-core.html An SBML reaction between species in an SBML model.
32782
32783    A @em reaction represents any transformation, transport or binding
32784    process, typically a chemical reaction, that can change the quantity of
32785    one or more species.  In SBML, a reaction is defined primarily in terms
32786    of the participating reactants and products (and their corresponding
32787    stoichiometries), along with optional modifier species, an optional rate
32788    at which the reaction takes place, and optional parameters.
32789
32790    As with other major objects in SBML, Reaction has a mandatory attribute,
32791    'id', used to give the reaction an identifier.  The identifier
32792    must be a text string conforming to the identifer syntax permitted in
32793    SBML.  In SBML Level&nbsp;2 and Level&nbsp;3, the reaction 'id'
32794    identifier can be used in mathematical formulas elsewhere in an SBML
32795    model to represent the rate of that reaction; this usage is explained
32796    below.  Reaction also has an optional 'name' attribute, of type
32797    @c string.  The 'id' and 'name' must be used according to the guidelines
32798    described in the SBML specification.
32799
32800    The species participating as reactants, products, and/or modifiers in a
32801    reaction are declared using lists of SpeciesReference and/or
32802    ModifierSpeciesReference instances stored in subelements
32803    'listOfReactants', 'listOfProducts' and 'listOfModifiers'.  Certain
32804    restrictions are placed on the appearance of species in reaction
32805    definitions:
32806    <ul>
32807    <li> The ability of a species to appear as a reactant or product of any
32808    reaction in a model is governed by certain flags in that species'
32809    definition; see the definition of Species for more information.
32810
32811    <li> Any species appearing in the mathematical formula of the subelement
32812    'kineticLaw' (described below) of a Reaction must be declared in at
32813    least one of that Reaction's lists of reactants, products, and/or
32814    modifiers.  Put another way, it is an error for a reaction's kinetic law
32815    formula to refer to species that have not been declared for that
32816    reaction.
32817
32818    <li> For SBML Levels 1, 2, and SBML Level&nbsp;3 Version&nbsp;1, a
32819    reaction definition can contain an empty list of reactants
32820    <em>or</em> an empty list of products, but it must have at least one
32821    reactant or product; in other words, a reaction without any reactant or
32822    product species is not permitted.  (This restriction does not apply to
32823    modifier species, which remain optional in all cases.)  In SBML
32824    Level&nbsp;3 Version&nbsp;2, this requirement was dropped, allowing
32825    the creation of reactions with neither reactants nor products.
32826    </ul>
32827
32828    A reaction can contain up to one KineticLaw object in a subelement named
32829    'kineticLaw'.  It defines the speed at which the process defined by the
32830    reaction takes place.  The description of KineticLaw provides more
32831    details about its use.  Note that although the inclusion of a KineticLaw
32832    object in an instance of a Reaction component is optional, there is no
32833    useful default that can be substituted in place of a missing rate
32834    expression in a reaction.  Moreover, a reaction's rate cannot be defined
32835    in any other way in SBML---InitialAssignment, AssignmentRule,
32836    RateRule, AlgebraicRule, Event, and other constructs in SBML cannot be
32837    used to set the reaction rate separately.  Nevertheless, for some
32838    modeling applications, reactions without any defined rate can be
32839    perfectly acceptable.
32840
32841    Reaction also has a boolean attribute named 'reversible' for indicating
32842    whether the reaction is reversible.  This attribute is optional in SBML
32843    Level&nbsp;2, with a default of @c True; it is mandatory in SBML
32844    Level&nbsp;3 (with no default value).  To say that a reaction is @em
32845    reversible is to say it can proceed in either the forward or the reverse
32846    direction.  Although the reversibility of a reaction can sometimes be
32847    deduced by inspecting its rate expression, this is not always the case,
32848    especially for complicated expressions.  Moreover, the need in SBML to
32849    allow rate expressions (i.e., KineticLaw) to be optional leads to the
32850    need for a separate flag indicating reversibility.  Note that labeling a
32851    reaction as irreversible is an assertion that the reaction always
32852    proceeds in the given forward direction.  (Why else would it be flagged
32853    as irreversible?)  This implies the rate expression in the KineticLaw
32854    always has a non-negative value during simulations.  Software tools
32855    could provide a means of optionally testing that this condition holds.
32856    The presence of reversibility information in two places (i.e., the rate
32857    expression and the 'reversible' attribute on Reaction) leaves open the
32858    possibility that a model could contain contradictory information, but
32859    the creation of such a model would be an error on the part of the
32860    software generating it.
32861
32862    The Reaction object class has another boolean attribute called 'fast'.
32863    This attribute is optional in SBML Level&nbsp;2, with a default of
32864    @c False; it is mandatory in SBML Level&nbsp;3 (with no default value).
32865    In SBML Level&nbsp;3 Version&nbsp;2, a value of @c True for the 'fast'
32866    attribute is deprecated in favor of all reactions having a 'fast' value
32867    of @c False.  It
32868    is used to indicate that a reaction occurs on a vastly faster time scale
32869    than others in a system.  Readers are directed to the SBML Level&nbsp;2
32870    Version&nbsp;4 specification, which provides more detail about the
32871    conditions under which a reaction can be considered to be fast in this
32872    sense.  SBML Level&nbsp;1
32873    and Level&nbsp;2 Version&nbsp;1 incorrectly claimed that software tools
32874    could ignore this attribute if they did not implement support for the
32875    corresponding concept; however, further research in SBML has revealed
32876    that this is not true, and 'fast' <em>cannot be ignored</em> if it is
32877    set to @c True.  SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 therefore
32878    stipulate that if a model has any reactions with 'fast' set to @c True,
32879    a software tool must be able to respect the attribute or else indicate
32880    to the user that it does not have the capacity to do so.  Analysis
32881    software cannot ignore the value of the 'fast' attribute because doing
32882    so may lead to different results as compared to a software system that
32883    <em>does</em> make use of 'fast'.
32884
32885    @par
32886    In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
32887    removed.  All reactions are assumed to be equivalent to reactions
32888    in previous levels/versions that have a 'fast' attribute value
32889    of @c False.  Users should be aware that even for previous
32890    levels/versions of the specification, 'fast' attribute values of
32891    @c True never achieved widespread support, and many software
32892    packages may ignore it.  To achieve the same or similar
32893    effects as setting the fast attribute to @c True for a given
32894    reaction, the KineticLaw attribute should be constructed to
32895    produce a value in the desired time scale, or else the
32896    reaction could be replaced with an AssignmentRule or
32897    AlgebraicRule.
32898
32899    In SBML Level&nbsp;3, the Reaction object has an
32900    additional optional attribute named 'compartment', whose value must be
32901    the identifier of a compartment defined in the enclosing Model object.
32902    The 'compartment' attribute can be used to indicate the compartment in
32903    which the reaction is assumed to take place.  If the attribute is
32904    present, its value must be the identifier of a Compartment object
32905    defined in the enclosing Model object.  Similar to the 'reversible'
32906    attribute, the value of the 'compartment' attribute has no direct impact
32907    on the construction of mathematical equations for the SBML model.  When
32908    a kinetic law is given for a reaction, the compartment location may
32909    already be implicit in the kinetic law (although this cannot always be
32910    guaranteed).  Nevertheless, software tools may find the 'compartment'
32911    attribute value useful for such purposes as analyzing the structure of
32912    the model, guiding the modeler in constructing correct rate formulas,
32913    and visualization purposes.
32914
32915    Readers are urged to read the SBML specification for more details about
32916    the proper use of Reaction.
32917
32918    """
32919
32920    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
32921    __repr__ = _swig_repr
32922    __swig_destroy__ = _libsbml.delete_Reaction
32923
32924    def __init__(self, *args):
32925        r"""
32926        __init__(Reaction self, unsigned int level, unsigned int version) -> Reaction
32927        __init__(Reaction self, SBMLNamespaces sbmlns) -> Reaction
32928        __init__(Reaction self, Reaction orig) -> Reaction
32929
32930        This method has multiple variants; they differ in the arguments
32931         they accept.  Each variant is described separately below.
32932
32933        @par
32934        <hr>
32935        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32936         <pre class='signature'>Reaction(SBMLNamespaces sbmlns)</pre>
32937
32938        Creates a new Reaction using the given SBMLNamespaces object
32939        @p  sbmlns.
32940
32941        @par
32942        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
32943        information.  It is used to communicate the SBML Level, Version, and (in
32944        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
32945        common approach to using libSBML's SBMLNamespaces facilities is to create an
32946        SBMLNamespaces object somewhere in a program once, then hand that object
32947        as needed to object constructors that accept SBMLNamespaces as arguments.
32948
32949        @param sbmlns an SBMLNamespaces object.
32950
32951        @throws SBMLConstructorException
32952        Thrown if the given @p sbmlns is inconsistent or incompatible
32953        with this object.
32954
32955        @note Attempting to add an object to an SBMLDocument having a different
32956        combination of SBML Level, Version and XML namespaces than the object
32957        itself will result in an error at the time a caller attempts to make the
32958        addition.  A parent object must have compatible Level, Version and XML
32959        namespaces.  (Strictly speaking, a parent may also have more XML
32960        namespaces than a child, but the reverse is not permitted.)  The
32961        restriction is necessary to ensure that an SBML model has a consistent
32962        overall structure.  This requires callers to manage their objects
32963        carefully, but the benefit is increased flexibility in how models can be
32964        created by permitting callers to create objects bottom-up if desired.  In
32965        situations where objects are not yet attached to parents (e.g.,
32966        SBMLDocument), knowledge of the intented SBML Level and Version help
32967        libSBML determine such things as whether it is valid to assign a
32968        particular value to an attribute.
32969
32970
32971        @par
32972        <hr>
32973        <span class='variant-sig-heading'>Method variant with the following signature</span>:
32974         <pre class='signature'>Reaction(long level, long version)</pre>
32975
32976        Creates a new Reaction using the given SBML @p level and @p version
32977        values.
32978
32979        @param level a long integer, the SBML Level to assign to this Reaction.
32980
32981        @param version a long integer, the SBML Version to assign to this
32982        Reaction.
32983
32984        @throws SBMLConstructorException
32985        Thrown if the given @p level and @p version combination are invalid
32986        or if this object is incompatible with the given level and version.
32987
32988        @note Attempting to add an object to an SBMLDocument having a different
32989        combination of SBML Level, Version and XML namespaces than the object
32990        itself will result in an error at the time a caller attempts to make the
32991        addition.  A parent object must have compatible Level, Version and XML
32992        namespaces.  (Strictly speaking, a parent may also have more XML
32993        namespaces than a child, but the reverse is not permitted.)  The
32994        restriction is necessary to ensure that an SBML model has a consistent
32995        overall structure.  This requires callers to manage their objects
32996        carefully, but the benefit is increased flexibility in how models can be
32997        created by permitting callers to create objects bottom-up if desired.  In
32998        situations where objects are not yet attached to parents (e.g.,
32999        SBMLDocument), knowledge of the intented SBML Level and Version help
33000        libSBML determine such things as whether it is valid to assign a
33001        particular value to an attribute.
33002
33003
33004        @par
33005        <hr>
33006        <span class='variant-sig-heading'>Method variant with the following signature</span>:
33007         <pre class='signature'>Reaction(Reaction orig)</pre>
33008
33009        Copy constructor; creates a copy of this Reaction.
33010
33011        @param orig the object to copy.
33012
33013        """
33014        _libsbml.Reaction_swiginit(self, _libsbml.new_Reaction(*args))
33015
33016    def clone(self):
33017        r"""
33018        clone(Reaction self) -> Reaction
33019
33020        Creates and returns a deep copy of this Reaction object.
33021
33022        @return the (deep) copy of this Reaction object.
33023
33024        """
33025        return _libsbml.Reaction_clone(self)
33026
33027    def getElementBySId(self, id):
33028        r"""
33029        getElementBySId(Reaction self, string id) -> SBase
33030
33031        Returns the first child element found that has the given @p id in the
33032        model-wide SId namespace, or @c None if no such object is found.
33033
33034        @param id string representing the id of the object to find.
33035
33036        @return pointer to the first element found with the given @p id.
33037
33038        """
33039        return _libsbml.Reaction_getElementBySId(self, id)
33040
33041    def getElementByMetaId(self, metaid):
33042        r"""
33043        getElementByMetaId(Reaction self, string metaid) -> SBase
33044
33045        Returns the first child element it can find with the given @p metaid, or
33046        @c None if no such object is found.
33047
33048        @param metaid string representing the metaid of the object to find.
33049
33050        @return pointer to the first element found with the given @p metaid.
33051
33052        """
33053        return _libsbml.Reaction_getElementByMetaId(self, metaid)
33054
33055    def renameSIdRefs(self, oldid, newid):
33056        r"""
33057        renameSIdRefs(Reaction self, string oldid, string newid)
33058
33059        Replaces all uses of a given @c SIdRef type attribute value with another
33060        value.
33061
33062        @par
33063        In SBML, object identifiers are of a data type called <code>SId</code>.
33064        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
33065        introduced for attribute values that refer to <code>SId</code> values; in
33066        previous Levels of SBML, this data type did not exist and attributes were
33067        simply described to as 'referring to an identifier', but the effective
33068        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
33069        other methods of libSBML refer to the type <code>SIdRef</code> for all
33070        Levels of SBML, even if the corresponding SBML specification did not
33071        explicitly name the data type.
33072
33073        This method works by looking at all attributes and (if appropriate)
33074        mathematical formulas in MathML content, comparing the referenced
33075        identifiers to the value of @p oldid.  If any matches are found, the
33076        matching values are replaced with @p newid.  The method does @em not
33077        descend into child elements.
33078
33079        @param oldid the old identifier.
33080        @param newid the new identifier.
33081
33082        """
33083        return _libsbml.Reaction_renameSIdRefs(self, oldid, newid)
33084
33085    def initDefaults(self):
33086        r"""
33087        initDefaults(Reaction self)
33088
33089        Initializes the fields of this Reaction object to 'typical' default
33090        values.
33091
33092        The SBML Reaction component has slightly different aspects and
33093        default attribute values in different SBML Levels and Versions.
33094        This method sets the values to certain common defaults, based
33095        mostly on what they are in SBML Level&nbsp;2.  Specifically:
33096
33097        @li Sets the 'reversible' attribute to @c True
33098        @li Sets the 'fast' attribute to @c False
33099        @li Marks the 'fast' attribute as @em not having been set for
33100        SBML Level&nbsp;2, but @em as having been set for
33101        SBML Level&nbsp;1 and SBML Level&nbsp;3.
33102
33103        @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
33104        Version&nbsp;2 incorrectly indicated that software tools could ignore the
33105        'fast' attribute if they did not implement support for the corresponding
33106        concept; however, further research in SBML has revealed that this is not
33107        true, and 'fast' <em>cannot be ignored</em> if it is set to @c True.
33108        Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
33109        therefore stipulate that if a model has any reactions with 'fast' set to
33110        @c True, a software tool must be able to respect the attribute or else
33111        indicate to the user that it does not have the capacity to do so.  Readers
33112        are directed to the SBML specifications, which provides more detail about
33113        the conditions under which a reaction can be considered to be fast in this
33114        sense.</span>
33115
33116        """
33117        return _libsbml.Reaction_initDefaults(self)
33118
33119    def getId(self):
33120        r"""
33121        getId(Reaction self) -> string
33122
33123        Returns the value of the 'id' attribute of this Reaction.
33124
33125        @note Because of the inconsistent behavior of this function with
33126        respect to assignments and rules, it is now recommended to
33127        use the getIdAttribute() function instead.
33128
33129        @par
33130        The identifier given by an object's 'id' attribute value
33131        is used to identify the object within the SBML model definition.
33132        Other objects can refer to the component using this identifier.  The
33133        data type of 'id' is always <code>SId</code> or a type derived
33134        from that, such as <code>UnitSId</code>, depending on the object in
33135        question.  All data types are defined as follows:
33136        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
33137        letter ::= 'a'..'z','A'..'Z'
33138        digit  ::= '0'..'9'
33139        idChar ::= letter | digit | '_'
33140        SId    ::= ( letter | '_' ) idChar*
33141        </pre>
33142        The characters <code>(</code> and <code>)</code> are used for grouping,
33143        the character <code>*</code> 'zero or more times', and the character
33144        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
33145        is determined by an exact character sequence match; i.e., comparisons must
33146        be performed in a case-sensitive manner.  This applies to all uses of
33147        <code>SId</code>, <code>SIdRef</code>, and derived types.
33148
33149        Users need to be aware of some important API issues that are the result of
33150        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
33151        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
33152        of SBML objects.  To simplify the work of programmers, libSBML's API
33153        provided get, set, check, and unset on the SBase object class itself
33154        instead of on individual subobject classes. This made the
33155        get/set/etc. methods uniformly available on all objects in the libSBML
33156        API.  LibSBML simply returned empty strings or otherwise did not act when
33157        the methods were applied to SBML objects that were not defined by the SBML
33158        specification to have 'id' or 'name' attributes.  Additional complications
33159        arose with the rule and assignment objects: InitialAssignment,
33160        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
33161        the rule object hierarchy was different, and in addition, then as now,
33162        they possess different attributes: 'variable' (for the rules and event
33163        assignments), 'symbol' (for initial assignments), or neither (for
33164        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
33165        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
33166
33167        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
33168        Version&nbsp;2, it became necessary to introduce a new way to interact
33169        with the attributes more consistently in libSBML to avoid breaking
33170        backward compatibility in the behavior of the original 'id' methods.  For
33171        this reason, libSBML provides four functions (getIdAttribute(),
33172        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
33173        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
33174        from SBase, regardless of the object's type.  <strong>These new methods
33175        should be used instead of the older getId()/setId()/etc. methods</strong>
33176        unless the old behavior is somehow necessary.  Regardless of the Level and
33177        Version of the SBML, these functions allow client applications to use more
33178        generalized code in some situations (for instance, when manipulating
33179        objects that are all known to have identifiers).  If the object in
33180        question does not posess an 'id' attribute according to the SBML
33181        specification for the Level and Version in use, libSBML will not allow the
33182        identifier to be set, nor will it read or write 'id' attributes for those
33183        objects.
33184
33185        @return the id of this Reaction.
33186
33187        @see getIdAttribute()
33188        @see setIdAttribute()
33189        @see isSetIdAttribute()
33190        @see unsetIdAttribute()
33191
33192        """
33193        return _libsbml.Reaction_getId(self)
33194
33195    def getName(self):
33196        r"""
33197        getName(Reaction self) -> string
33198
33199        Returns the value of the 'name' attribute of this Reaction object.
33200
33201        @par
33202        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
33203        moved to SBase directly, instead of being defined individually for many
33204        (but not all) objects.  LibSBML has for a long time provided functions
33205        defined on SBase itself to get, set, and unset those attributes, which
33206        would fail or otherwise return empty strings if executed on any object
33207        for which those attributes were not defined.  Now that all SBase objects
33208        define those attributes, those functions now succeed for any object with
33209        the appropriate level and version.
33210
33211        The 'name' attribute is
33212        optional and is not intended to be used for cross-referencing purposes
33213        within a model.  Its purpose instead is to provide a human-readable
33214        label for the component.  The data type of 'name' is the type
33215        <code>string</code> defined in XML Schema.  SBML imposes no
33216        restrictions as to the content of 'name' attributes beyond those
33217        restrictions defined by the <code>string</code> type in XML Schema.
33218
33219        The recommended practice for handling 'name' is as follows.  If a
33220        software tool has the capability for displaying the content of 'name'
33221        attributes, it should display this content to the user as a
33222        component's label instead of the component's 'id'.  If the user
33223        interface does not have this capability (e.g., because it cannot
33224        display or use special characters in symbol names), or if the 'name'
33225        attribute is missing on a given component, then the user interface
33226        should display the value of the 'id' attribute instead.  (Script
33227        language interpreters are especially likely to display 'id' instead of
33228        'name'.)
33229
33230        As a consequence of the above, authors of systems that automatically
33231        generate the values of 'id' attributes should be aware some systems
33232        may display the 'id''s to the user.  Authors therefore may wish to
33233        take some care to have their software create 'id' values that are: (a)
33234        reasonably easy for humans to type and read; and (b) likely to be
33235        meaningful, for example by making the 'id' attribute be an abbreviated
33236        form of the name attribute value.
33237
33238        An additional point worth mentioning is although there are
33239        restrictions on the uniqueness of 'id' values, there are no
33240        restrictions on the uniqueness of 'name' values in a model.  This
33241        allows software applications leeway in assigning component identifiers.
33242
33243        Regardless of the level and version of the SBML, these functions allow
33244        client applications to use more generalized code in some situations
33245        (for instance, when manipulating objects that are all known to have
33246        names).  If the object in question does not posess a 'name' attribute
33247        according to the SBML specification for the Level and Version in use,
33248        libSBML will not allow the name to be set, nor will it read or
33249        write 'name' attributes for those objects.
33250
33251        @return the name of this SBML object, or the empty string if not set or unsettable.
33252
33253        @see getIdAttribute()
33254        @see isSetName()
33255        @see setName()
33256        @see unsetName()
33257
33258        """
33259        return _libsbml.Reaction_getName(self)
33260
33261    def getKineticLaw(self, *args):
33262        r"""
33263        getKineticLaw(Reaction self) -> KineticLaw
33264        getKineticLaw(Reaction self) -> KineticLaw
33265
33266        Returns the KineticLaw object contained in this Reaction.
33267
33268        @return the KineticLaw instance.
33269
33270        """
33271        return _libsbml.Reaction_getKineticLaw(self, *args)
33272
33273    def getReversible(self):
33274        r"""
33275        getReversible(Reaction self) -> bool
33276
33277        Returns the value of the 'reversible' attribute on the Reaction as a
33278        boolean value.
33279
33280        @return the reversibility status of this Reaction.
33281
33282        """
33283        return _libsbml.Reaction_getReversible(self)
33284
33285    def getFast(self):
33286        r"""
33287        getFast(Reaction self) -> bool
33288
33289        Returns the value of the 'fast' attribute of this Reaction.
33290
33291        @par
33292        In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
33293        removed.  All reactions are assumed to be equivalent to reactions
33294        in previous levels/versions that have a 'fast' attribute value
33295        of @c False.  Users should be aware that even for previous
33296        levels/versions of the specification, 'fast' attribute values of
33297        @c True never achieved widespread support, and many software
33298        packages may ignore it.  To achieve the same or similar
33299        effects as setting the fast attribute to @c True for a given
33300        reaction, the KineticLaw attribute should be constructed to
33301        produce a value in the desired time scale, or else the
33302        reaction could be replaced with an AssignmentRule or
33303        AlgebraicRule.
33304
33305        @return the 'fast' status of this Reaction.
33306
33307        @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
33308        Version&nbsp;2 incorrectly indicated that software tools could ignore the
33309        'fast' attribute if they did not implement support for the corresponding
33310        concept; however, further research in SBML has revealed that this is not
33311        true, and 'fast' <em>cannot be ignored</em> if it is set to @c True.
33312        Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
33313        therefore stipulate that if a model has any reactions with 'fast' set to
33314        @c True, a software tool must be able to respect the attribute or else
33315        indicate to the user that it does not have the capacity to do so.  Readers
33316        are directed to the SBML specifications, which provides more detail about
33317        the conditions under which a reaction can be considered to be fast in this
33318        sense.</span>
33319
33320        """
33321        return _libsbml.Reaction_getFast(self)
33322
33323    def getCompartment(self):
33324        r"""
33325        getCompartment(Reaction self) -> string
33326
33327        (SBML Level&nbsp;3 only) Returns the value of the 'compartment'
33328        attribute on the Reaction.
33329
33330        @return the compartment of this Reaction.
33331
33332        @note The 'compartment' attribute is available in SBML Level&nbsp;3,
33333        but is not present on Reaction in lower Levels of
33334        SBML.
33335
33336        """
33337        return _libsbml.Reaction_getCompartment(self)
33338
33339    def isSetId(self):
33340        r"""
33341        isSetId(Reaction self) -> bool
33342
33343        Predicate returning @c True if this
33344        Reaction's 'id' attribute is set.
33345
33346        @par
33347        The identifier given by an object's 'id' attribute value
33348        is used to identify the object within the SBML model definition.
33349        Other objects can refer to the component using this identifier.  The
33350        data type of 'id' is always <code>SId</code> or a type derived
33351        from that, such as <code>UnitSId</code>, depending on the object in
33352        question.  All data types are defined as follows:
33353        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
33354        letter ::= 'a'..'z','A'..'Z'
33355        digit  ::= '0'..'9'
33356        idChar ::= letter | digit | '_'
33357        SId    ::= ( letter | '_' ) idChar*
33358        </pre>
33359        The characters <code>(</code> and <code>)</code> are used for grouping,
33360        the character <code>*</code> 'zero or more times', and the character
33361        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
33362        is determined by an exact character sequence match; i.e., comparisons must
33363        be performed in a case-sensitive manner.  This applies to all uses of
33364        <code>SId</code>, <code>SIdRef</code>, and derived types.
33365
33366        Users need to be aware of some important API issues that are the result of
33367        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
33368        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
33369        of SBML objects.  To simplify the work of programmers, libSBML's API
33370        provided get, set, check, and unset on the SBase object class itself
33371        instead of on individual subobject classes. This made the
33372        get/set/etc. methods uniformly available on all objects in the libSBML
33373        API.  LibSBML simply returned empty strings or otherwise did not act when
33374        the methods were applied to SBML objects that were not defined by the SBML
33375        specification to have 'id' or 'name' attributes.  Additional complications
33376        arose with the rule and assignment objects: InitialAssignment,
33377        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
33378        the rule object hierarchy was different, and in addition, then as now,
33379        they possess different attributes: 'variable' (for the rules and event
33380        assignments), 'symbol' (for initial assignments), or neither (for
33381        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
33382        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
33383
33384        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
33385        Version&nbsp;2, it became necessary to introduce a new way to interact
33386        with the attributes more consistently in libSBML to avoid breaking
33387        backward compatibility in the behavior of the original 'id' methods.  For
33388        this reason, libSBML provides four functions (getIdAttribute(),
33389        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
33390        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
33391        from SBase, regardless of the object's type.  <strong>These new methods
33392        should be used instead of the older getId()/setId()/etc. methods</strong>
33393        unless the old behavior is somehow necessary.  Regardless of the Level and
33394        Version of the SBML, these functions allow client applications to use more
33395        generalized code in some situations (for instance, when manipulating
33396        objects that are all known to have identifiers).  If the object in
33397        question does not posess an 'id' attribute according to the SBML
33398        specification for the Level and Version in use, libSBML will not allow the
33399        identifier to be set, nor will it read or write 'id' attributes for those
33400        objects.
33401
33402        @return @c True if the 'id' attribute of this SBML object is
33403        set, @c False otherwise.
33404
33405        @note Because of the inconsistent behavior of this function with
33406        respect to assignments and rules, it is recommended that callers
33407        use isSetIdAttribute() instead.
33408
33409        @see getIdAttribute()
33410        @see setIdAttribute()
33411        @see unsetIdAttribute()
33412        @see isSetIdAttribute()
33413
33414        """
33415        return _libsbml.Reaction_isSetId(self)
33416
33417    def isSetName(self):
33418        r"""
33419        isSetName(Reaction self) -> bool
33420
33421        Predicate returning @c True if this
33422        Reaction's 'name' attribute is set.
33423
33424        @par
33425        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
33426        moved to SBase directly, instead of being defined individually for many
33427        (but not all) objects.  LibSBML has for a long time provided functions
33428        defined on SBase itself to get, set, and unset those attributes, which
33429        would fail or otherwise return empty strings if executed on any object
33430        for which those attributes were not defined.  Now that all SBase objects
33431        define those attributes, those functions now succeed for any object with
33432        the appropriate level and version.
33433
33434        The 'name' attribute is
33435        optional and is not intended to be used for cross-referencing purposes
33436        within a model.  Its purpose instead is to provide a human-readable
33437        label for the component.  The data type of 'name' is the type
33438        <code>string</code> defined in XML Schema.  SBML imposes no
33439        restrictions as to the content of 'name' attributes beyond those
33440        restrictions defined by the <code>string</code> type in XML Schema.
33441
33442        The recommended practice for handling 'name' is as follows.  If a
33443        software tool has the capability for displaying the content of 'name'
33444        attributes, it should display this content to the user as a
33445        component's label instead of the component's 'id'.  If the user
33446        interface does not have this capability (e.g., because it cannot
33447        display or use special characters in symbol names), or if the 'name'
33448        attribute is missing on a given component, then the user interface
33449        should display the value of the 'id' attribute instead.  (Script
33450        language interpreters are especially likely to display 'id' instead of
33451        'name'.)
33452
33453        As a consequence of the above, authors of systems that automatically
33454        generate the values of 'id' attributes should be aware some systems
33455        may display the 'id''s to the user.  Authors therefore may wish to
33456        take some care to have their software create 'id' values that are: (a)
33457        reasonably easy for humans to type and read; and (b) likely to be
33458        meaningful, for example by making the 'id' attribute be an abbreviated
33459        form of the name attribute value.
33460
33461        An additional point worth mentioning is although there are
33462        restrictions on the uniqueness of 'id' values, there are no
33463        restrictions on the uniqueness of 'name' values in a model.  This
33464        allows software applications leeway in assigning component identifiers.
33465
33466        Regardless of the level and version of the SBML, these functions allow
33467        client applications to use more generalized code in some situations
33468        (for instance, when manipulating objects that are all known to have
33469        names).  If the object in question does not posess a 'name' attribute
33470        according to the SBML specification for the Level and Version in use,
33471        libSBML will not allow the name to be set, nor will it read or
33472        write 'name' attributes for those objects.
33473
33474        @return @c True if the 'name' attribute of this SBML object is
33475        set, @c False otherwise.
33476
33477        @see getName()
33478        @see setName()
33479        @see unsetName()
33480
33481        """
33482        return _libsbml.Reaction_isSetName(self)
33483
33484    def isSetKineticLaw(self):
33485        r"""
33486        isSetKineticLaw(Reaction self) -> bool
33487
33488        Predicate returning @c True if this
33489        Reaction contains a kinetic law object.
33490
33491        @return @c True if a KineticLaw is present in this Reaction,, @c False
33492        otherwise.
33493
33494        """
33495        return _libsbml.Reaction_isSetKineticLaw(self)
33496
33497    def isSetFast(self):
33498        r"""
33499        isSetFast(Reaction self) -> bool
33500
33501        Predicate returning @c True if the value of
33502        the 'fast' attribute on this Reaction is set.
33503
33504        @par
33505        In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
33506        removed.  All reactions are assumed to be equivalent to reactions
33507        in previous levels/versions that have a 'fast' attribute value
33508        of @c False.  Users should be aware that even for previous
33509        levels/versions of the specification, 'fast' attribute values of
33510        @c True never achieved widespread support, and many software
33511        packages may ignore it.  To achieve the same or similar
33512        effects as setting the fast attribute to @c True for a given
33513        reaction, the KineticLaw attribute should be constructed to
33514        produce a value in the desired time scale, or else the
33515        reaction could be replaced with an AssignmentRule or
33516        AlgebraicRule.
33517
33518        @return @c True if the 'fast' attribute is set, @c False otherwise.
33519
33520        @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
33521        Version&nbsp;2 incorrectly indicated that software tools could ignore the
33522        'fast' attribute if they did not implement support for the corresponding
33523        concept; however, further research in SBML has revealed that this is not
33524        true, and 'fast' <em>cannot be ignored</em> if it is set to @c True.
33525        Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
33526        therefore stipulate that if a model has any reactions with 'fast' set to
33527        @c True, a software tool must be able to respect the attribute or else
33528        indicate to the user that it does not have the capacity to do so.  Readers
33529        are directed to the SBML specifications, which provides more detail about
33530        the conditions under which a reaction can be considered to be fast in this
33531        sense.</span>
33532
33533        """
33534        return _libsbml.Reaction_isSetFast(self)
33535
33536    def isSetCompartment(self):
33537        r"""
33538        isSetCompartment(Reaction self) -> bool
33539
33540        Predicate returning @c True if this
33541        Reaction's 'compartment' attribute is set.
33542
33543        @return @c True if the 'compartment' attribute of this Reaction is
33544        set, @c False otherwise.
33545
33546        @note The 'compartment' attribute is available in SBML
33547        Level&nbsp;3, but is not present on Reaction in
33548        lower Levels of SBML.
33549
33550        """
33551        return _libsbml.Reaction_isSetCompartment(self)
33552
33553    def isSetReversible(self):
33554        r"""
33555        isSetReversible(Reaction self) -> bool
33556
33557        Predicate returning @c True if this
33558        Reaction's 'reversible' attribute is set.
33559
33560        @return @c True if the 'reversible' attribute of this Reaction is
33561        set, @c False otherwise.
33562
33563        """
33564        return _libsbml.Reaction_isSetReversible(self)
33565
33566    def setId(self, sid):
33567        r"""
33568        setId(Reaction self, string sid) -> int
33569
33570        Sets the value of the 'id' attribute of this Reaction.
33571
33572        @par
33573        The string @p sid is copied.
33574
33575        @par
33576        The identifier given by an object's 'id' attribute value
33577        is used to identify the object within the SBML model definition.
33578        Other objects can refer to the component using this identifier.  The
33579        data type of 'id' is always <code>SId</code> or a type derived
33580        from that, such as <code>UnitSId</code>, depending on the object in
33581        question.  All data types are defined as follows:
33582        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
33583        letter ::= 'a'..'z','A'..'Z'
33584        digit  ::= '0'..'9'
33585        idChar ::= letter | digit | '_'
33586        SId    ::= ( letter | '_' ) idChar*
33587        </pre>
33588        The characters <code>(</code> and <code>)</code> are used for grouping,
33589        the character <code>*</code> 'zero or more times', and the character
33590        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
33591        is determined by an exact character sequence match; i.e., comparisons must
33592        be performed in a case-sensitive manner.  This applies to all uses of
33593        <code>SId</code>, <code>SIdRef</code>, and derived types.
33594
33595        Users need to be aware of some important API issues that are the result of
33596        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
33597        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
33598        of SBML objects.  To simplify the work of programmers, libSBML's API
33599        provided get, set, check, and unset on the SBase object class itself
33600        instead of on individual subobject classes. This made the
33601        get/set/etc. methods uniformly available on all objects in the libSBML
33602        API.  LibSBML simply returned empty strings or otherwise did not act when
33603        the methods were applied to SBML objects that were not defined by the SBML
33604        specification to have 'id' or 'name' attributes.  Additional complications
33605        arose with the rule and assignment objects: InitialAssignment,
33606        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
33607        the rule object hierarchy was different, and in addition, then as now,
33608        they possess different attributes: 'variable' (for the rules and event
33609        assignments), 'symbol' (for initial assignments), or neither (for
33610        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
33611        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
33612
33613        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
33614        Version&nbsp;2, it became necessary to introduce a new way to interact
33615        with the attributes more consistently in libSBML to avoid breaking
33616        backward compatibility in the behavior of the original 'id' methods.  For
33617        this reason, libSBML provides four functions (getIdAttribute(),
33618        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
33619        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
33620        from SBase, regardless of the object's type.  <strong>These new methods
33621        should be used instead of the older getId()/setId()/etc. methods</strong>
33622        unless the old behavior is somehow necessary.  Regardless of the Level and
33623        Version of the SBML, these functions allow client applications to use more
33624        generalized code in some situations (for instance, when manipulating
33625        objects that are all known to have identifiers).  If the object in
33626        question does not posess an 'id' attribute according to the SBML
33627        specification for the Level and Version in use, libSBML will not allow the
33628        identifier to be set, nor will it read or write 'id' attributes for those
33629        objects.
33630
33631        @param sid the string to use as the identifier of this object.
33632
33633        @return integer value indicating success/failure of the
33634        function.  @if clike The value is drawn from the
33635        enumeration #OperationReturnValues_t. @endif@~ The possible values
33636        returned by this function are:
33637        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33638        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
33639        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
33640
33641        @see getIdAttribute()
33642        @see setIdAttribute()
33643        @see isSetIdAttribute()
33644        @see unsetIdAttribute()
33645
33646        """
33647        return _libsbml.Reaction_setId(self, sid)
33648
33649    def setName(self, name):
33650        r"""
33651        setName(Reaction self, string name) -> int
33652
33653        Sets the value of the 'name' attribute of this Reaction.
33654
33655        @par
33656
33657        The string in @p name is copied.
33658
33659        @param name the new name for the SBML object.
33660
33661        @return integer value indicating success/failure of the
33662        function.  @if clike The value is drawn from the
33663        enumeration #OperationReturnValues_t. @endif@~ The possible values
33664        returned by this function are:
33665        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33666        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
33667
33668        """
33669        return _libsbml.Reaction_setName(self, name)
33670
33671    def setKineticLaw(self, kl):
33672        r"""
33673        setKineticLaw(Reaction self, KineticLaw kl) -> int
33674
33675        Sets the 'kineticLaw' subelement of this Reaction to a copy of the
33676        given KineticLaw object.
33677
33678        @param kl the KineticLaw object to use.
33679
33680        @return integer value indicating success/failure of the
33681        function.  @if clike The value is drawn from the
33682        enumeration #OperationReturnValues_t. @endif@~ The possible values
33683        returned by this function are:
33684        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33685        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
33686        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
33687
33688        """
33689        return _libsbml.Reaction_setKineticLaw(self, kl)
33690
33691    def setReversible(self, value):
33692        r"""
33693        setReversible(Reaction self, bool value) -> int
33694
33695        Sets the value of the 'reversible' attribute of this Reaction.
33696
33697        @param value the value of the 'reversible' attribute.
33698
33699        @return integer value indicating success/failure of the
33700        function.  @if clike The value is drawn from the
33701        enumeration #OperationReturnValues_t. @endif@~ The possible values
33702        returned by this function are:
33703        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33704
33705        """
33706        return _libsbml.Reaction_setReversible(self, value)
33707
33708    def setFast(self, value):
33709        r"""
33710        setFast(Reaction self, bool value) -> int
33711
33712        Sets the value of the 'fast' attribute of this Reaction.
33713
33714        @par
33715        In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
33716        removed.  All reactions are assumed to be equivalent to reactions
33717        in previous levels/versions that have a 'fast' attribute value
33718        of @c False.  Users should be aware that even for previous
33719        levels/versions of the specification, 'fast' attribute values of
33720        @c True never achieved widespread support, and many software
33721        packages may ignore it.  To achieve the same or similar
33722        effects as setting the fast attribute to @c True for a given
33723        reaction, the KineticLaw attribute should be constructed to
33724        produce a value in the desired time scale, or else the
33725        reaction could be replaced with an AssignmentRule or
33726        AlgebraicRule.
33727
33728        Calling this function with an argument of @c True for an
33729        SBML Level&nbsp;3 Version&nbsp;2 Reaction will not set
33730        the value, as the attribute does not exist for that level/version.
33731        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
33732
33733        @param value the value of the 'fast' attribute.
33734
33735        @return integer value indicating success/failure of the
33736        function.  @if clike The value is drawn from the
33737        enumeration #OperationReturnValues_t. @endif@~ The possible values
33738        returned by this function are:
33739        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33740        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
33741
33742        @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
33743        Version&nbsp;2 incorrectly indicated that software tools could ignore the
33744        'fast' attribute if they did not implement support for the corresponding
33745        concept; however, further research in SBML has revealed that this is not
33746        true, and 'fast' <em>cannot be ignored</em> if it is set to @c True.
33747        Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
33748        therefore stipulate that if a model has any reactions with 'fast' set to
33749        @c True, a software tool must be able to respect the attribute or else
33750        indicate to the user that it does not have the capacity to do so.  Readers
33751        are directed to the SBML specifications, which provides more detail about
33752        the conditions under which a reaction can be considered to be fast in this
33753        sense.</span>
33754
33755        """
33756        return _libsbml.Reaction_setFast(self, value)
33757
33758    def setCompartment(self, sid):
33759        r"""
33760        setCompartment(Reaction self, string sid) -> int
33761
33762        Sets the value of the 'compartment' attribute of this Reaction.
33763
33764        The string @p sid is copied.
33765
33766        @param sid the string to use as the compartment of this Reaction.
33767
33768        @return integer value indicating success/failure of the
33769        function.  @if clike The value is drawn from the
33770        enumeration #OperationReturnValues_t. @endif@~ The possible values
33771        returned by this function are:
33772        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33773        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
33774        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
33775
33776        @note The 'compartment' attribute is available in SBML
33777        Level&nbsp;3, but is not present on Reaction in
33778        lower Levels of SBML.
33779
33780        """
33781        return _libsbml.Reaction_setCompartment(self, sid)
33782
33783    def unsetName(self):
33784        r"""
33785        unsetName(Reaction self) -> int
33786
33787        Unsets the value of the 'name' attribute of this Reaction.
33788
33789        @par
33790        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
33791        moved to SBase directly, instead of being defined individually for many
33792        (but not all) objects.  LibSBML has for a long time provided functions
33793        defined on SBase itself to get, set, and unset those attributes, which
33794        would fail or otherwise return empty strings if executed on any object
33795        for which those attributes were not defined.  Now that all SBase objects
33796        define those attributes, those functions now succeed for any object with
33797        the appropriate level and version.
33798
33799        The 'name' attribute is
33800        optional and is not intended to be used for cross-referencing purposes
33801        within a model.  Its purpose instead is to provide a human-readable
33802        label for the component.  The data type of 'name' is the type
33803        <code>string</code> defined in XML Schema.  SBML imposes no
33804        restrictions as to the content of 'name' attributes beyond those
33805        restrictions defined by the <code>string</code> type in XML Schema.
33806
33807        The recommended practice for handling 'name' is as follows.  If a
33808        software tool has the capability for displaying the content of 'name'
33809        attributes, it should display this content to the user as a
33810        component's label instead of the component's 'id'.  If the user
33811        interface does not have this capability (e.g., because it cannot
33812        display or use special characters in symbol names), or if the 'name'
33813        attribute is missing on a given component, then the user interface
33814        should display the value of the 'id' attribute instead.  (Script
33815        language interpreters are especially likely to display 'id' instead of
33816        'name'.)
33817
33818        As a consequence of the above, authors of systems that automatically
33819        generate the values of 'id' attributes should be aware some systems
33820        may display the 'id''s to the user.  Authors therefore may wish to
33821        take some care to have their software create 'id' values that are: (a)
33822        reasonably easy for humans to type and read; and (b) likely to be
33823        meaningful, for example by making the 'id' attribute be an abbreviated
33824        form of the name attribute value.
33825
33826        An additional point worth mentioning is although there are
33827        restrictions on the uniqueness of 'id' values, there are no
33828        restrictions on the uniqueness of 'name' values in a model.  This
33829        allows software applications leeway in assigning component identifiers.
33830
33831        Regardless of the level and version of the SBML, these functions allow
33832        client applications to use more generalized code in some situations
33833        (for instance, when manipulating objects that are all known to have
33834        names).  If the object in question does not posess a 'name' attribute
33835        according to the SBML specification for the Level and Version in use,
33836        libSBML will not allow the name to be set, nor will it read or
33837        write 'name' attributes for those objects.
33838
33839        @return integer value indicating success/failure of the
33840        function.  @if clike The value is drawn from the
33841        enumeration #OperationReturnValues_t. @endif@~ The possible values
33842        returned by this function are:
33843        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33844        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
33845
33846        @see getName()
33847        @see setName()
33848        @see isSetName()
33849
33850        """
33851        return _libsbml.Reaction_unsetName(self)
33852
33853    def unsetKineticLaw(self):
33854        r"""
33855        unsetKineticLaw(Reaction self) -> int
33856
33857        Unsets the 'kineticLaw' subelement of this Reaction.
33858
33859        @return integer value indicating success/failure of the
33860        function.  @if clike The value is drawn from the
33861        enumeration #OperationReturnValues_t. @endif@~ The possible values
33862        returned by this function are:
33863        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33864        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
33865
33866        """
33867        return _libsbml.Reaction_unsetKineticLaw(self)
33868
33869    def unsetFast(self):
33870        r"""
33871        unsetFast(Reaction self) -> int
33872
33873        Unsets the value of the 'fast' attribute of this Reaction.
33874
33875        @par
33876        In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
33877        removed.  All reactions are assumed to be equivalent to reactions
33878        in previous levels/versions that have a 'fast' attribute value
33879        of @c False.  Users should be aware that even for previous
33880        levels/versions of the specification, 'fast' attribute values of
33881        @c True never achieved widespread support, and many software
33882        packages may ignore it.  To achieve the same or similar
33883        effects as setting the fast attribute to @c True for a given
33884        reaction, the KineticLaw attribute should be constructed to
33885        produce a value in the desired time scale, or else the
33886        reaction could be replaced with an AssignmentRule or
33887        AlgebraicRule.
33888
33889        @return integer value indicating success/failure of the
33890        function.  @if clike The value is drawn from the
33891        enumeration #OperationReturnValues_t. @endif@~ The possible values
33892        returned by this function are:
33893        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33894        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
33895        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
33896
33897        @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
33898        Version&nbsp;2 incorrectly indicated that software tools could ignore the
33899        'fast' attribute if they did not implement support for the corresponding
33900        concept; however, further research in SBML has revealed that this is not
33901        true, and 'fast' <em>cannot be ignored</em> if it is set to @c True.
33902        Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
33903        therefore stipulate that if a model has any reactions with 'fast' set to
33904        @c True, a software tool must be able to respect the attribute or else
33905        indicate to the user that it does not have the capacity to do so.  Readers
33906        are directed to the SBML specifications, which provides more detail about
33907        the conditions under which a reaction can be considered to be fast in this
33908        sense.</span>
33909
33910        """
33911        return _libsbml.Reaction_unsetFast(self)
33912
33913    def unsetCompartment(self):
33914        r"""
33915        unsetCompartment(Reaction self) -> int
33916
33917        Unsets the value of the 'compartment' attribute of this Reaction.
33918
33919        @return integer value indicating success/failure of the
33920        function.  @if clike The value is drawn from the
33921        enumeration #OperationReturnValues_t. @endif@~ The possible values
33922        returned by this function are:
33923        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33924        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
33925        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
33926
33927        @note The 'compartment' attribute is available in SBML
33928        Level&nbsp;3, but is not present on Reaction in
33929        lower Levels of SBML.
33930
33931        """
33932        return _libsbml.Reaction_unsetCompartment(self)
33933
33934    def unsetReversible(self):
33935        r"""
33936        unsetReversible(Reaction self) -> int
33937
33938        Unsets the value of the 'reversible' attribute of this Reaction.
33939
33940        @return integer value indicating success/failure of the
33941        function.  @if clike The value is drawn from the
33942        enumeration #OperationReturnValues_t. @endif@~ The possible values
33943        returned by this function are:
33944        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33945        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
33946        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
33947
33948        """
33949        return _libsbml.Reaction_unsetReversible(self)
33950
33951    def addReactant(self, *args):
33952        r"""
33953        addReactant(Reaction self, SpeciesReference sr) -> int
33954        addReactant(Reaction self, Species species, double stoichiometry=1.0, string id="", bool constant=True) -> int
33955
33956        This method has multiple variants; they differ in the arguments
33957         they accept.  Each variant is described separately below.
33958
33959        @par
33960        <hr>
33961        <span class='variant-sig-heading'>Method variant with the following signature</span>:
33962         <pre class='signature'>addReactant(Species species, double stoichiometry = 1.0, string id = '', bool constant = true)</pre>
33963
33964        Adds the given species as a reactant with the given stoichiometry
33965
33966        @param species the species to be added as reactant.
33967
33968        @param stoichiometry an optional parameter specifying the
33969        stoichiometry of the added reactant (defaulting to 1).
33970
33971        @param id an optional id to be given to the species reference that will
33972        be created. (defaulting to empty string, i.e. not set).
33973
33974        @param constant an attribute specifying whether the species reference is
33975        constant or not (defaulting to true).
33976
33977        @return integer value indicating success/failure of the
33978        function.  @if clike The value is drawn from the
33979        enumeration #OperationReturnValues_t. @endif@~ The possible values
33980        returned by this function are:
33981        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
33982        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
33983        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
33984        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
33985
33986        @note This method should be used with some caution.  The fact that this
33987        method @em copies the object passed to it means that the caller will be
33988        left holding a physically different object instance than the one contained
33989        inside this object.  Changes made to the original object instance (such as
33990        resetting attribute values) will <em>not affect the instance in this
33991        object</em>.  In addition, the caller should make sure to free the
33992        original object if it is no longer being used, or else a memory leak will
33993        result.  Please see other methods on this class (particularly a
33994        corresponding method whose name begins with the word <code>create</code>)
33995        for alternatives that do not lead to these issues.
33996
33997        @note the Species object itself is NOT added to the model
33998
33999        @see createProduct()
34000
34001
34002
34003        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
34004
34005
34006        @par
34007        <hr>
34008        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34009         <pre class='signature'>addReactant(SpeciesReference sr)</pre>
34010
34011        Adds a given SpeciesReference object as a reactant in this Reaction.
34012
34013        The SpeciesReference instance in @p sr is copied.
34014
34015        @param sr a SpeciesReference object referring to a Species in the
34016        enclosing Model.
34017
34018        @return integer value indicating success/failure of the
34019        function.  @if clike The value is drawn from the
34020        enumeration #OperationReturnValues_t. @endif@~ The possible values
34021        returned by this function are:
34022        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
34023        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
34024        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
34025        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
34026        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
34027        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
34028
34029        @note This method should be used with some caution.  The fact that this
34030        method @em copies the object passed to it means that the caller will be
34031        left holding a physically different object instance than the one contained
34032        inside this object.  Changes made to the original object instance (such as
34033        resetting attribute values) will <em>not affect the instance in this
34034        object</em>.  In addition, the caller should make sure to free the
34035        original object if it is no longer being used, or else a memory leak will
34036        result.  Please see other methods on this class (particularly a
34037        corresponding method whose name begins with the word <code>create</code>)
34038        for alternatives that do not lead to these issues.
34039
34040        @see createReactant()
34041
34042        """
34043        return _libsbml.Reaction_addReactant(self, *args)
34044
34045    def addProduct(self, *args):
34046        r"""
34047        addProduct(Reaction self, SpeciesReference sr) -> int
34048        addProduct(Reaction self, Species species, double stoichiometry=1.0, string id="", bool constant=True) -> int
34049
34050        This method has multiple variants; they differ in the arguments
34051         they accept.  Each variant is described separately below.
34052
34053        @par
34054        <hr>
34055        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34056         <pre class='signature'>addProduct(Species species, double stoichiometry = 1.0, string id = '', bool constant = true)</pre>
34057
34058        Adds the given species as a product with the given stoichiometry
34059
34060        @param species the species to be added as product.
34061
34062        @param stoichiometry an optional parameter specifying the
34063        stoichiometry of the added product (defaulting to 1).
34064
34065        @param id an optional id to be given to the species reference that will
34066        be created. (defaulting to empty string, i.e. not set).
34067
34068        @param constant an attribute specifying whether the species reference is
34069        constant or not (defaulting to true).
34070
34071        @return integer value indicating success/failure of the
34072        function.  @if clike The value is drawn from the
34073        enumeration #OperationReturnValues_t. @endif@~ The possible values
34074        returned by this function are:
34075        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
34076        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
34077        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
34078        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
34079
34080        @note This method should be used with some caution.  The fact that this
34081        method @em copies the object passed to it means that the caller will be
34082        left holding a physically different object instance than the one contained
34083        inside this object.  Changes made to the original object instance (such as
34084        resetting attribute values) will <em>not affect the instance in this
34085        object</em>.  In addition, the caller should make sure to free the
34086        original object if it is no longer being used, or else a memory leak will
34087        result.  Please see other methods on this class (particularly a
34088        corresponding method whose name begins with the word <code>create</code>)
34089        for alternatives that do not lead to these issues.
34090
34091        @note the Species object itself is NOT added to the model
34092
34093        @see createProduct()
34094
34095
34096
34097        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
34098
34099
34100        @par
34101        <hr>
34102        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34103         <pre class='signature'>addProduct(SpeciesReference sr)</pre>
34104
34105        Adds a given SpeciesReference object as a product in this Reaction.
34106
34107        The SpeciesReference instance in @p sr is copied.
34108
34109        @param sr a SpeciesReference object referring to a Species in the
34110        enclosing Model.
34111
34112        @return integer value indicating success/failure of the
34113        function.  @if clike The value is drawn from the
34114        enumeration #OperationReturnValues_t. @endif@~ The possible values
34115        returned by this function are:
34116        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
34117        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
34118        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
34119        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
34120
34121        @note This method should be used with some caution.  The fact that this
34122        method @em copies the object passed to it means that the caller will be
34123        left holding a physically different object instance than the one contained
34124        inside this object.  Changes made to the original object instance (such as
34125        resetting attribute values) will <em>not affect the instance in this
34126        object</em>.  In addition, the caller should make sure to free the
34127        original object if it is no longer being used, or else a memory leak will
34128        result.  Please see other methods on this class (particularly a
34129        corresponding method whose name begins with the word <code>create</code>)
34130        for alternatives that do not lead to these issues.
34131
34132        @see createProduct()
34133
34134        """
34135        return _libsbml.Reaction_addProduct(self, *args)
34136
34137    def addModifier(self, *args):
34138        r"""
34139        addModifier(Reaction self, ModifierSpeciesReference msr) -> int
34140        addModifier(Reaction self, Species species, string id="") -> int
34141
34142        This method has multiple variants; they differ in the arguments
34143         they accept.  Each variant is described separately below.
34144
34145        @par
34146        <hr>
34147        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34148         <pre class='signature'>addModifier(Species species, string id = '')</pre>
34149
34150        Adds the given species as a modifier to this reaction
34151
34152        @param species the species to be added as modifier.
34153
34154        @param id an optional id to be given to the species reference that will
34155        be created. (defaulting to empty string, i.e. not set).
34156
34157        @return integer value indicating success/failure of the
34158        function.  @if clike The value is drawn from the
34159        enumeration #OperationReturnValues_t. @endif@~ The possible values
34160        returned by this function are:
34161        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
34162        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
34163        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
34164        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
34165
34166        @note This method should be used with some caution.  The fact that this
34167        method @em copies the object passed to it means that the caller will be
34168        left holding a physically different object instance than the one contained
34169        inside this object.  Changes made to the original object instance (such as
34170        resetting attribute values) will <em>not affect the instance in this
34171        object</em>.  In addition, the caller should make sure to free the
34172        original object if it is no longer being used, or else a memory leak will
34173        result.  Please see other methods on this class (particularly a
34174        corresponding method whose name begins with the word <code>create</code>)
34175        for alternatives that do not lead to these issues.
34176
34177        @note the Species object itself is NOT added to the model
34178
34179        @see createModifier()
34180
34181
34182
34183        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
34184
34185
34186        @par
34187        <hr>
34188        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34189         <pre class='signature'>addModifier(ModifierSpeciesReference msr)</pre>
34190
34191        Adds a given ModifierSpeciesReference object as a product in this
34192        Reaction.
34193
34194        The ModifierSpeciesReference instance in @p msr is copied.
34195
34196        @param msr a ModifierSpeciesReference object referring to a Species in
34197        the enclosing Model.
34198
34199        @return integer value indicating success/failure of the
34200        function.  @if clike The value is drawn from the
34201        enumeration #OperationReturnValues_t. @endif@~ The possible values
34202        returned by this function are:
34203        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
34204        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
34205        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
34206        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
34207        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
34208        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
34209
34210        @note This method should be used with some caution.  The fact that this
34211        method @em copies the object passed to it means that the caller will be
34212        left holding a physically different object instance than the one contained
34213        inside this object.  Changes made to the original object instance (such as
34214        resetting attribute values) will <em>not affect the instance in this
34215        object</em>.  In addition, the caller should make sure to free the
34216        original object if it is no longer being used, or else a memory leak will
34217        result.  Please see other methods on this class (particularly a
34218        corresponding method whose name begins with the word <code>create</code>)
34219        for alternatives that do not lead to these issues.
34220
34221        @see createModifier()
34222
34223        """
34224        return _libsbml.Reaction_addModifier(self, *args)
34225
34226    def createReactant(self):
34227        r"""
34228        createReactant(Reaction self) -> SpeciesReference
34229
34230        Creates a new SpeciesReference, adds it to this Reaction's list of
34231        reactants, and returns it.
34232
34233        @return a new SpeciesReference object.
34234
34235        """
34236        return _libsbml.Reaction_createReactant(self)
34237
34238    def createProduct(self):
34239        r"""
34240        createProduct(Reaction self) -> SpeciesReference
34241
34242        Creates a new SpeciesReference, adds it to this Reaction's list of
34243        products, and returns it.
34244
34245        @return a new SpeciesReference object.
34246
34247        """
34248        return _libsbml.Reaction_createProduct(self)
34249
34250    def createModifier(self):
34251        r"""
34252        createModifier(Reaction self) -> ModifierSpeciesReference
34253
34254        Creates a new ModifierSpeciesReference, adds it to this Reaction's
34255        list of modifiers and returns it.
34256
34257        @return a new ModifierSpeciesReference object.
34258
34259        """
34260        return _libsbml.Reaction_createModifier(self)
34261
34262    def createKineticLaw(self):
34263        r"""
34264        createKineticLaw(Reaction self) -> KineticLaw
34265
34266        Creates a new KineticLaw object, installs it as this Reaction's
34267        'kineticLaw' subelement, and returns it.
34268
34269        If this Reaction had a previous KineticLaw, it will be destroyed.
34270
34271        @return the new KineticLaw object.
34272
34273        """
34274        return _libsbml.Reaction_createKineticLaw(self)
34275
34276    def getListOfReactants(self, *args):
34277        r"""
34278        getListOfReactants(Reaction self) -> ListOfSpeciesReferences
34279        getListOfReactants(Reaction self) -> ListOfSpeciesReferences
34280
34281        Returns the list of reactants in this Reaction object.
34282
34283        @return the ListOfSpeciesReferences containing the references to the
34284        species acting as reactants in this reaction.
34285
34286        """
34287        return _libsbml.Reaction_getListOfReactants(self, *args)
34288
34289    def getListOfProducts(self, *args):
34290        r"""
34291        getListOfProducts(Reaction self) -> ListOfSpeciesReferences
34292        getListOfProducts(Reaction self) -> ListOfSpeciesReferences
34293
34294        Returns the list of products in this Reaction object.
34295
34296        @return the ListOfSpeciesReferences containing the references to the
34297        species acting as products in this reaction.
34298
34299        """
34300        return _libsbml.Reaction_getListOfProducts(self, *args)
34301
34302    def getListOfModifiers(self, *args):
34303        r"""
34304        getListOfModifiers(Reaction self) -> ListOfSpeciesReferences
34305        getListOfModifiers(Reaction self) -> ListOfSpeciesReferences
34306
34307        Returns the list of modifiers in this Reaction object.
34308
34309        @return the ListOfSpeciesReferences containing the references to the
34310        species acting as modifiers in this reaction.
34311
34312        """
34313        return _libsbml.Reaction_getListOfModifiers(self, *args)
34314
34315    def getReactant(self, *args):
34316        r"""
34317        getReactant(Reaction self, unsigned int n) -> SpeciesReference
34318        getReactant(Reaction self, unsigned int n) -> SpeciesReference
34319        getReactant(Reaction self, string species) -> SpeciesReference
34320        getReactant(Reaction self, string species) -> SpeciesReference
34321
34322        This method has multiple variants; they differ in the arguments
34323         they accept.  Each variant is described separately below.
34324
34325        @par
34326        <hr>
34327        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34328         <pre class='signature'>getReactant(string species)</pre>
34329
34330        Returns the reactant species (as a SpeciesReference object) having
34331        a specific identifier in this Reaction.
34332
34333        @param species the identifier of the reactant Species ('species'
34334        attribute of the reactant SpeciesReference object).
34335
34336        @return a SpeciesReference object, or @c None if no species with the
34337        given identifier @p species appears as a reactant in this Reaction.
34338
34339
34340        @par
34341        <hr>
34342        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34343         <pre class='signature'>getReactant(long n)</pre>
34344
34345        Returns the nth reactant species (as a SpeciesReference object)
34346        in the list of reactants in this Reaction.
34347
34348        Callers should first call getNumReactants() to find out how many
34349        reactants there are, to avoid using an invalid index number.
34350
34351        @param n the index of the reactant sought.
34352
34353        @return the nth reactant (as a SpeciesReference object) of this
34354        Reaction.
34355        If the index @p n is invalid, @c None is returned.
34356
34357        """
34358        return _libsbml.Reaction_getReactant(self, *args)
34359
34360    def getProduct(self, *args):
34361        r"""
34362        getProduct(Reaction self, unsigned int n) -> SpeciesReference
34363        getProduct(Reaction self, unsigned int n) -> SpeciesReference
34364        getProduct(Reaction self, string species) -> SpeciesReference
34365        getProduct(Reaction self, string species) -> SpeciesReference
34366
34367        This method has multiple variants; they differ in the arguments
34368         they accept.  Each variant is described separately below.
34369
34370        @par
34371        <hr>
34372        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34373         <pre class='signature'>getProduct(string species)</pre>
34374
34375        Returns the product species (as a SpeciesReference object) having
34376        a specific identifier in this Reaction.
34377
34378        @param species the identifier of the product Species ('species'
34379        attribute of the product SpeciesReference object).
34380
34381        @return a SpeciesReference object, or @c None if no species with the
34382        given identifier @p species appears as a product in this Reaction.
34383
34384
34385        @par
34386        <hr>
34387        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34388         <pre class='signature'>getProduct(long n)</pre>
34389
34390        Returns the nth product species (as a SpeciesReference object)
34391        in the list of products in this Reaction.
34392
34393        Callers should first call getNumProducts() to find out how many
34394        products there are, to avoid using an invalid index number.
34395
34396        @param n the index of the product sought.
34397
34398        @return the nth product (as a SpeciesReference object) of this
34399        Reaction.
34400        If the index @p n is invalid, @c None is returned.
34401
34402        """
34403        return _libsbml.Reaction_getProduct(self, *args)
34404
34405    def getModifier(self, *args):
34406        r"""
34407        getModifier(Reaction self, unsigned int n) -> ModifierSpeciesReference
34408        getModifier(Reaction self, unsigned int n) -> ModifierSpeciesReference
34409        getModifier(Reaction self, string species) -> ModifierSpeciesReference
34410        getModifier(Reaction self, string species) -> ModifierSpeciesReference
34411
34412        This method has multiple variants; they differ in the arguments
34413         they accept.  Each variant is described separately below.
34414
34415        @par
34416        <hr>
34417        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34418         <pre class='signature'>getModifier(string species)</pre>
34419
34420        Returns the modifier species (as a ModifierSpeciesReference object)
34421        having a specific identifier in this Reaction.
34422
34423        @param species the identifier of the modifier Species ('species'
34424        attribute of the ModifierSpeciesReference object).
34425
34426        @return a ModifierSpeciesReference object, or @c None if no species with
34427        the given identifier @p species appears as a modifier in this
34428        Reaction.
34429
34430
34431        @par
34432        <hr>
34433        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34434         <pre class='signature'>getModifier(long n)</pre>
34435
34436        Returns the nth modifier species (as a ModifierSpeciesReference object)
34437        in the list of modifiers of this Reaction.
34438
34439        Callers should first call getNumModifiers() to find out how many
34440        modifiers there are, to avoid using an invalid index number.
34441
34442        @param n the index of the modifier species sought.
34443
34444        @return the nth modifier (as a ModifierSpeciesReference object) of
34445        this Reaction.
34446        If the index @p n is invalid, @c None is returned.
34447
34448        """
34449        return _libsbml.Reaction_getModifier(self, *args)
34450
34451    def getNumReactants(self):
34452        r"""
34453        getNumReactants(Reaction self) -> unsigned int
34454
34455        Returns the number of reactant species in this Reaction.
34456
34457        @return the number of reactants in this Reaction.
34458
34459        """
34460        return _libsbml.Reaction_getNumReactants(self)
34461
34462    def getNumProducts(self):
34463        r"""
34464        getNumProducts(Reaction self) -> unsigned int
34465
34466        Returns the number of product species in this Reaction.
34467
34468        @return the number of products in this Reaction.
34469
34470        """
34471        return _libsbml.Reaction_getNumProducts(self)
34472
34473    def getNumModifiers(self):
34474        r"""
34475        getNumModifiers(Reaction self) -> unsigned int
34476
34477        Returns the number of modifier species in this Reaction.
34478
34479        @return the number of modifiers in this Reaction.
34480
34481        """
34482        return _libsbml.Reaction_getNumModifiers(self)
34483
34484    def removeReactant(self, *args):
34485        r"""
34486        removeReactant(Reaction self, unsigned int n) -> SpeciesReference
34487        removeReactant(Reaction self, string species) -> SpeciesReference
34488
34489        This method has multiple variants; they differ in the arguments
34490         they accept.  Each variant is described separately below.
34491
34492        @par
34493        <hr>
34494        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34495         <pre class='signature'>removeReactant(string species)</pre>
34496
34497        Removes the reactant species (SpeciesReference object) having the given
34498        'species' attribute in this Reaction and returns a pointer to it.
34499
34500        The caller owns the returned object and is responsible for deleting it.
34501
34502        @param species the 'species' attribute of the reactant SpeciesReference
34503        object.
34504
34505        @return the removed reactant SpeciesReference object, or @c None if no
34506        reactant SpeciesReference object with the given 'species' attribute
34507        @p species exists in this Reaction.
34508
34509
34510        @par
34511        <hr>
34512        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34513         <pre class='signature'>removeReactant(long n)</pre>
34514
34515        Removes the nth reactant species (SpeciesReference object) in the list of
34516        reactants in this Reaction and returns a pointer to it.
34517
34518        The caller owns the returned object and is responsible for deleting it.
34519        The caller should first call getNumReactants() to find out how many
34520        reactants there are, to avoid using an invalid index number.
34521
34522        @param n the index of the reactant SpeciesReference object to remove.
34523
34524        @return the removed reactant SpeciesReference object, or @c None if the
34525        given index is out of range.
34526
34527        """
34528        return _libsbml.Reaction_removeReactant(self, *args)
34529
34530    def removeProduct(self, *args):
34531        r"""
34532        removeProduct(Reaction self, unsigned int n) -> SpeciesReference
34533        removeProduct(Reaction self, string species) -> SpeciesReference
34534
34535        This method has multiple variants; they differ in the arguments
34536         they accept.  Each variant is described separately below.
34537
34538        @par
34539        <hr>
34540        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34541         <pre class='signature'>removeProduct(string species)</pre>
34542
34543        Removes the product species (SpeciesReference object) having the given
34544        'species' attribute in this Reaction and returns a pointer to it.
34545
34546        The caller owns the returned object and is responsible for deleting it.
34547
34548        @param species the 'species' attribute of the product SpeciesReference
34549        object.
34550
34551        @return the removed product SpeciesReference object, or @c None if no
34552        product SpeciesReference object with the given 'species' attribute
34553        @p species exists in this Reaction.
34554
34555
34556        @par
34557        <hr>
34558        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34559         <pre class='signature'>removeProduct(long n)</pre>
34560
34561        Removes the nth product species (SpeciesReference object) in the list of
34562        products in this Reaction and returns a pointer to it.
34563
34564        The caller owns the returned object and is responsible for deleting it.
34565        The caller should first call getNumProducts() to find out how many
34566        products there are, to avoid using an invalid index number.
34567
34568        @param n the index of the product SpeciesReference object to remove.
34569
34570        @return the removed product SpeciesReference object, or @c None if the
34571        given index is out of range.
34572
34573        """
34574        return _libsbml.Reaction_removeProduct(self, *args)
34575
34576    def removeModifier(self, *args):
34577        r"""
34578        removeModifier(Reaction self, unsigned int n) -> ModifierSpeciesReference
34579        removeModifier(Reaction self, string species) -> ModifierSpeciesReference
34580
34581        This method has multiple variants; they differ in the arguments
34582         they accept.  Each variant is described separately below.
34583
34584        @par
34585        <hr>
34586        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34587         <pre class='signature'>removeModifier(string species)</pre>
34588
34589        Removes the modifier species (ModifierSpeciesReference object) having
34590        the given 'species' attribute in this Reaction and returns a pointer to it.
34591
34592        The caller owns the returned object and is responsible for deleting it.
34593
34594        @param species the 'species' attribute of the ModifierSpeciesReference
34595        object.
34596
34597        @return the removed ModifierSpeciesReference object, or @c None if no
34598        ModifierSpeciesReference object with the given 'species' attribute @p
34599        species exists in this Reaction.
34600
34601
34602        @par
34603        <hr>
34604        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34605         <pre class='signature'>removeModifier(long n)</pre>
34606
34607        Removes the nth modifier species (ModifierSpeciesReference object) in
34608        the list of  modifiers in this Reaction and returns a pointer to it.
34609
34610        The caller owns the returned object and is responsible for deleting it.
34611        The caller should first call getNumModifiers() to find out how many
34612        modifiers there are, to avoid using an invalid index number.
34613
34614        @param n the index of the ModifierSpeciesReference object to remove.
34615
34616        @return the removed ModifierSpeciesReference object, or @c None if the
34617        given index is out of range.
34618
34619        """
34620        return _libsbml.Reaction_removeModifier(self, *args)
34621
34622    def connectToChild(self):
34623        r"""connectToChild(Reaction self)"""
34624        return _libsbml.Reaction_connectToChild(self)
34625
34626    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
34627        r"""
34628        enablePackageInternal(Reaction self, string pkgURI, string pkgPrefix, bool flag)
34629
34630        @internal
34631
34632        @internal
34633
34634        """
34635        return _libsbml.Reaction_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
34636
34637    def updateSBMLNamespace(self, package, level, version):
34638        r"""
34639        updateSBMLNamespace(Reaction self, string package, unsigned int level, unsigned int version)
34640
34641        @internal
34642
34643        @internal
34644
34645        """
34646        return _libsbml.Reaction_updateSBMLNamespace(self, package, level, version)
34647
34648    def getTypeCode(self):
34649        r"""
34650        getTypeCode(Reaction self) -> int
34651
34652        Returns the libSBML type code for this SBML object.
34653
34654        @par
34655        LibSBML attaches an identifying code to every kind of SBML object.  These
34656        are integer constants known as <em>SBML type codes</em>.  The names of all
34657        the codes begin with the characters <code>SBML_</code>.
34658        @if clike The set of possible type codes for core elements is defined in
34659        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
34660        SBML Level&nbsp;3 packages define their own extra enumerations of type
34661        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
34662        package).@endif@if java In the Java language interface for libSBML, the
34663        type codes are defined as static integer constants in the interface class
34664        {@link libsbmlConstants}.  @endif@if python In the Python language
34665        interface for libSBML, the type codes are defined as static integer
34666        constants in the interface class @link libsbml@endlink.@endif@if csharp In
34667        the C# language interface for libSBML, the type codes are defined as
34668        static integer constants in the interface class
34669        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
34670        package plug-ins may use overlapping type codes; to identify the package
34671        to which a given object belongs, call the
34672        <code>@if conly SBase_getPackageName()
34673        @else SBase.getPackageName()
34674        @endif</code>
34675        method on the object.
34676
34677        The exception to this is lists:  all SBML-style list elements have the type
34678        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
34679        are from.
34680
34681        @return the SBML type code for this object:
34682        @link libsbml#SBML_REACTION SBML_REACTION@endlink (default).
34683
34684        @warning <span class='warning'>The specific integer values of the possible
34685        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
34686        packages,  To fully identify the correct code, <strong>it is necessary to
34687        invoke both getPackageName() and getTypeCode()</strong> (or
34688        ListOf.getItemTypeCode()).</span>
34689
34690        @see getElementName()
34691        @see getPackageName()
34692
34693        """
34694        return _libsbml.Reaction_getTypeCode(self)
34695
34696    def getElementName(self):
34697        r"""
34698        getElementName(Reaction self) -> string
34699
34700        Returns the XML element name of this object, which for Reaction, is
34701        always @c 'reaction'.
34702
34703        @return the name of this element, i.e., @c 'reaction'.
34704
34705        """
34706        return _libsbml.Reaction_getElementName(self)
34707
34708    def hasRequiredAttributes(self):
34709        r"""
34710        hasRequiredAttributes(Reaction self) -> bool
34711
34712        Predicate returning @c True if all the required attributes for this
34713        Reaction object have been set.
34714
34715        The required attributes for a Reaction object are:
34716        @li 'id' (or 'name' in SBML Level&nbsp;1)
34717        @li 'fast' (in Level&nbsp;3 Version&nbsp;1 only, where it is defined as a required attribute)
34718        @li 'reversible' (in Level&nbsp;3 only, where it is defined as a required attribute)
34719
34720        @return @c True if the required attributes have been set, @c False
34721        otherwise.
34722
34723        """
34724        return _libsbml.Reaction_hasRequiredAttributes(self)
34725
34726# Register Reaction in _libsbml:
34727_libsbml.Reaction_swigregister(Reaction)
34728
34729class ListOfReactions(ListOf):
34730    r"""
34731
34732    @sbmlpackage{core}
34733
34734    @htmlinclude pkg-marker-core.html A list of Reaction objects.
34735
34736    @par
34737    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
34738    are merely containers used for organizing the main components of an SBML
34739    model.  In libSBML's implementation, ListOf___
34740    @if conly data structures @else classes@endif@~ are derived from the
34741    intermediate utility @if conly structure @else class@endif@~ ListOf, which
34742    is not defined by the SBML specifications but serves as a useful
34743    programmatic construct.  ListOf is itself is in turn derived from SBase,
34744    which provides all of the various ListOf___
34745    @if conly data structures @else classes@endif@~ with common features
34746    defined by the SBML specification, such as 'metaid' attributes and
34747    annotations.
34748
34749    The relationship between the lists and the rest of an SBML model is
34750    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
34751
34752    @htmlinclude listof-illustration.html
34753
34754    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
34755    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
34756    Version&nbsp;2 allows
34757    containers to contain zero or more of the relevant object, instead of
34758    requiring at least one.  As such, libsbml will write out an
34759    otherwise-empty ListOf___ element that has any optional attribute set
34760    (such as 'id' or 'metaid'), that has an optional child (such
34761    as a 'notes' or 'annotation'), or that has attributes or children set
34762    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
34763    any other children.
34764
34765    Readers may wonder about the motivations for using the ListOf___
34766    containers in SBML.  A simpler approach in XML might be to place the
34767    components all directly at the top level of the model definition.  The
34768    choice made in SBML is to group them within XML elements named after
34769    %ListOf<em>Classname</em>, in part because it helps organize the
34770    components.  More importantly, the fact that the container classes are
34771    derived from SBase means that software tools can add information @em about
34772    the lists themselves into each list container's 'annotation'.
34773
34774    @see ListOfFunctionDefinitions
34775    @see ListOfUnitDefinitions
34776    @see ListOfCompartmentTypes
34777    @see ListOfSpeciesTypes
34778    @see ListOfCompartments
34779    @see ListOfSpecies
34780    @see ListOfParameters
34781    @see ListOfInitialAssignments
34782    @see ListOfRules
34783    @see ListOfConstraints
34784    @see ListOfReactions
34785    @see ListOfEvents
34786
34787    @if conly
34788    @note In the C API for libSBML, functions that in other language APIs
34789    would be inherited by the various ListOf___ structures not shown in the
34790    pages for the individual ListOf___'s.  Instead, the functions are defined
34791    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
34792    the many common functions available for manipulating ListOf___
34793    structures</strong>.  The documentation for the individual ListOf___
34794    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
34795    all of the functionality available. @endif@~
34796
34797    """
34798
34799    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
34800    __repr__ = _swig_repr
34801
34802    def __init__(self, *args):
34803        r"""
34804        __init__(ListOfReactions self, unsigned int level, unsigned int version) -> ListOfReactions
34805        __init__(ListOfReactions self, SBMLNamespaces sbmlns) -> ListOfReactions
34806
34807        This method has multiple variants; they differ in the arguments
34808         they accept.  Each variant is described separately below.
34809
34810        @par
34811        <hr>
34812        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34813         <pre class='signature'>ListOfReactions(SBMLNamespaces sbmlns)</pre>
34814
34815        Creates a new ListOfReactions object.
34816
34817        The object is constructed such that it is valid for the SBML Level and
34818        Version combination determined by the SBMLNamespaces object in @p
34819        sbmlns.
34820
34821        @param sbmlns an SBMLNamespaces object that is used to determine the
34822        characteristics of the ListOfReactions object to be created.
34823
34824        @throws SBMLConstructorException
34825        Thrown if the given @p sbmlns is inconsistent or incompatible
34826        with this object.
34827
34828        @note Attempting to add an object to an SBMLDocument having a different
34829        combination of SBML Level, Version and XML namespaces than the object
34830        itself will result in an error at the time a caller attempts to make the
34831        addition.  A parent object must have compatible Level, Version and XML
34832        namespaces.  (Strictly speaking, a parent may also have more XML
34833        namespaces than a child, but the reverse is not permitted.)  The
34834        restriction is necessary to ensure that an SBML model has a consistent
34835        overall structure.  This requires callers to manage their objects
34836        carefully, but the benefit is increased flexibility in how models can be
34837        created by permitting callers to create objects bottom-up if desired.  In
34838        situations where objects are not yet attached to parents (e.g.,
34839        SBMLDocument), knowledge of the intented SBML Level and Version help
34840        libSBML determine such things as whether it is valid to assign a
34841        particular value to an attribute.
34842
34843
34844        @par
34845        <hr>
34846        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34847         <pre class='signature'>ListOfReactions(long level, long version)</pre>
34848
34849        Creates a new ListOfReactions object.
34850
34851        The object is constructed such that it is valid for the given SBML
34852        Level and Version combination.
34853
34854        @param level the SBML Level.
34855
34856        @param version the Version within the SBML Level.
34857
34858        @throws SBMLConstructorException
34859        Thrown if the given @p level and @p version combination are invalid
34860        or if this object is incompatible with the given level and version.
34861
34862        @note Attempting to add an object to an SBMLDocument having a different
34863        combination of SBML Level, Version and XML namespaces than the object
34864        itself will result in an error at the time a caller attempts to make the
34865        addition.  A parent object must have compatible Level, Version and XML
34866        namespaces.  (Strictly speaking, a parent may also have more XML
34867        namespaces than a child, but the reverse is not permitted.)  The
34868        restriction is necessary to ensure that an SBML model has a consistent
34869        overall structure.  This requires callers to manage their objects
34870        carefully, but the benefit is increased flexibility in how models can be
34871        created by permitting callers to create objects bottom-up if desired.  In
34872        situations where objects are not yet attached to parents (e.g.,
34873        SBMLDocument), knowledge of the intented SBML Level and Version help
34874        libSBML determine such things as whether it is valid to assign a
34875        particular value to an attribute.
34876
34877        """
34878        _libsbml.ListOfReactions_swiginit(self, _libsbml.new_ListOfReactions(*args))
34879
34880    def clone(self):
34881        r"""
34882        clone(ListOfReactions self) -> ListOfReactions
34883
34884        Creates and returns a deep copy of this ListOfReactions object.
34885
34886        @return the (deep) copy of this ListOfReactions object.
34887
34888        """
34889        return _libsbml.ListOfReactions_clone(self)
34890
34891    def getItemTypeCode(self):
34892        r"""
34893        getItemTypeCode(ListOfReactions self) -> int
34894
34895        Returns the libSBML type code for the objects contained in this ListOf
34896        (i.e., Reaction objects, if the list is non-empty).
34897
34898        @par
34899        LibSBML attaches an identifying code to every kind of SBML object.  These
34900        are integer constants known as <em>SBML type codes</em>.  The names of all
34901        the codes begin with the characters <code>SBML_</code>.
34902        @if clike The set of possible type codes for core elements is defined in
34903        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
34904        SBML Level&nbsp;3 packages define their own extra enumerations of type
34905        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
34906        package).@endif@if java In the Java language interface for libSBML, the
34907        type codes are defined as static integer constants in the interface class
34908        {@link libsbmlConstants}.  @endif@if python In the Python language
34909        interface for libSBML, the type codes are defined as static integer
34910        constants in the interface class @link libsbml@endlink.@endif@if csharp In
34911        the C# language interface for libSBML, the type codes are defined as
34912        static integer constants in the interface class
34913        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
34914        package plug-ins may use overlapping type codes; to identify the package
34915        to which a given object belongs, call the
34916        <code>@if conly SBase_getPackageName()
34917        @else SBase.getPackageName()
34918        @endif</code>
34919        method on the object.
34920
34921        The exception to this is lists:  all SBML-style list elements have the type
34922        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
34923        are from.
34924
34925        @return the SBML type code for objects contained in this list:
34926        @link libsbml#SBML_REACTION SBML_REACTION@endlink (default).
34927
34928        @see getElementName()
34929        @see getPackageName()
34930
34931        """
34932        return _libsbml.ListOfReactions_getItemTypeCode(self)
34933
34934    def getElementName(self):
34935        r"""
34936        getElementName(ListOfReactions self) -> string
34937
34938        Returns the XML element name of this object
34939
34940        For ListOfReactions, the XML element name is @c 'listOfReactions'.
34941
34942        @return the name of this element, i.e., @c 'listOfReactions'.
34943
34944        """
34945        return _libsbml.ListOfReactions_getElementName(self)
34946
34947    def get(self, *args):
34948        r"""
34949        get(ListOfReactions self, unsigned int n) -> Reaction
34950        get(ListOfReactions self, unsigned int n) -> Reaction
34951        get(ListOfReactions self, string sid) -> Reaction
34952        get(ListOfReactions self, string sid) -> Reaction
34953
34954        This method has multiple variants; they differ in the arguments
34955         they accept.  Each variant is described separately below.
34956
34957        @par
34958        <hr>
34959        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34960         <pre class='signature'>get(long n)</pre>
34961
34962        Get a Reaction from the ListOfReactions.
34963
34964        @param n the index number of the Reaction to get.
34965
34966        @return the nth Reaction in this ListOfReactions.
34967        If the index @p n is invalid, @c None is returned.
34968
34969        @see size()
34970
34971
34972        @par
34973        <hr>
34974        <span class='variant-sig-heading'>Method variant with the following signature</span>:
34975         <pre class='signature'>get(string sid)</pre>
34976
34977        Get a Reaction from the ListOfReactions based on its identifier.
34978
34979        @param sid a string representing the identifier of the Reaction to get.
34980
34981        @return Reaction in this ListOfReactions with the given @p sid or
34982        @c None if no such Reaction exists.
34983
34984        @see get()
34985        @see size()
34986
34987        """
34988        return _libsbml.ListOfReactions_get(self, *args)
34989
34990    def remove(self, *args):
34991        r"""
34992        remove(ListOfReactions self, unsigned int n) -> Reaction
34993        remove(ListOfReactions self, string sid) -> Reaction
34994
34995        This method has multiple variants; they differ in the arguments
34996         they accept.  Each variant is described separately below.
34997
34998        @par
34999        <hr>
35000        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35001         <pre class='signature'>remove(long n)</pre>
35002
35003        Removes the nth item from this ListOfReactions items and returns a
35004        pointer to it.
35005
35006        The caller owns the returned item and is responsible for deleting it.
35007
35008        @param n the index of the item to remove.
35009
35010        @see size()
35011
35012
35013        @par
35014        <hr>
35015        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35016         <pre class='signature'>remove(string sid)</pre>
35017
35018        Removes item in this ListOfReactions items with the given identifier.
35019
35020        The caller owns the returned item and is responsible for deleting it.
35021        If none of the items in this list have the identifier @p sid, then
35022        None is returned.
35023
35024        @param sid the identifier of the item to remove.
35025
35026        @return the item removed.  As mentioned above, the caller owns the
35027        returned item.
35028
35029        """
35030        return _libsbml.ListOfReactions_remove(self, *args)
35031    __swig_destroy__ = _libsbml.delete_ListOfReactions
35032
35033# Register ListOfReactions in _libsbml:
35034_libsbml.ListOfReactions_swigregister(ListOfReactions)
35035
35036class KineticLaw(SBase):
35037    r"""
35038
35039    @sbmlpackage{core}
35040
35041    @htmlinclude pkg-marker-core.html The rate expression for an SBML reaction.
35042
35043    An object of class KineticLaw is used to describe the rate at which the
35044    process defined by a given Reaction takes place.  KineticLaw has
35045    subelements called 'math' (for MathML content) and 'listOfParameters'
35046    (of class ListOfParameters), in addition to the attributes and
35047    subelements it inherits from SBase.
35048
35049    KineticLaw's 'math' subelement for holding a MathML formula (required
35050    through SBML Level&nbsp;3 Version&nbsp;1, but optional as of SBML
35051    Level&nbsp;3 Version&nbsp;2) defines the
35052    rate of the reaction.  The formula may refer to other entities in a
35053    model as well as local parameter definitions within the scope of the
35054    Reaction (see below).  It is important to keep in mind, however, that
35055    the only Species identifiers that can be used in this formula are those
35056    declared in the lists of reactants, products and modifiers in the
35057    Reaction structure.  (In other words, before a species can be referenced
35058    in the KineticLaw, it must be declared in one of those lists.)
35059
35060    KineticLaw provides a way to define @em local parameters whose
35061    identifiers can be used in the 'math' formula of that KineticLaw
35062    instance.  Prior to SBML Level&nbsp;3, these parameter definitions are
35063    stored inside a 'listOfParameters' subelement containing Parameter
35064    objects; in SBML Level&nbsp;3, this is achieved using a specialized
35065    object class called LocalParameter and the containing subelement is
35066    called 'listOfLocalParameters'.  In both cases, the parameters so
35067    defined are only visible within the KineticLaw (or, as of SBML
35068    Level&nbsp;3 Version&nbsp;2, only visible within the parent Reaction);
35069    they cannot be accessed
35070    outside.  A local parameter within one reaction is not visible from
35071    within another reaction, nor is it visible to any other construct
35072    outside of the KineticLaw in which it is defined.  In addition, another
35073    important feature is that if such a Parameter (or in Level&nbsp;3,
35074    LocalParameter) object has the same identifier as another object in the
35075    scope of the enclosing Model, the definition inside the KineticLaw takes
35076    precedence.  In other words, within the KineticLaw's 'math' formula,
35077    references to local parameter identifiers <strong>shadow any identical
35078    global identifiers</strong>.
35079
35080    The values of local parameters defined within KineticLaw objects cannot
35081    change.  In SBML Level&nbsp;3, this quality is built into the
35082    LocalParameter construct.  In Level&nbsp;2, where the same kind of
35083    Parameter object class is used as for global parameters, the Parameter
35084    objects' 'constant' attribute must always have a value of @c True
35085    (either explicitly or left to its default value).
35086
35087
35088    @section shadowing-warning A warning about identifier shadowing
35089
35090    A common misconception is that different classes of objects (e.g.,
35091    species, compartments, parameters) in SBML have different identifier
35092    scopes.  They do not.  The implication is that if a KineticLaw's local
35093    parameter definition uses an identifier identical to @em any other
35094    identifier defined in the model outside the KineticLaw, even if the
35095    other identifier does @em not belong to a parameter type of object, the
35096    local parameter's identifier takes precedence within that KineticLaw's
35097    'math' formula.  It is not an error in SBML for identifiers to shadow
35098    each other this way, but can lead to confusing and subtle errors.
35099
35100
35101    @section version-diffs SBML Level/Version differences
35102
35103    In SBML Level&nbsp;2 Version&nbsp;1, the SBML specification
35104    included two additional attributes on KineticLaw called 'substanceUnits'
35105    and 'timeUnits'.  They were removed beginning with SBML Level&nbsp;2
35106    Version&nbsp;2 because further research determined they introduced many
35107    problems.  The most significant problem was that their use could easily
35108    lead to the creation of valid models whose reactions nevertheless could
35109    not be integrated into a system of equations without outside knowledge
35110    for converting the quantities used.  Examination of real-life models
35111    revealed that a common reason for using 'substanceUnits' on KineticLaw
35112    was to set the units of all reactions to the same set of substance
35113    units, something that is better achieved by using UnitDefinition to
35114    redefine @c 'substance' for the whole Model.
35115
35116    As mentioned above, in SBML Level&nbsp;2 Versions 2&ndash;4, local
35117    parameters are of class Parameter.  In SBML Level&nbsp;3, the class of
35118    object is LocalParameter.
35119
35120    In SBML Level&nbsp;3 Version&nbsp;2, the scope of the LocalParameter
35121    was expanded to the entire Reaction, instead of just the KineticLaw.
35122    This introduced a single new restriction: an L3v2 LocalParameter may
35123    not now shadow the @c id of any Species referenced by a SpeciesReference
35124    in the same Reaction.  Other than that, there is no difference in any
35125    core construct.  However, packages may take advantage of this new scope by
35126    adding elements to the Reaction that may now reference a LocalParameter
35127    defined in the same Reaction.
35128
35129    """
35130
35131    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
35132    __repr__ = _swig_repr
35133    __swig_destroy__ = _libsbml.delete_KineticLaw
35134
35135    def __init__(self, *args):
35136        r"""
35137        __init__(KineticLaw self, unsigned int level, unsigned int version) -> KineticLaw
35138        __init__(KineticLaw self, SBMLNamespaces sbmlns) -> KineticLaw
35139        __init__(KineticLaw self, KineticLaw orig) -> KineticLaw
35140
35141        This method has multiple variants; they differ in the arguments
35142         they accept.  Each variant is described separately below.
35143
35144        @par
35145        <hr>
35146        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35147         <pre class='signature'>KineticLaw(SBMLNamespaces sbmlns)</pre>
35148
35149        Creates a new KineticLaw using the given SBMLNamespaces object
35150        @p sbmlns.
35151
35152        @par
35153        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
35154        information.  It is used to communicate the SBML Level, Version, and (in
35155        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
35156        common approach to using libSBML's SBMLNamespaces facilities is to create an
35157        SBMLNamespaces object somewhere in a program once, then hand that object
35158        as needed to object constructors that accept SBMLNamespaces as arguments.
35159
35160        @param sbmlns an SBMLNamespaces object.
35161
35162        @throws SBMLConstructorException
35163        Thrown if the given @p sbmlns is inconsistent or incompatible
35164        with this object.
35165
35166        @note Attempting to add an object to an SBMLDocument having a different
35167        combination of SBML Level, Version and XML namespaces than the object
35168        itself will result in an error at the time a caller attempts to make the
35169        addition.  A parent object must have compatible Level, Version and XML
35170        namespaces.  (Strictly speaking, a parent may also have more XML
35171        namespaces than a child, but the reverse is not permitted.)  The
35172        restriction is necessary to ensure that an SBML model has a consistent
35173        overall structure.  This requires callers to manage their objects
35174        carefully, but the benefit is increased flexibility in how models can be
35175        created by permitting callers to create objects bottom-up if desired.  In
35176        situations where objects are not yet attached to parents (e.g.,
35177        SBMLDocument), knowledge of the intented SBML Level and Version help
35178        libSBML determine such things as whether it is valid to assign a
35179        particular value to an attribute.
35180
35181
35182        @par
35183        <hr>
35184        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35185         <pre class='signature'>KineticLaw(long level, long version)</pre>
35186
35187        Creates a new KineticLaw using the given SBML @p level and @p version
35188        values.
35189
35190        @param level a long integer, the SBML Level to assign to this KineticLaw.
35191
35192        @param version a long integer, the SBML Version to assign to this
35193        KineticLaw.
35194
35195        @throws SBMLConstructorException
35196        Thrown if the given @p level and @p version combination are invalid
35197        or if this object is incompatible with the given level and version.
35198
35199        @note Attempting to add an object to an SBMLDocument having a different
35200        combination of SBML Level, Version and XML namespaces than the object
35201        itself will result in an error at the time a caller attempts to make the
35202        addition.  A parent object must have compatible Level, Version and XML
35203        namespaces.  (Strictly speaking, a parent may also have more XML
35204        namespaces than a child, but the reverse is not permitted.)  The
35205        restriction is necessary to ensure that an SBML model has a consistent
35206        overall structure.  This requires callers to manage their objects
35207        carefully, but the benefit is increased flexibility in how models can be
35208        created by permitting callers to create objects bottom-up if desired.  In
35209        situations where objects are not yet attached to parents (e.g.,
35210        SBMLDocument), knowledge of the intented SBML Level and Version help
35211        libSBML determine such things as whether it is valid to assign a
35212        particular value to an attribute.
35213
35214
35215        @par
35216        <hr>
35217        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35218         <pre class='signature'>KineticLaw(KineticLaw orig)</pre>
35219
35220        Copy constructor; creates a copy of this KineticLaw.
35221
35222        @param orig the object to copy.
35223
35224        """
35225        _libsbml.KineticLaw_swiginit(self, _libsbml.new_KineticLaw(*args))
35226
35227    def clone(self):
35228        r"""
35229        clone(KineticLaw self) -> KineticLaw
35230
35231        Creates and returns a deep copy of this KineticLaw object.
35232
35233        @return the (deep) copy of this KineticLaw object.
35234
35235        """
35236        return _libsbml.KineticLaw_clone(self)
35237
35238    def getElementBySId(self, id):
35239        r"""
35240        getElementBySId(KineticLaw self, string id) -> SBase
35241
35242        Returns the first child element found that has the given @p id in the
35243        model-wide SId namespace, or @c None if no such object is found.
35244
35245        @param id string representing the id of the object to find.
35246
35247        @return pointer to the first element found with the given @p id.
35248
35249        """
35250        return _libsbml.KineticLaw_getElementBySId(self, id)
35251
35252    def getElementByMetaId(self, metaid):
35253        r"""
35254        getElementByMetaId(KineticLaw self, string metaid) -> SBase
35255
35256        Returns the first child element it can find with the given @p metaid, or
35257        @c None if no such object is found.
35258
35259        @param metaid string representing the metaid of the object to find.
35260
35261        @return pointer to the first element found with the given @p metaid.
35262
35263        """
35264        return _libsbml.KineticLaw_getElementByMetaId(self, metaid)
35265
35266    def getFormula(self):
35267        r"""
35268        getFormula(KineticLaw self) -> string
35269
35270        Returns the mathematical formula for this KineticLaw object and return
35271        it as as a text string.
35272
35273        This is fundamentally equivalent to
35274        @if java KineticLaw.getMath()@else getMath()@endif.
35275        This variant is provided principally for compatibility compatibility
35276        with SBML Level&nbsp;1.
35277
35278        @return a string representing the formula of this KineticLaw.
35279
35280        @note @htmlinclude level-1-uses-text-string-math.html
35281
35282        @see getMath()
35283
35284        """
35285        return _libsbml.KineticLaw_getFormula(self)
35286
35287    def getMath(self):
35288        r"""
35289        getMath(KineticLaw self) -> ASTNode
35290
35291        Returns the mathematical formula for this KineticLaw object and return
35292        it as as an AST.
35293
35294        This is fundamentally equivalent to
35295        @if java KineticLaw.getFormula()@else getFormula()@endif.
35296        The latter is provided principally for compatibility compatibility
35297        with SBML Level&nbsp;1, which represented mathematical formulas in
35298        text-string form.
35299
35300        @return the ASTNode representation of the mathematical formula,
35301        or @c None if the math is not set.
35302
35303        @see getFormula()
35304
35305        """
35306        return _libsbml.KineticLaw_getMath(self)
35307
35308    def getTimeUnits(self):
35309        r"""
35310        getTimeUnits(KineticLaw self) -> string
35311
35312        (SBML Level&nbsp;2 Version&nbsp;1 only) Returns the value of the
35313        'timeUnits' attribute of this KineticLaw object.
35314
35315        @return the 'timeUnits' attribute value.
35316
35317        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35318        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35319        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35320        removed.  For compatibility with new versions of SBML, users are
35321        cautioned to avoid these attributes.
35322
35323        """
35324        return _libsbml.KineticLaw_getTimeUnits(self)
35325
35326    def getSubstanceUnits(self):
35327        r"""
35328        getSubstanceUnits(KineticLaw self) -> string
35329
35330        (SBML Level&nbsp;2 Version&nbsp;1 only) Returns the value of the
35331        'substanceUnits' attribute of this KineticLaw object.
35332
35333        @return the 'substanceUnits' attribute value.
35334
35335        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35336        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35337        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35338        removed.  For compatibility with new versions of SBML, users are
35339        cautioned to avoid these attributes.
35340
35341        """
35342        return _libsbml.KineticLaw_getSubstanceUnits(self)
35343
35344    def isSetFormula(self):
35345        r"""
35346        isSetFormula(KineticLaw self) -> bool
35347
35348        Predicate returning @c True if this KineticLaw's 'formula' attribute is
35349        set.
35350
35351        This is functionally identical to the method
35352        @if java KineticLaw.isSetMath()@else isSetMath()@endif.  It is
35353        provided in order to mirror the parallel between
35354        @if java KineticLaw.getFormula()@else getFormula()@endif@~ and
35355        @if java KineticLaw.getMath()@else getMath()@endif.
35356
35357        @return @c True if the formula (meaning the @c math subelement) of
35358        this KineticLaw is set, @c False otherwise.
35359
35360        @note @htmlinclude level-1-uses-text-string-math.html
35361
35362        @see isSetMath()
35363
35364        """
35365        return _libsbml.KineticLaw_isSetFormula(self)
35366
35367    def isSetMath(self):
35368        r"""
35369        isSetMath(KineticLaw self) -> bool
35370
35371        Predicate returning @c True if this Kinetic's 'math' subelement is set.
35372
35373        This is identical to the method
35374        @if java KineticLaw.isSetFormula()@else isSetFormula()@endif.
35375        It is provided in order to mirror the parallel between
35376        @if java KineticLaw.getFormula()@else getFormula()@endif@~ and
35377        @if java KineticLaw.getMath()@else getMath()@endif.
35378
35379        @return @c True if the formula (meaning the @c math subelement) of
35380        this KineticLaw is set, @c False otherwise.
35381
35382        @see isSetFormula()
35383
35384        """
35385        return _libsbml.KineticLaw_isSetMath(self)
35386
35387    def isSetTimeUnits(self):
35388        r"""
35389        isSetTimeUnits(KineticLaw self) -> bool
35390
35391        (SBML Level&nbsp;2 Version&nbsp;1 only) Predicate returning @c True if
35392        this SpeciesReference's 'timeUnits' attribute is set.
35393
35394        @return @c True if the 'timeUnits' attribute of this KineticLaw object
35395        is set, @c False otherwise.
35396
35397        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35398        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35399        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35400        removed.  For compatibility with new versions of SBML, users are
35401        cautioned to avoid these attributes.
35402
35403        """
35404        return _libsbml.KineticLaw_isSetTimeUnits(self)
35405
35406    def isSetSubstanceUnits(self):
35407        r"""
35408        isSetSubstanceUnits(KineticLaw self) -> bool
35409
35410        (SBML Level&nbsp;2 Version&nbsp;1 only) Predicate returning @c True if
35411        this SpeciesReference's 'substanceUnits' attribute is set.
35412
35413        @return @c True if the 'substanceUnits' attribute of this KineticLaw
35414        object is set, @c False otherwise.
35415
35416        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35417        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35418        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35419        removed.  For compatibility with new versions of SBML, users are
35420        cautioned to avoid these attributes.
35421
35422        """
35423        return _libsbml.KineticLaw_isSetSubstanceUnits(self)
35424
35425    def setFormula(self, formula):
35426        r"""
35427        setFormula(KineticLaw self, string formula) -> int
35428
35429        Sets the mathematical expression of this KineticLaw instance to the
35430        given @p formula.
35431
35432        The given @p formula string is copied.  Internally, libSBML stores the
35433        mathematical expression as an ASTNode.
35434
35435        @param formula the mathematical expression to use, represented in
35436        text-string form.
35437
35438        @return integer value indicating success/failure of the
35439        function.  @if clike The value is drawn from the
35440        enumeration #OperationReturnValues_t. @endif@~ The possible values
35441        returned by this function are:
35442        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35443        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
35444
35445        @note @htmlinclude level-1-uses-text-string-math.html
35446
35447        @see setMath()
35448
35449        """
35450        return _libsbml.KineticLaw_setFormula(self, formula)
35451
35452    def setMath(self, math):
35453        r"""
35454        setMath(KineticLaw self, ASTNode math) -> int
35455
35456        Sets the mathematical expression of this KineticLaw instance to a copy
35457        of the given ASTNode.
35458
35459        This is fundamentally identical to
35460        @if java KineticLaw.setFormula()@else getFormula()@endif.
35461        The latter is provided principally for compatibility compatibility with
35462        SBML Level&nbsp;1, which represented mathematical formulas in text-string
35463        form.
35464
35465        @param math an ASTNode representing a formula tree.
35466
35467        @return integer value indicating success/failure of the
35468        function.  @if clike The value is drawn from the
35469        enumeration #OperationReturnValues_t. @endif@~ The possible values
35470        returned by this function are:
35471        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35472        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
35473
35474        @see setFormula()
35475
35476        """
35477        return _libsbml.KineticLaw_setMath(self, math)
35478
35479    def setTimeUnits(self, sid):
35480        r"""
35481        setTimeUnits(KineticLaw self, string sid) -> int
35482
35483        (SBML Level&nbsp;2 Version&nbsp;1 only) Sets the 'timeUnits' attribute
35484        of this KineticLaw object to a copy of the identifier in @p sid.
35485
35486        @param sid the identifier of the units to use.
35487
35488        @return integer value indicating success/failure of the
35489        function.  @if clike The value is drawn from the
35490        enumeration #OperationReturnValues_t. @endif@~ The possible values
35491        returned by this function are:
35492        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35493        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
35494        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
35495
35496        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35497        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35498        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35499        removed.  For compatibility with new versions of SBML, users are
35500        cautioned to avoid these attributes.
35501
35502        """
35503        return _libsbml.KineticLaw_setTimeUnits(self, sid)
35504
35505    def setSubstanceUnits(self, sid):
35506        r"""
35507        setSubstanceUnits(KineticLaw self, string sid) -> int
35508
35509        (SBML Level&nbsp;2 Version&nbsp;1 only) Sets the 'substanceUnits'
35510        attribute of this KineticLaw object to a copy of the identifier given
35511        in @p sid.
35512
35513        @param sid the identifier of the units to use.
35514
35515        @return integer value indicating success/failure of the
35516        function.  @if clike The value is drawn from the
35517        enumeration #OperationReturnValues_t. @endif@~ The possible values
35518        returned by this function are:
35519        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35520        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
35521        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
35522
35523        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35524        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35525        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35526        removed.  For compatibility with new versions of SBML, users are
35527        cautioned to avoid these attributes.
35528
35529        """
35530        return _libsbml.KineticLaw_setSubstanceUnits(self, sid)
35531
35532    def unsetTimeUnits(self):
35533        r"""
35534        unsetTimeUnits(KineticLaw self) -> int
35535
35536        (SBML Level&nbsp;2 Version&nbsp;1 only) Unsets the 'timeUnits'
35537        attribugte of this KineticLaw object.
35538
35539        @return integer value indicating success/failure of the
35540        function.  @if clike The value is drawn from the
35541        enumeration #OperationReturnValues_t. @endif@~ The possible values
35542        returned by this function are:
35543        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35544        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
35545        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
35546
35547        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35548        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35549        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35550        removed.  For compatibility with new versions of SBML, users are
35551        cautioned to avoid these attributes.
35552
35553        """
35554        return _libsbml.KineticLaw_unsetTimeUnits(self)
35555
35556    def unsetSubstanceUnits(self):
35557        r"""
35558        unsetSubstanceUnits(KineticLaw self) -> int
35559
35560        (SBML Level&nbsp;2 Version&nbsp;1 only) Unsets the 'substanceUnits'
35561        attribute of this KineticLaw object.
35562
35563        @return integer value indicating success/failure of the
35564        function.  @if clike The value is drawn from the
35565        enumeration #OperationReturnValues_t. @endif@~ The possible values
35566        returned by this function are:
35567        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35568        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
35569        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
35570
35571        @note The attributes 'timeUnits' and 'substanceUnits' are present only
35572        in SBML Level&nbsp;2 Version&nbsp;1.  In SBML Level&nbsp;2
35573        Version&nbsp;2, the 'timeUnits' and 'substanceUnits' attributes were
35574        removed.  For compatibility with new versions of SBML, users are
35575        cautioned to avoid these attributes.
35576
35577        """
35578        return _libsbml.KineticLaw_unsetSubstanceUnits(self)
35579
35580    def addParameter(self, p):
35581        r"""
35582        addParameter(KineticLaw self, Parameter p) -> int
35583
35584        Adds a copy of the given Parameter object to the list of local
35585        parameters in this KineticLaw.
35586        @par
35587        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35588        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35589
35590        @param p the Parameter to add.
35591
35592        @return integer value indicating success/failure of the
35593        function.  @if clike The value is drawn from the
35594        enumeration #OperationReturnValues_t. @endif@~ The possible values
35595        returned by this function are:
35596        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35597        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
35598        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
35599        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
35600        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
35601        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
35602
35603        @note This method should be used with some caution.  The fact that this
35604        method @em copies the object passed to it means that the caller will be
35605        left holding a physically different object instance than the one contained
35606        inside this object.  Changes made to the original object instance (such as
35607        resetting attribute values) will <em>not affect the instance in this
35608        object</em>.  In addition, the caller should make sure to free the
35609        original object if it is no longer being used, or else a memory leak will
35610        result.  Please see other methods on this class (particularly a
35611        corresponding method whose name begins with the word <code>create</code>)
35612        for alternatives that do not lead to these issues.
35613
35614        @see createParameter()
35615
35616        """
35617        return _libsbml.KineticLaw_addParameter(self, p)
35618
35619    def addLocalParameter(self, p):
35620        r"""
35621        addLocalParameter(KineticLaw self, LocalParameter p) -> int
35622
35623        Adds a copy of the given LocalParameter object to the list of local
35624        parameters in this KineticLaw.
35625        @par
35626        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35627        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35628
35629        @param p the LocalParameter to add.
35630
35631        @return integer value indicating success/failure of the
35632        function.  @if clike The value is drawn from the
35633        enumeration #OperationReturnValues_t. @endif@~ The possible values
35634        returned by this function are:
35635        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
35636        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
35637        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
35638        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
35639        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
35640        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
35641
35642        @note This method should be used with some caution.  The fact that this
35643        method @em copies the object passed to it means that the caller will be
35644        left holding a physically different object instance than the one contained
35645        inside this object.  Changes made to the original object instance (such as
35646        resetting attribute values) will <em>not affect the instance in this
35647        object</em>.  In addition, the caller should make sure to free the
35648        original object if it is no longer being used, or else a memory leak will
35649        result.  Please see other methods on this class (particularly a
35650        corresponding method whose name begins with the word <code>create</code>)
35651        for alternatives that do not lead to these issues.
35652
35653        @see createLocalParameter()
35654
35655        """
35656        return _libsbml.KineticLaw_addLocalParameter(self, p)
35657
35658    def createParameter(self):
35659        r"""
35660        createParameter(KineticLaw self) -> Parameter
35661
35662        Creates a new Parameter object, adds it to this KineticLaw's list of
35663        parameters, and returns the Parameter object created.
35664        @par
35665        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35666        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35667
35668        @return a new Parameter object instance.
35669
35670        @see addParameter()
35671
35672        """
35673        return _libsbml.KineticLaw_createParameter(self)
35674
35675    def createLocalParameter(self):
35676        r"""
35677        createLocalParameter(KineticLaw self) -> LocalParameter
35678
35679        Creates a new LocalParameter object, adds it to this KineticLaw's list
35680        of local parameters, and returns the LocalParameter object created.
35681        @par
35682        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35683        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35684
35685        @return a new LocalParameter object instance.
35686
35687        @see addLocalParameter()
35688
35689        """
35690        return _libsbml.KineticLaw_createLocalParameter(self)
35691
35692    def getListOfParameters(self, *args):
35693        r"""
35694        getListOfParameters(KineticLaw self) -> ListOfParameters
35695        getListOfParameters(KineticLaw self) -> ListOfParameters
35696
35697        Returns the list of parameters in this KineticLaw object.
35698        @par
35699        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35700        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35701
35702        @return the list of Parameters for this KineticLaw.
35703
35704        """
35705        return _libsbml.KineticLaw_getListOfParameters(self, *args)
35706
35707    def getListOfLocalParameters(self, *args):
35708        r"""
35709        getListOfLocalParameters(KineticLaw self) -> ListOfLocalParameters
35710        getListOfLocalParameters(KineticLaw self) -> ListOfLocalParameters
35711
35712        Returns the list of local parameters in this KineticLaw object.
35713        @par
35714        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35715        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35716
35717        @return the list of LocalParameters for this KineticLaw.
35718
35719        """
35720        return _libsbml.KineticLaw_getListOfLocalParameters(self, *args)
35721
35722    def getParameter(self, *args):
35723        r"""
35724        getParameter(KineticLaw self, unsigned int n) -> Parameter
35725        getParameter(KineticLaw self, unsigned int n) -> Parameter
35726        getParameter(KineticLaw self, string sid) -> Parameter
35727        getParameter(KineticLaw self, string sid) -> Parameter
35728
35729        This method has multiple variants; they differ in the arguments
35730         they accept.  Each variant is described separately below.
35731
35732        @par
35733        <hr>
35734        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35735         <pre class='signature'>getParameter(long n)</pre>
35736
35737        Returns the nth Parameter object in the list of parameters in
35738        this KineticLaw instance.
35739        @par
35740        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35741        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35742
35743        @param n the index of the Parameter object sought.
35744
35745        @return the nth Parameter of this KineticLaw.
35746        If the index @p n is invalid, @c None is returned.
35747
35748
35749        @par
35750        <hr>
35751        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35752         <pre class='signature'>getParameter(string sid)</pre>
35753
35754        Returns a parameter based on its identifier.
35755        @par
35756        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35757        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35758
35759        @param sid the identifier of the Parameter being sought.
35760
35761        @return the Parameter object in this KineticLaw instace having the
35762        given 'id', or @c None if no such Parameter exists.
35763
35764        """
35765        return _libsbml.KineticLaw_getParameter(self, *args)
35766
35767    def getLocalParameter(self, *args):
35768        r"""
35769        getLocalParameter(KineticLaw self, unsigned int n) -> LocalParameter
35770        getLocalParameter(KineticLaw self, unsigned int n) -> LocalParameter
35771        getLocalParameter(KineticLaw self, string sid) -> LocalParameter
35772        getLocalParameter(KineticLaw self, string sid) -> LocalParameter
35773
35774        This method has multiple variants; they differ in the arguments
35775         they accept.  Each variant is described separately below.
35776
35777        @par
35778        <hr>
35779        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35780         <pre class='signature'>getLocalParameter(long n)</pre>
35781
35782        Returns the nth LocalParameter object in the list of local parameters in
35783        this KineticLaw instance.
35784        @par
35785        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35786        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35787
35788        @param n the index of the LocalParameter object sought.
35789
35790        @return the nth LocalParameter of this KineticLaw.
35791        If the index @p n is invalid, @c None is returned.
35792
35793
35794        @par
35795        <hr>
35796        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35797         <pre class='signature'>getLocalParameter(string sid)</pre>
35798
35799        Returns a local parameter based on its identifier.
35800        @par
35801        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35802        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35803
35804        @param sid the identifier of the LocalParameter being sought.
35805
35806        @return the LocalParameter object in this KineticLaw instace having the
35807        given 'id', or @c None if no such LocalParameter exists.
35808
35809        """
35810        return _libsbml.KineticLaw_getLocalParameter(self, *args)
35811
35812    def getNumParameters(self):
35813        r"""
35814        getNumParameters(KineticLaw self) -> unsigned int
35815
35816        Returns the number of parameters in this KineticLaw instance.
35817        @par
35818        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35819        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35820
35821        @return the number of Parameters in this KineticLaw.
35822
35823        """
35824        return _libsbml.KineticLaw_getNumParameters(self)
35825
35826    def getNumLocalParameters(self):
35827        r"""
35828        getNumLocalParameters(KineticLaw self) -> unsigned int
35829
35830        Returns the number of local parameters in this KineticLaw instance.
35831        @par
35832        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35833        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35834
35835        @return the number of LocalParameters in this KineticLaw.
35836
35837        """
35838        return _libsbml.KineticLaw_getNumLocalParameters(self)
35839
35840    def getDerivedUnitDefinition(self, *args):
35841        r"""
35842        getDerivedUnitDefinition(KineticLaw self) -> UnitDefinition
35843        getDerivedUnitDefinition(KineticLaw self) -> UnitDefinition
35844
35845        Calculates and returns a UnitDefinition that expresses the units of
35846        measurement assumed for the 'math' expression of this KineticLaw.
35847
35848        @par
35849        The units are calculated based on the mathematical expression in the
35850        KineticLaw and the model quantities referenced by <code>&lt;ci&gt;</code>
35851        elements used within that expression.  The
35852        @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~
35853        method returns the calculated units.
35854
35855        @note The functionality that facilitates unit analysis depends on the
35856        model as a whole.  Thus, in cases where the object has not been added to
35857        a model or the model itself is incomplete, unit analysis is not possible
35858        and this method will return @c None.
35859
35860        @warning <span class='warning'>Note that it is possible the 'math'
35861        expression in the KineticLaw contains pure numbers or parameters with
35862        undeclared units.  In those cases, it is not possible to calculate the
35863        units of the overall expression without making assumptions.  LibSBML does
35864        not make assumptions about the units, and
35865        KineticLaw.getDerivedUnitDefinition() returns the units as far as it is
35866        able to determine them.  For example, in an expression <em>X + Y</em>, if
35867        <em>X</em> has unambiguously-defined units and <em>Y</em> does not, it
35868        will return the units of <em>X</em>.  <strong>It is important that callers
35869        also invoke the method</strong>
35870        KineticLaw.containsUndeclaredUnits()<strong>to determine whether this
35871        situation holds</strong>.  Callers may wish to take suitable actions in
35872        those scenarios.</span>
35873
35874        @return a UnitDefinition that expresses the units of the math
35875        expression of this KineticLaw, or @c None if one cannot be constructed.
35876
35877        @see containsUndeclaredUnits()
35878
35879        """
35880        return _libsbml.KineticLaw_getDerivedUnitDefinition(self, *args)
35881
35882    def containsUndeclaredUnits(self, *args):
35883        r"""
35884        containsUndeclaredUnits(KineticLaw self) -> bool
35885        containsUndeclaredUnits(KineticLaw self) -> bool
35886
35887        Predicate returning @c True if the math expression of this KineticLaw
35888        contains parameters/numbers with undeclared units.
35889
35890        @return @c True if the math expression of this KineticLaw
35891        includes parameters/numbers
35892        with undeclared units, @c False otherwise.
35893
35894        @note A return value of @c True indicates that the UnitDefinition
35895        returned by
35896        @if java KineticLaw.getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~
35897        may not accurately represent the units of the expression.
35898
35899        @see getDerivedUnitDefinition()
35900
35901        """
35902        return _libsbml.KineticLaw_containsUndeclaredUnits(self, *args)
35903
35904    def removeParameter(self, *args):
35905        r"""
35906        removeParameter(KineticLaw self, unsigned int n) -> Parameter
35907        removeParameter(KineticLaw self, string sid) -> Parameter
35908
35909        This method has multiple variants; they differ in the arguments
35910         they accept.  Each variant is described separately below.
35911
35912        @par
35913        <hr>
35914        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35915         <pre class='signature'>removeParameter(long n)</pre>
35916
35917        Removes the nth Parameter object in the list of parameters
35918        in this KineticLaw instance and returns a pointer to it.
35919        @par
35920        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35921        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35922
35923        The caller owns the returned object and is responsible for deleting it.
35924
35925        @param n the index of the Parameter object to remove.
35926
35927        @return the Parameter object removed.  As mentioned above,
35928        the caller owns the returned item. @c None is returned if the given index
35929        is out of range.
35930
35931
35932        @par
35933        <hr>
35934        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35935         <pre class='signature'>removeParameter(string sid)</pre>
35936
35937        Removes a Parameter object with the given identifier in the list of
35938        parameters in this KineticLaw instance and returns a pointer to it.
35939        @par
35940        This function should be used for SBML Level&nbsp;1 and Level&nbsp;2 documents,
35941        as the equivalent constructs in Level&nbsp;3 are LocalParameter objects instead.
35942
35943        The caller owns the returned object and is responsible for deleting it.
35944
35945        @param sid the identifier of the Parameter to remove.
35946
35947        @return the Parameter object removed.  As mentioned above, the
35948        caller owns the returned object. @c None is returned if no Parameter
35949        object with the identifier exists in this KineticLaw instance.
35950
35951        """
35952        return _libsbml.KineticLaw_removeParameter(self, *args)
35953
35954    def removeLocalParameter(self, *args):
35955        r"""
35956        removeLocalParameter(KineticLaw self, unsigned int n) -> LocalParameter
35957        removeLocalParameter(KineticLaw self, string sid) -> LocalParameter
35958
35959        This method has multiple variants; they differ in the arguments
35960         they accept.  Each variant is described separately below.
35961
35962        @par
35963        <hr>
35964        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35965         <pre class='signature'>removeLocalParameter(long n)</pre>
35966
35967        Removes the nth LocalParameter object in the list of local parameters
35968        in this KineticLaw instance and returns a pointer to it.
35969        @par
35970        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35971        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35972
35973        The caller owns the returned object and is responsible for deleting it.
35974
35975        @param n the index of the LocalParameter object to remove.
35976
35977        @return the LocalParameter object removed.  As mentioned above,
35978        the caller owns the returned item. @c None is returned if the given index
35979        is out of range.
35980
35981
35982        @par
35983        <hr>
35984        <span class='variant-sig-heading'>Method variant with the following signature</span>:
35985         <pre class='signature'>removeLocalParameter(string sid)</pre>
35986
35987        Removes a LocalParameter object with the given identifier in the list of
35988        local parameters in this KineticLaw instance and returns a pointer to it.
35989        @par
35990        This function should be used for SBML Level&nbsp;3 documents, as the equivalent
35991        constructs in Level&nbsp;2 and Level&nbsp;1 are Parameter objects instead.
35992
35993        The caller owns the returned object and is responsible for deleting it.
35994
35995        @param sid the identifier of the LocalParameter to remove.
35996
35997        @return the LocalParameter object removed.  As mentioned above, the
35998        caller owns the returned object. @c None is returned if no LocalParameter
35999        object with the identifier exists in this KineticLaw instance.
36000
36001        """
36002        return _libsbml.KineticLaw_removeLocalParameter(self, *args)
36003
36004    def connectToChild(self):
36005        r"""connectToChild(KineticLaw self)"""
36006        return _libsbml.KineticLaw_connectToChild(self)
36007
36008    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
36009        r"""
36010        enablePackageInternal(KineticLaw self, string pkgURI, string pkgPrefix, bool flag)
36011
36012        @internal
36013
36014        @internal
36015
36016        """
36017        return _libsbml.KineticLaw_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
36018
36019    def updateSBMLNamespace(self, package, level, version):
36020        r"""
36021        updateSBMLNamespace(KineticLaw self, string package, unsigned int level, unsigned int version)
36022
36023        @internal
36024
36025        @internal
36026
36027        """
36028        return _libsbml.KineticLaw_updateSBMLNamespace(self, package, level, version)
36029
36030    def getTypeCode(self):
36031        r"""
36032        getTypeCode(KineticLaw self) -> int
36033
36034        Returns the libSBML type code for this %SBML object.
36035
36036        @par
36037        LibSBML attaches an identifying code to every kind of SBML object.  These
36038        are integer constants known as <em>SBML type codes</em>.  The names of all
36039        the codes begin with the characters <code>SBML_</code>.
36040        @if clike The set of possible type codes for core elements is defined in
36041        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
36042        SBML Level&nbsp;3 packages define their own extra enumerations of type
36043        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
36044        package).@endif@if java In the Java language interface for libSBML, the
36045        type codes are defined as static integer constants in the interface class
36046        {@link libsbmlConstants}.  @endif@if python In the Python language
36047        interface for libSBML, the type codes are defined as static integer
36048        constants in the interface class @link libsbml@endlink.@endif@if csharp In
36049        the C# language interface for libSBML, the type codes are defined as
36050        static integer constants in the interface class
36051        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
36052        package plug-ins may use overlapping type codes; to identify the package
36053        to which a given object belongs, call the
36054        <code>@if conly SBase_getPackageName()
36055        @else SBase.getPackageName()
36056        @endif</code>
36057        method on the object.
36058
36059        The exception to this is lists:  all SBML-style list elements have the type
36060        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
36061        are from.
36062
36063        @return the SBML type code for this object:
36064        @link libsbml#SBML_KINETIC_LAW SBML_KINETIC_LAW@endlink (default).
36065
36066        @warning <span class='warning'>The specific integer values of the possible
36067        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
36068        packages,  To fully identify the correct code, <strong>it is necessary to
36069        invoke both getPackageName() and getTypeCode()</strong> (or
36070        ListOf.getItemTypeCode()).</span>
36071
36072        @see getElementName()
36073        @see getPackageName()
36074
36075        """
36076        return _libsbml.KineticLaw_getTypeCode(self)
36077
36078    def getElementName(self):
36079        r"""
36080        getElementName(KineticLaw self) -> string
36081
36082        Returns the XML element name of this object, which for Species, is
36083        always @c 'kineticLaw'.
36084
36085        @return the name of this element, i.e., @c 'kineticLaw'.
36086
36087        """
36088        return _libsbml.KineticLaw_getElementName(self)
36089
36090    def hasRequiredAttributes(self):
36091        r"""
36092        hasRequiredAttributes(KineticLaw self) -> bool
36093
36094        Predicate returning @c True if all the required attributes for this
36095        KineticLaw object have been set.
36096
36097        The required attributes for a KineticLaw object are:
36098        @li 'formula' (SBML Level&nbsp;1 only)
36099
36100        @return @c True if the required attributes have been set, @c False
36101        otherwise.
36102
36103        """
36104        return _libsbml.KineticLaw_hasRequiredAttributes(self)
36105
36106    def hasRequiredElements(self):
36107        r"""
36108        hasRequiredElements(KineticLaw self) -> bool
36109
36110        Predicate returning @c True if all the required elements for this
36111        KineticLaw object have been set.
36112
36113        @note The required elements for a KineticLaw object are:
36114        @li 'math' inSBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
36115        (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
36116
36117        @return a boolean value indicating whether all the required
36118        elements for this object have been defined.
36119
36120        """
36121        return _libsbml.KineticLaw_hasRequiredElements(self)
36122
36123    def removeFromParentAndDelete(self):
36124        r"""
36125        removeFromParentAndDelete(KineticLaw self) -> int
36126
36127        Finds this KineticLaw's Reaction parent and calls unsetKineticLaw() on
36128        it, indirectly deleting itself.
36129
36130        Overridden from the SBase function since the parent is not a ListOf.
36131
36132        @return integer value indicating success/failure of the
36133        function.  @if clike The value is drawn from the
36134        enumeration #OperationReturnValues_t. @endif@~ The possible values
36135        returned by this function are:
36136        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
36137        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
36138
36139        """
36140        return _libsbml.KineticLaw_removeFromParentAndDelete(self)
36141
36142    def renameSIdRefs(self, oldid, newid):
36143        r"""
36144        renameSIdRefs(KineticLaw self, string oldid, string newid)
36145
36146        Replaces all uses of a given @c SIdRef type attribute value with another
36147        value.
36148
36149        @par
36150        In SBML, object identifiers are of a data type called <code>SId</code>.
36151        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
36152        introduced for attribute values that refer to <code>SId</code> values; in
36153        previous Levels of SBML, this data type did not exist and attributes were
36154        simply described to as 'referring to an identifier', but the effective
36155        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
36156        other methods of libSBML refer to the type <code>SIdRef</code> for all
36157        Levels of SBML, even if the corresponding SBML specification did not
36158        explicitly name the data type.
36159
36160        This method works by looking at all attributes and (if appropriate)
36161        mathematical formulas in MathML content, comparing the referenced
36162        identifiers to the value of @p oldid.  If any matches are found, the
36163        matching values are replaced with @p newid.  The method does @em not
36164        descend into child elements.
36165
36166        @param oldid the old identifier.
36167        @param newid the new identifier.
36168
36169        """
36170        return _libsbml.KineticLaw_renameSIdRefs(self, oldid, newid)
36171
36172    def renameUnitSIdRefs(self, oldid, newid):
36173        r"""
36174        renameUnitSIdRefs(KineticLaw self, string oldid, string newid)
36175
36176        Replaces all uses of a given @c UnitSIdRef type attribute value with
36177        another value.
36178
36179        @par
36180        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
36181        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
36182        introduced for attribute values that refer to <code>UnitSId</code> values; in
36183        previous Levels of SBML, this data type did not exist and attributes were
36184        simply described to as 'referring to a unit identifier', but the effective
36185        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
36186        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
36187        Levels of SBML, even if the corresponding SBML specification did not
36188        explicitly name the data type.
36189
36190        This method works by looking at all unit identifier attribute values
36191        (including, if appropriate, inside mathematical formulas), comparing the
36192        referenced unit identifiers to the value of @p oldid.  If any matches
36193        are found, the matching values are replaced with @p newid.  The method
36194        does @em not descend into child elements.
36195
36196        @param oldid the old identifier.
36197        @param newid the new identifier.
36198
36199        """
36200        return _libsbml.KineticLaw_renameUnitSIdRefs(self, oldid, newid)
36201
36202    def replaceSIDWithFunction(self, id, function):
36203        r"""
36204        replaceSIDWithFunction(KineticLaw self, string id, ASTNode function)
36205
36206        @internal
36207
36208        @internal
36209
36210        """
36211        return _libsbml.KineticLaw_replaceSIDWithFunction(self, id, function)
36212
36213    def divideAssignmentsToSIdByFunction(self, id, function):
36214        r"""
36215        divideAssignmentsToSIdByFunction(KineticLaw self, string id, ASTNode function)
36216
36217        @internal
36218
36219        @internal
36220
36221        """
36222        return _libsbml.KineticLaw_divideAssignmentsToSIdByFunction(self, id, function)
36223
36224    def multiplyAssignmentsToSIdByFunction(self, id, function):
36225        r"""
36226        multiplyAssignmentsToSIdByFunction(KineticLaw self, string id, ASTNode function)
36227
36228        @internal
36229
36230        @internal
36231
36232        """
36233        return _libsbml.KineticLaw_multiplyAssignmentsToSIdByFunction(self, id, function)
36234
36235# Register KineticLaw in _libsbml:
36236_libsbml.KineticLaw_swigregister(KineticLaw)
36237
36238class SimpleSpeciesReference(SBase):
36239    r"""
36240
36241    @sbmlpackage{core}
36242
36243    @htmlinclude pkg-marker-core.html Abstract class for references to species in reactions.
36244
36245    As mentioned in the description of Reaction, every species that enters
36246    into a given reaction must appear in that reaction's lists of reactants,
36247    products and/or modifiers.  In an SBML model, all species that may
36248    participate in any reaction are listed in the 'listOfSpecies' element of
36249    the top-level Model object.  Lists of products, reactants and modifiers
36250    in Reaction objects do not introduce new species, but rather, they refer
36251    back to those listed in the model's top-level 'listOfSpecies'.  For
36252    reactants and products, the connection is made using SpeciesReference
36253    objects; for modifiers, it is made using ModifierSpeciesReference
36254    objects.  SimpleSpeciesReference is an abstract type that serves as the
36255    parent class of both SpeciesReference and ModifierSpeciesReference.  It
36256    is used simply to hold the attributes and elements that are common to
36257    the latter two structures.
36258
36259    The SimpleSpeciesReference structure has a mandatory attribute,
36260    'species', which must be a text string conforming to the identifer
36261    syntax permitted in %SBML.  This attribute is inherited by the
36262    SpeciesReference and ModifierSpeciesReference subclasses derived from
36263    SimpleSpeciesReference.  The value of the 'species' attribute must be
36264    the identifier of a species defined in the enclosing Model.  The species
36265    is thereby declared as participating in the reaction being defined.  The
36266    precise role of that species as a reactant, product, or modifier in the
36267    reaction is determined by the subclass of SimpleSpeciesReference (i.e.,
36268    either SpeciesReference or ModifierSpeciesReference) in which the
36269    identifier appears.
36270
36271    SimpleSpeciesReference also contains an optional attribute, 'id',
36272    allowing instances to be referenced from other structures.  No SBML
36273    structures currently do this; however, such structures are anticipated
36274    in future SBML Levels.
36275
36276    """
36277
36278    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
36279
36280    def __init__(self, *args, **kwargs):
36281        raise AttributeError("No constructor defined - class is abstract")
36282    __repr__ = _swig_repr
36283    __swig_destroy__ = _libsbml.delete_SimpleSpeciesReference
36284
36285    def getId(self):
36286        r"""
36287        getId(SimpleSpeciesReference self) -> string
36288
36289        Returns the value of the 'id' attribute of this SimpleSpeciesReference.
36290
36291        @note Because of the inconsistent behavior of this function with
36292        respect to assignments and rules, it is now recommended to
36293        use the getIdAttribute() function instead.
36294
36295        @par
36296        The identifier given by an object's 'id' attribute value
36297        is used to identify the object within the SBML model definition.
36298        Other objects can refer to the component using this identifier.  The
36299        data type of 'id' is always <code>SId</code> or a type derived
36300        from that, such as <code>UnitSId</code>, depending on the object in
36301        question.  All data types are defined as follows:
36302        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
36303        letter ::= 'a'..'z','A'..'Z'
36304        digit  ::= '0'..'9'
36305        idChar ::= letter | digit | '_'
36306        SId    ::= ( letter | '_' ) idChar*
36307        </pre>
36308        The characters <code>(</code> and <code>)</code> are used for grouping,
36309        the character <code>*</code> 'zero or more times', and the character
36310        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
36311        is determined by an exact character sequence match; i.e., comparisons must
36312        be performed in a case-sensitive manner.  This applies to all uses of
36313        <code>SId</code>, <code>SIdRef</code>, and derived types.
36314
36315        Users need to be aware of some important API issues that are the result of
36316        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
36317        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
36318        of SBML objects.  To simplify the work of programmers, libSBML's API
36319        provided get, set, check, and unset on the SBase object class itself
36320        instead of on individual subobject classes. This made the
36321        get/set/etc. methods uniformly available on all objects in the libSBML
36322        API.  LibSBML simply returned empty strings or otherwise did not act when
36323        the methods were applied to SBML objects that were not defined by the SBML
36324        specification to have 'id' or 'name' attributes.  Additional complications
36325        arose with the rule and assignment objects: InitialAssignment,
36326        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
36327        the rule object hierarchy was different, and in addition, then as now,
36328        they possess different attributes: 'variable' (for the rules and event
36329        assignments), 'symbol' (for initial assignments), or neither (for
36330        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
36331        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
36332
36333        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
36334        Version&nbsp;2, it became necessary to introduce a new way to interact
36335        with the attributes more consistently in libSBML to avoid breaking
36336        backward compatibility in the behavior of the original 'id' methods.  For
36337        this reason, libSBML provides four functions (getIdAttribute(),
36338        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
36339        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
36340        from SBase, regardless of the object's type.  <strong>These new methods
36341        should be used instead of the older getId()/setId()/etc. methods</strong>
36342        unless the old behavior is somehow necessary.  Regardless of the Level and
36343        Version of the SBML, these functions allow client applications to use more
36344        generalized code in some situations (for instance, when manipulating
36345        objects that are all known to have identifiers).  If the object in
36346        question does not posess an 'id' attribute according to the SBML
36347        specification for the Level and Version in use, libSBML will not allow the
36348        identifier to be set, nor will it read or write 'id' attributes for those
36349        objects.
36350
36351        @return the id of this SimpleSpeciesReference.
36352
36353        @see getIdAttribute()
36354        @see setIdAttribute()
36355        @see isSetIdAttribute()
36356        @see unsetIdAttribute()
36357
36358        """
36359        return _libsbml.SimpleSpeciesReference_getId(self)
36360
36361    def getName(self):
36362        r"""
36363        getName(SimpleSpeciesReference self) -> string
36364
36365        Returns the value of the 'name' attribute of this SimpleSpeciesReference object.
36366
36367        @par
36368        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
36369        moved to SBase directly, instead of being defined individually for many
36370        (but not all) objects.  LibSBML has for a long time provided functions
36371        defined on SBase itself to get, set, and unset those attributes, which
36372        would fail or otherwise return empty strings if executed on any object
36373        for which those attributes were not defined.  Now that all SBase objects
36374        define those attributes, those functions now succeed for any object with
36375        the appropriate level and version.
36376
36377        The 'name' attribute is
36378        optional and is not intended to be used for cross-referencing purposes
36379        within a model.  Its purpose instead is to provide a human-readable
36380        label for the component.  The data type of 'name' is the type
36381        <code>string</code> defined in XML Schema.  SBML imposes no
36382        restrictions as to the content of 'name' attributes beyond those
36383        restrictions defined by the <code>string</code> type in XML Schema.
36384
36385        The recommended practice for handling 'name' is as follows.  If a
36386        software tool has the capability for displaying the content of 'name'
36387        attributes, it should display this content to the user as a
36388        component's label instead of the component's 'id'.  If the user
36389        interface does not have this capability (e.g., because it cannot
36390        display or use special characters in symbol names), or if the 'name'
36391        attribute is missing on a given component, then the user interface
36392        should display the value of the 'id' attribute instead.  (Script
36393        language interpreters are especially likely to display 'id' instead of
36394        'name'.)
36395
36396        As a consequence of the above, authors of systems that automatically
36397        generate the values of 'id' attributes should be aware some systems
36398        may display the 'id''s to the user.  Authors therefore may wish to
36399        take some care to have their software create 'id' values that are: (a)
36400        reasonably easy for humans to type and read; and (b) likely to be
36401        meaningful, for example by making the 'id' attribute be an abbreviated
36402        form of the name attribute value.
36403
36404        An additional point worth mentioning is although there are
36405        restrictions on the uniqueness of 'id' values, there are no
36406        restrictions on the uniqueness of 'name' values in a model.  This
36407        allows software applications leeway in assigning component identifiers.
36408
36409        Regardless of the level and version of the SBML, these functions allow
36410        client applications to use more generalized code in some situations
36411        (for instance, when manipulating objects that are all known to have
36412        names).  If the object in question does not posess a 'name' attribute
36413        according to the SBML specification for the Level and Version in use,
36414        libSBML will not allow the name to be set, nor will it read or
36415        write 'name' attributes for those objects.
36416
36417        @return the name of this SBML object, or the empty string if not set or unsettable.
36418
36419        @see getIdAttribute()
36420        @see isSetName()
36421        @see setName()
36422        @see unsetName()
36423
36424        """
36425        return _libsbml.SimpleSpeciesReference_getName(self)
36426
36427    def getSpecies(self):
36428        r"""
36429        getSpecies(SimpleSpeciesReference self) -> string
36430
36431        Get the value of the 'species' attribute.
36432
36433        @return the value of the attribute 'species' for this
36434        SimpleSpeciesReference.
36435
36436        """
36437        return _libsbml.SimpleSpeciesReference_getSpecies(self)
36438
36439    def isSetId(self):
36440        r"""
36441        isSetId(SimpleSpeciesReference self) -> bool
36442
36443        Predicate returning @c True if this
36444        SimpleSpeciesReference's 'id' attribute is set.
36445
36446        @par
36447        The identifier given by an object's 'id' attribute value
36448        is used to identify the object within the SBML model definition.
36449        Other objects can refer to the component using this identifier.  The
36450        data type of 'id' is always <code>SId</code> or a type derived
36451        from that, such as <code>UnitSId</code>, depending on the object in
36452        question.  All data types are defined as follows:
36453        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
36454        letter ::= 'a'..'z','A'..'Z'
36455        digit  ::= '0'..'9'
36456        idChar ::= letter | digit | '_'
36457        SId    ::= ( letter | '_' ) idChar*
36458        </pre>
36459        The characters <code>(</code> and <code>)</code> are used for grouping,
36460        the character <code>*</code> 'zero or more times', and the character
36461        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
36462        is determined by an exact character sequence match; i.e., comparisons must
36463        be performed in a case-sensitive manner.  This applies to all uses of
36464        <code>SId</code>, <code>SIdRef</code>, and derived types.
36465
36466        Users need to be aware of some important API issues that are the result of
36467        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
36468        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
36469        of SBML objects.  To simplify the work of programmers, libSBML's API
36470        provided get, set, check, and unset on the SBase object class itself
36471        instead of on individual subobject classes. This made the
36472        get/set/etc. methods uniformly available on all objects in the libSBML
36473        API.  LibSBML simply returned empty strings or otherwise did not act when
36474        the methods were applied to SBML objects that were not defined by the SBML
36475        specification to have 'id' or 'name' attributes.  Additional complications
36476        arose with the rule and assignment objects: InitialAssignment,
36477        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
36478        the rule object hierarchy was different, and in addition, then as now,
36479        they possess different attributes: 'variable' (for the rules and event
36480        assignments), 'symbol' (for initial assignments), or neither (for
36481        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
36482        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
36483
36484        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
36485        Version&nbsp;2, it became necessary to introduce a new way to interact
36486        with the attributes more consistently in libSBML to avoid breaking
36487        backward compatibility in the behavior of the original 'id' methods.  For
36488        this reason, libSBML provides four functions (getIdAttribute(),
36489        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
36490        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
36491        from SBase, regardless of the object's type.  <strong>These new methods
36492        should be used instead of the older getId()/setId()/etc. methods</strong>
36493        unless the old behavior is somehow necessary.  Regardless of the Level and
36494        Version of the SBML, these functions allow client applications to use more
36495        generalized code in some situations (for instance, when manipulating
36496        objects that are all known to have identifiers).  If the object in
36497        question does not posess an 'id' attribute according to the SBML
36498        specification for the Level and Version in use, libSBML will not allow the
36499        identifier to be set, nor will it read or write 'id' attributes for those
36500        objects.
36501
36502        @return @c True if the 'id' attribute of this SBML object is
36503        set, @c False otherwise.
36504
36505        @note Because of the inconsistent behavior of this function with
36506        respect to assignments and rules, it is recommended that callers
36507        use isSetIdAttribute() instead.
36508
36509        @see getIdAttribute()
36510        @see setIdAttribute()
36511        @see unsetIdAttribute()
36512        @see isSetIdAttribute()
36513
36514        """
36515        return _libsbml.SimpleSpeciesReference_isSetId(self)
36516
36517    def isSetName(self):
36518        r"""
36519        isSetName(SimpleSpeciesReference self) -> bool
36520
36521        Predicate returning @c True if this
36522        SimpleSpeciesReference's 'name' attribute is set.
36523
36524        @par
36525        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
36526        moved to SBase directly, instead of being defined individually for many
36527        (but not all) objects.  LibSBML has for a long time provided functions
36528        defined on SBase itself to get, set, and unset those attributes, which
36529        would fail or otherwise return empty strings if executed on any object
36530        for which those attributes were not defined.  Now that all SBase objects
36531        define those attributes, those functions now succeed for any object with
36532        the appropriate level and version.
36533
36534        The 'name' attribute is
36535        optional and is not intended to be used for cross-referencing purposes
36536        within a model.  Its purpose instead is to provide a human-readable
36537        label for the component.  The data type of 'name' is the type
36538        <code>string</code> defined in XML Schema.  SBML imposes no
36539        restrictions as to the content of 'name' attributes beyond those
36540        restrictions defined by the <code>string</code> type in XML Schema.
36541
36542        The recommended practice for handling 'name' is as follows.  If a
36543        software tool has the capability for displaying the content of 'name'
36544        attributes, it should display this content to the user as a
36545        component's label instead of the component's 'id'.  If the user
36546        interface does not have this capability (e.g., because it cannot
36547        display or use special characters in symbol names), or if the 'name'
36548        attribute is missing on a given component, then the user interface
36549        should display the value of the 'id' attribute instead.  (Script
36550        language interpreters are especially likely to display 'id' instead of
36551        'name'.)
36552
36553        As a consequence of the above, authors of systems that automatically
36554        generate the values of 'id' attributes should be aware some systems
36555        may display the 'id''s to the user.  Authors therefore may wish to
36556        take some care to have their software create 'id' values that are: (a)
36557        reasonably easy for humans to type and read; and (b) likely to be
36558        meaningful, for example by making the 'id' attribute be an abbreviated
36559        form of the name attribute value.
36560
36561        An additional point worth mentioning is although there are
36562        restrictions on the uniqueness of 'id' values, there are no
36563        restrictions on the uniqueness of 'name' values in a model.  This
36564        allows software applications leeway in assigning component identifiers.
36565
36566        Regardless of the level and version of the SBML, these functions allow
36567        client applications to use more generalized code in some situations
36568        (for instance, when manipulating objects that are all known to have
36569        names).  If the object in question does not posess a 'name' attribute
36570        according to the SBML specification for the Level and Version in use,
36571        libSBML will not allow the name to be set, nor will it read or
36572        write 'name' attributes for those objects.
36573
36574        @return @c True if the 'name' attribute of this SBML object is
36575        set, @c False otherwise.
36576
36577        @see getName()
36578        @see setName()
36579        @see unsetName()
36580
36581        """
36582        return _libsbml.SimpleSpeciesReference_isSetName(self)
36583
36584    def isSetSpecies(self):
36585        r"""
36586        isSetSpecies(SimpleSpeciesReference self) -> bool
36587
36588        Predicate returning @c True if this
36589        SimpleSpeciesReference's 'species' attribute is set.
36590
36591        @return @c True if the 'species' attribute of this
36592        SimpleSpeciesReference is set, @c False otherwise.
36593
36594        """
36595        return _libsbml.SimpleSpeciesReference_isSetSpecies(self)
36596
36597    def setSpecies(self, sid):
36598        r"""
36599        setSpecies(SimpleSpeciesReference self, string sid) -> int
36600
36601        Sets the 'species' attribute of this SimpleSpeciesReference.
36602
36603        The identifier string passed in @p sid is copied.
36604
36605        @param sid the identifier of a species defined in the enclosing
36606        Model's ListOfSpecies.
36607
36608        @return integer value indicating success/failure of the
36609        function.  @if clike The value is drawn from the
36610        enumeration #OperationReturnValues_t. @endif@~ The possible values
36611        returned by this function are:
36612        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
36613        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
36614
36615        """
36616        return _libsbml.SimpleSpeciesReference_setSpecies(self, sid)
36617
36618    def setId(self, sid):
36619        r"""
36620        setId(SimpleSpeciesReference self, string sid) -> int
36621
36622        Sets the value of the 'id' attribute of this SimpleSpeciesReference.
36623
36624        @par
36625        The string @p sid is copied.
36626
36627        @par
36628        The identifier given by an object's 'id' attribute value
36629        is used to identify the object within the SBML model definition.
36630        Other objects can refer to the component using this identifier.  The
36631        data type of 'id' is always <code>SId</code> or a type derived
36632        from that, such as <code>UnitSId</code>, depending on the object in
36633        question.  All data types are defined as follows:
36634        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
36635        letter ::= 'a'..'z','A'..'Z'
36636        digit  ::= '0'..'9'
36637        idChar ::= letter | digit | '_'
36638        SId    ::= ( letter | '_' ) idChar*
36639        </pre>
36640        The characters <code>(</code> and <code>)</code> are used for grouping,
36641        the character <code>*</code> 'zero or more times', and the character
36642        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
36643        is determined by an exact character sequence match; i.e., comparisons must
36644        be performed in a case-sensitive manner.  This applies to all uses of
36645        <code>SId</code>, <code>SIdRef</code>, and derived types.
36646
36647        Users need to be aware of some important API issues that are the result of
36648        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
36649        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
36650        of SBML objects.  To simplify the work of programmers, libSBML's API
36651        provided get, set, check, and unset on the SBase object class itself
36652        instead of on individual subobject classes. This made the
36653        get/set/etc. methods uniformly available on all objects in the libSBML
36654        API.  LibSBML simply returned empty strings or otherwise did not act when
36655        the methods were applied to SBML objects that were not defined by the SBML
36656        specification to have 'id' or 'name' attributes.  Additional complications
36657        arose with the rule and assignment objects: InitialAssignment,
36658        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
36659        the rule object hierarchy was different, and in addition, then as now,
36660        they possess different attributes: 'variable' (for the rules and event
36661        assignments), 'symbol' (for initial assignments), or neither (for
36662        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
36663        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
36664
36665        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
36666        Version&nbsp;2, it became necessary to introduce a new way to interact
36667        with the attributes more consistently in libSBML to avoid breaking
36668        backward compatibility in the behavior of the original 'id' methods.  For
36669        this reason, libSBML provides four functions (getIdAttribute(),
36670        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
36671        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
36672        from SBase, regardless of the object's type.  <strong>These new methods
36673        should be used instead of the older getId()/setId()/etc. methods</strong>
36674        unless the old behavior is somehow necessary.  Regardless of the Level and
36675        Version of the SBML, these functions allow client applications to use more
36676        generalized code in some situations (for instance, when manipulating
36677        objects that are all known to have identifiers).  If the object in
36678        question does not posess an 'id' attribute according to the SBML
36679        specification for the Level and Version in use, libSBML will not allow the
36680        identifier to be set, nor will it read or write 'id' attributes for those
36681        objects.
36682
36683        @param sid the string to use as the identifier of this object.
36684
36685        @return integer value indicating success/failure of the
36686        function.  @if clike The value is drawn from the
36687        enumeration #OperationReturnValues_t. @endif@~ The possible values
36688        returned by this function are:
36689        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
36690        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
36691        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
36692
36693        @see getIdAttribute()
36694        @see setIdAttribute()
36695        @see isSetIdAttribute()
36696        @see unsetIdAttribute()
36697
36698        """
36699        return _libsbml.SimpleSpeciesReference_setId(self, sid)
36700
36701    def setName(self, name):
36702        r"""
36703        setName(SimpleSpeciesReference self, string name) -> int
36704
36705        Sets the value of the 'name' attribute of this SimpleSpeciesReference.
36706
36707        @par
36708
36709        The string in @p name is copied.
36710
36711        @param name the new name for the SBML object.
36712
36713        @return integer value indicating success/failure of the
36714        function.  @if clike The value is drawn from the
36715        enumeration #OperationReturnValues_t. @endif@~ The possible values
36716        returned by this function are:
36717        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
36718        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
36719
36720        """
36721        return _libsbml.SimpleSpeciesReference_setName(self, name)
36722
36723    def unsetId(self):
36724        r"""
36725        unsetId(SimpleSpeciesReference self) -> int
36726
36727        Unsets the value of the 'id' attribute of this SimpleSpeciesReference.
36728
36729        @par
36730        The identifier given by an object's 'id' attribute value
36731        is used to identify the object within the SBML model definition.
36732        Other objects can refer to the component using this identifier.  The
36733        data type of 'id' is always <code>SId</code> or a type derived
36734        from that, such as <code>UnitSId</code>, depending on the object in
36735        question.  All data types are defined as follows:
36736        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
36737        letter ::= 'a'..'z','A'..'Z'
36738        digit  ::= '0'..'9'
36739        idChar ::= letter | digit | '_'
36740        SId    ::= ( letter | '_' ) idChar*
36741        </pre>
36742        The characters <code>(</code> and <code>)</code> are used for grouping,
36743        the character <code>*</code> 'zero or more times', and the character
36744        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
36745        is determined by an exact character sequence match; i.e., comparisons must
36746        be performed in a case-sensitive manner.  This applies to all uses of
36747        <code>SId</code>, <code>SIdRef</code>, and derived types.
36748
36749        Users need to be aware of some important API issues that are the result of
36750        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
36751        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
36752        of SBML objects.  To simplify the work of programmers, libSBML's API
36753        provided get, set, check, and unset on the SBase object class itself
36754        instead of on individual subobject classes. This made the
36755        get/set/etc. methods uniformly available on all objects in the libSBML
36756        API.  LibSBML simply returned empty strings or otherwise did not act when
36757        the methods were applied to SBML objects that were not defined by the SBML
36758        specification to have 'id' or 'name' attributes.  Additional complications
36759        arose with the rule and assignment objects: InitialAssignment,
36760        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
36761        the rule object hierarchy was different, and in addition, then as now,
36762        they possess different attributes: 'variable' (for the rules and event
36763        assignments), 'symbol' (for initial assignments), or neither (for
36764        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
36765        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
36766
36767        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
36768        Version&nbsp;2, it became necessary to introduce a new way to interact
36769        with the attributes more consistently in libSBML to avoid breaking
36770        backward compatibility in the behavior of the original 'id' methods.  For
36771        this reason, libSBML provides four functions (getIdAttribute(),
36772        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
36773        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
36774        from SBase, regardless of the object's type.  <strong>These new methods
36775        should be used instead of the older getId()/setId()/etc. methods</strong>
36776        unless the old behavior is somehow necessary.  Regardless of the Level and
36777        Version of the SBML, these functions allow client applications to use more
36778        generalized code in some situations (for instance, when manipulating
36779        objects that are all known to have identifiers).  If the object in
36780        question does not posess an 'id' attribute according to the SBML
36781        specification for the Level and Version in use, libSBML will not allow the
36782        identifier to be set, nor will it read or write 'id' attributes for those
36783        objects.
36784
36785        @return integer value indicating success/failure of the
36786        function.  @if clike The value is drawn from the
36787        enumeration #OperationReturnValues_t. @endif@~ The possible values
36788        returned by this function are:
36789        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
36790        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
36791
36792        @see getIdAttribute()
36793        @see setIdAttribute()
36794        @see isSetIdAttribute()
36795        @see unsetIdAttribute()
36796
36797        """
36798        return _libsbml.SimpleSpeciesReference_unsetId(self)
36799
36800    def unsetName(self):
36801        r"""
36802        unsetName(SimpleSpeciesReference self) -> int
36803
36804        Unsets the value of the 'name' attribute of this SimpleSpeciesReference.
36805
36806        @par
36807        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
36808        moved to SBase directly, instead of being defined individually for many
36809        (but not all) objects.  LibSBML has for a long time provided functions
36810        defined on SBase itself to get, set, and unset those attributes, which
36811        would fail or otherwise return empty strings if executed on any object
36812        for which those attributes were not defined.  Now that all SBase objects
36813        define those attributes, those functions now succeed for any object with
36814        the appropriate level and version.
36815
36816        The 'name' attribute is
36817        optional and is not intended to be used for cross-referencing purposes
36818        within a model.  Its purpose instead is to provide a human-readable
36819        label for the component.  The data type of 'name' is the type
36820        <code>string</code> defined in XML Schema.  SBML imposes no
36821        restrictions as to the content of 'name' attributes beyond those
36822        restrictions defined by the <code>string</code> type in XML Schema.
36823
36824        The recommended practice for handling 'name' is as follows.  If a
36825        software tool has the capability for displaying the content of 'name'
36826        attributes, it should display this content to the user as a
36827        component's label instead of the component's 'id'.  If the user
36828        interface does not have this capability (e.g., because it cannot
36829        display or use special characters in symbol names), or if the 'name'
36830        attribute is missing on a given component, then the user interface
36831        should display the value of the 'id' attribute instead.  (Script
36832        language interpreters are especially likely to display 'id' instead of
36833        'name'.)
36834
36835        As a consequence of the above, authors of systems that automatically
36836        generate the values of 'id' attributes should be aware some systems
36837        may display the 'id''s to the user.  Authors therefore may wish to
36838        take some care to have their software create 'id' values that are: (a)
36839        reasonably easy for humans to type and read; and (b) likely to be
36840        meaningful, for example by making the 'id' attribute be an abbreviated
36841        form of the name attribute value.
36842
36843        An additional point worth mentioning is although there are
36844        restrictions on the uniqueness of 'id' values, there are no
36845        restrictions on the uniqueness of 'name' values in a model.  This
36846        allows software applications leeway in assigning component identifiers.
36847
36848        Regardless of the level and version of the SBML, these functions allow
36849        client applications to use more generalized code in some situations
36850        (for instance, when manipulating objects that are all known to have
36851        names).  If the object in question does not posess a 'name' attribute
36852        according to the SBML specification for the Level and Version in use,
36853        libSBML will not allow the name to be set, nor will it read or
36854        write 'name' attributes for those objects.
36855
36856        @return integer value indicating success/failure of the
36857        function.  @if clike The value is drawn from the
36858        enumeration #OperationReturnValues_t. @endif@~ The possible values
36859        returned by this function are:
36860        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
36861        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
36862
36863        @see getName()
36864        @see setName()
36865        @see isSetName()
36866
36867        """
36868        return _libsbml.SimpleSpeciesReference_unsetName(self)
36869
36870    def unsetSpecies(self):
36871        r"""
36872        unsetSpecies(SimpleSpeciesReference self) -> int
36873
36874        Unsets the value of the 'species' attribute of this SimpleSpeciesReference.
36875
36876        @return integer value indicating success/failure of the
36877        function.  @if clike The value is drawn from the
36878        enumeration #OperationReturnValues_t. @endif@~ The possible values
36879        returned by this function are:
36880        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
36881        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
36882
36883        """
36884        return _libsbml.SimpleSpeciesReference_unsetSpecies(self)
36885
36886    def isModifier(self):
36887        r"""
36888        isModifier(SimpleSpeciesReference self) -> bool
36889
36890        Predicate returning @c True if this
36891        is a ModifierSpeciesReference.
36892
36893        @return @c True if this SimpleSpeciesReference's subclass is
36894        ModiferSpeciesReference, @c False if it is a plain SpeciesReference.
36895
36896        """
36897        return _libsbml.SimpleSpeciesReference_isModifier(self)
36898
36899    def renameSIdRefs(self, oldid, newid):
36900        r"""
36901        renameSIdRefs(SimpleSpeciesReference self, string oldid, string newid)
36902
36903        Replaces all uses of a given @c SIdRef type attribute value with another
36904        value.
36905
36906        @par
36907        In SBML, object identifiers are of a data type called <code>SId</code>.
36908        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
36909        introduced for attribute values that refer to <code>SId</code> values; in
36910        previous Levels of SBML, this data type did not exist and attributes were
36911        simply described to as 'referring to an identifier', but the effective
36912        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
36913        other methods of libSBML refer to the type <code>SIdRef</code> for all
36914        Levels of SBML, even if the corresponding SBML specification did not
36915        explicitly name the data type.
36916
36917        This method works by looking at all attributes and (if appropriate)
36918        mathematical formulas in MathML content, comparing the referenced
36919        identifiers to the value of @p oldid.  If any matches are found, the
36920        matching values are replaced with @p newid.  The method does @em not
36921        descend into child elements.
36922
36923        @param oldid the old identifier.
36924        @param newid the new identifier.
36925
36926        """
36927        return _libsbml.SimpleSpeciesReference_renameSIdRefs(self, oldid, newid)
36928
36929# Register SimpleSpeciesReference in _libsbml:
36930_libsbml.SimpleSpeciesReference_swigregister(SimpleSpeciesReference)
36931
36932class SpeciesReference(SimpleSpeciesReference):
36933    r"""
36934
36935    @sbmlpackage{core}
36936
36937    @htmlinclude pkg-marker-core.html A reference to an SBML species in a reaction.
36938
36939    The Reaction structure provides a way to express which species act as
36940    reactants and which species act as products in a reaction.  In a given
36941    reaction, references to those species acting as reactants and/or
36942    products are made using instances of SpeciesReference structures in a
36943    Reaction object's lists of reactants and products.
36944
36945    A species can occur more than once in the lists of reactants and
36946    products of a given Reaction instance.  The effective stoichiometry for
36947    a species in a reaction is the sum of the stoichiometry values given on
36948    the SpeciesReference object in the list of products minus the sum of
36949    stoichiometry values given on the SpeciesReference objects in the list
36950    of reactants.  A positive value indicates the species is effectively a
36951    product and a negative value indicates the species is effectively a
36952    reactant.  SBML places no restrictions on the effective stoichiometry of
36953    a species in a reaction; for example, it can be zero.  In the following
36954    SBML fragment, the two reactions have the same effective stoichiometry
36955    for all their species:
36956    @verbatim
36957     <reaction id='x'>
36958         <listOfReactants>
36959             <speciesReference species='a'/>
36960             <speciesReference species='a'/>
36961             <speciesReference species='b'/>
36962         </listOfReactants>
36963         <listOfProducts>
36964             <speciesReference species='c'/>
36965             <speciesReference species='b'/>
36966         </listProducts>
36967     </reaction>
36968     <reaction id='y'>
36969         <listOfReactants>
36970             <speciesReference species='a' stoichiometry='2'/>
36971         </listOfReactants>
36972         <listOfProducts>
36973             <speciesReference species='c'/>
36974         </listProducts>
36975     </reaction>
36976     @endverbatim
36977
36978    The precise structure of SpeciesReference differs between SBML
36979    Level&nbsp;2 and Level&nbsp;3.  We discuss the two variants in separate
36980    sections below.
36981
36982    @section spr-l2 SpeciesReference in SBML Level 2
36983
36984    The mandatory 'species' attribute of SpeciesReference must have as its
36985    value the identifier of an existing species defined in the enclosing
36986    Model.  The species is thereby designated as a reactant or product in
36987    the reaction.  Which one it is (i.e., reactant or product) is indicated
36988    by whether the SpeciesReference appears in the Reaction's 'reactant' or
36989    'product' lists.
36990
36991    Product and reactant stoichiometries can be specified using
36992    <em>either</em> 'stoichiometry' or 'stoichiometryMath' in a
36993    SpeciesReference object.  The 'stoichiometry' attribute is of type
36994    double and should contain values greater than @c 0 (false).  The
36995    'stoichiometryMath' element is implemented as an element containing a
36996    MathML expression.  These two are mutually exclusive; only one of
36997    'stoichiometry' or 'stoichiometryMath' should be defined in a given
36998    SpeciesReference instance.  When neither the attribute nor the element
36999    is present, the value of 'stoichiometry' in the SpeciesReference
37000    instance defaults to @c 1.
37001
37002    For maximum interoperability, the 'stoichiometry' attribute should be
37003    used in preference to 'stoichiometryMath' when a species' stoichiometry
37004    is a simple scalar number (integer or decimal).  When the stoichiometry
37005    is a rational number, or when it is a more complicated formula,
37006    'stoichiometryMath' must be used.  The MathML expression in
37007    'stoichiometryMath' may also refer to identifiers of entities in a model
37008    (except reaction identifiers).  However, the only species identifiers
37009    that can be used in 'stoichiometryMath' are those referenced in the
37010    Reaction list of reactants, products and modifiers.
37011
37012    The following is a simple example of a species reference for species
37013    @c X0, with stoichiometry @c 2, in a list of reactants within a reaction
37014    having the identifier @c J1:
37015    @verbatim
37016     <model>
37017         ...
37018         <listOfReactions>
37019             <reaction id='J1'>
37020                 <listOfReactants>
37021                     <speciesReference species='X0' stoichiometry='2'>
37022                 </listOfReactants>
37023                 ...
37024             </reaction>
37025             ...
37026         </listOfReactions>
37027         ...
37028     </model>
37029     @endverbatim
37030
37031    The following is a more complex example of a species reference for
37032    species X0, with a stoichiometry formula consisting of the parameter
37033    @c x:
37034    @verbatim
37035     <model>
37036         ...
37037         <listOfReactions>
37038             <reaction id='J1'>
37039                 <listOfReactants>
37040                     <speciesReference species='X0'>
37041                         <stoichiometryMath>
37042                             <math xmlns='http://www.w3.org/1998/Math/MathML'>
37043                                 <ci>x</ci>
37044                             </math>
37045                         </stoichiometryMath>
37046                     </speciesReference>
37047                 </listOfReactants>
37048                 ...
37049             </reaction>
37050             ...
37051         </listOfReactions>
37052         ...
37053     </model>
37054     @endverbatim
37055
37056
37057    @section spr-l3 SpeciesReference in SBML Level 3
37058
37059    In Level 2's definition of a reaction, the stoichiometry attribute of a
37060    SpeciesReference is actually a combination of two factors, the standard
37061    biochemical stoichiometry and a conversion factor that may be needed to
37062    translate the units of the species quantity to the units of the reaction
37063    rate. Unfortunately, Level&nbsp;2 offers no direct way of decoupling
37064    these two factors, or for explicitly indicating the units. The only way
37065    to do it in Level&nbsp;2 is to use the StoichiometryMath object
37066    associated with SpeciesReferences, and to reference SBML Parameter
37067    objects from within the StoichiometryMath formula. This works because
37068    Parameter offers a way to attach units to a numerical value, but the
37069    solution is indirect and awkward for something that should be a simple
37070    matter.  Moreover, the question of how to properly encode
37071    stoichiometries in SBML reactions has caused much confusion among
37072    implementors of SBML software.
37073
37074    SBML Level&nbsp;3 approaches this problem differently.  It (1) extends
37075    the the use of the SpeciesReference identifier to represent the value of
37076    the 'stoichiometry' attribute, (2) makes the 'stoichiometry' attribute
37077    optional, (3) removes StoichiometryMath, and (4) adds a new 'constant'
37078    boolean attribute on SpeciesReference.
37079
37080    As in Level&nbsp;2, the 'stoichiometry' attribute is of type
37081    @c float and should contain values greater than zero (@c 0).  A
37082    missing 'stoichiometry' implies that the stoichiometry is either
37083    unknown, or to be obtained from an external source, or determined by an
37084    InitialAssignment object or other SBML construct elsewhere in the model.
37085
37086    A species reference's stoichiometry is set by its 'stoichiometry'
37087    attribute exactly once.  If the SpeciesReference object's 'constant'
37088    attribute has the value @c True, then the stoichiometry is fixed and
37089    cannot be changed except by an InitialAssignment object.  These two
37090    methods of setting the stoichiometry (i.e., using 'stoichiometry'
37091    directly, or using InitialAssignment) differ in that the 'stoichiometry'
37092    attribute can only be set to a literal floating-point number, whereas
37093    InitialAssignment allows the value to be set using an arbitrary
37094    mathematical expression.  (As an example, the approach could be used to
37095    set the stoichiometry to a rational number of the form @em p/@em q,
37096    where @em p and @em q are integers, something that is occasionally
37097    useful in the context of biochemical reaction networks.)  If the species
37098    reference's 'constant' attribute has the value @c False, the species
37099    reference's value may be overridden by an InitialAssignment or changed
37100    by AssignmentRule or AlgebraicRule, and in addition, for simulation time
37101    <em>t &gt; 0</em>, it may also be changed by a RateRule or Event
37102    objects.  (However, some of these constructs are mutually exclusive; see
37103    the SBML Level&nbsp;3 Core specifiation for more
37104    details.)  It is not an error to define 'stoichiometry' on a species
37105    reference and also redefine the stoichiometry using an
37106    InitialAssignment, but the 'stoichiometry' attribute in that case is
37107    ignored.
37108
37109    The value of the 'id' attribute of a SpeciesReference can be used as the
37110    content of a <code>&lt;ci&gt;</code> element in MathML formulas
37111    elsewhere in the model.  When the identifier appears in a MathML
37112    <code>&lt;ci&gt;</code> element, it represents the stoichiometry of the
37113    corresponding species in the reaction where the SpeciesReference object
37114    instance appears.  More specifically, it represents the value of the
37115    'stoichiometry' attribute on the SpeciesReference object.
37116
37117    In SBML Level 3, the unit of measurement associated with the value of a
37118    species' stoichiometry is always considered to be @c dimensionless.
37119    This has the following implications:
37120    <ul>
37121
37122    <li> When a species reference's identifier appears in mathematical
37123    formulas elsewhere in the model, the unit associated with that value is
37124    @c dimensionless.
37125
37126    <li> The units of the 'math' elements of AssignmentRule,
37127    InitialAssignment and EventAssignment objects setting the stoichiometry
37128    of the species reference should be @c dimensionless.
37129
37130    <li> If a species reference's identifier is the subject of a RateRule,
37131    the unit associated with the RateRule object's value should be
37132    <code>dimensionless</code>/<em>time</em>, where <em>time</em> is the
37133    model-wide unit of time set on the Model object.
37134
37135    </ul>
37136
37137    """
37138
37139    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
37140    __repr__ = _swig_repr
37141    __swig_destroy__ = _libsbml.delete_SpeciesReference
37142
37143    def __init__(self, *args):
37144        r"""
37145        __init__(SpeciesReference self, unsigned int level, unsigned int version) -> SpeciesReference
37146        __init__(SpeciesReference self, SBMLNamespaces sbmlns) -> SpeciesReference
37147        __init__(SpeciesReference self, SpeciesReference orig) -> SpeciesReference
37148
37149        This method has multiple variants; they differ in the arguments
37150         they accept.  Each variant is described separately below.
37151
37152        @par
37153        <hr>
37154        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37155         <pre class='signature'>SpeciesReference(SBMLNamespaces sbmlns)</pre>
37156
37157        Creates a new SpeciesReference using the given SBMLNamespaces object
37158        @p sbmlns.
37159
37160        @param sbmlns an SBMLNamespaces object.
37161
37162        @throws SBMLConstructorException
37163        Thrown if the given @p sbmlns is inconsistent or incompatible
37164        with this object.
37165
37166        @note Attempting to add an object to an SBMLDocument having a different
37167        combination of SBML Level, Version and XML namespaces than the object
37168        itself will result in an error at the time a caller attempts to make the
37169        addition.  A parent object must have compatible Level, Version and XML
37170        namespaces.  (Strictly speaking, a parent may also have more XML
37171        namespaces than a child, but the reverse is not permitted.)  The
37172        restriction is necessary to ensure that an SBML model has a consistent
37173        overall structure.  This requires callers to manage their objects
37174        carefully, but the benefit is increased flexibility in how models can be
37175        created by permitting callers to create objects bottom-up if desired.  In
37176        situations where objects are not yet attached to parents (e.g.,
37177        SBMLDocument), knowledge of the intented SBML Level and Version help
37178        libSBML determine such things as whether it is valid to assign a
37179        particular value to an attribute.
37180
37181
37182        @par
37183        <hr>
37184        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37185         <pre class='signature'>SpeciesReference(long level, long version)</pre>
37186
37187        Creates a new SpeciesReference using the given SBML @p level and @p version
37188        values.
37189
37190        @param level a long integer, the SBML Level to assign to this SpeciesReference.
37191
37192        @param version a long integer, the SBML Version to assign to this
37193        SpeciesReference.
37194
37195        @throws SBMLConstructorException
37196        Thrown if the given @p level and @p version combination are invalid
37197        or if this object is incompatible with the given level and version.
37198
37199        @note Attempting to add an object to an SBMLDocument having a different
37200        combination of SBML Level, Version and XML namespaces than the object
37201        itself will result in an error at the time a caller attempts to make the
37202        addition.  A parent object must have compatible Level, Version and XML
37203        namespaces.  (Strictly speaking, a parent may also have more XML
37204        namespaces than a child, but the reverse is not permitted.)  The
37205        restriction is necessary to ensure that an SBML model has a consistent
37206        overall structure.  This requires callers to manage their objects
37207        carefully, but the benefit is increased flexibility in how models can be
37208        created by permitting callers to create objects bottom-up if desired.  In
37209        situations where objects are not yet attached to parents (e.g.,
37210        SBMLDocument), knowledge of the intented SBML Level and Version help
37211        libSBML determine such things as whether it is valid to assign a
37212        particular value to an attribute.
37213
37214
37215        @par
37216        <hr>
37217        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37218         <pre class='signature'>SpeciesReference(SpeciesReference orig)</pre>
37219
37220        Copy constructor; creates a copy of this SpeciesReference.
37221
37222        @param orig the SpeciesReference instance to copy.
37223
37224        """
37225        _libsbml.SpeciesReference_swiginit(self, _libsbml.new_SpeciesReference(*args))
37226
37227    def clone(self):
37228        r"""
37229        clone(SpeciesReference self) -> SpeciesReference
37230
37231        Creates and returns a deep copy of this SpeciesReference object.
37232
37233        @return the (deep) copy of this SpeciesReference object.
37234
37235        """
37236        return _libsbml.SpeciesReference_clone(self)
37237
37238    def initDefaults(self):
37239        r"""
37240        initDefaults(SpeciesReference self)
37241
37242        Initializes the fields of this SpeciesReference object to 'typical'
37243        default values.
37244
37245        The SBML SpeciesReference component has slightly different aspects and
37246        default attribute values in different SBML Levels and Versions.
37247        This method sets the values to certain common defaults, based
37248        mostly on what they are in SBML Level&nbsp;2.  Specifically:
37249        <ul>
37250        <li> Sets attribute 'stoichiometry' to @c 1.0
37251        <li> (Applies to Level&nbsp;1 models only) Sets attribute 'denominator' to @c 1
37252        </ul>
37253
37254        @see getDenominator()
37255        @see setDenominator()
37256        @see getStoichiometry()
37257        @see setStoichiometry()
37258        @see getStoichiometryMath()
37259        @see setStoichiometryMath()
37260
37261        """
37262        return _libsbml.SpeciesReference_initDefaults(self)
37263
37264    def getStoichiometry(self):
37265        r"""
37266        getStoichiometry(SpeciesReference self) -> double
37267
37268        Get the value of the 'stoichiometry' attribute.
37269
37270        In SBML Level 2, product and reactant stoichiometries can be specified
37271        using <em>either</em> 'stoichiometry' or 'stoichiometryMath' in a
37272        SpeciesReference object.  The former is to be used when a
37273        stoichiometry is simply a scalar number, while the latter is for
37274        occasions when it needs to be a rational number or it needs to
37275        reference other mathematical expressions.  The 'stoichiometry'
37276        attribute is of type @c float and should contain values greater than
37277        zero (@c 0).  The 'stoichiometryMath' element is implemented as an
37278        element containing a MathML expression.  These two are mutually
37279        exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should
37280        be defined in a given SpeciesReference instance.  When neither the
37281        attribute nor the element is present, the value of 'stoichiometry' in
37282        the SpeciesReference instance defaults to @c 1.  For maximum
37283        interoperability between different software tools, the 'stoichiometry'
37284        attribute should be used in preference to 'stoichiometryMath' when a
37285        species' stoichiometry is a simple scalar number (integer or
37286        decimal).
37287
37288        In SBML Level 3, there is no StoichiometryMath, and SpeciesReference
37289        objects have only the 'stoichiometry' attribute.
37290
37291        @return the value of the (scalar) 'stoichiometry' attribute of this
37292        SpeciesReference.
37293
37294        @see getStoichiometryMath()
37295
37296        """
37297        return _libsbml.SpeciesReference_getStoichiometry(self)
37298
37299    def getStoichiometryMath(self, *args):
37300        r"""
37301        getStoichiometryMath(SpeciesReference self) -> StoichiometryMath
37302        getStoichiometryMath(SpeciesReference self) -> StoichiometryMath
37303
37304        Get the content of the 'stoichiometryMath' subelement as an ASTNode
37305        tree.
37306
37307        The 'stoichiometryMath' element exists only in SBML Level 2.  There,
37308        product and reactant stoichiometries can be specified using
37309        <em>either</em> 'stoichiometry' or 'stoichiometryMath' in a
37310        SpeciesReference object.  The former is to be used when a
37311        stoichiometry is simply a scalar number, while the latter is for
37312        occasions when it needs to be a rational number or it needs to
37313        reference other mathematical expressions.  The 'stoichiometry'
37314        attribute is of type @c float and should contain values greater than
37315        zero (@c 0).  The 'stoichiometryMath' element is implemented as an
37316        element containing a MathML expression.  These two are mutually
37317        exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should
37318        be defined in a given SpeciesReference instance.  When neither the
37319        attribute nor the element is present, the value of 'stoichiometry' in
37320        the SpeciesReference instance defaults to @c 1.  For maximum
37321        interoperability between different software tools, the 'stoichiometry'
37322        attribute should be used in preference to 'stoichiometryMath' when a
37323        species' stoichiometry is a simple scalar number (integer or decimal).
37324
37325        @return the content of the 'stoichiometryMath' subelement of this
37326        SpeciesReference.
37327
37328        """
37329        return _libsbml.SpeciesReference_getStoichiometryMath(self, *args)
37330
37331    def getDenominator(self):
37332        r"""
37333        getDenominator(SpeciesReference self) -> int
37334
37335        Get the value of the 'denominator' attribute, for the case of a
37336        rational-numbered stoichiometry or a model in SBML Level&nbsp;1.
37337
37338        The 'denominator' attribute is only actually written out in the case
37339        of an SBML Level&nbsp;1 model.  In SBML Level&nbsp;2, rational-number
37340        stoichiometries are written as MathML elements in the
37341        'stoichiometryMath' subelement.  However, as a convenience to users,
37342        libSBML allows the creation and manipulation of rational-number
37343        stoichiometries by supplying the numerator and denominator directly
37344        rather than having to manually create an ASTNode object.  LibSBML
37345        will write out the appropriate constructs (either a combination of
37346        'stoichiometry' and 'denominator' in the case of SBML Level&nbsp;1, or a
37347        'stoichiometryMath' subelement in the case of SBML Level&nbsp;2).
37348        However, as the 'stoichiometryMath' subelement was removed in SBML
37349        Level&nbsp;3, automatic translation of the 'denominator'
37350        attribute is no longer supported for that level.
37351
37352        @return the value of the 'denominator' attribute of this
37353        SpeciesReference.
37354
37355        """
37356        return _libsbml.SpeciesReference_getDenominator(self)
37357
37358    def getConstant(self):
37359        r"""
37360        getConstant(SpeciesReference self) -> bool
37361
37362        Get the value of the 'constant' attribute.
37363
37364        @return the value of the 'constant' attribute of this
37365        SpeciesReference.
37366
37367        """
37368        return _libsbml.SpeciesReference_getConstant(self)
37369
37370    def isSetStoichiometryMath(self):
37371        r"""
37372        isSetStoichiometryMath(SpeciesReference self) -> bool
37373
37374        Predicate returning @c True if this
37375        SpeciesReference's 'stoichiometryMath' subelement is set
37376
37377        @return @c True if the 'stoichiometryMath' subelement of this
37378        SpeciesReference is set, @c False otherwise.
37379
37380        """
37381        return _libsbml.SpeciesReference_isSetStoichiometryMath(self)
37382
37383    def isSetConstant(self):
37384        r"""
37385        isSetConstant(SpeciesReference self) -> bool
37386
37387        Predicate returning @c True if this
37388        SpeciesReference's 'constant' attribute is set
37389
37390        @return @c True if the 'constant' attribute of this
37391        SpeciesReference is set, @c False otherwise.
37392
37393        """
37394        return _libsbml.SpeciesReference_isSetConstant(self)
37395
37396    def isSetStoichiometry(self):
37397        r"""
37398        isSetStoichiometry(SpeciesReference self) -> bool
37399
37400        Predicate returning @c True if this
37401        SpeciesReference's 'stoichiometry' attribute is set.
37402
37403        @return @c True if the 'stoichiometry' attribute of this
37404        SpeciesReference is set, @c False otherwise.
37405
37406        """
37407        return _libsbml.SpeciesReference_isSetStoichiometry(self)
37408
37409    def setStoichiometry(self, value):
37410        r"""
37411        setStoichiometry(SpeciesReference self, double value) -> int
37412
37413        Sets the value of the 'stoichiometry' attribute of this
37414        SpeciesReference.
37415
37416        In SBML Level 2, product and reactant stoichiometries can be specified
37417        using <em>either</em> 'stoichiometry' or 'stoichiometryMath' in a
37418        SpeciesReference object.  The former is to be used when a
37419        stoichiometry is simply a scalar number, while the latter is for
37420        occasions when it needs to be a rational number or it needs to
37421        reference other mathematical expressions.  The 'stoichiometry'
37422        attribute is of type @c float and should contain values greater than
37423        zero (@c 0).  The 'stoichiometryMath' element is implemented as an
37424        element containing a MathML expression.  These two are mutually
37425        exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should
37426        be defined in a given SpeciesReference instance.  When neither the
37427        attribute nor the element is present, the value of 'stoichiometry' in
37428        the SpeciesReference instance defaults to @c 1.  For maximum
37429        interoperability between different software tools, the 'stoichiometry'
37430        attribute should be used in preference to 'stoichiometryMath' when a
37431        species' stoichiometry is a simple scalar number (integer or
37432        decimal).
37433
37434        In SBML Level 3, there is no StoichiometryMath, and SpeciesReference
37435        objects have only the 'stoichiometry' attribute.
37436
37437        @param value the new value of the 'stoichiometry' attribute.
37438
37439        @note In SBML Level&nbsp;2, the 'stoichiometryMath' subelement of this
37440        SpeciesReference object will be unset because the 'stoichiometry'
37441        attribute and the stoichiometryMath' subelement are mutually
37442        exclusive.
37443
37444        @return integer value indicating success/failure of the
37445        function.  @if clike The value is drawn from the
37446        enumeration #OperationReturnValues_t. @endif@~ The possible values
37447        returned by this function are:
37448        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37449
37450        """
37451        return _libsbml.SpeciesReference_setStoichiometry(self, value)
37452
37453    def setStoichiometryMath(self, math):
37454        r"""
37455        setStoichiometryMath(SpeciesReference self, StoichiometryMath math) -> int
37456
37457        Sets the 'stoichiometryMath' subelement of this SpeciesReference.
37458
37459        The Abstract Syntax Tree in @p math is copied.
37460
37461        In SBML Level 2, product and reactant stoichiometries can be specified
37462        using <em>either</em> 'stoichiometry' or 'stoichiometryMath' in a
37463        SpeciesReference object.  The former is to be used when a
37464        stoichiometry is simply a scalar number, while the latter is for
37465        occasions when it needs to be a rational number or it needs to
37466        reference other mathematical expressions.  The 'stoichiometry'
37467        attribute is of type @c float and should contain values greater than
37468        zero (@c 0).  The 'stoichiometryMath' element is implemented as an
37469        element containing a MathML expression.  These two are mutually
37470        exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should
37471        be defined in a given SpeciesReference instance.  When neither the
37472        attribute nor the element is present, the value of 'stoichiometry' in
37473        the SpeciesReference instance defaults to @c 1.  For maximum
37474        interoperability between different software tools, the 'stoichiometry'
37475        attribute should be used in preference to 'stoichiometryMath' when a
37476        species' stoichiometry is a simple scalar number (integer or
37477        decimal).
37478
37479        In SBML Level 3, there is no StoichiometryMath, and SpeciesReference
37480        objects have only the 'stoichiometry' attribute.
37481
37482        @param math the StoichiometryMath expression that is to be copied as the
37483        content of the 'stoichiometryMath' subelement.
37484
37485        @note In SBML Level&nbsp;2, the 'stoichiometry' attribute of this
37486        SpeciesReference object will be unset (isSetStoichiometry() will
37487        return @c False although getStoichiometry() will return @c 1.0) if the
37488        given math is not null because the 'stoichiometry' attribute and the
37489        stoichiometryMath' subelement are mutually exclusive.
37490
37491        @return integer value indicating success/failure of the
37492        function.  @if clike The value is drawn from the
37493        enumeration #OperationReturnValues_t. @endif@~ The possible values
37494        returned by this function are:
37495        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37496        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
37497        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
37498        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
37499
37500        """
37501        return _libsbml.SpeciesReference_setStoichiometryMath(self, math)
37502
37503    def setDenominator(self, value):
37504        r"""
37505        setDenominator(SpeciesReference self, int value) -> int
37506
37507        Set the value of the 'denominator' attribute, for the case of a
37508        rational-numbered stoichiometry or a model in SBML Level&nbsp;1.
37509
37510        The 'denominator' attribute is only actually written out in the case
37511        of an SBML Level&nbsp;1 model.  In SBML Level&nbsp;2, rational-number
37512        stoichiometries are written as MathML elements in the
37513        'stoichiometryMath' subelement.  However, as a convenience to users,
37514        libSBML allows the creation and manipulation of rational-number
37515        stoichiometries by supplying the numerator and denominator directly
37516        rather than having to manually create an ASTNode object.  LibSBML
37517        will write out the appropriate constructs (either a combination of
37518        'stoichiometry' and 'denominator' in the case of SBML Level&nbsp;1, or
37519        a 'stoichiometryMath' subelement in the case of SBML Level&nbsp;2).
37520        However, as the 'stoichiometryMath' subelement was removed in SBML
37521        Level&nbsp;3, automatic translation of the 'denominator'
37522        attribute is no longer supported for that level.
37523
37524        @param value the scalar value.
37525
37526        @return integer value indicating success/failure of the
37527        function.  @if clike The value is drawn from the
37528        enumeration #OperationReturnValues_t. @endif@~ The possible values
37529        returned by this function are:
37530        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37531        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
37532
37533        """
37534        return _libsbml.SpeciesReference_setDenominator(self, value)
37535
37536    def setConstant(self, flag):
37537        r"""
37538        setConstant(SpeciesReference self, bool flag) -> int
37539
37540        Sets the 'constant' attribute of this SpeciesReference to the given boolean
37541        @p flag.
37542
37543        @param flag a boolean, the value for the 'constant' attribute of this
37544        SpeciesReference instance.
37545
37546        @return integer value indicating success/failure of the
37547        function.  @if clike The value is drawn from the
37548        enumeration #OperationReturnValues_t. @endif@~ The possible values
37549        returned by this function are:
37550        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37551        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
37552
37553        """
37554        return _libsbml.SpeciesReference_setConstant(self, flag)
37555
37556    def unsetStoichiometryMath(self):
37557        r"""
37558        unsetStoichiometryMath(SpeciesReference self) -> int
37559
37560        Unsets the 'stoichiometryMath' subelement of this SpeciesReference.
37561
37562        @return integer value indicating success/failure of the
37563        function.  @if clike The value is drawn from the
37564        enumeration #OperationReturnValues_t. @endif@~ The possible values
37565        returned by this function are:
37566        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37567        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
37568        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
37569
37570        In SBML Level 2, product and reactant stoichiometries can be specified
37571        using <em>either</em> 'stoichiometry' or 'stoichiometryMath' in a
37572        SpeciesReference object.  The former is to be used when a
37573        stoichiometry is simply a scalar number, while the latter is for
37574        occasions when it needs to be a rational number or it needs to
37575        reference other mathematical expressions.  The 'stoichiometry'
37576        attribute is of type @c float and should contain values greater than
37577        zero (@c 0).  The 'stoichiometryMath' element is implemented as an
37578        element containing a MathML expression.  These two are mutually
37579        exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should
37580        be defined in a given SpeciesReference instance.  When neither the
37581        attribute nor the element is present, the value of 'stoichiometry' in
37582        the SpeciesReference instance defaults to @c 1.  For maximum
37583        interoperability between different software tools, the 'stoichiometry'
37584        attribute should be used in preference to 'stoichiometryMath' when a
37585        species' stoichiometry is a simple scalar number (integer or
37586        decimal).
37587
37588        In SBML Level 3, there is no StoichiometryMath, and SpeciesReference
37589        objects have only the 'stoichiometry' attribute.
37590
37591        @note In SBML Level&nbsp;2, the 'stoichiometry' attribute of this
37592        SpeciesReference object will be reset to a default value (@c 1.0) if
37593        the 'stoichiometry' attribute has not been set.
37594
37595        """
37596        return _libsbml.SpeciesReference_unsetStoichiometryMath(self)
37597
37598    def unsetStoichiometry(self):
37599        r"""
37600        unsetStoichiometry(SpeciesReference self) -> int
37601
37602        Unsets the 'stoichiometry' attribute of this SpeciesReference.
37603
37604        @return integer value indicating success/failure of the
37605        function.  @if clike The value is drawn from the
37606        enumeration #OperationReturnValues_t. @endif@~ The possible values
37607        returned by this function are:
37608        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37609        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
37610
37611        @note In SBML Level&nbsp;1, the 'stoichiometry' attribute of this
37612        SpeciesReference object will be just reset to a default value (@c 1.0)
37613        and isSetStoichiometry() will still return @c True.  In SBML
37614        Level&nbsp;2, the 'stoichiometry' attribute of this object will be
37615        unset (which will result in isSetStoichiometry() returning @c False,
37616        although getStoichiometry() will return @c 1.0) if the
37617        'stoichiometryMath' subelement is set, otherwise the attribute
37618        will be just reset to the default value (@c 1.0) (and
37619        isSetStoichiometry() will still return @c True).  In SBML
37620        Level&nbsp;3, the 'stoichiometry' attribute of this object will be set
37621        to @c NaN and isSetStoichiometry() will return @c False.
37622
37623        """
37624        return _libsbml.SpeciesReference_unsetStoichiometry(self)
37625
37626    def unsetConstant(self):
37627        r"""
37628        unsetConstant(SpeciesReference self) -> int
37629
37630        Unsets the 'constant' attribute of this SpeciesReference.
37631
37632        @return integer value indicating success/failure of the
37633        function.  @if clike The value is drawn from the
37634        enumeration #OperationReturnValues_t. @endif@~ The possible values
37635        returned by this function are:
37636        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37637        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
37638
37639        """
37640        return _libsbml.SpeciesReference_unsetConstant(self)
37641
37642    def createStoichiometryMath(self):
37643        r"""
37644        createStoichiometryMath(SpeciesReference self) -> StoichiometryMath
37645
37646        Creates a new, empty StoichiometryMath object, adds it to this
37647        SpeciesReference, and returns it.
37648
37649        @return the newly created StoichiometryMath object instance.
37650
37651        @note This function has no effect on SBML Level 1 or Level 3
37652        SpeciesReference objects, neither of which have
37653        StoichiometryMath children.
37654
37655        @see Reaction.addReactant()
37656        @see Reaction.addProduct()
37657
37658        """
37659        return _libsbml.SpeciesReference_createStoichiometryMath(self)
37660
37661    def setAnnotation(self, *args):
37662        r"""
37663        setAnnotation(SpeciesReference self, XMLNode annotation) -> int
37664        setAnnotation(SpeciesReference self, string annotation) -> int
37665
37666        This method has multiple variants; they differ in the arguments
37667         they accept.  Each variant is described separately below.
37668
37669        @par
37670        <hr>
37671        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37672         <pre class='signature'>setAnnotation(XMLNode annotation)</pre>
37673
37674        Sets the value of the 'annotation' subelement of this SBML object to a
37675        copy of @p annotation.
37676
37677        Any existing content of the 'annotation' subelement is discarded.
37678        Unless you have taken steps to first copy and reconstitute any
37679        existing annotations into the @p annotation that is about to be
37680        assigned, it is likely that performing such wholesale replacement is
37681        unfriendly towards other software applications whose annotations are
37682        discarded.  An alternative may be to use appendAnnotation().
37683
37684        @param annotation an XML structure that is to be used as the content
37685        of the 'annotation' subelement of this object.
37686
37687        @return integer value indicating success/failure of the
37688        function.  @if clike The value is drawn from the
37689        enumeration #OperationReturnValues_t. @endif@~ This particular
37690        function only does one thing irrespective of user input or
37691        object state, and thus will only return a single value:
37692        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37693
37694        @see appendAnnotation()
37695        @see appendAnnotation()
37696
37697
37698        @par
37699        <hr>
37700        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37701         <pre class='signature'>setAnnotation(string annotation)</pre>
37702
37703        Sets the value of the 'annotation' subelement of this SBML object to a
37704        copy of @p annotation.
37705
37706        Any existing content of the 'annotation' subelement is discarded.
37707        Unless you have taken steps to first copy and reconstitute any
37708        existing annotations into the @p annotation that is about to be
37709        assigned, it is likely that performing such wholesale replacement is
37710        unfriendly towards other software applications whose annotations are
37711        discarded.  An alternative may be to use appendAnnotation().
37712
37713        @param annotation an XML string that is to be used as the content
37714        of the 'annotation' subelement of this object.
37715
37716        @return integer value indicating success/failure of the
37717        function.  @if clike The value is drawn from the
37718        enumeration #OperationReturnValues_t. @endif@~ The possible values
37719        returned by this function are:
37720        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37721        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
37722
37723        @see appendAnnotation()
37724        @see appendAnnotation()
37725
37726        """
37727        return _libsbml.SpeciesReference_setAnnotation(self, *args)
37728
37729    def appendAnnotation(self, *args):
37730        r"""
37731        appendAnnotation(SpeciesReference self, XMLNode annotation) -> int
37732        appendAnnotation(SpeciesReference self, string annotation) -> int
37733
37734        This method has multiple variants; they differ in the arguments
37735         they accept.  Each variant is described separately below.
37736
37737        @par
37738        <hr>
37739        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37740         <pre class='signature'>appendAnnotation(XMLNode annotation)</pre>
37741
37742        Appends annotation content to any existing content in the 'annotation'
37743        subelement of this object.
37744
37745        The content in @p annotation is copied.  Unlike
37746        SpeciesReference.setAnnotation(),
37747        this method allows other annotations to be preserved when an application
37748        adds its own data.
37749
37750        @param annotation an XML structure that is to be copied and appended
37751        to the content of the 'annotation' subelement of this object.
37752
37753        @return integer value indicating success/failure of the
37754        function.  @if clike The value is drawn from the
37755        enumeration #OperationReturnValues_t. @endif@~ The possible values
37756        returned by this function are:
37757        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37758        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
37759
37760        @see setAnnotation()
37761        @see setAnnotation()
37762
37763
37764        @par
37765        <hr>
37766        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37767         <pre class='signature'>appendAnnotation(string annotation)</pre>
37768
37769        Appends annotation content to any existing content in the 'annotation'
37770        subelement of this object.
37771
37772        The content in @p annotation is copied.  Unlike
37773        SpeciesReference.setAnnotation(), this
37774        method allows other annotations to be preserved when an application
37775        adds its own data.
37776
37777        @param annotation an XML string that is to be copied and appended
37778        to the content of the 'annotation' subelement of this object.
37779
37780        @return integer value indicating success/failure of the
37781        function.  @if clike The value is drawn from the
37782        enumeration #OperationReturnValues_t. @endif@~ The possible values
37783        returned by this function are:
37784        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
37785        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
37786
37787        @see setAnnotation()
37788        @see setAnnotation()
37789
37790        """
37791        return _libsbml.SpeciesReference_appendAnnotation(self, *args)
37792
37793    def getTypeCode(self):
37794        r"""
37795        getTypeCode(SpeciesReference self) -> int
37796
37797        Returns the libSBML type code for this %SBML object.
37798
37799        @par
37800        LibSBML attaches an identifying code to every kind of SBML object.  These
37801        are integer constants known as <em>SBML type codes</em>.  The names of all
37802        the codes begin with the characters <code>SBML_</code>.
37803        @if clike The set of possible type codes for core elements is defined in
37804        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
37805        SBML Level&nbsp;3 packages define their own extra enumerations of type
37806        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
37807        package).@endif@if java In the Java language interface for libSBML, the
37808        type codes are defined as static integer constants in the interface class
37809        {@link libsbmlConstants}.  @endif@if python In the Python language
37810        interface for libSBML, the type codes are defined as static integer
37811        constants in the interface class @link libsbml@endlink.@endif@if csharp In
37812        the C# language interface for libSBML, the type codes are defined as
37813        static integer constants in the interface class
37814        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
37815        package plug-ins may use overlapping type codes; to identify the package
37816        to which a given object belongs, call the
37817        <code>@if conly SBase_getPackageName()
37818        @else SBase.getPackageName()
37819        @endif</code>
37820        method on the object.
37821
37822        The exception to this is lists:  all SBML-style list elements have the type
37823        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
37824        are from.
37825
37826        @return the SBML type code for this object:
37827        @link libsbml#SBML_SPECIES_REFERENCE SBML_SPECIES_REFERENCE@endlink (default).
37828
37829        @see getElementName()
37830        @see getPackageName()
37831
37832        """
37833        return _libsbml.SpeciesReference_getTypeCode(self)
37834
37835    def getElementName(self):
37836        r"""
37837        getElementName(SpeciesReference self) -> string
37838
37839        Returns the XML element name of this object, which for
37840        SpeciesReference, is always @c 'speciesReference'.
37841
37842        @return the name of this element, i.e., @c 'speciesReference'.
37843
37844        """
37845        return _libsbml.SpeciesReference_getElementName(self)
37846
37847    def hasRequiredAttributes(self):
37848        r"""
37849        hasRequiredAttributes(SpeciesReference self) -> bool
37850
37851        Predicate returning @c True if
37852        all the required attributes for this SpeciesReference object
37853        have been set.
37854
37855        The required attributes for a SpeciesReference object are:
37856        @li 'species'
37857        @li 'constant' (only available SBML Level&nbsp;3)
37858
37859        @return @c True if the required attributes have been set, @c False
37860        otherwise.
37861
37862        """
37863        return _libsbml.SpeciesReference_hasRequiredAttributes(self)
37864
37865# Register SpeciesReference in _libsbml:
37866_libsbml.SpeciesReference_swigregister(SpeciesReference)
37867
37868class ListOfSpeciesReferences(ListOf):
37869    r"""
37870
37871    @sbmlpackage{core}
37872
37873    @htmlinclude pkg-marker-core.html A list of SpeciesReference objects.
37874
37875    @par
37876    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
37877    are merely containers used for organizing the main components of an SBML
37878    model.  In libSBML's implementation, ListOf___
37879    @if conly data structures @else classes@endif@~ are derived from the
37880    intermediate utility @if conly structure @else class@endif@~ ListOf, which
37881    is not defined by the SBML specifications but serves as a useful
37882    programmatic construct.  ListOf is itself is in turn derived from SBase,
37883    which provides all of the various ListOf___
37884    @if conly data structures @else classes@endif@~ with common features
37885    defined by the SBML specification, such as 'metaid' attributes and
37886    annotations.
37887
37888    The relationship between the lists and the rest of an SBML model is
37889    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
37890
37891    @htmlinclude listof-illustration.html
37892
37893    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
37894    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
37895    Version&nbsp;2 allows
37896    containers to contain zero or more of the relevant object, instead of
37897    requiring at least one.  As such, libsbml will write out an
37898    otherwise-empty ListOf___ element that has any optional attribute set
37899    (such as 'id' or 'metaid'), that has an optional child (such
37900    as a 'notes' or 'annotation'), or that has attributes or children set
37901    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
37902    any other children.
37903
37904    Readers may wonder about the motivations for using the ListOf___
37905    containers in SBML.  A simpler approach in XML might be to place the
37906    components all directly at the top level of the model definition.  The
37907    choice made in SBML is to group them within XML elements named after
37908    %ListOf<em>Classname</em>, in part because it helps organize the
37909    components.  More importantly, the fact that the container classes are
37910    derived from SBase means that software tools can add information @em about
37911    the lists themselves into each list container's 'annotation'.
37912
37913    @see ListOfFunctionDefinitions
37914    @see ListOfUnitDefinitions
37915    @see ListOfCompartmentTypes
37916    @see ListOfSpeciesTypes
37917    @see ListOfCompartments
37918    @see ListOfSpecies
37919    @see ListOfParameters
37920    @see ListOfInitialAssignments
37921    @see ListOfRules
37922    @see ListOfConstraints
37923    @see ListOfReactions
37924    @see ListOfEvents
37925
37926    @if conly
37927    @note In the C API for libSBML, functions that in other language APIs
37928    would be inherited by the various ListOf___ structures not shown in the
37929    pages for the individual ListOf___'s.  Instead, the functions are defined
37930    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
37931    the many common functions available for manipulating ListOf___
37932    structures</strong>.  The documentation for the individual ListOf___
37933    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
37934    all of the functionality available. @endif@~
37935
37936    """
37937
37938    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
37939    __repr__ = _swig_repr
37940
37941    def __init__(self, *args):
37942        r"""
37943        __init__(ListOfSpeciesReferences self, unsigned int level, unsigned int version) -> ListOfSpeciesReferences
37944        __init__(ListOfSpeciesReferences self, SBMLNamespaces sbmlns) -> ListOfSpeciesReferences
37945
37946        This method has multiple variants; they differ in the arguments
37947         they accept.  Each variant is described separately below.
37948
37949        @par
37950        <hr>
37951        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37952         <pre class='signature'>ListOfSpeciesReferences(SBMLNamespaces sbmlns)</pre>
37953
37954        Creates a new ListOfSpeciesReferences object.
37955
37956        The object is constructed such that it is valid for the SBML Level and
37957        Version combination determined by the SBMLNamespaces object in @p
37958        sbmlns.
37959
37960        @param sbmlns an SBMLNamespaces object that is used to determine the
37961        characteristics of the ListOfSpeciesReferences object to be created.
37962
37963        @throws SBMLConstructorException
37964        Thrown if the given @p sbmlns is inconsistent or incompatible
37965        with this object.
37966
37967        @note Attempting to add an object to an SBMLDocument having a different
37968        combination of SBML Level, Version and XML namespaces than the object
37969        itself will result in an error at the time a caller attempts to make the
37970        addition.  A parent object must have compatible Level, Version and XML
37971        namespaces.  (Strictly speaking, a parent may also have more XML
37972        namespaces than a child, but the reverse is not permitted.)  The
37973        restriction is necessary to ensure that an SBML model has a consistent
37974        overall structure.  This requires callers to manage their objects
37975        carefully, but the benefit is increased flexibility in how models can be
37976        created by permitting callers to create objects bottom-up if desired.  In
37977        situations where objects are not yet attached to parents (e.g.,
37978        SBMLDocument), knowledge of the intented SBML Level and Version help
37979        libSBML determine such things as whether it is valid to assign a
37980        particular value to an attribute.
37981
37982
37983        @par
37984        <hr>
37985        <span class='variant-sig-heading'>Method variant with the following signature</span>:
37986         <pre class='signature'>ListOfSpeciesReferences(long level, long version)</pre>
37987
37988        Creates a new, empty ListOfSpeciesReferences object.
37989
37990        The object is constructed such that it is valid for the given SBML
37991        Level and Version combination.
37992
37993        @param level the SBML Level.
37994
37995        @param version the Version within the SBML Level.
37996
37997        @throws SBMLConstructorException
37998        Thrown if the given @p level and @p version combination are invalid
37999        or if this object is incompatible with the given level and version.
38000
38001        @note Attempting to add an object to an SBMLDocument having a different
38002        combination of SBML Level, Version and XML namespaces than the object
38003        itself will result in an error at the time a caller attempts to make the
38004        addition.  A parent object must have compatible Level, Version and XML
38005        namespaces.  (Strictly speaking, a parent may also have more XML
38006        namespaces than a child, but the reverse is not permitted.)  The
38007        restriction is necessary to ensure that an SBML model has a consistent
38008        overall structure.  This requires callers to manage their objects
38009        carefully, but the benefit is increased flexibility in how models can be
38010        created by permitting callers to create objects bottom-up if desired.  In
38011        situations where objects are not yet attached to parents (e.g.,
38012        SBMLDocument), knowledge of the intented SBML Level and Version help
38013        libSBML determine such things as whether it is valid to assign a
38014        particular value to an attribute.
38015
38016        """
38017        _libsbml.ListOfSpeciesReferences_swiginit(self, _libsbml.new_ListOfSpeciesReferences(*args))
38018
38019    def clone(self):
38020        r"""
38021        clone(ListOfSpeciesReferences self) -> ListOfSpeciesReferences
38022
38023        Creates and returns a deep copy of this ListOfSpeciesReferences object.
38024
38025        @return the (deep) copy of this ListOfSpeciesReferences object.
38026
38027        """
38028        return _libsbml.ListOfSpeciesReferences_clone(self)
38029
38030    def getItemTypeCode(self):
38031        r"""
38032        getItemTypeCode(ListOfSpeciesReferences self) -> int
38033
38034        Returns the libSBML type code for the objects contained in this ListOf
38035        (i.e., SpeciesReference objects, if the list is non-empty).
38036
38037        @par
38038        LibSBML attaches an identifying code to every kind of SBML object.  These
38039        are integer constants known as <em>SBML type codes</em>.  The names of all
38040        the codes begin with the characters <code>SBML_</code>.
38041        @if clike The set of possible type codes for core elements is defined in
38042        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
38043        SBML Level&nbsp;3 packages define their own extra enumerations of type
38044        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
38045        package).@endif@if java In the Java language interface for libSBML, the
38046        type codes are defined as static integer constants in the interface class
38047        {@link libsbmlConstants}.  @endif@if python In the Python language
38048        interface for libSBML, the type codes are defined as static integer
38049        constants in the interface class @link libsbml@endlink.@endif@if csharp In
38050        the C# language interface for libSBML, the type codes are defined as
38051        static integer constants in the interface class
38052        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
38053        package plug-ins may use overlapping type codes; to identify the package
38054        to which a given object belongs, call the
38055        <code>@if conly SBase_getPackageName()
38056        @else SBase.getPackageName()
38057        @endif</code>
38058        method on the object.
38059
38060        The exception to this is lists:  all SBML-style list elements have the type
38061        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
38062        are from.
38063
38064        @return the SBML type code for objects contained in this list:
38065        @link libsbml#SBML_SPECIES_REFERENCE SBML_SPECIES_REFERENCE@endlink (default).
38066
38067        @see getElementName()
38068        @see getPackageName()
38069
38070        """
38071        return _libsbml.ListOfSpeciesReferences_getItemTypeCode(self)
38072
38073    def getElementName(self):
38074        r"""
38075        getElementName(ListOfSpeciesReferences self) -> string
38076
38077        Returns the XML element name of this object.
38078
38079        For ListOfSpeciesReferences, the XML element name is
38080        @c 'listOfSpeciesReferences'.
38081
38082        @return the name of this element, i.e., @c 'listOfSpeciesReferences'.
38083
38084        """
38085        return _libsbml.ListOfSpeciesReferences_getElementName(self)
38086
38087    def get(self, *args):
38088        r"""
38089        get(ListOfSpeciesReferences self, unsigned int n) -> SimpleSpeciesReference
38090        get(ListOfSpeciesReferences self, unsigned int n) -> SimpleSpeciesReference
38091        get(ListOfSpeciesReferences self, string sid) -> SimpleSpeciesReference
38092        get(ListOfSpeciesReferences self, string sid) -> SimpleSpeciesReference
38093
38094        This method has multiple variants; they differ in the arguments
38095         they accept.  Each variant is described separately below.
38096
38097        @par
38098        <hr>
38099        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38100         <pre class='signature'>get(long n)</pre>
38101
38102        Get a SpeciesReference from the ListOfSpeciesReferences.
38103
38104        @param n the index number of the SpeciesReference to get.
38105
38106        @return the nth SpeciesReference in this ListOfSpeciesReferences.
38107        If the index @p n is invalid, @c None is returned.
38108
38109        @see size()
38110
38111
38112        @par
38113        <hr>
38114        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38115         <pre class='signature'>get(string sid)</pre>
38116
38117        Get a SpeciesReference from the ListOfSpeciesReferences
38118        based on its identifier.
38119
38120        @param sid a string representing the identifier
38121        of the SpeciesReference to get.
38122
38123        @return SpeciesReference in this ListOfSpeciesReferences
38124        with the given @p sid or @c None if no such
38125        SpeciesReference exists.
38126
38127        @see get()
38128        @see size()
38129
38130        """
38131        return _libsbml.ListOfSpeciesReferences_get(self, *args)
38132
38133    def remove(self, *args):
38134        r"""
38135        remove(ListOfSpeciesReferences self, unsigned int n) -> SimpleSpeciesReference
38136        remove(ListOfSpeciesReferences self, string sid) -> SimpleSpeciesReference
38137
38138        This method has multiple variants; they differ in the arguments
38139         they accept.  Each variant is described separately below.
38140
38141        @par
38142        <hr>
38143        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38144         <pre class='signature'>remove(long n)</pre>
38145
38146        Removes the nth item from this ListOfSpeciesReferences items and returns a pointer to
38147        it.
38148
38149        The caller owns the returned item and is responsible for deleting it.
38150
38151        @param n the index of the item to remove.
38152
38153        @see size()
38154
38155
38156        @par
38157        <hr>
38158        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38159         <pre class='signature'>remove(string sid)</pre>
38160
38161        Removes item in this ListOfSpeciesReferences items with the given identifier.
38162
38163        The caller owns the returned item and is responsible for deleting it.
38164        If none of the items in this list have the identifier @p sid, then
38165        @c None is returned.
38166
38167        @param sid the identifier of the item to remove.
38168
38169        @return the item removed.  As mentioned above, the caller owns the
38170        returned item.
38171
38172        """
38173        return _libsbml.ListOfSpeciesReferences_remove(self, *args)
38174
38175    def getType(self):
38176        r"""
38177        getType(ListOfSpeciesReferences self) -> unsigned int
38178
38179        @internal
38180
38181        @internal
38182
38183        """
38184        return _libsbml.ListOfSpeciesReferences_getType(self)
38185    __swig_destroy__ = _libsbml.delete_ListOfSpeciesReferences
38186
38187# Register ListOfSpeciesReferences in _libsbml:
38188_libsbml.ListOfSpeciesReferences_swigregister(ListOfSpeciesReferences)
38189
38190class ModifierSpeciesReference(SimpleSpeciesReference):
38191    r"""
38192
38193    @sbmlpackage{core}
38194
38195    @htmlinclude pkg-marker-core.html A reference to an SBML <em>modifier species</em>.
38196
38197    Sometimes a species appears in the kinetic rate formula of a reaction
38198    but is itself neither created nor destroyed in that reaction (for
38199    example, because it acts as a catalyst or inhibitor).  In SBML, all such
38200    species are simply called @em modifiers without regard to the detailed
38201    role of those species in the model.  The Reaction structure provides a
38202    way to express which species act as modifiers in a given reaction.  This
38203    is the purpose of the list of modifiers available in Reaction.  The list
38204    contains instances of ModifierSpeciesReference structures.
38205
38206    The ModifierSpeciesReference structure inherits the mandatory attribute
38207    'species' and optional attributes 'id' and 'name' from the parent class
38208    SimpleSpeciesReference.  See the description of SimpleSpeciesReference
38209    for more information about these.
38210
38211    The value of the 'species' attribute must be the identifier of a species
38212    defined in the enclosing Model; this species is designated as a modifier
38213    for the current reaction.  A reaction may have any number of modifiers.
38214    It is permissible for a modifier species to appear simultaneously in the
38215    list of reactants and products of the same reaction where it is
38216    designated as a modifier, as well as to appear in the list of reactants,
38217    products and modifiers of other reactions in the model.
38218
38219    """
38220
38221    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
38222    __repr__ = _swig_repr
38223
38224    def __init__(self, *args):
38225        r"""
38226        __init__(ModifierSpeciesReference self, unsigned int level, unsigned int version) -> ModifierSpeciesReference
38227        __init__(ModifierSpeciesReference self, SBMLNamespaces sbmlns) -> ModifierSpeciesReference
38228
38229        This method has multiple variants; they differ in the arguments
38230         they accept.  Each variant is described separately below.
38231
38232        @par
38233        <hr>
38234        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38235         <pre class='signature'>ModifierSpeciesReference(SBMLNamespaces sbmlns)</pre>
38236
38237        Creates a new ModifierSpeciesReference using the given SBMLNamespaces
38238        object @p sbmlns.
38239
38240        @param sbmlns an SBMLNamespaces object.
38241
38242        @throws SBMLConstructorException
38243        Thrown if the given @p sbmlns is inconsistent or incompatible
38244        with this object.
38245
38246        @note Attempting to add an object to an SBMLDocument having a different
38247        combination of SBML Level, Version and XML namespaces than the object
38248        itself will result in an error at the time a caller attempts to make the
38249        addition.  A parent object must have compatible Level, Version and XML
38250        namespaces.  (Strictly speaking, a parent may also have more XML
38251        namespaces than a child, but the reverse is not permitted.)  The
38252        restriction is necessary to ensure that an SBML model has a consistent
38253        overall structure.  This requires callers to manage their objects
38254        carefully, but the benefit is increased flexibility in how models can be
38255        created by permitting callers to create objects bottom-up if desired.  In
38256        situations where objects are not yet attached to parents (e.g.,
38257        SBMLDocument), knowledge of the intented SBML Level and Version help
38258        libSBML determine such things as whether it is valid to assign a
38259        particular value to an attribute.
38260
38261
38262        @par
38263        <hr>
38264        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38265         <pre class='signature'>ModifierSpeciesReference(long level, long version)</pre>
38266
38267        Creates a new ModifierSpeciesReference using the given SBML @p level and
38268        @p version values.
38269
38270        @param level a long integer, the SBML Level to assign to this
38271        ModifierSpeciesReference.
38272
38273        @param version a long integer, the SBML Version to assign to this
38274        ModifierSpeciesReference.
38275
38276        @throws SBMLConstructorException
38277        Thrown if the given @p level and @p version combination are invalid
38278        or if this object is incompatible with the given level and version.
38279
38280        @note Attempting to add an object to an SBMLDocument having a different
38281        combination of SBML Level, Version and XML namespaces than the object
38282        itself will result in an error at the time a caller attempts to make the
38283        addition.  A parent object must have compatible Level, Version and XML
38284        namespaces.  (Strictly speaking, a parent may also have more XML
38285        namespaces than a child, but the reverse is not permitted.)  The
38286        restriction is necessary to ensure that an SBML model has a consistent
38287        overall structure.  This requires callers to manage their objects
38288        carefully, but the benefit is increased flexibility in how models can be
38289        created by permitting callers to create objects bottom-up if desired.  In
38290        situations where objects are not yet attached to parents (e.g.,
38291        SBMLDocument), knowledge of the intented SBML Level and Version help
38292        libSBML determine such things as whether it is valid to assign a
38293        particular value to an attribute.
38294
38295        """
38296        _libsbml.ModifierSpeciesReference_swiginit(self, _libsbml.new_ModifierSpeciesReference(*args))
38297    __swig_destroy__ = _libsbml.delete_ModifierSpeciesReference
38298
38299    def clone(self):
38300        r"""
38301        clone(ModifierSpeciesReference self) -> ModifierSpeciesReference
38302
38303        Creates and returns a deep copy of this ModifierSpeciesReference object.
38304
38305        @return the (deep) copy of this ModifierSpeciesReference object.
38306
38307        """
38308        return _libsbml.ModifierSpeciesReference_clone(self)
38309
38310    def getTypeCode(self):
38311        r"""
38312        getTypeCode(ModifierSpeciesReference self) -> int
38313
38314        Returns the libSBML type code for this %SBML object.
38315
38316        @par
38317        LibSBML attaches an identifying code to every kind of SBML object.  These
38318        are integer constants known as <em>SBML type codes</em>.  The names of all
38319        the codes begin with the characters <code>SBML_</code>.
38320        @if clike The set of possible type codes for core elements is defined in
38321        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
38322        SBML Level&nbsp;3 packages define their own extra enumerations of type
38323        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
38324        package).@endif@if java In the Java language interface for libSBML, the
38325        type codes are defined as static integer constants in the interface class
38326        {@link libsbmlConstants}.  @endif@if python In the Python language
38327        interface for libSBML, the type codes are defined as static integer
38328        constants in the interface class @link libsbml@endlink.@endif@if csharp In
38329        the C# language interface for libSBML, the type codes are defined as
38330        static integer constants in the interface class
38331        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
38332        package plug-ins may use overlapping type codes; to identify the package
38333        to which a given object belongs, call the
38334        <code>@if conly SBase_getPackageName()
38335        @else SBase.getPackageName()
38336        @endif</code>
38337        method on the object.
38338
38339        The exception to this is lists:  all SBML-style list elements have the type
38340        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
38341        are from.
38342
38343        @return the SBML type code for this object:
38344        @link libsbml#SBML_MODIFIER_SPECIES_REFERENCE SBML_MODIFIER_SPECIES_REFERENCE@endlink (default).
38345
38346        @warning <span class='warning'>The specific integer values of the possible
38347        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
38348        packages,  To fully identify the correct code, <strong>it is necessary to
38349        invoke both getPackageName() and getTypeCode()</strong> (or
38350        ListOf.getItemTypeCode()).</span>
38351
38352        @see getElementName()
38353        @see getPackageName()
38354
38355        """
38356        return _libsbml.ModifierSpeciesReference_getTypeCode(self)
38357
38358    def getElementName(self):
38359        r"""
38360        getElementName(ModifierSpeciesReference self) -> string
38361
38362        Returns the XML element name of this object, which for Species, is
38363        always @c 'modifierSpeciesReference'.
38364
38365        @return the name of this element, i.e., @c 'modifierSpeciesReference'.
38366
38367        """
38368        return _libsbml.ModifierSpeciesReference_getElementName(self)
38369
38370    def hasRequiredAttributes(self):
38371        r"""
38372        hasRequiredAttributes(ModifierSpeciesReference self) -> bool
38373
38374        Predicate returning @c True if
38375        all the required attributes for this ModifierSpeciesReference object
38376        have been set.
38377
38378        The required attributes for a ModifierSpeciesReference object are:
38379        species
38380
38381        @return @c True if the required attributes have been set, @c False
38382        otherwise.
38383
38384        """
38385        return _libsbml.ModifierSpeciesReference_hasRequiredAttributes(self)
38386
38387# Register ModifierSpeciesReference in _libsbml:
38388_libsbml.ModifierSpeciesReference_swigregister(ModifierSpeciesReference)
38389
38390class Event(SBase):
38391    r"""
38392
38393    @sbmlpackage{core}
38394
38395    @htmlinclude pkg-marker-core.html A discontinuous SBML <em>event</em>.
38396
38397    An SBML Event object defines when the event can occur, the variables
38398    that are affected by it, how the variables are affected, and the event's
38399    relationship to other events.  The effect of the event can optionally be
38400    delayed after the occurrence of the condition which invokes it.
38401
38402    The operation of Event is divided into two phases (even when the event
38403    is not delayed): one when the event is @em triggered, and the other when
38404    the event is @em executed.  Trigger objects define the conditions for
38405    triggering an event, Delay objects define when the event is actually
38406    executed, EventAssignment objects define the effects of executing the
38407    event, and (in SBML Level&nbsp;3) Priority objects influence the order
38408    of EventAssignment performance in cases of simultaneous events.  Please
38409    consult the descriptions of Trigger, Delay, EventAssignment and Priority
38410    for more information.
38411
38412    @section event-version-diffs SBML Level/Version differences
38413
38414    @subsection sbml-l2 SBML Level 2
38415
38416    In SBML Level&nbsp;2 versions before Version&nbsp;4, the semantics of
38417    Event time delays were defined such that the expressions in the event's
38418    assignments were always evaluated at the time the event was
38419    <em>triggered</em>.  This definition made it difficult to define an event
38420    whose assignment formulas were meant to be evaluated at the time the
38421    event was <em>executed</em> (i.e., after the time period defined
38422    by the value of the Delay element, or after any other simultaneous
38423    event may have been <em>executed</em> and changed the model state).
38424    In SBML Level&nbsp;2 Version&nbsp;4 and in
38425    Level&nbsp;3, the attribute 'useValuesFromTriggerTime' on Event was added
38426    to allow a model to indicate the time at which the event's assignments
38427    are to be calculated, whether at the moment the event is triggered (if
38428    the value of the attribute is @c True), or at the moment of execution
38429    (if 'useValuesFromTriggerTime'=@c False).  If the event has a delay,
38430    the 'useValuesFromTriggerTime' is likely to make a significant difference
38431    in the values used in the assignment, but the possibility of simultaneous
38432    events mean that even zero-delay events can have different results
38433    depending on the value of this attribute.
38434
38435    The definition of Event in SBML Level&nbsp;2 Versions 1 and 2 includes
38436    an additional attribute called 'timeUnits', which allowed the time units
38437    of the Delay to be set explicitly.  Later Versions of SBML Level&nbsp;2
38438    as well as SBML Level&nbsp;3 do not define this attribute.  LibSBML
38439    supports this attribute for compatibility with previous versions of SBML
38440    Level&nbsp;2; however, if a model in SBML Level&nbsp;3 or Level&nbsp;2
38441    Versions&nbsp;3&ndash;4 format sets the attribute, the
38442    consistency-checking method SBMLDocument.checkConsistency() will report
38443    an error.
38444
38445    The attribute 'useValuesFromTriggerTime' was introduced in SBML
38446    Level&nbsp;2 Version&nbsp;4.  Models defined in prior Versions of SBML
38447    Level&nbsp;2 cannot use this attribute, and
38448    SBMLDocument.checkConsistency() will report an error if they do.
38449
38450    @subsection sbml-l3 SBML Level 3
38451
38452    SBML Level 3 introduces several changes to the structure and components
38453    of Events compared to SBML Level&nbsp;2.  These changes fall into two
38454    main categories: changes to what is optional or required, and additions
38455    of new attributes and elements.
38456    <ul>
38457    <li> The attribute 'useValuesFromTriggerTime' on Event is mandatory (it
38458    was optional in Level&nbsp;2 and had a default value of @c True);
38459    <li> Event's 'listOfEventAssignments' element (of class
38460    ListOfEventAssignments) is optional (it was mandatory in Level&nbsp;2);
38461    <li> Event's 'priority' element (of class Priority) is new in
38462    Level&nbsp;3; and
38463    <li> The Trigger object gains new mandatory attributes (described as part
38464    of the definition of Trigger).
38465    <li> In SBML Level&nbsp;3 Version&nbsp;2, the Trigger object became
38466    optional.  An Event with no Trigger will simply not fire.
38467    </ul>
38468
38469    The changes to the attributes of Event are described below; the changes
38470    to Trigger and Priority are described in their respective sections.
38471
38472    @section semantics Semantics of events in SBML Level&nbsp;3 Version&nbsp;1
38473
38474    The detailed semantics of events are described in the specification
38475    documents for each SBML Level/Version.  Here we include the description
38476    from the SBML Level&nbsp;1 Version&nbsp;1.
38477    Any transition of a Trigger object's 'math' formula from the value
38478    @c False to @c True will cause the enclosing Event object to
38479    <em>trigger</em>.  Such a transition is not possible at the very start
38480    of a simulation (i.e., at time <em>t = 0</em>) unless the Trigger
38481    object's 'initialValue' attribute has a value of @c False; this defines
38482    the value of the trigger formula to be @c False immediately prior to the
38483    start of simulation, thereby giving it the potential to change in value
38484    from @c False to @c True when the formula is evaluated at <em>t =
38485    0</em>.  If 'initialValue'=@c True, then the trigger expression cannot
38486    transition from @c False to @c True at <em>t = 0</em> but may do so at
38487    some time <em>t > 0</em>.
38488
38489    Consider an Event object definition <EM>E</EM> with delay <em>d</em> in
38490    which the Trigger object's 'math' formula makes a transition in value
38491    from @c False to @c True at times <em>t<sub>1</sub></em> and
38492    <em>t<sub>2</sub></em>.  The EventAssignment within the Event object
38493    will have effect at <em>t<sub>1</sub> + d</em> and
38494    <em>t<sub>2</sub> + d</em> irrespective of the relative times of
38495    <em>t<sub>1</sub></em> and <em>t<sub>2</sub></em>.  For example, events
38496    can 'overlap' so that <em>t<sub>1</sub> < t<sub>2</sub> <
38497    t<sub>1</sub> + d</em> still causes an event assignments to occur at
38498    <em>t<sub>1</sub> + d</em> and <em>t<sub>2</sub> + d</em>.
38499
38500    It is entirely possible for two events to be executed simultaneously,
38501    and it is possible for events to trigger other events (i.e., an event
38502    assignment can cause an event to trigger).  This leads to several
38503    points:
38504    <ul>
38505
38506    <li> A software package should retest all event triggers after executing
38507    an event assignment in order to account for the possibility that the
38508    assignment causes another event trigger to transition from @c False to
38509    @c True.  This check should be made after each individual Event object's
38510    execution, even when several events are to be executed simultaneously.
38511
38512    <li> Any Event object whose Trigger 'persistent' attribute has the value
38513    @c False must have its trigger expression reevaluated continuously
38514    between when the event is triggered and when it is executed.  If
38515    its trigger expression ever evaluates to @c False, it must be removed
38516    from the queue of events pending execution and treated as any other
38517    event whose trigger expression evaluates to @c False.
38518
38519    <li> Although the precise time at which events are executed is not
38520    resolved beyond the given execution point in simulated time, it is
38521    assumed that the order in which the events occur <em>is</em> resolved.
38522    This order can be significant in determining the overall outcome of a
38523    given simulation.  When an event <EM>X</EM> <em>triggers</em> another
38524    event <EM>Y</EM> and event <EM>Y</EM> has zero delay, then event
38525    <EM>Y</EM> is added to the existing set of simultaneous events that are
38526    pending <em>execution</em>.  Events <EM>X</EM> and <EM>Y</EM> form a
38527    cascade of events at the same point in simulation time.  An event such
38528    as <EM>Y</EM> may have a special priority if it contains a Priority
38529    subobject.
38530
38531    <li> All events in a model are open to being in a cascade.  The position
38532    of an event in the event queue does not affect whether it can be in the
38533    cascade: event <EM>Y</EM> can be triggered whether it is before or after
38534    <EM>X</EM> in the queue of events pending execution.  A cascade of
38535    events can be potentially infinite (never terminate); when this occurs a
38536    simulator should indicate this has occurred---it is incorrect for a
38537    simulator to break a cascade arbitrarily and continue the simulation
38538    without at least indicating that the infinite cascade occurred.
38539
38540    <li> Simultaneous events having no defined priorities are executed in an
38541    undefined order.  This does not mean that the behavior of the simulation
38542    is completely undefined; merely that the <em>order</em> of execution of
38543    these particular events is undefined.  A given simulator may use any
38544    algorithm to choose an order as long as every event is executed exactly
38545    once.
38546
38547    <li> Events with defined priorities are executed in the order implied by
38548    their Priority 'math' formula values, with events having higher
38549    priorities being executed ahead of events with lower priorities, and
38550    events with identical priorities being executed in a random order with
38551    respect to one another (as determined at run-time by some random
38552    algorithm equivalent to coin-flipping).  Newly-triggered events that are
38553    to be executed immediately (i.e., if they define no delays) should be
38554    inserted into the queue of events pending execution according to their
38555    priorities: events with higher priority values value must be inserted
38556    ahead of events with lower priority values and after any pending events
38557    with even higher priorities, and inserted randomly among pending events
38558    with the same priority values.  Events without Priority objects must be
38559    inserted into the queue in some fashion, but the algorithm used to place
38560    it in the queue is undefined.  Similarly, there is no restriction on the
38561    order of a newly-inserted event with a defined Priority with respect to
38562    any other pending Event without a defined Priority.
38563
38564    <li> A model variable that is the target of one or more event
38565    assignments can change more than once when simultaneous events are
38566    processed at some time point <em>t</em>.  The model's behavior (output)
38567    for such a variable is the value of the variable at the end of
38568    processing all the simultaneous events at time <em>t</em>.
38569
38570    </ul>
38571
38572    @section l3v2_restrictions Restrictions relaxed in SBML Level&nbsp;3 Version&nbsp;2
38573
38574    In SBML Level&nbsp;3 Version&nbsp;2, several restrictions were lifted
38575    that have the potential to affect the semantics of an Event:
38576
38577    <ul>
38578    <li> The Trigger subobject of an Event is optional.  If missing,
38579    an Event is never @em triggered, unless an alternate triggering
38580    scheme is introduced by an SBML Level&nbsp;3 package.
38581
38582    <li> The 'math' subelements of an Event Trigger, Delay, Priority,
38583    and EventAssignment are all optional.  If any of these elements lack
38584    a 'math' subelement, and that information is not supplied in an SBML
38585    Level&nbsp;3 package, it is mathematically equivalent to the Trigger,
38586    Delay, Priority, or EventAssignment not being present at all.
38587
38588    <li> The ListOfEventAssignments may be empty, which is mathematically
38589    equivalent to the Event not having a ListOfEventAssignments at all.
38590
38591    <li> Any 'math' subelement may return a Boolean or a numeric value
38592    in any context.  If a numeric value is used in a Boolean context,
38593    a '0' is interpreted as @c False, and all other values are
38594    interpreted as @c True.  If a Boolean value is used in a numeric
38595    context, a @c True is interpreted as a 1, and a @c False is
38596    interpreted as a 0.  This means (for example) that a Trigger value
38597    that changes from 0.0 to anything else is equivalent to changing
38598    from @c False to @c True.
38599    </ul>
38600
38601    @see Trigger
38602    @see Priority
38603    @see Delay
38604    @see EventAssignment
38605
38606    """
38607
38608    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
38609    __repr__ = _swig_repr
38610    __swig_destroy__ = _libsbml.delete_Event
38611
38612    def __init__(self, *args):
38613        r"""
38614        __init__(Event self, unsigned int level, unsigned int version) -> Event
38615        __init__(Event self, SBMLNamespaces sbmlns) -> Event
38616        __init__(Event self, Event orig) -> Event
38617
38618        This method has multiple variants; they differ in the arguments
38619         they accept.  Each variant is described separately below.
38620
38621        @par
38622        <hr>
38623        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38624         <pre class='signature'>Event(SBMLNamespaces sbmlns)</pre>
38625
38626        Creates a new Event using the given SBMLNamespaces object
38627        @p sbmlns.
38628
38629        @par
38630        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
38631        information.  It is used to communicate the SBML Level, Version, and (in
38632        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
38633        common approach to using libSBML's SBMLNamespaces facilities is to create an
38634        SBMLNamespaces object somewhere in a program once, then hand that object
38635        as needed to object constructors that accept SBMLNamespaces as arguments.
38636
38637        @param sbmlns an SBMLNamespaces object.
38638
38639        @throws SBMLConstructorException
38640        Thrown if the given @p sbmlns is inconsistent or incompatible
38641        with this object.
38642
38643        @note Attempting to add an object to an SBMLDocument having a different
38644        combination of SBML Level, Version and XML namespaces than the object
38645        itself will result in an error at the time a caller attempts to make the
38646        addition.  A parent object must have compatible Level, Version and XML
38647        namespaces.  (Strictly speaking, a parent may also have more XML
38648        namespaces than a child, but the reverse is not permitted.)  The
38649        restriction is necessary to ensure that an SBML model has a consistent
38650        overall structure.  This requires callers to manage their objects
38651        carefully, but the benefit is increased flexibility in how models can be
38652        created by permitting callers to create objects bottom-up if desired.  In
38653        situations where objects are not yet attached to parents (e.g.,
38654        SBMLDocument), knowledge of the intented SBML Level and Version help
38655        libSBML determine such things as whether it is valid to assign a
38656        particular value to an attribute.
38657
38658
38659        @par
38660        <hr>
38661        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38662         <pre class='signature'>Event(long level, long version)</pre>
38663
38664        Creates a new Event using the given SBML @p level and @p version
38665        values.
38666
38667        @param level a long integer, the SBML Level to assign to this Event.
38668
38669        @param version a long integer, the SBML Version to assign to this
38670        Event.
38671
38672        @throws SBMLConstructorException
38673        Thrown if the given @p level and @p version combination are invalid
38674        or if this object is incompatible with the given level and version.
38675
38676        @note Attempting to add an object to an SBMLDocument having a different
38677        combination of SBML Level, Version and XML namespaces than the object
38678        itself will result in an error at the time a caller attempts to make the
38679        addition.  A parent object must have compatible Level, Version and XML
38680        namespaces.  (Strictly speaking, a parent may also have more XML
38681        namespaces than a child, but the reverse is not permitted.)  The
38682        restriction is necessary to ensure that an SBML model has a consistent
38683        overall structure.  This requires callers to manage their objects
38684        carefully, but the benefit is increased flexibility in how models can be
38685        created by permitting callers to create objects bottom-up if desired.  In
38686        situations where objects are not yet attached to parents (e.g.,
38687        SBMLDocument), knowledge of the intented SBML Level and Version help
38688        libSBML determine such things as whether it is valid to assign a
38689        particular value to an attribute.
38690
38691
38692        @par
38693        <hr>
38694        <span class='variant-sig-heading'>Method variant with the following signature</span>:
38695         <pre class='signature'>Event(Event orig)</pre>
38696
38697        Copy constructor; creates a copy of this Event.
38698
38699        @param orig the object to copy.
38700
38701        """
38702        _libsbml.Event_swiginit(self, _libsbml.new_Event(*args))
38703
38704    def clone(self):
38705        r"""
38706        clone(Event self) -> Event
38707
38708        Creates and returns a deep copy of this Event object.
38709
38710        @return the (deep) copy of this Event object.
38711
38712        """
38713        return _libsbml.Event_clone(self)
38714
38715    def initDefaults(self):
38716        r"""
38717        initDefaults(Event self)
38718
38719        Initializes the fields of this Event object to 'typical' default
38720        values.
38721
38722        The SBML Event component has slightly different aspects and
38723        default attribute values in different SBML Levels and Versions.
38724        This method sets the values to certain common defaults, based
38725        mostly on what they are in SBML Level&nbsp;2.  Specifically:
38726
38727        @li Sets attribute 'useValuesFromTriggerTime' to @c True
38728
38729        """
38730        return _libsbml.Event_initDefaults(self)
38731
38732    def getElementBySId(self, id):
38733        r"""
38734        getElementBySId(Event self, string id) -> SBase
38735
38736        Returns the first child element found that has the given @p id in the
38737        model-wide SId namespace, or @c None if no such object is found.
38738
38739        @param id string representing the id of the object to find.
38740
38741        @return pointer to the first element found with the given @p id.
38742
38743        """
38744        return _libsbml.Event_getElementBySId(self, id)
38745
38746    def getElementByMetaId(self, metaid):
38747        r"""
38748        getElementByMetaId(Event self, string metaid) -> SBase
38749
38750        Returns the first child element it can find with the given @p metaid, or
38751        @c None if no such object is found.
38752
38753        @param metaid string representing the metaid of the object to find.
38754
38755        @return pointer to the first element found with the given @p metaid.
38756
38757        """
38758        return _libsbml.Event_getElementByMetaId(self, metaid)
38759
38760    def getId(self):
38761        r"""
38762        getId(Event self) -> string
38763
38764        Returns the value of the 'id' attribute of this Event.
38765
38766        @note Because of the inconsistent behavior of this function with
38767        respect to assignments and rules, it is now recommended to
38768        use the getIdAttribute() function instead.
38769
38770        @par
38771        The identifier given by an object's 'id' attribute value
38772        is used to identify the object within the SBML model definition.
38773        Other objects can refer to the component using this identifier.  The
38774        data type of 'id' is always <code>SId</code> or a type derived
38775        from that, such as <code>UnitSId</code>, depending on the object in
38776        question.  All data types are defined as follows:
38777        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
38778        letter ::= 'a'..'z','A'..'Z'
38779        digit  ::= '0'..'9'
38780        idChar ::= letter | digit | '_'
38781        SId    ::= ( letter | '_' ) idChar*
38782        </pre>
38783        The characters <code>(</code> and <code>)</code> are used for grouping,
38784        the character <code>*</code> 'zero or more times', and the character
38785        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
38786        is determined by an exact character sequence match; i.e., comparisons must
38787        be performed in a case-sensitive manner.  This applies to all uses of
38788        <code>SId</code>, <code>SIdRef</code>, and derived types.
38789
38790        Users need to be aware of some important API issues that are the result of
38791        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
38792        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
38793        of SBML objects.  To simplify the work of programmers, libSBML's API
38794        provided get, set, check, and unset on the SBase object class itself
38795        instead of on individual subobject classes. This made the
38796        get/set/etc. methods uniformly available on all objects in the libSBML
38797        API.  LibSBML simply returned empty strings or otherwise did not act when
38798        the methods were applied to SBML objects that were not defined by the SBML
38799        specification to have 'id' or 'name' attributes.  Additional complications
38800        arose with the rule and assignment objects: InitialAssignment,
38801        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
38802        the rule object hierarchy was different, and in addition, then as now,
38803        they possess different attributes: 'variable' (for the rules and event
38804        assignments), 'symbol' (for initial assignments), or neither (for
38805        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
38806        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
38807
38808        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
38809        Version&nbsp;2, it became necessary to introduce a new way to interact
38810        with the attributes more consistently in libSBML to avoid breaking
38811        backward compatibility in the behavior of the original 'id' methods.  For
38812        this reason, libSBML provides four functions (getIdAttribute(),
38813        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
38814        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
38815        from SBase, regardless of the object's type.  <strong>These new methods
38816        should be used instead of the older getId()/setId()/etc. methods</strong>
38817        unless the old behavior is somehow necessary.  Regardless of the Level and
38818        Version of the SBML, these functions allow client applications to use more
38819        generalized code in some situations (for instance, when manipulating
38820        objects that are all known to have identifiers).  If the object in
38821        question does not posess an 'id' attribute according to the SBML
38822        specification for the Level and Version in use, libSBML will not allow the
38823        identifier to be set, nor will it read or write 'id' attributes for those
38824        objects.
38825
38826        @return the id of this Event.
38827
38828        @see getIdAttribute()
38829        @see setIdAttribute()
38830        @see isSetIdAttribute()
38831        @see unsetIdAttribute()
38832
38833        """
38834        return _libsbml.Event_getId(self)
38835
38836    def getName(self):
38837        r"""
38838        getName(Event self) -> string
38839
38840        Returns the value of the 'name' attribute of this Event.
38841
38842        @par
38843        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
38844        moved to SBase directly, instead of being defined individually for many
38845        (but not all) objects.  LibSBML has for a long time provided functions
38846        defined on SBase itself to get, set, and unset those attributes, which
38847        would fail or otherwise return empty strings if executed on any object
38848        for which those attributes were not defined.  Now that all SBase objects
38849        define those attributes, those functions now succeed for any object with
38850        the appropriate level and version.
38851
38852        The 'name' attribute is
38853        optional and is not intended to be used for cross-referencing purposes
38854        within a model.  Its purpose instead is to provide a human-readable
38855        label for the component.  The data type of 'name' is the type
38856        <code>string</code> defined in XML Schema.  SBML imposes no
38857        restrictions as to the content of 'name' attributes beyond those
38858        restrictions defined by the <code>string</code> type in XML Schema.
38859
38860        The recommended practice for handling 'name' is as follows.  If a
38861        software tool has the capability for displaying the content of 'name'
38862        attributes, it should display this content to the user as a
38863        component's label instead of the component's 'id'.  If the user
38864        interface does not have this capability (e.g., because it cannot
38865        display or use special characters in symbol names), or if the 'name'
38866        attribute is missing on a given component, then the user interface
38867        should display the value of the 'id' attribute instead.  (Script
38868        language interpreters are especially likely to display 'id' instead of
38869        'name'.)
38870
38871        As a consequence of the above, authors of systems that automatically
38872        generate the values of 'id' attributes should be aware some systems
38873        may display the 'id''s to the user.  Authors therefore may wish to
38874        take some care to have their software create 'id' values that are: (a)
38875        reasonably easy for humans to type and read; and (b) likely to be
38876        meaningful, for example by making the 'id' attribute be an abbreviated
38877        form of the name attribute value.
38878
38879        An additional point worth mentioning is although there are
38880        restrictions on the uniqueness of 'id' values, there are no
38881        restrictions on the uniqueness of 'name' values in a model.  This
38882        allows software applications leeway in assigning component identifiers.
38883
38884        Regardless of the level and version of the SBML, these functions allow
38885        client applications to use more generalized code in some situations
38886        (for instance, when manipulating objects that are all known to have
38887        names).  If the object in question does not posess a 'name' attribute
38888        according to the SBML specification for the Level and Version in use,
38889        libSBML will not allow the name to be set, nor will it read or
38890        write 'name' attributes for those objects.
38891
38892        @return the name of this SBML object, or the empty string if not set or unsettable.
38893
38894        @see getIdAttribute()
38895        @see isSetName()
38896        @see setName()
38897        @see unsetName()
38898
38899        """
38900        return _libsbml.Event_getName(self)
38901
38902    def getTrigger(self, *args):
38903        r"""
38904        getTrigger(Event self) -> Trigger
38905        getTrigger(Event self) -> Trigger
38906
38907        Get the event trigger portion of this Event.
38908
38909        @return the Trigger object of this Event, or @c None if the trigger is not set.
38910
38911        """
38912        return _libsbml.Event_getTrigger(self, *args)
38913
38914    def getDelay(self, *args):
38915        r"""
38916        getDelay(Event self) -> Delay
38917        getDelay(Event self) -> Delay
38918
38919        Get the assignment delay portion of this Event, if there is one.
38920
38921        @return the delay of this Event if one is defined, or @c None if none
38922        is defined.
38923
38924        """
38925        return _libsbml.Event_getDelay(self, *args)
38926
38927    def getPriority(self, *args):
38928        r"""
38929        getPriority(Event self) -> Priority
38930        getPriority(Event self) -> Priority
38931
38932        (SBML Level&nbsp;3 only) Get the event priority portion of this
38933        Event.
38934
38935        @return the Priority object of this Event, or @c None if the Priority
38936        has not been set.
38937
38938        @note The element 'priority' is available in SBML Level&nbsp;3,
38939        but is not present in lower Levels of SBML.
38940
38941        """
38942        return _libsbml.Event_getPriority(self, *args)
38943
38944    def getTimeUnits(self):
38945        r"""
38946        getTimeUnits(Event self) -> string
38947
38948        Get the value of the 'timeUnits' attribute of this Event, if it has one.
38949
38950        @return the value of the attribute 'timeUnits' as a string.
38951
38952        @warning <span class='warning'>Definitions of Event in SBML Level 2
38953        Versions&nbsp;1 and&nbsp;2 included the additional attribute called
38954        'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
38955        LibSBML supports this attribute for compatibility with previous versions
38956        of SBML Level&nbsp;2, but its use is discouraged since models in
38957        Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
38958        Version&nbsp;3 or&nbsp;4 model sets the attribute, the
38959        consistency-checking method SBMLDocument.checkConsistency() will report
38960        an error.</span>
38961
38962        """
38963        return _libsbml.Event_getTimeUnits(self)
38964
38965    def getUseValuesFromTriggerTime(self):
38966        r"""
38967        getUseValuesFromTriggerTime(Event self) -> bool
38968
38969        Get the value of the 'useValuesFromTriggerTime' attribute of this Event.
38970
38971        @par
38972        The optional Delay on Event and the fact that multiple events may be
38973        simultaneously executed means there are two times to consider when
38974        computing the results of an event: the time at which the event is
38975        <em>triggered</em>, and the time at which assignments are
38976        <em>executed</em>.  It is also possible to distinguish between the
38977        time at which the EventAssignment's expression is calculated, and the
38978        time at which the assignment is made: the expression could be
38979        evaluated at the same time the assignments are performed, i.e., when
38980        the event is <em>executed</em>, but it could also be defined to be
38981        evaluated at the time the event is <em>triggered</em>.
38982
38983        In SBML Level&nbsp;2 versions prior to Version&nbsp;4, the semantics
38984        of Event time delays were defined such that the expressions in the
38985        event's assignments were always evaluated at the time the event was
38986        <em>triggered</em>.  This definition made it difficult to define an
38987        event whose assignment formulas were meant to be evaluated at the time
38988        the event was <em>executed</em> (i.e., after the time period defined
38989        by the value of the Delay element, or after any other simultaneous
38990        event may have been <em>executed</em> and changed the model state).
38991        In SBML Level&nbsp;2
38992        Version&nbsp;4, the attribute 'useValuesFromTriggerTime' on Event
38993        allows a model to indicate the time at which the event's assignments
38994        are intended to be evaluated.  In SBML Level&nbsp;2, the attribute has
38995        a default value of @c True, which corresponds to the interpretation of
38996        event assignments prior to Version&nbsp;4: the values of the
38997        assignment formulas are computed at the moment the event is triggered,
38998        not after the delay.  If 'useValuesFromTriggerTime'=@c False, it means
38999        that the formulas in the event's assignments are to be computed after
39000        the delay, at the time the event is executed.  In SBML Level&nbsp;3,
39001        the attribute is mandatory, not optional, and all events must specify
39002        a value for it.
39003
39004        @return the value of the attribute 'useValuesFromTriggerTime' as a boolean.
39005
39006        @warning <span class='warning'>The attribute 'useValuesFromTriggerTime'
39007        was introduced in SBML Level&nbsp;2 Version&nbsp;4.  It is not valid in
39008        models defined using SBML Level&nbsp;2 versions prior to Version&nbsp;4.
39009        If a Level&nbsp;2 Version&nbsp;1&ndash;3 model sets the attribute, the
39010        consistency-checking method SBMLDocument.checkConsistency() will report
39011        an error.</span>
39012
39013        """
39014        return _libsbml.Event_getUseValuesFromTriggerTime(self)
39015
39016    def isSetId(self):
39017        r"""
39018        isSetId(Event self) -> bool
39019
39020        Predicate returning @c True if this
39021        Event's 'id' attribute is set.
39022
39023        @par
39024        The identifier given by an object's 'id' attribute value
39025        is used to identify the object within the SBML model definition.
39026        Other objects can refer to the component using this identifier.  The
39027        data type of 'id' is always <code>SId</code> or a type derived
39028        from that, such as <code>UnitSId</code>, depending on the object in
39029        question.  All data types are defined as follows:
39030        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
39031        letter ::= 'a'..'z','A'..'Z'
39032        digit  ::= '0'..'9'
39033        idChar ::= letter | digit | '_'
39034        SId    ::= ( letter | '_' ) idChar*
39035        </pre>
39036        The characters <code>(</code> and <code>)</code> are used for grouping,
39037        the character <code>*</code> 'zero or more times', and the character
39038        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
39039        is determined by an exact character sequence match; i.e., comparisons must
39040        be performed in a case-sensitive manner.  This applies to all uses of
39041        <code>SId</code>, <code>SIdRef</code>, and derived types.
39042
39043        Users need to be aware of some important API issues that are the result of
39044        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
39045        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
39046        of SBML objects.  To simplify the work of programmers, libSBML's API
39047        provided get, set, check, and unset on the SBase object class itself
39048        instead of on individual subobject classes. This made the
39049        get/set/etc. methods uniformly available on all objects in the libSBML
39050        API.  LibSBML simply returned empty strings or otherwise did not act when
39051        the methods were applied to SBML objects that were not defined by the SBML
39052        specification to have 'id' or 'name' attributes.  Additional complications
39053        arose with the rule and assignment objects: InitialAssignment,
39054        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
39055        the rule object hierarchy was different, and in addition, then as now,
39056        they possess different attributes: 'variable' (for the rules and event
39057        assignments), 'symbol' (for initial assignments), or neither (for
39058        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
39059        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
39060
39061        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
39062        Version&nbsp;2, it became necessary to introduce a new way to interact
39063        with the attributes more consistently in libSBML to avoid breaking
39064        backward compatibility in the behavior of the original 'id' methods.  For
39065        this reason, libSBML provides four functions (getIdAttribute(),
39066        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
39067        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
39068        from SBase, regardless of the object's type.  <strong>These new methods
39069        should be used instead of the older getId()/setId()/etc. methods</strong>
39070        unless the old behavior is somehow necessary.  Regardless of the Level and
39071        Version of the SBML, these functions allow client applications to use more
39072        generalized code in some situations (for instance, when manipulating
39073        objects that are all known to have identifiers).  If the object in
39074        question does not posess an 'id' attribute according to the SBML
39075        specification for the Level and Version in use, libSBML will not allow the
39076        identifier to be set, nor will it read or write 'id' attributes for those
39077        objects.
39078
39079        @return @c True if the 'id' attribute of this SBML object is
39080        set, @c False otherwise.
39081
39082        @note Because of the inconsistent behavior of this function with
39083        respect to assignments and rules, it is recommended that callers
39084        use isSetIdAttribute() instead.
39085
39086        @see getIdAttribute()
39087        @see setIdAttribute()
39088        @see unsetIdAttribute()
39089        @see isSetIdAttribute()
39090
39091        """
39092        return _libsbml.Event_isSetId(self)
39093
39094    def isSetName(self):
39095        r"""
39096        isSetName(Event self) -> bool
39097
39098        Predicate returning @c True if this
39099        Event's 'name' attribute is set.
39100
39101        @par
39102        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
39103        moved to SBase directly, instead of being defined individually for many
39104        (but not all) objects.  LibSBML has for a long time provided functions
39105        defined on SBase itself to get, set, and unset those attributes, which
39106        would fail or otherwise return empty strings if executed on any object
39107        for which those attributes were not defined.  Now that all SBase objects
39108        define those attributes, those functions now succeed for any object with
39109        the appropriate level and version.
39110
39111        The 'name' attribute is
39112        optional and is not intended to be used for cross-referencing purposes
39113        within a model.  Its purpose instead is to provide a human-readable
39114        label for the component.  The data type of 'name' is the type
39115        <code>string</code> defined in XML Schema.  SBML imposes no
39116        restrictions as to the content of 'name' attributes beyond those
39117        restrictions defined by the <code>string</code> type in XML Schema.
39118
39119        The recommended practice for handling 'name' is as follows.  If a
39120        software tool has the capability for displaying the content of 'name'
39121        attributes, it should display this content to the user as a
39122        component's label instead of the component's 'id'.  If the user
39123        interface does not have this capability (e.g., because it cannot
39124        display or use special characters in symbol names), or if the 'name'
39125        attribute is missing on a given component, then the user interface
39126        should display the value of the 'id' attribute instead.  (Script
39127        language interpreters are especially likely to display 'id' instead of
39128        'name'.)
39129
39130        As a consequence of the above, authors of systems that automatically
39131        generate the values of 'id' attributes should be aware some systems
39132        may display the 'id''s to the user.  Authors therefore may wish to
39133        take some care to have their software create 'id' values that are: (a)
39134        reasonably easy for humans to type and read; and (b) likely to be
39135        meaningful, for example by making the 'id' attribute be an abbreviated
39136        form of the name attribute value.
39137
39138        An additional point worth mentioning is although there are
39139        restrictions on the uniqueness of 'id' values, there are no
39140        restrictions on the uniqueness of 'name' values in a model.  This
39141        allows software applications leeway in assigning component identifiers.
39142
39143        Regardless of the level and version of the SBML, these functions allow
39144        client applications to use more generalized code in some situations
39145        (for instance, when manipulating objects that are all known to have
39146        names).  If the object in question does not posess a 'name' attribute
39147        according to the SBML specification for the Level and Version in use,
39148        libSBML will not allow the name to be set, nor will it read or
39149        write 'name' attributes for those objects.
39150
39151        @return @c True if the 'name' attribute of this SBML object is
39152        set, @c False otherwise.
39153
39154        @see getName()
39155        @see setName()
39156        @see unsetName()
39157
39158        """
39159        return _libsbml.Event_isSetName(self)
39160
39161    def isSetTrigger(self):
39162        r"""
39163        isSetTrigger(Event self) -> bool
39164
39165        Predicate for testing whether the trigger for this Event is set.
39166
39167        @return @c True if the trigger of this Event is set, @c False
39168        otherwise.
39169
39170        """
39171        return _libsbml.Event_isSetTrigger(self)
39172
39173    def isSetDelay(self):
39174        r"""
39175        isSetDelay(Event self) -> bool
39176
39177        Predicate for testing whether the delay for this Event is set.
39178
39179        @return @c True if the delay of this Event is set, @c False
39180        otherwise.
39181
39182        """
39183        return _libsbml.Event_isSetDelay(self)
39184
39185    def isSetPriority(self):
39186        r"""
39187        isSetPriority(Event self) -> bool
39188
39189        (SBML Level&nbsp;3 only) Predicate for testing whether the priority
39190        for this Event is set.
39191
39192        @return @c True if the priority of this Event is set, @c False
39193        otherwise.
39194
39195        @note The element 'priority' is available in SBML Level&nbsp;3,
39196        but is not present in lower Levels of SBML.
39197
39198        """
39199        return _libsbml.Event_isSetPriority(self)
39200
39201    def isSetTimeUnits(self):
39202        r"""
39203        isSetTimeUnits(Event self) -> bool
39204
39205        Predicate for testing whether the 'timeUnits' attribute of this Event
39206        is set.
39207
39208        @return @c True if the 'timeUnits' attribute of this Event is
39209        set, @c False otherwise.
39210
39211        @warning <span class='warning'>Definitions of Event in SBML Level 2
39212        Versions&nbsp;1 and&nbsp;2 included the additional attribute called
39213        'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
39214        LibSBML supports this attribute for compatibility with previous versions
39215        of SBML Level&nbsp;2, but its use is discouraged since models in
39216        Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
39217        Version&nbsp;3 or&nbsp;4 model sets the attribute, the
39218        consistency-checking method SBMLDocument.checkConsistency() will report
39219        an error.</span>
39220
39221        """
39222        return _libsbml.Event_isSetTimeUnits(self)
39223
39224    def isSetUseValuesFromTriggerTime(self):
39225        r"""
39226        isSetUseValuesFromTriggerTime(Event self) -> bool
39227
39228        Predicate for testing whether the 'useValuesFromTriggerTime' attribute of this Event
39229        is set.
39230
39231        @return @c True if the 'useValuesFromTriggerTime' attribute of this Event is
39232        set, @c False otherwise.
39233
39234        @note In SBML Level&nbsp;2, this attribute is optional and has a default value of
39235        @c True, whereas in Level&nbsp;3, this optional is mandatory and
39236        has no default value.
39237
39238        """
39239        return _libsbml.Event_isSetUseValuesFromTriggerTime(self)
39240
39241    def setId(self, sid):
39242        r"""
39243        setId(Event self, string sid) -> int
39244
39245        Sets the value of the 'id' attribute of this Event.
39246
39247        @par
39248        The string @p sid is copied.
39249
39250        @par
39251        The identifier given by an object's 'id' attribute value
39252        is used to identify the object within the SBML model definition.
39253        Other objects can refer to the component using this identifier.  The
39254        data type of 'id' is always <code>SId</code> or a type derived
39255        from that, such as <code>UnitSId</code>, depending on the object in
39256        question.  All data types are defined as follows:
39257        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
39258        letter ::= 'a'..'z','A'..'Z'
39259        digit  ::= '0'..'9'
39260        idChar ::= letter | digit | '_'
39261        SId    ::= ( letter | '_' ) idChar*
39262        </pre>
39263        The characters <code>(</code> and <code>)</code> are used for grouping,
39264        the character <code>*</code> 'zero or more times', and the character
39265        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
39266        is determined by an exact character sequence match; i.e., comparisons must
39267        be performed in a case-sensitive manner.  This applies to all uses of
39268        <code>SId</code>, <code>SIdRef</code>, and derived types.
39269
39270        Users need to be aware of some important API issues that are the result of
39271        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
39272        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
39273        of SBML objects.  To simplify the work of programmers, libSBML's API
39274        provided get, set, check, and unset on the SBase object class itself
39275        instead of on individual subobject classes. This made the
39276        get/set/etc. methods uniformly available on all objects in the libSBML
39277        API.  LibSBML simply returned empty strings or otherwise did not act when
39278        the methods were applied to SBML objects that were not defined by the SBML
39279        specification to have 'id' or 'name' attributes.  Additional complications
39280        arose with the rule and assignment objects: InitialAssignment,
39281        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
39282        the rule object hierarchy was different, and in addition, then as now,
39283        they possess different attributes: 'variable' (for the rules and event
39284        assignments), 'symbol' (for initial assignments), or neither (for
39285        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
39286        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
39287
39288        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
39289        Version&nbsp;2, it became necessary to introduce a new way to interact
39290        with the attributes more consistently in libSBML to avoid breaking
39291        backward compatibility in the behavior of the original 'id' methods.  For
39292        this reason, libSBML provides four functions (getIdAttribute(),
39293        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
39294        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
39295        from SBase, regardless of the object's type.  <strong>These new methods
39296        should be used instead of the older getId()/setId()/etc. methods</strong>
39297        unless the old behavior is somehow necessary.  Regardless of the Level and
39298        Version of the SBML, these functions allow client applications to use more
39299        generalized code in some situations (for instance, when manipulating
39300        objects that are all known to have identifiers).  If the object in
39301        question does not posess an 'id' attribute according to the SBML
39302        specification for the Level and Version in use, libSBML will not allow the
39303        identifier to be set, nor will it read or write 'id' attributes for those
39304        objects.
39305
39306        @param sid the string to use as the identifier of this object.
39307
39308        @return integer value indicating success/failure of the
39309        function.  @if clike The value is drawn from the
39310        enumeration #OperationReturnValues_t. @endif@~ The possible values
39311        returned by this function are:
39312        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39313        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
39314        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
39315
39316        @see getIdAttribute()
39317        @see setIdAttribute()
39318        @see isSetIdAttribute()
39319        @see unsetIdAttribute()
39320
39321        """
39322        return _libsbml.Event_setId(self, sid)
39323
39324    def setName(self, name):
39325        r"""
39326        setName(Event self, string name) -> int
39327
39328        Sets the value of the 'name' attribute of this Event.
39329
39330
39331        @par
39332
39333        The string in @p name is copied.
39334
39335        @param name the new name for the SBML object.
39336
39337        @return integer value indicating success/failure of the
39338        function.  @if clike The value is drawn from the
39339        enumeration #OperationReturnValues_t. @endif@~ The possible values
39340        returned by this function are:
39341        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39342        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
39343
39344        """
39345        return _libsbml.Event_setName(self, name)
39346
39347    def setTrigger(self, trigger):
39348        r"""
39349        setTrigger(Event self, Trigger trigger) -> int
39350
39351        Sets the trigger definition of this Event to a copy of the given
39352        Trigger object instance.
39353
39354        @param trigger the Trigger object instance to use.
39355
39356        @return integer value indicating success/failure of the
39357        function.  @if clike The value is drawn from the
39358        enumeration #OperationReturnValues_t. @endif@~ The possible values
39359        returned by this function are:
39360        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39361        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
39362        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
39363
39364        """
39365        return _libsbml.Event_setTrigger(self, trigger)
39366
39367    def setDelay(self, delay):
39368        r"""
39369        setDelay(Event self, Delay delay) -> int
39370
39371        Sets the delay definition of this Event to a copy of the given Delay
39372        object instance.
39373
39374        @param delay the Delay object instance to use.
39375
39376        @return integer value indicating success/failure of the
39377        function.  @if clike The value is drawn from the
39378        enumeration #OperationReturnValues_t. @endif@~ The possible values
39379        returned by this function are:
39380        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39381        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
39382        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
39383
39384        """
39385        return _libsbml.Event_setDelay(self, delay)
39386
39387    def setPriority(self, priority):
39388        r"""
39389        setPriority(Event self, Priority priority) -> int
39390
39391        (SBML Level&nbsp;3 only) Sets the priority definition of this Event
39392        to a copy of the given Priority object instance.
39393
39394        @param priority the Priority object instance to use.
39395
39396        @return integer value indicating success/failure of the
39397        function.  @if clike The value is drawn from the
39398        enumeration #OperationReturnValues_t. @endif@~ The possible values
39399        returned by this function are:
39400        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39401        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
39402        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
39403        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
39404
39405        @note The element 'priority' is available in SBML Level&nbsp;3,
39406        but is not present in lower Levels of SBML.
39407
39408        """
39409        return _libsbml.Event_setPriority(self, priority)
39410
39411    def setTimeUnits(self, sid):
39412        r"""
39413        setTimeUnits(Event self, string sid) -> int
39414
39415        Sets the 'timeUnits' attribute of this Event to a copy of @p sid.
39416
39417        @param sid the identifier of the time units to use.
39418
39419        @return integer value indicating success/failure of the
39420        function.  @if clike The value is drawn from the
39421        enumeration #OperationReturnValues_t. @endif@~ The possible values
39422        returned by this function are:
39423        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39424        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
39425        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
39426
39427        @warning <span class='warning'>Definitions of Event in SBML Level 2
39428        Versions&nbsp;1 and&nbsp;2 included the additional attribute called
39429        'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
39430        LibSBML supports this attribute for compatibility with previous versions
39431        of SBML Level&nbsp;2, but its use is discouraged since models in
39432        Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
39433        Version&nbsp;3 or&nbsp;4 model sets the attribute, the
39434        consistency-checking method SBMLDocument.checkConsistency() will report
39435        an error.</span>
39436
39437        """
39438        return _libsbml.Event_setTimeUnits(self, sid)
39439
39440    def setUseValuesFromTriggerTime(self, value):
39441        r"""
39442        setUseValuesFromTriggerTime(Event self, bool value) -> int
39443
39444        Sets the 'useValuesFromTriggerTime' attribute of this Event to a @p value.
39445
39446        @par
39447        The optional Delay on Event and the fact that multiple events may be
39448        simultaneously executed means there are two times to consider when
39449        computing the results of an event: the time at which the event is
39450        <em>triggered</em>, and the time at which assignments are
39451        <em>executed</em>.  It is also possible to distinguish between the
39452        time at which the EventAssignment's expression is calculated, and the
39453        time at which the assignment is made: the expression could be
39454        evaluated at the same time the assignments are performed, i.e., when
39455        the event is <em>executed</em>, but it could also be defined to be
39456        evaluated at the time the event is <em>triggered</em>.
39457
39458        In SBML Level&nbsp;2 versions prior to Version&nbsp;4, the semantics
39459        of Event time delays were defined such that the expressions in the
39460        event's assignments were always evaluated at the time the event was
39461        <em>triggered</em>.  This definition made it difficult to define an
39462        event whose assignment formulas were meant to be evaluated at the time
39463        the event was <em>executed</em> (i.e., after the time period defined
39464        by the value of the Delay element, or after any other simultaneous
39465        event may have been <em>executed</em> and changed the model state).
39466        In SBML Level&nbsp;2
39467        Version&nbsp;4, the attribute 'useValuesFromTriggerTime' on Event
39468        allows a model to indicate the time at which the event's assignments
39469        are intended to be evaluated.  In SBML Level&nbsp;2, the attribute has
39470        a default value of @c True, which corresponds to the interpretation of
39471        event assignments prior to Version&nbsp;4: the values of the
39472        assignment formulas are computed at the moment the event is triggered,
39473        not after the delay.  If 'useValuesFromTriggerTime'=@c False, it means
39474        that the formulas in the event's assignments are to be computed after
39475        the delay, at the time the event is executed.  In SBML Level&nbsp;3,
39476        the attribute is mandatory, not optional, and all events must specify
39477        a value for it.
39478
39479        @param value the value of useValuesFromTriggerTime to use.
39480
39481        @return integer value indicating success/failure of the
39482        function.  @if clike The value is drawn from the
39483        enumeration #OperationReturnValues_t. @endif@~ The possible values
39484        returned by this function are:
39485        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39486        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
39487
39488        @warning <span class='warning'>The attribute 'useValuesFromTriggerTime'
39489        was introduced in SBML Level&nbsp;2 Version&nbsp;4.  It is not valid in
39490        models defined using SBML Level&nbsp;2 versions prior to Version&nbsp;4.
39491        If a Level&nbsp;2 Version&nbsp;1&ndash;3 model sets the attribute, the
39492        consistency-checking method SBMLDocument.checkConsistency() will report
39493        an error.</span>
39494
39495        """
39496        return _libsbml.Event_setUseValuesFromTriggerTime(self, value)
39497
39498    def unsetId(self):
39499        r"""
39500        unsetId(Event self) -> int
39501
39502        Unsets the value of the 'id' attribute of this Event.
39503
39504        @par
39505        The identifier given by an object's 'id' attribute value
39506        is used to identify the object within the SBML model definition.
39507        Other objects can refer to the component using this identifier.  The
39508        data type of 'id' is always <code>SId</code> or a type derived
39509        from that, such as <code>UnitSId</code>, depending on the object in
39510        question.  All data types are defined as follows:
39511        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
39512        letter ::= 'a'..'z','A'..'Z'
39513        digit  ::= '0'..'9'
39514        idChar ::= letter | digit | '_'
39515        SId    ::= ( letter | '_' ) idChar*
39516        </pre>
39517        The characters <code>(</code> and <code>)</code> are used for grouping,
39518        the character <code>*</code> 'zero or more times', and the character
39519        <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
39520        is determined by an exact character sequence match; i.e., comparisons must
39521        be performed in a case-sensitive manner.  This applies to all uses of
39522        <code>SId</code>, <code>SIdRef</code>, and derived types.
39523
39524        Users need to be aware of some important API issues that are the result of
39525        the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
39526        Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
39527        of SBML objects.  To simplify the work of programmers, libSBML's API
39528        provided get, set, check, and unset on the SBase object class itself
39529        instead of on individual subobject classes. This made the
39530        get/set/etc. methods uniformly available on all objects in the libSBML
39531        API.  LibSBML simply returned empty strings or otherwise did not act when
39532        the methods were applied to SBML objects that were not defined by the SBML
39533        specification to have 'id' or 'name' attributes.  Additional complications
39534        arose with the rule and assignment objects: InitialAssignment,
39535        EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
39536        the rule object hierarchy was different, and in addition, then as now,
39537        they possess different attributes: 'variable' (for the rules and event
39538        assignments), 'symbol' (for initial assignments), or neither (for
39539        algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
39540        would always return an empty string, and isSetId() would always return @c False for objects of these classes.
39541
39542        With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
39543        Version&nbsp;2, it became necessary to introduce a new way to interact
39544        with the attributes more consistently in libSBML to avoid breaking
39545        backward compatibility in the behavior of the original 'id' methods.  For
39546        this reason, libSBML provides four functions (getIdAttribute(),
39547        setIdAttribute(@if java String@endif), isSetIdAttribute(), and
39548        unsetIdAttribute()) that always act on the actual 'id' attribute inherited
39549        from SBase, regardless of the object's type.  <strong>These new methods
39550        should be used instead of the older getId()/setId()/etc. methods</strong>
39551        unless the old behavior is somehow necessary.  Regardless of the Level and
39552        Version of the SBML, these functions allow client applications to use more
39553        generalized code in some situations (for instance, when manipulating
39554        objects that are all known to have identifiers).  If the object in
39555        question does not posess an 'id' attribute according to the SBML
39556        specification for the Level and Version in use, libSBML will not allow the
39557        identifier to be set, nor will it read or write 'id' attributes for those
39558        objects.
39559
39560        @return integer value indicating success/failure of the
39561        function.  @if clike The value is drawn from the
39562        enumeration #OperationReturnValues_t. @endif@~ The possible values
39563        returned by this function are:
39564        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39565        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39566
39567        @see getIdAttribute()
39568        @see setIdAttribute()
39569        @see isSetIdAttribute()
39570        @see unsetIdAttribute()
39571
39572        """
39573        return _libsbml.Event_unsetId(self)
39574
39575    def unsetName(self):
39576        r"""
39577        unsetName(Event self) -> int
39578
39579        Unsets the value of the 'name' attribute of this Event.
39580
39581        @par
39582        In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
39583        moved to SBase directly, instead of being defined individually for many
39584        (but not all) objects.  LibSBML has for a long time provided functions
39585        defined on SBase itself to get, set, and unset those attributes, which
39586        would fail or otherwise return empty strings if executed on any object
39587        for which those attributes were not defined.  Now that all SBase objects
39588        define those attributes, those functions now succeed for any object with
39589        the appropriate level and version.
39590
39591        The 'name' attribute is
39592        optional and is not intended to be used for cross-referencing purposes
39593        within a model.  Its purpose instead is to provide a human-readable
39594        label for the component.  The data type of 'name' is the type
39595        <code>string</code> defined in XML Schema.  SBML imposes no
39596        restrictions as to the content of 'name' attributes beyond those
39597        restrictions defined by the <code>string</code> type in XML Schema.
39598
39599        The recommended practice for handling 'name' is as follows.  If a
39600        software tool has the capability for displaying the content of 'name'
39601        attributes, it should display this content to the user as a
39602        component's label instead of the component's 'id'.  If the user
39603        interface does not have this capability (e.g., because it cannot
39604        display or use special characters in symbol names), or if the 'name'
39605        attribute is missing on a given component, then the user interface
39606        should display the value of the 'id' attribute instead.  (Script
39607        language interpreters are especially likely to display 'id' instead of
39608        'name'.)
39609
39610        As a consequence of the above, authors of systems that automatically
39611        generate the values of 'id' attributes should be aware some systems
39612        may display the 'id''s to the user.  Authors therefore may wish to
39613        take some care to have their software create 'id' values that are: (a)
39614        reasonably easy for humans to type and read; and (b) likely to be
39615        meaningful, for example by making the 'id' attribute be an abbreviated
39616        form of the name attribute value.
39617
39618        An additional point worth mentioning is although there are
39619        restrictions on the uniqueness of 'id' values, there are no
39620        restrictions on the uniqueness of 'name' values in a model.  This
39621        allows software applications leeway in assigning component identifiers.
39622
39623        Regardless of the level and version of the SBML, these functions allow
39624        client applications to use more generalized code in some situations
39625        (for instance, when manipulating objects that are all known to have
39626        names).  If the object in question does not posess a 'name' attribute
39627        according to the SBML specification for the Level and Version in use,
39628        libSBML will not allow the name to be set, nor will it read or
39629        write 'name' attributes for those objects.
39630
39631        @return integer value indicating success/failure of the
39632        function.  @if clike The value is drawn from the
39633        enumeration #OperationReturnValues_t. @endif@~ The possible values
39634        returned by this function are:
39635        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39636        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39637
39638        @see getName()
39639        @see setName()
39640        @see isSetName()
39641
39642        """
39643        return _libsbml.Event_unsetName(self)
39644
39645    def unsetUseValuesFromTriggerTime(self):
39646        r"""
39647        unsetUseValuesFromTriggerTime(Event self) -> int
39648
39649        Unsets the value of the 'useValuesFromTriggerTime' attribute of this Event.
39650
39651        @par
39652        The optional Delay on Event and the fact that multiple events may be
39653        simultaneously executed means there are two times to consider when
39654        computing the results of an event: the time at which the event is
39655        <em>triggered</em>, and the time at which assignments are
39656        <em>executed</em>.  It is also possible to distinguish between the
39657        time at which the EventAssignment's expression is calculated, and the
39658        time at which the assignment is made: the expression could be
39659        evaluated at the same time the assignments are performed, i.e., when
39660        the event is <em>executed</em>, but it could also be defined to be
39661        evaluated at the time the event is <em>triggered</em>.
39662
39663        In SBML Level&nbsp;2 versions prior to Version&nbsp;4, the semantics
39664        of Event time delays were defined such that the expressions in the
39665        event's assignments were always evaluated at the time the event was
39666        <em>triggered</em>.  This definition made it difficult to define an
39667        event whose assignment formulas were meant to be evaluated at the time
39668        the event was <em>executed</em> (i.e., after the time period defined
39669        by the value of the Delay element, or after any other simultaneous
39670        event may have been <em>executed</em> and changed the model state).
39671        In SBML Level&nbsp;2
39672        Version&nbsp;4, the attribute 'useValuesFromTriggerTime' on Event
39673        allows a model to indicate the time at which the event's assignments
39674        are intended to be evaluated.  In SBML Level&nbsp;2, the attribute has
39675        a default value of @c True, which corresponds to the interpretation of
39676        event assignments prior to Version&nbsp;4: the values of the
39677        assignment formulas are computed at the moment the event is triggered,
39678        not after the delay.  If 'useValuesFromTriggerTime'=@c False, it means
39679        that the formulas in the event's assignments are to be computed after
39680        the delay, at the time the event is executed.  In SBML Level&nbsp;3,
39681        the attribute is mandatory, not optional, and all events must specify
39682        a value for it.
39683
39684        @return integer value indicating success/failure of the
39685        function.  @if clike The value is drawn from the
39686        enumeration #OperationReturnValues_t. @endif@~ The possible values
39687        returned by this function are:
39688        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39689        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39690
39691        @warning <span class='warning'>The attribute 'useValuesFromTriggerTime'
39692        was introduced in SBML Level&nbsp;2 Version&nbsp;4.  It is not valid in
39693        models defined using SBML Level&nbsp;2 versions prior to Version&nbsp;4.
39694        If a Level&nbsp;2 Version&nbsp;1&ndash;3 model sets the attribute, the
39695        consistency-checking method SBMLDocument.checkConsistency() will report
39696        an error.</span>
39697
39698        """
39699        return _libsbml.Event_unsetUseValuesFromTriggerTime(self)
39700
39701    def unsetDelay(self):
39702        r"""
39703        unsetDelay(Event self) -> int
39704
39705        Unsets the Delay of this Event.
39706
39707        @return integer value indicating success/failure of the
39708        function.  @if clike The value is drawn from the
39709        enumeration #OperationReturnValues_t. @endif@~ The possible values
39710        returned by this function are:
39711        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39712        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39713
39714        """
39715        return _libsbml.Event_unsetDelay(self)
39716
39717    def unsetPriority(self):
39718        r"""
39719        unsetPriority(Event self) -> int
39720
39721        (SBML Level&nbsp;3 only) Unsets the Priority of this Event.
39722
39723        @return integer value indicating success/failure of the
39724        function.  @if clike The value is drawn from the
39725        enumeration #OperationReturnValues_t. @endif@~ The possible values
39726        returned by this function are:
39727        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39728        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39729
39730        @note The element 'priority' is available in SBML Level&nbsp;3,
39731        but is not present in lower Levels of SBML.
39732
39733        """
39734        return _libsbml.Event_unsetPriority(self)
39735
39736    def unsetTrigger(self):
39737        r"""
39738        unsetTrigger(Event self) -> int
39739
39740        Unsets the Trigger of this Event.
39741
39742        @return integer value indicating success/failure of the
39743        function.  @if clike The value is drawn from the
39744        enumeration #OperationReturnValues_t. @endif@~ The possible values
39745        returned by this function are:
39746        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39747        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39748
39749        @note The element 'priority' is available in SBML Level&nbsp;3,
39750        but is not present in lower Levels of SBML.
39751
39752        """
39753        return _libsbml.Event_unsetTrigger(self)
39754
39755    def unsetTimeUnits(self):
39756        r"""
39757        unsetTimeUnits(Event self) -> int
39758
39759        Unsets the 'timeUnits' attribute of this Event.
39760
39761        @return integer value indicating success/failure of the
39762        function.  @if clike The value is drawn from the
39763        enumeration #OperationReturnValues_t. @endif@~ The possible values
39764        returned by this function are:
39765        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39766        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
39767        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39768
39769        @warning <span class='warning'>Definitions of Event in SBML Level 2
39770        Versions&nbsp;1 and&nbsp;2 included the additional attribute called
39771        'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
39772        LibSBML supports this attribute for compatibility with previous versions
39773        of SBML Level&nbsp;2, but its use is discouraged since models in
39774        Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
39775        Version&nbsp;3 or&nbsp;4 model sets the attribute, the
39776        consistency-checking method SBMLDocument.checkConsistency() will report
39777        an error.</span>
39778
39779        """
39780        return _libsbml.Event_unsetTimeUnits(self)
39781
39782    def addEventAssignment(self, ea):
39783        r"""
39784        addEventAssignment(Event self, EventAssignment ea) -> int
39785
39786        Appends a copy of the given EventAssignment to this Event.
39787
39788        @param ea the EventAssignment object to add.
39789
39790        @return integer value indicating success/failure of the
39791        function.  @if clike The value is drawn from the
39792        enumeration #OperationReturnValues_t. @endif@~ The possible values
39793        returned by this function are:
39794        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
39795        @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
39796        @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
39797        @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
39798        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
39799
39800        @note This method should be used with some caution.  The fact that this
39801        method @em copies the object passed to it means that the caller will be
39802        left holding a physically different object instance than the one contained
39803        inside this object.  Changes made to the original object instance (such as
39804        resetting attribute values) will <em>not affect the instance in this
39805        object</em>.  In addition, the caller should make sure to free the
39806        original object if it is no longer being used, or else a memory leak will
39807        result.  Please see other methods on this class (particularly a
39808        corresponding method whose name begins with the word <code>create</code>)
39809        for alternatives that do not lead to these issues.
39810
39811        @see createEventAssignment()
39812
39813        """
39814        return _libsbml.Event_addEventAssignment(self, ea)
39815
39816    def createEventAssignment(self):
39817        r"""
39818        createEventAssignment(Event self) -> EventAssignment
39819
39820        Creates a new, empty EventAssignment, adds it to this Event's list of
39821        event assignments and returns the EventAssignment.
39822
39823        @return the newly created EventAssignment object instance.
39824
39825        @see addEventAssignment()
39826
39827        """
39828        return _libsbml.Event_createEventAssignment(self)
39829
39830    def createTrigger(self):
39831        r"""
39832        createTrigger(Event self) -> Trigger
39833
39834        Creates a new, empty Trigger, adds it to this Event and
39835        returns the Trigger.
39836
39837        @return the newly created Trigger object instance.
39838
39839        """
39840        return _libsbml.Event_createTrigger(self)
39841
39842    def createDelay(self):
39843        r"""
39844        createDelay(Event self) -> Delay
39845
39846        Creates a new, empty Delay, adds it to this Event and
39847        returns the Delay.
39848
39849        @return the newly created Delay object instance.
39850
39851        """
39852        return _libsbml.Event_createDelay(self)
39853
39854    def createPriority(self):
39855        r"""
39856        createPriority(Event self) -> Priority
39857
39858        (SBML Level&nbsp;3 only) Creates a new, empty Priority, adds it to this
39859        Event and returns the Priority.
39860
39861        @return the newly created Priority object instance, or @c None if the SBML
39862        level and version used for this Event does not define Priority children.
39863
39864        @note The element 'priority' is available in SBML Level&nbsp;3,
39865        but is not present in lower Levels of SBML.
39866
39867        """
39868        return _libsbml.Event_createPriority(self)
39869
39870    def getListOfEventAssignments(self, *args):
39871        r"""
39872        getListOfEventAssignments(Event self) -> ListOfEventAssignments
39873        getListOfEventAssignments(Event self) -> ListOfEventAssignments
39874
39875        Returns the list of event assignments for this Event.
39876
39877        @return the list of EventAssignments for this Event.
39878
39879        """
39880        return _libsbml.Event_getListOfEventAssignments(self, *args)
39881
39882    def getEventAssignment(self, *args):
39883        r"""
39884        getEventAssignment(Event self, unsigned int n) -> EventAssignment
39885        getEventAssignment(Event self, unsigned int n) -> EventAssignment
39886        getEventAssignment(Event self, string variable) -> EventAssignment
39887        getEventAssignment(Event self, string variable) -> EventAssignment
39888
39889        This method has multiple variants; they differ in the arguments
39890         they accept.  Each variant is described separately below.
39891
39892        @par
39893        <hr>
39894        <span class='variant-sig-heading'>Method variant with the following signature</span>:
39895         <pre class='signature'>getEventAssignment(string variable)</pre>
39896
39897        Return the event assignment indicated by the given @p variable.
39898
39899        @param variable a string, the identifier of the variable whose
39900        EventAssignment is being sought.
39901
39902        @return the EventAssignment for the given @p variable, or @c None if
39903        no such EventAssignment exists.
39904
39905
39906        @par
39907        <hr>
39908        <span class='variant-sig-heading'>Method variant with the following signature</span>:
39909         <pre class='signature'>getEventAssignment(long n)</pre>
39910
39911        Return a specific EventAssignment object of this Event.
39912
39913        @param n an integer, the index of the EventAssignment object to return.
39914
39915        @return the <code>n</code>th EventAssignment of this Event.
39916
39917        """
39918        return _libsbml.Event_getEventAssignment(self, *args)
39919
39920    def getNumEventAssignments(self):
39921        r"""
39922        getNumEventAssignments(Event self) -> unsigned int
39923
39924        Returns the number of EventAssignment objects attached to this
39925        Event.
39926
39927        @return the number of EventAssignments in this Event.
39928
39929        """
39930        return _libsbml.Event_getNumEventAssignments(self)
39931
39932    def removeEventAssignment(self, *args):
39933        r"""
39934        removeEventAssignment(Event self, unsigned int n) -> EventAssignment
39935        removeEventAssignment(Event self, string variable) -> EventAssignment
39936
39937        This method has multiple variants; they differ in the arguments
39938         they accept.  Each variant is described separately below.
39939
39940        @par
39941        <hr>
39942        <span class='variant-sig-heading'>Method variant with the following signature</span>:
39943         <pre class='signature'>removeEventAssignment(string variable)</pre>
39944
39945        Removes the EventAssignment object with the given 'variable' attribute
39946        from this Event object and returns a pointer to it.
39947
39948        The caller owns the returned object and is responsible for deleting it.
39949        If none of the EventAssignment objects in this Event object have the
39950        'variable' attribute @p variable, then @c None is returned.
39951
39952        @param variable the 'variable' attribute of the EventAssignment object
39953        to remove.
39954
39955        @return the EventAssignment object removed.  As mentioned above, the
39956        caller owns the returned object. @c None is returned if no EventAssignment
39957        object with the 'variable' attribute exists in this Event object.
39958
39959
39960        @par
39961        <hr>
39962        <span class='variant-sig-heading'>Method variant with the following signature</span>:
39963         <pre class='signature'>removeEventAssignment(long n)</pre>
39964
39965        Removes the nth EventAssignment object from this Event object and
39966        returns a pointer to it.
39967
39968        The caller owns the returned object and is responsible for deleting it.
39969
39970        @param n the index of the EventAssignment object to remove.
39971
39972        @return the EventAssignment object removed.  As mentioned above,
39973        the caller owns the returned item. @c None is returned if the given index
39974        is out of range.
39975
39976        """
39977        return _libsbml.Event_removeEventAssignment(self, *args)
39978
39979    def connectToChild(self):
39980        r"""connectToChild(Event self)"""
39981        return _libsbml.Event_connectToChild(self)
39982
39983    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
39984        r"""
39985        enablePackageInternal(Event self, string pkgURI, string pkgPrefix, bool flag)
39986
39987        @internal
39988
39989        @internal
39990
39991        """
39992        return _libsbml.Event_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
39993
39994    def updateSBMLNamespace(self, package, level, version):
39995        r"""
39996        updateSBMLNamespace(Event self, string package, unsigned int level, unsigned int version)
39997
39998        @internal
39999
40000        @internal
40001
40002        """
40003        return _libsbml.Event_updateSBMLNamespace(self, package, level, version)
40004
40005    def getTypeCode(self):
40006        r"""
40007        getTypeCode(Event self) -> int
40008
40009        Returns the libSBML type code of this object instance.
40010
40011        @par
40012        LibSBML attaches an identifying code to every kind of SBML object.  These
40013        are integer constants known as <em>SBML type codes</em>.  The names of all
40014        the codes begin with the characters <code>SBML_</code>.
40015        @if clike The set of possible type codes for core elements is defined in
40016        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
40017        SBML Level&nbsp;3 packages define their own extra enumerations of type
40018        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
40019        package).@endif@if java In the Java language interface for libSBML, the
40020        type codes are defined as static integer constants in the interface class
40021        {@link libsbmlConstants}.  @endif@if python In the Python language
40022        interface for libSBML, the type codes are defined as static integer
40023        constants in the interface class @link libsbml@endlink.@endif@if csharp In
40024        the C# language interface for libSBML, the type codes are defined as
40025        static integer constants in the interface class
40026        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
40027        package plug-ins may use overlapping type codes; to identify the package
40028        to which a given object belongs, call the
40029        <code>@if conly SBase_getPackageName()
40030        @else SBase.getPackageName()
40031        @endif</code>
40032        method on the object.
40033
40034        The exception to this is lists:  all SBML-style list elements have the type
40035        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
40036        are from.
40037
40038        @return the SBML type code for this object:
40039        @link libsbml#SBML_EVENT SBML_EVENT@endlink (default).
40040
40041        @warning <span class='warning'>The specific integer values of the possible
40042        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
40043        packages,  To fully identify the correct code, <strong>it is necessary to
40044        invoke both getPackageName() and getTypeCode()</strong> (or
40045        ListOf.getItemTypeCode()).</span>
40046
40047        @see getElementName()
40048        @see getPackageName()
40049
40050        """
40051        return _libsbml.Event_getTypeCode(self)
40052
40053    def getElementName(self):
40054        r"""
40055        getElementName(Event self) -> string
40056
40057        Returns the XML element name of this object, which for Event, is
40058        always @c 'event'.
40059
40060        @return the name of this element, i.e., @c 'event'.
40061
40062        """
40063        return _libsbml.Event_getElementName(self)
40064
40065    def hasRequiredAttributes(self):
40066        r"""
40067        hasRequiredAttributes(Event self) -> bool
40068
40069        Predicate returning @c True if all the required attributes for this
40070        Event object have been set.
40071
40072        The required attributes for an Event object are:
40073        @li 'useValuesfromTriggerTime' (required in SBML Level&nbsp;3)
40074
40075        @return @c True if the required attributes have been set, @c False
40076        otherwise.
40077
40078        """
40079        return _libsbml.Event_hasRequiredAttributes(self)
40080
40081    def hasRequiredElements(self):
40082        r"""
40083        hasRequiredElements(Event self) -> bool
40084
40085        Predicate returning @c True if all the required elements for this Event
40086        object have been set.
40087
40088        @note The required elements for an Event object are:
40089        @li 'trigger' (required in SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1;
40090        optional in SBML Level&nbsp;3 Version&nbsp;2+
40091        @li 'listOfEventAssignments' (required in SBML Level&nbsp;2; optional in Level&nbsp;3)
40092
40093        """
40094        return _libsbml.Event_hasRequiredElements(self)
40095
40096# Register Event in _libsbml:
40097_libsbml.Event_swigregister(Event)
40098
40099class ListOfEvents(ListOf):
40100    r"""
40101
40102    @sbmlpackage{core}
40103
40104    @htmlinclude pkg-marker-core.html A list of Event objects.
40105
40106    @par
40107    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
40108    are merely containers used for organizing the main components of an SBML
40109    model.  In libSBML's implementation, ListOf___
40110    @if conly data structures @else classes@endif@~ are derived from the
40111    intermediate utility @if conly structure @else class@endif@~ ListOf, which
40112    is not defined by the SBML specifications but serves as a useful
40113    programmatic construct.  ListOf is itself is in turn derived from SBase,
40114    which provides all of the various ListOf___
40115    @if conly data structures @else classes@endif@~ with common features
40116    defined by the SBML specification, such as 'metaid' attributes and
40117    annotations.
40118
40119    The relationship between the lists and the rest of an SBML model is
40120    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
40121
40122    @htmlinclude listof-illustration.html
40123
40124    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
40125    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
40126    Version&nbsp;2 allows
40127    containers to contain zero or more of the relevant object, instead of
40128    requiring at least one.  As such, libsbml will write out an
40129    otherwise-empty ListOf___ element that has any optional attribute set
40130    (such as 'id' or 'metaid'), that has an optional child (such
40131    as a 'notes' or 'annotation'), or that has attributes or children set
40132    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
40133    any other children.
40134
40135    Readers may wonder about the motivations for using the ListOf___
40136    containers in SBML.  A simpler approach in XML might be to place the
40137    components all directly at the top level of the model definition.  The
40138    choice made in SBML is to group them within XML elements named after
40139    %ListOf<em>Classname</em>, in part because it helps organize the
40140    components.  More importantly, the fact that the container classes are
40141    derived from SBase means that software tools can add information @em about
40142    the lists themselves into each list container's 'annotation'.
40143
40144    @see ListOfFunctionDefinitions
40145    @see ListOfUnitDefinitions
40146    @see ListOfCompartmentTypes
40147    @see ListOfSpeciesTypes
40148    @see ListOfCompartments
40149    @see ListOfSpecies
40150    @see ListOfParameters
40151    @see ListOfInitialAssignments
40152    @see ListOfRules
40153    @see ListOfConstraints
40154    @see ListOfReactions
40155    @see ListOfEvents
40156
40157    @if conly
40158    @note In the C API for libSBML, functions that in other language APIs
40159    would be inherited by the various ListOf___ structures not shown in the
40160    pages for the individual ListOf___'s.  Instead, the functions are defined
40161    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
40162    the many common functions available for manipulating ListOf___
40163    structures</strong>.  The documentation for the individual ListOf___
40164    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
40165    all of the functionality available. @endif@~
40166
40167    """
40168
40169    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
40170    __repr__ = _swig_repr
40171
40172    def __init__(self, *args):
40173        r"""
40174        __init__(ListOfEvents self, unsigned int level, unsigned int version) -> ListOfEvents
40175        __init__(ListOfEvents self, SBMLNamespaces sbmlns) -> ListOfEvents
40176
40177        This method has multiple variants; they differ in the arguments
40178         they accept.  Each variant is described separately below.
40179
40180        @par
40181        <hr>
40182        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40183         <pre class='signature'>ListOfEvents(SBMLNamespaces sbmlns)</pre>
40184
40185        Creates a new ListOfEvents object.
40186
40187        The object is constructed such that it is valid for the SBML Level and
40188        Version combination determined by the SBMLNamespaces object in @p
40189        sbmlns.
40190
40191        @param sbmlns an SBMLNamespaces object that is used to determine the
40192        characteristics of the ListOfEvents object to be created.
40193
40194        @throws SBMLConstructorException
40195        Thrown if the given @p sbmlns is inconsistent or incompatible
40196        with this object.
40197
40198        @note Attempting to add an object to an SBMLDocument having a different
40199        combination of SBML Level, Version and XML namespaces than the object
40200        itself will result in an error at the time a caller attempts to make the
40201        addition.  A parent object must have compatible Level, Version and XML
40202        namespaces.  (Strictly speaking, a parent may also have more XML
40203        namespaces than a child, but the reverse is not permitted.)  The
40204        restriction is necessary to ensure that an SBML model has a consistent
40205        overall structure.  This requires callers to manage their objects
40206        carefully, but the benefit is increased flexibility in how models can be
40207        created by permitting callers to create objects bottom-up if desired.  In
40208        situations where objects are not yet attached to parents (e.g.,
40209        SBMLDocument), knowledge of the intented SBML Level and Version help
40210        libSBML determine such things as whether it is valid to assign a
40211        particular value to an attribute.
40212
40213
40214        @par
40215        <hr>
40216        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40217         <pre class='signature'>ListOfEvents(long level, long version)</pre>
40218
40219        Creates a new ListOfEvents object.
40220
40221        The object is constructed such that it is valid for the given SBML
40222        Level and Version combination.
40223
40224        @param level the SBML Level.
40225
40226        @param version the Version within the SBML Level.
40227
40228        @throws SBMLConstructorException
40229        Thrown if the given @p level and @p version combination are invalid
40230        or if this object is incompatible with the given level and version.
40231
40232        @note Attempting to add an object to an SBMLDocument having a different
40233        combination of SBML Level, Version and XML namespaces than the object
40234        itself will result in an error at the time a caller attempts to make the
40235        addition.  A parent object must have compatible Level, Version and XML
40236        namespaces.  (Strictly speaking, a parent may also have more XML
40237        namespaces than a child, but the reverse is not permitted.)  The
40238        restriction is necessary to ensure that an SBML model has a consistent
40239        overall structure.  This requires callers to manage their objects
40240        carefully, but the benefit is increased flexibility in how models can be
40241        created by permitting callers to create objects bottom-up if desired.  In
40242        situations where objects are not yet attached to parents (e.g.,
40243        SBMLDocument), knowledge of the intented SBML Level and Version help
40244        libSBML determine such things as whether it is valid to assign a
40245        particular value to an attribute.
40246
40247        """
40248        _libsbml.ListOfEvents_swiginit(self, _libsbml.new_ListOfEvents(*args))
40249
40250    def clone(self):
40251        r"""
40252        clone(ListOfEvents self) -> ListOfEvents
40253
40254        Creates and returns a deep copy of this ListOfEvents object.
40255
40256        @return the (deep) copy of this ListOfEvents object.
40257
40258        """
40259        return _libsbml.ListOfEvents_clone(self)
40260
40261    def getItemTypeCode(self):
40262        r"""
40263        getItemTypeCode(ListOfEvents self) -> int
40264
40265        Returns the libSBML type code for the objects contained in this ListOf
40266        (i.e., Event objects, if the list is non-empty).
40267
40268        @par
40269        LibSBML attaches an identifying code to every kind of SBML object.  These
40270        are integer constants known as <em>SBML type codes</em>.  The names of all
40271        the codes begin with the characters <code>SBML_</code>.
40272        @if clike The set of possible type codes for core elements is defined in
40273        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
40274        SBML Level&nbsp;3 packages define their own extra enumerations of type
40275        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
40276        package).@endif@if java In the Java language interface for libSBML, the
40277        type codes are defined as static integer constants in the interface class
40278        {@link libsbmlConstants}.  @endif@if python In the Python language
40279        interface for libSBML, the type codes are defined as static integer
40280        constants in the interface class @link libsbml@endlink.@endif@if csharp In
40281        the C# language interface for libSBML, the type codes are defined as
40282        static integer constants in the interface class
40283        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
40284        package plug-ins may use overlapping type codes; to identify the package
40285        to which a given object belongs, call the
40286        <code>@if conly SBase_getPackageName()
40287        @else SBase.getPackageName()
40288        @endif</code>
40289        method on the object.
40290
40291        The exception to this is lists:  all SBML-style list elements have the type
40292        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
40293        are from.
40294
40295        @return the SBML type code for the objects contained in this ListOf:
40296        @link libsbml#SBML_EVENT SBML_EVENT@endlink (default).
40297
40298        @see getElementName()
40299        @see getPackageName()
40300
40301        """
40302        return _libsbml.ListOfEvents_getItemTypeCode(self)
40303
40304    def getElementName(self):
40305        r"""
40306        getElementName(ListOfEvents self) -> string
40307
40308        Returns the XML element name of this object.
40309
40310        For ListOfEvents, the XML element name is @c 'listOfEvents'.
40311
40312        @return the name of this element, i.e., @c 'listOfEvents'.
40313
40314        """
40315        return _libsbml.ListOfEvents_getElementName(self)
40316
40317    def get(self, *args):
40318        r"""
40319        get(ListOfEvents self, unsigned int n) -> Event
40320        get(ListOfEvents self, unsigned int n) -> Event
40321        get(ListOfEvents self, string sid) -> Event
40322        get(ListOfEvents self, string sid) -> Event
40323
40324        This method has multiple variants; they differ in the arguments
40325         they accept.  Each variant is described separately below.
40326
40327        @par
40328        <hr>
40329        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40330         <pre class='signature'>get(long n)</pre>
40331
40332        Get an Event from the ListOfEvents.
40333
40334        @param n the index number of the Event to get.
40335
40336        @return the <code>n</code>th Event in this ListOfEvents.
40337
40338        @see size()
40339
40340
40341        @par
40342        <hr>
40343        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40344         <pre class='signature'>get(string sid)</pre>
40345
40346        Get an Event from the ListOfEvents
40347        based on its identifier.
40348
40349        @param sid a string representing the identifier
40350        of the Event to get.
40351
40352        @return Event in this ListOfEvents
40353        with the given @p sid or @c None if no such
40354        Event exists.
40355
40356        @see get()
40357        @see size()
40358
40359        """
40360        return _libsbml.ListOfEvents_get(self, *args)
40361
40362    def remove(self, *args):
40363        r"""
40364        remove(ListOfEvents self, unsigned int n) -> Event
40365        remove(ListOfEvents self, string sid) -> Event
40366
40367        This method has multiple variants; they differ in the arguments
40368         they accept.  Each variant is described separately below.
40369
40370        @par
40371        <hr>
40372        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40373         <pre class='signature'>remove(long n)</pre>
40374
40375        Removes the nth item from this ListOfEvents items and returns a pointer to
40376        it.
40377
40378        The caller owns the returned item and is responsible for deleting it.
40379
40380        @param n the index of the item to remove.
40381
40382        @see size()
40383
40384
40385        @par
40386        <hr>
40387        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40388         <pre class='signature'>remove(string sid)</pre>
40389
40390        Removes item in this ListOfEvents items with the given identifier.
40391
40392        The caller owns the returned item and is responsible for deleting it.
40393        If none of the items in this list have the identifier @p sid, then
40394        @c None is returned.
40395
40396        @param sid the identifier of the item to remove.
40397
40398        @return the item removed.  As mentioned above, the caller owns the
40399        returned item.
40400
40401        """
40402        return _libsbml.ListOfEvents_remove(self, *args)
40403    __swig_destroy__ = _libsbml.delete_ListOfEvents
40404
40405# Register ListOfEvents in _libsbml:
40406_libsbml.ListOfEvents_swigregister(ListOfEvents)
40407
40408class EventAssignment(SBase):
40409    r"""
40410
40411    @sbmlpackage{core}
40412
40413    @htmlinclude pkg-marker-core.html An assignment to a variable by an SBML <em>event</em>.
40414
40415    Event contains an optional element called 'listOfEventAssignments', of
40416    class ListOfEventAssignments.  In every instance of an event definition
40417    in a model, the object's 'listOfEventAssignments' element must have a
40418    non-empty list of one or more 'eventAssignment' elements of class
40419    EventAssignment.  The object class EventAssignment has one required
40420    attribute, 'variable', and a required element, 'math'.  Being derived
40421    from SBase, it also has all the usual attributes and elements of its
40422    parent class.
40423
40424    An Event object defines when the event can occur, the variables that are
40425    affected by the event, and how the variables are affected.  The purpose
40426    of the EventAssignment object class is to define how variables are
40427    affected by an Event.  In SBML Level&nbsp;2, every Event object instance
40428    must have a nonempty list of event assignments; in SBML Level&nbsp;3,
40429    the list of assignments is optional.
40430
40431    The operation of an Event is divided into two phases (regardless of
40432    whether a delay is involved): one phase when the event is @em triggered,
40433    and the other when the event is @em executed.   EventAssignment objects
40434    are interpreted when an event is executed.  The effects are described
40435    below.
40436
40437    @section event-variable The attribute 'variable'
40438
40439    The EventAssignment attribute 'variable' must be the identifier of an
40440    existing Compartment, Species, SpeciesReference, or Parameter
40441    instance defined in the model.  In SBML Level&nbsp;3 Version&nbsp;2,
40442    this list was expanded to include identifiers of SBML Level&nbsp;3
40443    package variables that have both mathematical meaning and the
40444    ability to be assigned.  When the event is executed, the value of
40445    the model component identified by 'variable' is changed by the
40446    EventAssignment to the value computed by the 'math' element; that is, a
40447    species' quantity, species reference's stoichiometry, compartment's size
40448    or parameter's value are reset to the value computed by 'math'.
40449
40450    Certain restrictions are placed on what can appear in 'variable':
40451    <ul>
40452    <li> The object identified by the value of the EventAssignment attribute
40453    'variable' must not have its 'constant' attribute set to or default to
40454    @c True.  (Constants cannot be affected by events.)
40455
40456    <li> The 'variable' attribute must not contain the identifier of a
40457    reaction.  In SBML Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1,
40458    only species, species references, compartment and parameter
40459    values may be set by an Event.  In SBML Level&nbsp;3 Version&nbsp;2,
40460    the 'variable' attribute may also be the identifier of an SBML
40461    Level&nbsp;3 package element with mathematical meaning and the
40462    ability to be assigned a value.  This situation may only arise if
40463    the SBML package is present in the SBML document with a
40464    package:required attribute of @c True
40465
40466    <li> The value of every 'variable' attribute must be unique among the set
40467    of EventAssignment structures within a given Event structure.  In other
40468    words, a single event cannot have multiple EventAssignment objects
40469    assigning the same variable.  (All of them would be performed at the
40470    same time when that particular Event triggers, resulting in
40471    indeterminacy.)  However, @em separate Event instances can refer to the
40472    same variable.
40473
40474    <li> A variable cannot be assigned a value in an EventAssignment object
40475    instance and also be assigned a value by an AssignmentRule; i.e., the
40476    value of an EventAssignment's 'variable' attribute cannot be the same as
40477    the value of a AssignmentRule' 'variable' attribute.  (Assignment rules
40478    hold at all times, therefore it would be inconsistent to also define an
40479    event that reassigns the value of the same variable.)
40480    </ul>
40481
40482    If the variable attribute of an EventAssignment object references an
40483    object in an SBML namespace that is not understood by the interpreter
40484    reading a given SBML document (that is, if the object is defined by an
40485    SBML Level&nbsp;3 package that the software does not support), the
40486    event assignment must be ignored--the object's value will not need to
40487    be set, as the interpreter could not understand that package. If an
40488    interpreter cannot establish whether a referenced object is missing
40489    from the model or instead is defined in an SBML namespace not
40490    understood by the interpreter, it may produce a warning to the user.
40491    (The latter situation may only arise if an SBML package is present in
40492    the SBML document with a package:required attribute of 'true'.)
40493
40494    Note that the time of assignment of the object identified by the
40495    value of the 'variable' attribute is always the time at which the Event
40496    is <em>executed</em>, not when it is <em>triggered</em>.  The timing is
40497    controlled by the optional Delay in an Event.  The time of
40498    assignment is not affected by the 'useValuesFromTriggerTime'
40499    attribute on Event---that attribute affects the time at which the
40500    EventAssignment's 'math' expression is @em evaluated.  In other
40501    words, SBML allows decoupling the time at which the
40502    'variable' is assigned from the time at which its value
40503    expression is calculated.
40504
40505    @section event-math The 'math' subelement in an EventAssignment
40506
40507    The MathML expression contained in an EventAssignment defines the new
40508    value of the variable being assigned by the Event.
40509
40510    As mentioned above, the time at which the expression in 'math' is
40511    evaluated is determined by the attribute 'useValuesFromTriggerTime' on
40512    Event.  If the attribute value is @c True, the expression must be
40513    evaluated when the event is @em triggered; more precisely, the values of
40514    identifiers occurring in MathML <code>&lt;ci&gt;</code> elements in the
40515    EventAssignment's 'math' expression are the values they have at the
40516    point when the event @em triggered.  If, instead,
40517    'useValuesFromTriggerTime''s value is @c False, it means the values at
40518    @em execution time should be used; that is, the values of identifiers
40519    occurring in MathML <code>&lt;ci&gt;</code> elements in the
40520    EventAssignment's 'math' expression are the values they have at the
40521    point when the event @em executed.
40522
40523    @section eventassignment-version-diffs SBML Level/Version differences
40524
40525    Between Version&nbsp;4 and previous versions of SBML Level&nbsp;2, the
40526    requirements regarding the matching of units between an
40527    EvengAssignment's formula and the units of the object identified by the
40528    'variable' attribute changed.  Previous versions required consistency,
40529    but in SBML Level&nbsp;2 Version&nbsp;4 and in SBML Level&nbsp;3, unit
40530    consistency is only @em recommended.  More precisely:
40531    <ul>
40532
40533    <li> In the case of a species, an EventAssignment sets the referenced
40534    species' quantity (concentration or amount of substance) to the value
40535    determined by the formula in the EventAssignment's 'math' subelement.
40536    The units of the 'math' formula should (in SBML Level&nbsp;2
40537    Version&nbsp;4 and in Level&nbsp;3) or must (in previous Versions of
40538    Level&nbsp;2) be identical to the units of the species.
40539
40540    <li> (SBML Level&nbsp;3 only.) In the case of a species reference, an
40541    EventAssignment sets the stoichiometry of the reactant or product
40542    referenced by the SpeciesReference object to the value determined by the
40543    formula in the 'math' element.  The unit associated with the value
40544    produced by the 'math' formula should be @c dimensionless, because
40545    reactant and product stoichiometries in reactions are dimensionless
40546    quantities.
40547
40548    <li> In the case of a compartment, an EventAssignment sets the
40549    referenced compartment's size to the size determined by the formula in
40550    the 'math' subelement of the EventAssignment.  The overall units of the
40551    formula should (in SBML Level&nbsp;2 Version&nbsp;4 and in Level&nbsp;3)
40552    or must (in previous Versions of Level&nbsp;2) be identical to the units
40553    specified for the size of the compartment identified by the
40554    EventAssignment's 'variable' attribute.
40555
40556    <li> In the case of a parameter, an EventAssignment sets the referenced
40557    parameter's value to that determined by the formula in 'math'.  The
40558    overall units of the formula should (in SBML Level&nbsp;2 Version&nbsp;4
40559    and Level&nbsp;3) or must (in previous Versions of Level&nbsp;2) be
40560    identical to the units defined for the parameter.
40561
40562    <li> (For SBML Level&nbsp;3 Version&nbsp;2 only) <em>In the case of
40563    an object from an SBML Level&nbsp;3 package</em>, an EventAssignment sets
40564    the referenced object's value (as defined by that package) to the
40565    value of the formula in 'math'. The unit of measurement associated
40566    with the value produced by the formula should be the same as that
40567    object's units attribute value (if it has such an attribute), or be
40568    equal to the units of model components of that type (if objects of
40569    that class are defined by the package as having the same units).
40570    </ul>
40571
40572    Note that the formula placed in the 'math' element <em>has no assumed
40573    units</em>.  The consistency of the units of the formula, and the units
40574    of the entity which the assignment affects, must be explicitly
40575    established just as in the case of the value of the Delay subelement.
40576    An approach similar to the one discussed in the context of Delay may be
40577    used for the formula of an EventAssignment.
40578
40579    @section event-asnt-restrictions Restrictions relaxed in SBML Level&nbsp;3 Version&nbsp;2
40580
40581    In SBML Level&nbsp;3 Version&nbsp;2, the requirement that an EventAssignment
40582    have a 'math' subelement was relaxed, making it optional.  In
40583    this case, the EventAssignment remains undefined, and unless that information
40584    is provided in some other form (such as with an SBML Level&nbsp;3
40585    package), the Event behaves as if it had no EventAssignment.
40586
40587    @see Event
40588
40589    """
40590
40591    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
40592    __repr__ = _swig_repr
40593    __swig_destroy__ = _libsbml.delete_EventAssignment
40594
40595    def __init__(self, *args):
40596        r"""
40597        __init__(EventAssignment self, unsigned int level, unsigned int version) -> EventAssignment
40598        __init__(EventAssignment self, SBMLNamespaces sbmlns) -> EventAssignment
40599        __init__(EventAssignment self, EventAssignment orig) -> EventAssignment
40600
40601        This method has multiple variants; they differ in the arguments
40602         they accept.  Each variant is described separately below.
40603
40604        @par
40605        <hr>
40606        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40607         <pre class='signature'>EventAssignment(SBMLNamespaces sbmlns)</pre>
40608
40609        Creates a new EventAssignment using the given SBMLNamespaces object
40610        @p sbmlns.
40611
40612        @par
40613        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
40614        information.  It is used to communicate the SBML Level, Version, and (in
40615        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
40616        common approach to using libSBML's SBMLNamespaces facilities is to create an
40617        SBMLNamespaces object somewhere in a program once, then hand that object
40618        as needed to object constructors that accept SBMLNamespaces as arguments.
40619
40620        @param sbmlns an SBMLNamespaces object.
40621
40622        @throws SBMLConstructorException
40623        Thrown if the given @p sbmlns is inconsistent or incompatible
40624        with this object.
40625
40626        @note Attempting to add an object to an SBMLDocument having a different
40627        combination of SBML Level, Version and XML namespaces than the object
40628        itself will result in an error at the time a caller attempts to make the
40629        addition.  A parent object must have compatible Level, Version and XML
40630        namespaces.  (Strictly speaking, a parent may also have more XML
40631        namespaces than a child, but the reverse is not permitted.)  The
40632        restriction is necessary to ensure that an SBML model has a consistent
40633        overall structure.  This requires callers to manage their objects
40634        carefully, but the benefit is increased flexibility in how models can be
40635        created by permitting callers to create objects bottom-up if desired.  In
40636        situations where objects are not yet attached to parents (e.g.,
40637        SBMLDocument), knowledge of the intented SBML Level and Version help
40638        libSBML determine such things as whether it is valid to assign a
40639        particular value to an attribute.
40640
40641
40642        @par
40643        <hr>
40644        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40645         <pre class='signature'>EventAssignment(long level, long version)</pre>
40646
40647        Creates a new EventAssignment using the given SBML @p level and @p version
40648        values.
40649
40650        @param level a long integer, the SBML Level to assign to this EventAssignment.
40651
40652        @param version a long integer, the SBML Version to assign to this
40653        EventAssignment.
40654
40655        @throws SBMLConstructorException
40656        Thrown if the given @p level and @p version combination are invalid
40657        or if this object is incompatible with the given level and version.
40658
40659        @note Attempting to add an object to an SBMLDocument having a different
40660        combination of SBML Level, Version and XML namespaces than the object
40661        itself will result in an error at the time a caller attempts to make the
40662        addition.  A parent object must have compatible Level, Version and XML
40663        namespaces.  (Strictly speaking, a parent may also have more XML
40664        namespaces than a child, but the reverse is not permitted.)  The
40665        restriction is necessary to ensure that an SBML model has a consistent
40666        overall structure.  This requires callers to manage their objects
40667        carefully, but the benefit is increased flexibility in how models can be
40668        created by permitting callers to create objects bottom-up if desired.  In
40669        situations where objects are not yet attached to parents (e.g.,
40670        SBMLDocument), knowledge of the intented SBML Level and Version help
40671        libSBML determine such things as whether it is valid to assign a
40672        particular value to an attribute.
40673
40674
40675        @par
40676        <hr>
40677        <span class='variant-sig-heading'>Method variant with the following signature</span>:
40678         <pre class='signature'>EventAssignment(EventAssignment orig)</pre>
40679
40680        Copy constructor; creates a copy of this EventAssignment.
40681
40682        @param orig the object to copy.
40683
40684        """
40685        _libsbml.EventAssignment_swiginit(self, _libsbml.new_EventAssignment(*args))
40686
40687    def clone(self):
40688        r"""
40689        clone(EventAssignment self) -> EventAssignment
40690
40691        Creates and returns a deep copy of this EventAssignment object.
40692
40693        @return the (deep) copy of this EventAssignment object.
40694
40695        """
40696        return _libsbml.EventAssignment_clone(self)
40697
40698    def getVariable(self):
40699        r"""
40700        getVariable(EventAssignment self) -> string
40701
40702        Get the value of this EventAssignment's 'variable' attribute.
40703
40704        @return the identifier stored in the 'variable' attribute of this
40705        EventAssignment.
40706
40707        """
40708        return _libsbml.EventAssignment_getVariable(self)
40709
40710    def getMath(self):
40711        r"""
40712        getMath(EventAssignment self) -> ASTNode
40713
40714        Get the mathematical expression in this EventAssignment's 'math'
40715        subelement.
40716
40717        @return the top ASTNode of an abstract syntax tree representing the
40718        mathematical formula in this EventAssignment, or @c None if the math is not set.
40719
40720        """
40721        return _libsbml.EventAssignment_getMath(self)
40722
40723    def isSetVariable(self):
40724        r"""
40725        isSetVariable(EventAssignment self) -> bool
40726
40727        Predicate for testing whether the attribute 'variable' of this
40728        EventAssignment is set.
40729
40730        @return @c True if the 'variable' attribute of this EventAssignment
40731        is set, @c False otherwise.
40732
40733        """
40734        return _libsbml.EventAssignment_isSetVariable(self)
40735
40736    def isSetMath(self):
40737        r"""
40738        isSetMath(EventAssignment self) -> bool
40739
40740        Predicate for testing whether the 'math' subelement of this
40741        EventAssignment is set.
40742
40743        @return @c True if this EventAssignment has a 'math' subelement,
40744        @c False otherwise.
40745
40746        """
40747        return _libsbml.EventAssignment_isSetMath(self)
40748
40749    def setVariable(self, sid):
40750        r"""
40751        setVariable(EventAssignment self, string sid) -> int
40752
40753        Sets the attribute 'variable' of this EventAssignment to a copy of
40754        the given identifier string.
40755
40756        @param sid the identifier of an element defined in this model that
40757        can vary over time.
40758
40759        @return integer value indicating success/failure of the
40760        function.  @if clike The value is drawn from the
40761        enumeration #OperationReturnValues_t. @endif@~ The possible values
40762        returned by this function are:
40763        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
40764        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
40765
40766        """
40767        return _libsbml.EventAssignment_setVariable(self, sid)
40768
40769    def unsetVariable(self):
40770        r"""
40771        unsetVariable(EventAssignment self) -> int
40772
40773        Unsets the attribute 'variable' of this EventAssignment.
40774
40775        @return integer value indicating success/failure of the
40776        function.  @if clike The value is drawn from the
40777        enumeration #OperationReturnValues_t. @endif@~ The possible values
40778        returned by this function are:
40779        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
40780        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
40781
40782        """
40783        return _libsbml.EventAssignment_unsetVariable(self)
40784
40785    def setMath(self, math):
40786        r"""
40787        setMath(EventAssignment self, ASTNode math) -> int
40788
40789        Sets the 'math' subelement of this EventAssignment to a copy of the
40790        given ASTNode.
40791
40792        @param math an ASTNode that will be copied and stored as the
40793        mathematical formula for this EventAssignment.
40794
40795        @return integer value indicating success/failure of the
40796        function.  @if clike The value is drawn from the
40797        enumeration #OperationReturnValues_t. @endif@~ The possible values
40798        returned by this function are:
40799        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
40800        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
40801
40802        """
40803        return _libsbml.EventAssignment_setMath(self, math)
40804
40805    def getDerivedUnitDefinition(self, *args):
40806        r"""
40807        getDerivedUnitDefinition(EventAssignment self) -> UnitDefinition
40808        getDerivedUnitDefinition(EventAssignment self) -> UnitDefinition
40809
40810        Calculates and returns a UnitDefinition that expresses the units of
40811        measurement assumed for the 'math' expression of this EventAssignment.
40812
40813        @par
40814        The units are calculated based on the mathematical expression in the
40815        EventAssignment and the model quantities referenced by
40816        <code>&lt;ci&gt;</code> elements used within that expression.  The method
40817        getDerivedUnitDefinition() returns the calculated units,
40818        to the extent that libSBML can compute them.
40819
40820        @note The functionality that facilitates unit analysis depends on the
40821        model as a whole.  Thus, in cases where the object has not been added to
40822        a model or the model itself is incomplete, unit analysis is not possible
40823        and this method will return @c None.
40824
40825        @warning Note that it is possible the 'math' expression in the
40826        EventAssignment contains literal numbers or parameters with undeclared
40827        units.  In those cases, it is not possible to calculate the units of the
40828        overall expression without making assumptions.  LibSBML does not make
40829        assumptions about the units, and
40830        getDerivedUnitDefinition() only returns the units as far
40831        as it is able to determine them.  For example, in an expression <em>X +
40832        Y</em>, if <em>X</em> has unambiguously-defined units and <em>Y</em> does
40833        not, it will return the units of <em>X</em>.  When using this method,
40834        <strong>it is critical that callers also invoke the method</strong>
40835        containsUndeclaredUnits() <strong>to determine whether
40836        this situation holds</strong>.  Callers should take suitable action in
40837        those situations.
40838
40839        @return a UnitDefinition that expresses the units of the math
40840        expression of this EventAssignment, or @c None if one cannot be constructed.
40841
40842        @see containsUndeclaredUnits()
40843
40844        """
40845        return _libsbml.EventAssignment_getDerivedUnitDefinition(self, *args)
40846
40847    def containsUndeclaredUnits(self, *args):
40848        r"""
40849        containsUndeclaredUnits(EventAssignment self) -> bool
40850        containsUndeclaredUnits(EventAssignment self) -> bool
40851
40852        Predicate returning @c True if the math expression of this
40853        EventAssignment contains literal numbers or parameters with undeclared
40854        units.
40855
40856        @par
40857        The units are calculated based on the mathematical expression in the
40858        EventAssignment and the model quantities referenced by
40859        <code>&lt;ci&gt;</code> elements used within that expression.  The method
40860        getDerivedUnitDefinition() returns the calculated units,
40861        to the extent that libSBML can compute them.
40862
40863        If the expression contains literal numbers or parameters with undeclared
40864        units, libSBML may not be able to compute the full units of the
40865        expression and will only return what it can compute.  Callers should
40866        always use containsUndeclaredUnits() when using
40867        getDerivedUnitDefinition() to decide whether the
40868        returned units may be incomplete.
40869
40870        @return @c True if the math expression of this EventAssignment
40871        includes parameters/numbers
40872        with undeclared units, @c False otherwise.
40873
40874        @note A return value of @c True indicates that the UnitDefinition
40875        returned by getDerivedUnitDefinition() may not
40876        accurately represent the units of the expression.
40877
40878        @see getDerivedUnitDefinition()
40879
40880        """
40881        return _libsbml.EventAssignment_containsUndeclaredUnits(self, *args)
40882
40883    def getTypeCode(self):
40884        r"""
40885        getTypeCode(EventAssignment self) -> int
40886
40887        Returns the libSBML type code of this object instance.
40888
40889        @par
40890        LibSBML attaches an identifying code to every kind of SBML object.  These
40891        are integer constants known as <em>SBML type codes</em>.  The names of all
40892        the codes begin with the characters <code>SBML_</code>.
40893        @if clike The set of possible type codes for core elements is defined in
40894        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
40895        SBML Level&nbsp;3 packages define their own extra enumerations of type
40896        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
40897        package).@endif@if java In the Java language interface for libSBML, the
40898        type codes are defined as static integer constants in the interface class
40899        {@link libsbmlConstants}.  @endif@if python In the Python language
40900        interface for libSBML, the type codes are defined as static integer
40901        constants in the interface class @link libsbml@endlink.@endif@if csharp In
40902        the C# language interface for libSBML, the type codes are defined as
40903        static integer constants in the interface class
40904        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
40905        package plug-ins may use overlapping type codes; to identify the package
40906        to which a given object belongs, call the
40907        <code>@if conly SBase_getPackageName()
40908        @else SBase.getPackageName()
40909        @endif</code>
40910        method on the object.
40911
40912        The exception to this is lists:  all SBML-style list elements have the type
40913        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
40914        are from.
40915
40916        @return the SBML type code for this object:
40917        @link libsbml#SBML_EVENT_ASSIGNMENT SBML_EVENT_ASSIGNMENT@endlink (default).
40918
40919        @warning <span class='warning'>The specific integer values of the possible
40920        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
40921        packages,  To fully identify the correct code, <strong>it is necessary to
40922        invoke both getPackageName() and getTypeCode()</strong> (or
40923        ListOf.getItemTypeCode()).</span>
40924
40925        @see getElementName()
40926        @see getPackageName()
40927
40928        """
40929        return _libsbml.EventAssignment_getTypeCode(self)
40930
40931    def getElementName(self):
40932        r"""
40933        getElementName(EventAssignment self) -> string
40934
40935        Returns the XML element name of this object, which for
40936        EventAssignment, is always @c 'eventAssignment'.
40937
40938        @return the name of this element, i.e., @c 'eventAssignment'.
40939
40940        """
40941        return _libsbml.EventAssignment_getElementName(self)
40942
40943    def hasRequiredAttributes(self):
40944        r"""
40945        hasRequiredAttributes(EventAssignment self) -> bool
40946
40947        Predicate returning @c True if all the required attributes for this
40948        EventAssignment object have been set.
40949
40950        The required attributes for a EventAssignment object are:
40951        @li 'variable'
40952
40953        @return @c True if the required attributes have been set, @c False
40954        otherwise.
40955
40956        """
40957        return _libsbml.EventAssignment_hasRequiredAttributes(self)
40958
40959    def hasRequiredElements(self):
40960        r"""
40961        hasRequiredElements(EventAssignment self) -> bool
40962
40963        Predicate returning @c True if all the required elements for this
40964        EventAssignment object have been set.
40965
40966        @note The required elements for an EventAssignment object are:
40967        @li 'math' in SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
40968        (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
40969
40970        @return a boolean value indicating whether all the required
40971        elements for this object have been defined.
40972
40973        """
40974        return _libsbml.EventAssignment_hasRequiredElements(self)
40975
40976    def getId(self):
40977        r"""
40978        getId(EventAssignment self) -> string
40979
40980        Returns the value of the 'variable' attribute of this EventAssignment (NOT the 'id').
40981
40982        @note Because of the inconsistent behavior of this function with
40983        respect to assignments and rules, it is now recommended to
40984        use the getIdAttribute() or getVariable() instead.
40985
40986        The 'variable' attribute of an EventAssignment indicates the element which
40987        the results of the 'math' are to be applied upon Event execution.
40988
40989        @return the variable of this EventAssignment.
40990
40991        @see getIdAttribute()
40992        @see setIdAttribute()
40993        @see isSetIdAttribute()
40994        @see unsetIdAttribute()
40995        @see getVariable()
40996
40997        """
40998        return _libsbml.EventAssignment_getId(self)
40999
41000    def renameSIdRefs(self, oldid, newid):
41001        r"""
41002        renameSIdRefs(EventAssignment self, string oldid, string newid)
41003
41004        Replaces all uses of a given @c SIdRef type attribute value with another
41005        value.
41006
41007        @par
41008        In SBML, object identifiers are of a data type called <code>SId</code>.
41009        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
41010        introduced for attribute values that refer to <code>SId</code> values; in
41011        previous Levels of SBML, this data type did not exist and attributes were
41012        simply described to as 'referring to an identifier', but the effective
41013        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
41014        other methods of libSBML refer to the type <code>SIdRef</code> for all
41015        Levels of SBML, even if the corresponding SBML specification did not
41016        explicitly name the data type.
41017
41018        This method works by looking at all attributes and (if appropriate)
41019        mathematical formulas in MathML content, comparing the referenced
41020        identifiers to the value of @p oldid.  If any matches are found, the
41021        matching values are replaced with @p newid.  The method does @em not
41022        descend into child elements.
41023
41024        @param oldid the old identifier.
41025        @param newid the new identifier.
41026
41027        """
41028        return _libsbml.EventAssignment_renameSIdRefs(self, oldid, newid)
41029
41030    def renameUnitSIdRefs(self, oldid, newid):
41031        r"""
41032        renameUnitSIdRefs(EventAssignment self, string oldid, string newid)
41033
41034        Replaces all uses of a given @c UnitSIdRef type attribute value with
41035        another value.
41036
41037        @par
41038        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
41039        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
41040        introduced for attribute values that refer to <code>UnitSId</code> values; in
41041        previous Levels of SBML, this data type did not exist and attributes were
41042        simply described to as 'referring to a unit identifier', but the effective
41043        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
41044        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
41045        Levels of SBML, even if the corresponding SBML specification did not
41046        explicitly name the data type.
41047
41048        This method works by looking at all unit identifier attribute values
41049        (including, if appropriate, inside mathematical formulas), comparing the
41050        referenced unit identifiers to the value of @p oldid.  If any matches
41051        are found, the matching values are replaced with @p newid.  The method
41052        does @em not descend into child elements.
41053
41054        @param oldid the old identifier.
41055        @param newid the new identifier.
41056
41057        """
41058        return _libsbml.EventAssignment_renameUnitSIdRefs(self, oldid, newid)
41059
41060    def replaceSIDWithFunction(self, id, function):
41061        r"""
41062        replaceSIDWithFunction(EventAssignment self, string id, ASTNode function)
41063
41064        @internal
41065
41066        @internal
41067
41068        """
41069        return _libsbml.EventAssignment_replaceSIDWithFunction(self, id, function)
41070
41071    def divideAssignmentsToSIdByFunction(self, id, function):
41072        r"""
41073        divideAssignmentsToSIdByFunction(EventAssignment self, string id, ASTNode function)
41074
41075        @internal
41076
41077        @internal
41078
41079        """
41080        return _libsbml.EventAssignment_divideAssignmentsToSIdByFunction(self, id, function)
41081
41082    def multiplyAssignmentsToSIdByFunction(self, id, function):
41083        r"""
41084        multiplyAssignmentsToSIdByFunction(EventAssignment self, string id, ASTNode function)
41085
41086        @internal
41087
41088        @internal
41089
41090        """
41091        return _libsbml.EventAssignment_multiplyAssignmentsToSIdByFunction(self, id, function)
41092
41093# Register EventAssignment in _libsbml:
41094_libsbml.EventAssignment_swigregister(EventAssignment)
41095
41096class ListOfEventAssignments(ListOf):
41097    r"""
41098
41099    @sbmlpackage{core}
41100
41101    @htmlinclude pkg-marker-core.html A list of EventAssignment objects.
41102
41103    @par
41104    The various ListOf___ @if conly structures @else classes@endif@~ in SBML
41105    are merely containers used for organizing the main components of an SBML
41106    model.  In libSBML's implementation, ListOf___
41107    @if conly data structures @else classes@endif@~ are derived from the
41108    intermediate utility @if conly structure @else class@endif@~ ListOf, which
41109    is not defined by the SBML specifications but serves as a useful
41110    programmatic construct.  ListOf is itself is in turn derived from SBase,
41111    which provides all of the various ListOf___
41112    @if conly data structures @else classes@endif@~ with common features
41113    defined by the SBML specification, such as 'metaid' attributes and
41114    annotations.
41115
41116    The relationship between the lists and the rest of an SBML model is
41117    illustrated by the following (for SBML Level&nbsp;2 Version&nbsp;4):
41118
41119    @htmlinclude listof-illustration.html
41120
41121    SBML Level&nbsp;3 Version&nbsp;1 has essentially the same structure as
41122    Level&nbsp;2 Version&nbsp;4, depicted above, but SBML Level&nbsp;3
41123    Version&nbsp;2 allows
41124    containers to contain zero or more of the relevant object, instead of
41125    requiring at least one.  As such, libsbml will write out an
41126    otherwise-empty ListOf___ element that has any optional attribute set
41127    (such as 'id' or 'metaid'), that has an optional child (such
41128    as a 'notes' or 'annotation'), or that has attributes or children set
41129    from any SBML Level&nbsp;3 package, whether or not the ListOf___ has
41130    any other children.
41131
41132    Readers may wonder about the motivations for using the ListOf___
41133    containers in SBML.  A simpler approach in XML might be to place the
41134    components all directly at the top level of the model definition.  The
41135    choice made in SBML is to group them within XML elements named after
41136    %ListOf<em>Classname</em>, in part because it helps organize the
41137    components.  More importantly, the fact that the container classes are
41138    derived from SBase means that software tools can add information @em about
41139    the lists themselves into each list container's 'annotation'.
41140
41141    @see ListOfFunctionDefinitions
41142    @see ListOfUnitDefinitions
41143    @see ListOfCompartmentTypes
41144    @see ListOfSpeciesTypes
41145    @see ListOfCompartments
41146    @see ListOfSpecies
41147    @see ListOfParameters
41148    @see ListOfInitialAssignments
41149    @see ListOfRules
41150    @see ListOfConstraints
41151    @see ListOfReactions
41152    @see ListOfEvents
41153
41154    @if conly
41155    @note In the C API for libSBML, functions that in other language APIs
41156    would be inherited by the various ListOf___ structures not shown in the
41157    pages for the individual ListOf___'s.  Instead, the functions are defined
41158    on ListOf_t.  <strong>Please consult the documentation for ListOf_t for
41159    the many common functions available for manipulating ListOf___
41160    structures</strong>.  The documentation for the individual ListOf___
41161    structures (ListOfCompartments_t, ListOfReactions_t, etc.) does not reveal
41162    all of the functionality available. @endif@~
41163
41164    """
41165
41166    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
41167    __repr__ = _swig_repr
41168
41169    def __init__(self, *args):
41170        r"""
41171        __init__(ListOfEventAssignments self, unsigned int level, unsigned int version) -> ListOfEventAssignments
41172        __init__(ListOfEventAssignments self, SBMLNamespaces sbmlns) -> ListOfEventAssignments
41173
41174        This method has multiple variants; they differ in the arguments
41175         they accept.  Each variant is described separately below.
41176
41177        @par
41178        <hr>
41179        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41180         <pre class='signature'>ListOfEventAssignments(SBMLNamespaces sbmlns)</pre>
41181
41182        Creates a new ListOfEventAssignments object.
41183
41184        The object is constructed such that it is valid for the SBML Level and
41185        Version combination determined by the SBMLNamespaces object in @p
41186        sbmlns.
41187
41188        @param sbmlns an SBMLNamespaces object that is used to determine the
41189        characteristics of the ListOfEventAssignments object to be created.
41190
41191        @throws SBMLConstructorException
41192        Thrown if the given @p sbmlns is inconsistent or incompatible
41193        with this object.
41194
41195        @note Attempting to add an object to an SBMLDocument having a different
41196        combination of SBML Level, Version and XML namespaces than the object
41197        itself will result in an error at the time a caller attempts to make the
41198        addition.  A parent object must have compatible Level, Version and XML
41199        namespaces.  (Strictly speaking, a parent may also have more XML
41200        namespaces than a child, but the reverse is not permitted.)  The
41201        restriction is necessary to ensure that an SBML model has a consistent
41202        overall structure.  This requires callers to manage their objects
41203        carefully, but the benefit is increased flexibility in how models can be
41204        created by permitting callers to create objects bottom-up if desired.  In
41205        situations where objects are not yet attached to parents (e.g.,
41206        SBMLDocument), knowledge of the intented SBML Level and Version help
41207        libSBML determine such things as whether it is valid to assign a
41208        particular value to an attribute.
41209
41210
41211        @par
41212        <hr>
41213        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41214         <pre class='signature'>ListOfEventAssignments(long level, long version)</pre>
41215
41216        Creates a new ListOfEventAssignments object.
41217
41218        The object is constructed such that it is valid for the given SBML
41219        Level and Version combination.
41220
41221        @param level the SBML Level.
41222
41223        @param version the Version within the SBML Level.
41224
41225        @throws SBMLConstructorException
41226        Thrown if the given @p level and @p version combination are invalid
41227        or if this object is incompatible with the given level and version.
41228
41229        @note Attempting to add an object to an SBMLDocument having a different
41230        combination of SBML Level, Version and XML namespaces than the object
41231        itself will result in an error at the time a caller attempts to make the
41232        addition.  A parent object must have compatible Level, Version and XML
41233        namespaces.  (Strictly speaking, a parent may also have more XML
41234        namespaces than a child, but the reverse is not permitted.)  The
41235        restriction is necessary to ensure that an SBML model has a consistent
41236        overall structure.  This requires callers to manage their objects
41237        carefully, but the benefit is increased flexibility in how models can be
41238        created by permitting callers to create objects bottom-up if desired.  In
41239        situations where objects are not yet attached to parents (e.g.,
41240        SBMLDocument), knowledge of the intented SBML Level and Version help
41241        libSBML determine such things as whether it is valid to assign a
41242        particular value to an attribute.
41243
41244        """
41245        _libsbml.ListOfEventAssignments_swiginit(self, _libsbml.new_ListOfEventAssignments(*args))
41246
41247    def clone(self):
41248        r"""
41249        clone(ListOfEventAssignments self) -> ListOfEventAssignments
41250
41251        Creates and returns a deep copy of this ListOfEventAssignments object.
41252
41253        @return the (deep) copy of this ListOfEventAssignments object.
41254
41255        """
41256        return _libsbml.ListOfEventAssignments_clone(self)
41257
41258    def getItemTypeCode(self):
41259        r"""
41260        getItemTypeCode(ListOfEventAssignments self) -> int
41261
41262        Returns the libSBML type code for the objects contained in this ListOf
41263        (i.e., EventAssignment objects, if the list is non-empty).
41264
41265        @par
41266        LibSBML attaches an identifying code to every kind of SBML object.  These
41267        are integer constants known as <em>SBML type codes</em>.  The names of all
41268        the codes begin with the characters <code>SBML_</code>.
41269        @if clike The set of possible type codes for core elements is defined in
41270        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
41271        SBML Level&nbsp;3 packages define their own extra enumerations of type
41272        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
41273        package).@endif@if java In the Java language interface for libSBML, the
41274        type codes are defined as static integer constants in the interface class
41275        {@link libsbmlConstants}.  @endif@if python In the Python language
41276        interface for libSBML, the type codes are defined as static integer
41277        constants in the interface class @link libsbml@endlink.@endif@if csharp In
41278        the C# language interface for libSBML, the type codes are defined as
41279        static integer constants in the interface class
41280        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
41281        package plug-ins may use overlapping type codes; to identify the package
41282        to which a given object belongs, call the
41283        <code>@if conly SBase_getPackageName()
41284        @else SBase.getPackageName()
41285        @endif</code>
41286        method on the object.
41287
41288        The exception to this is lists:  all SBML-style list elements have the type
41289        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
41290        are from.
41291
41292        @return the SBML type code for the objects contained in this ListOf:
41293        @link libsbml#SBML_EVENT_ASSIGNMENT SBML_EVENT_ASSIGNMENT@endlink (default).
41294
41295        @see getElementName()
41296        @see getPackageName()
41297
41298        """
41299        return _libsbml.ListOfEventAssignments_getItemTypeCode(self)
41300
41301    def getElementName(self):
41302        r"""
41303        getElementName(ListOfEventAssignments self) -> string
41304
41305        Returns the XML element name of this object.
41306
41307        For ListOfEventAssignments, the XML element name is
41308        @c 'listOfEventAssignments'.
41309
41310        @return the name of this element, i.e., @c 'listOfEventAssignments'.
41311
41312        """
41313        return _libsbml.ListOfEventAssignments_getElementName(self)
41314
41315    def get(self, *args):
41316        r"""
41317        get(ListOfEventAssignments self, unsigned int n) -> EventAssignment
41318        get(ListOfEventAssignments self, unsigned int n) -> EventAssignment
41319        get(ListOfEventAssignments self, string sid) -> EventAssignment
41320        get(ListOfEventAssignments self, string sid) -> EventAssignment
41321
41322        This method has multiple variants; they differ in the arguments
41323         they accept.  Each variant is described separately below.
41324
41325        @par
41326        <hr>
41327        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41328         <pre class='signature'>get(long n)</pre>
41329
41330        Get a EventAssignment from the ListOfEventAssignments.
41331
41332        @param n the index number of the EventAssignment to get.
41333
41334        @return the nth EventAssignment in this ListOfEventAssignments.
41335        If the index @p n is invalid, @c None is returned.
41336
41337        @see size()
41338
41339
41340        @par
41341        <hr>
41342        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41343         <pre class='signature'>get(string sid)</pre>
41344
41345        Get a EventAssignment from the ListOfEventAssignments
41346        based on its identifier.
41347
41348        @param sid a string representing the identifier
41349        of the EventAssignment to get.
41350
41351        @return EventAssignment in this ListOfEventAssignments
41352        with the given @p sid or @c None if no such
41353        EventAssignment exists.
41354
41355        @see get()
41356        @see size()
41357
41358        """
41359        return _libsbml.ListOfEventAssignments_get(self, *args)
41360
41361    def remove(self, *args):
41362        r"""
41363        remove(ListOfEventAssignments self, unsigned int n) -> EventAssignment
41364        remove(ListOfEventAssignments self, string sid) -> EventAssignment
41365
41366        This method has multiple variants; they differ in the arguments
41367         they accept.  Each variant is described separately below.
41368
41369        @par
41370        <hr>
41371        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41372         <pre class='signature'>remove(long n)</pre>
41373
41374        Removes the nth item from this ListOfEventAssignments items and returns
41375        a pointer to it.
41376
41377        The caller owns the returned item and is responsible for deleting it.
41378
41379        @param n the index of the item to remove.
41380
41381        @see size()
41382
41383
41384        @par
41385        <hr>
41386        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41387         <pre class='signature'>remove(string sid)</pre>
41388
41389        Removes item in this ListOfEventAssignments items with the given
41390        identifier.
41391
41392        The caller owns the returned item and is responsible for deleting it.
41393        If none of the items in this list have the identifier @p sid, then
41394        @c None is returned.
41395
41396        @param sid the identifier of the item to remove.
41397
41398        @return the item removed.  As mentioned above, the caller owns the
41399        returned item.
41400
41401        """
41402        return _libsbml.ListOfEventAssignments_remove(self, *args)
41403
41404    def getElementBySId(self, id):
41405        r"""
41406        getElementBySId(ListOfEventAssignments self, string id) -> SBase
41407
41408        Returns the first child element found that has the given @p id in the
41409        model-wide SId namespace, or @c None if no such object is found.
41410
41411        Note that EventAssignments do not actually have IDs, but the libsbml
41412        interface pretends that they do: no event assignment is returned by this
41413        function.
41414
41415        @param id string representing the id of the object to find.
41416
41417        @return pointer to the first element found with the given @p id.
41418
41419        """
41420        return _libsbml.ListOfEventAssignments_getElementBySId(self, id)
41421    __swig_destroy__ = _libsbml.delete_ListOfEventAssignments
41422
41423# Register ListOfEventAssignments in _libsbml:
41424_libsbml.ListOfEventAssignments_swigregister(ListOfEventAssignments)
41425
41426class Trigger(SBase):
41427    r"""
41428
41429    @sbmlpackage{core}
41430
41431    @htmlinclude pkg-marker-core.html The trigger expression for an SBML <em>event</em>.
41432
41433    An Event object defines when the event can occur, the variables that are
41434    affected by the event, and how the variables are affected.  The Trigger
41435    construct in SBML is used to define a mathematical expression that
41436    determines when an Event is @em triggered.
41437
41438    A Trigger object in SBML Level&nbsp;2 and Level&nbsp;3 contains one
41439    subelement named 'math' containing a MathML expression.  The expression
41440    is evaluated as a value of type @c boolean.  The exact moment at which
41441    the expression evaluates to @c True is the time point when the Event is
41442    @em triggered.  In SBML Level&nbsp;3, Trigger has additional attributes
41443    that must be assigned values; they are discussed in a separate section
41444    below.
41445
41446    In SBML Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1, the 'math'
41447    subelement is required, and it must evaluate to a @c boolean expression.
41448    In SBML Level&nbsp;3 Version&nbsp;2, those restrictions are relaxed:
41449    the 'math' element is optional, and numeric values are allowed in
41450    Boolean contexts (a '0' is interpreted as @c False, and all other
41451    values are interpreted as @c True).  If a Trigger with no 'math'
41452    is present in an Event, that Event will never @em trigger, unless that
41453    missing information is included in an SBML Level&nbsp;3 package.
41454
41455    An event only @em triggers when its Trigger expression makes the
41456    transition in value from @c False to @c True.  The event will also
41457    trigger at any subsequent time points when the trigger makes this
41458    transition; in other words, an event can be triggered multiple times
41459    during a simulation if its trigger condition makes the transition from
41460    @c False to @c True more than once.  In SBML Level&nbsp;3, the behavior
41461    at the very start of simulation (i.e., at <em>t = 0</em>, where
41462    <em>t</em> stands for time) is determined in part by the boolean flag
41463    'initialValue'.  This and other additional features introduced in SBML
41464    Level&nbsp;3 are discussed further below.
41465
41466    @section trigger-version-diffs Version differences
41467
41468    SBML Level&nbsp;3 Version&nbsp;1 introduces two required attributes
41469    on the Trigger object: 'persistent' and 'initialValue'.  The rest of
41470    this introduction describes these two attributes.
41471
41472    @subsection trigger-persistent The 'persistent' attribute on Trigger
41473
41474    In the interval between when an Event object <em>triggers</em> (i.e.,
41475    its Trigger object expression transitions in value from @c False to
41476    @c True) and when its assignments are to be <em>executed</em>, conditions
41477    in the model may change such that the trigger expression transitions
41478    back from @c True to @c False.  Should the event's assignments still be
41479    made if this happens?  Answering this question is the purpose of the
41480    'persistent' attribute on Trigger.
41481
41482    If the boolean attribute 'persistent' has a value of @c True, then once
41483    the event is triggered, all of its assignments are always performed when
41484    the time of execution is reached.  The name @em persistent is meant to
41485    evoke the idea that the trigger expression does not have to be
41486    re-checked after it triggers if 'persistent'=@c True.  Conversely, if
41487    the attribute value is @c False, then the trigger expression is not
41488    assumed to persist: if the expression transitions in value back to
41489    @c False at any time between when the event triggered and when it is to be
41490    executed, the event is no longer considered to have triggered and its
41491    assignments are not executed.  (If the trigger expression transitions
41492    once more to @c True after that point, then the event is triggered, but
41493    this then constitutes a whole new event trigger-and-execute sequence.)
41494
41495    The 'persistent' attribute can be especially useful when Event objects
41496    contain Delay objects, but it is relevant even in a model without delays
41497    if the model contains two or more events.  As explained in the
41498    introduction to this section, the operation of all events in SBML
41499    (delayed or not) is conceptually divided into two phases,
41500    <em>triggering</em> and <em>execution</em>; however, unless events have
41501    priorities associated with them, SBML does not mandate a particular
41502    ordering of event execution in the case of simultaneous events.  Models
41503    with multiple events can lead to situations where the execution of one
41504    event affects another event's trigger expression value.  If that other
41505    event has 'persistent'=@c False, and its trigger expression evaluates to
41506    @c False before it is to be executed, the event must not be executed
41507    after all.
41508
41509    @subsection trigger-initialvalue The 'initialValue' attribute on Trigger
41510
41511    As mentioned above, an event <em>triggers</em> when the mathematical
41512    expression in its Trigger object transitions in value from @c False to
41513    @c True.  An unanswered question concerns what happens at the start of a
41514    simulation: can event triggers make this transition at <em>t = 0</em>,
41515    where <em>t</em> stands for time?
41516
41517    In order to determine whether an event may trigger at <em>t = 0</em>, it
41518    is necessary to know what value the Trigger object's 'math' expression
41519    had immediately prior to <em>t = 0</em>.  This starting value of the
41520    trigger expression is determined by the value of the boolean attribute
41521    'initialValue'.  A value of @c True means the trigger expression is
41522    taken to have the value @c True immediately prior to <em>t = 0</em>.  In
41523    that case, the trigger cannot transition in value from @c False to
41524    @c True at the moment simulation begins (because it has the value @c True
41525    both before and after <em>t = 0</em>), and can only make the transition
41526    from @c False to @c True sometime <em>after</em> <em>t = 0</em>.  (To do
41527    that, it would also first have to transition to @c False before it could
41528    make the transition from @c False back to @c True.)  Conversely, if
41529    'initialValue'=@c False, then the trigger expression is assumed to start
41530    with the value @c False, and therefore may trigger at <em>t = 0</em> if
41531    the expression evaluates to @c True at that moment.
41532
41533
41534    @see Event
41535    @see Delay
41536    @see EventAssignment
41537
41538    """
41539
41540    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
41541    __repr__ = _swig_repr
41542    __swig_destroy__ = _libsbml.delete_Trigger
41543
41544    def __init__(self, *args):
41545        r"""
41546        __init__(Trigger self, unsigned int level, unsigned int version) -> Trigger
41547        __init__(Trigger self, SBMLNamespaces sbmlns) -> Trigger
41548        __init__(Trigger self, Trigger orig) -> Trigger
41549
41550        This method has multiple variants; they differ in the arguments
41551         they accept.  Each variant is described separately below.
41552
41553        @par
41554        <hr>
41555        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41556         <pre class='signature'>Trigger(SBMLNamespaces sbmlns)</pre>
41557
41558        Creates a new Trigger using the given SBMLNamespaces object
41559        @p sbmlns.
41560
41561        @par
41562        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
41563        information.  It is used to communicate the SBML Level, Version, and (in
41564        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
41565        common approach to using libSBML's SBMLNamespaces facilities is to create an
41566        SBMLNamespaces object somewhere in a program once, then hand that object
41567        as needed to object constructors that accept SBMLNamespaces as arguments.
41568
41569        @param sbmlns an SBMLNamespaces object.
41570
41571        @throws SBMLConstructorException
41572        Thrown if the given @p sbmlns is inconsistent or incompatible
41573        with this object.
41574
41575        @note Attempting to add an object to an SBMLDocument having a different
41576        combination of SBML Level, Version and XML namespaces than the object
41577        itself will result in an error at the time a caller attempts to make the
41578        addition.  A parent object must have compatible Level, Version and XML
41579        namespaces.  (Strictly speaking, a parent may also have more XML
41580        namespaces than a child, but the reverse is not permitted.)  The
41581        restriction is necessary to ensure that an SBML model has a consistent
41582        overall structure.  This requires callers to manage their objects
41583        carefully, but the benefit is increased flexibility in how models can be
41584        created by permitting callers to create objects bottom-up if desired.  In
41585        situations where objects are not yet attached to parents (e.g.,
41586        SBMLDocument), knowledge of the intented SBML Level and Version help
41587        libSBML determine such things as whether it is valid to assign a
41588        particular value to an attribute.
41589
41590
41591        @par
41592        <hr>
41593        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41594         <pre class='signature'>Trigger(long level, long version)</pre>
41595
41596        Creates a new Trigger using the given SBML @p level and @p version
41597        values.
41598
41599        @param level a long integer, the SBML Level to assign to this Trigger.
41600
41601        @param version a long integer, the SBML Version to assign to this
41602        Trigger.
41603
41604        @throws SBMLConstructorException
41605        Thrown if the given @p level and @p version combination are invalid
41606        or if this object is incompatible with the given level and version.
41607
41608        @note Attempting to add an object to an SBMLDocument having a different
41609        combination of SBML Level, Version and XML namespaces than the object
41610        itself will result in an error at the time a caller attempts to make the
41611        addition.  A parent object must have compatible Level, Version and XML
41612        namespaces.  (Strictly speaking, a parent may also have more XML
41613        namespaces than a child, but the reverse is not permitted.)  The
41614        restriction is necessary to ensure that an SBML model has a consistent
41615        overall structure.  This requires callers to manage their objects
41616        carefully, but the benefit is increased flexibility in how models can be
41617        created by permitting callers to create objects bottom-up if desired.  In
41618        situations where objects are not yet attached to parents (e.g.,
41619        SBMLDocument), knowledge of the intented SBML Level and Version help
41620        libSBML determine such things as whether it is valid to assign a
41621        particular value to an attribute.
41622
41623
41624        @par
41625        <hr>
41626        <span class='variant-sig-heading'>Method variant with the following signature</span>:
41627         <pre class='signature'>Trigger(Trigger orig)</pre>
41628
41629        Copy constructor; creates a copy of this Trigger.
41630
41631        @param orig the object to copy.
41632
41633        """
41634        _libsbml.Trigger_swiginit(self, _libsbml.new_Trigger(*args))
41635
41636    def clone(self):
41637        r"""
41638        clone(Trigger self) -> Trigger
41639
41640        Creates and returns a deep copy of this Trigger object.
41641
41642        @return the (deep) copy of this Trigger object.
41643
41644        """
41645        return _libsbml.Trigger_clone(self)
41646
41647    def getMath(self):
41648        r"""
41649        getMath(Trigger self) -> ASTNode
41650
41651        Get the mathematical formula for the trigger and return it
41652        as an AST.
41653
41654        @return the math of this Trigger, or @c None if the math is not set.
41655
41656        """
41657        return _libsbml.Trigger_getMath(self)
41658
41659    def getInitialValue(self):
41660        r"""
41661        getInitialValue(Trigger self) -> bool
41662
41663        (SBML Level&nbsp;3 only) Get the value of the 'initialValue' attribute
41664        of this Trigger.
41665
41666        @return the boolean value stored as the 'initialValue' attribute value
41667        in this Trigger.
41668
41669        @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
41670        but is not present in lower Levels of SBML.
41671
41672        """
41673        return _libsbml.Trigger_getInitialValue(self)
41674
41675    def getPersistent(self):
41676        r"""
41677        getPersistent(Trigger self) -> bool
41678
41679        (SBML Level&nbsp;3 only) Get the value of the 'persistent' attribute
41680        of this Trigger.
41681
41682        @return the boolean value stored as the 'persistent' attribute value
41683        in this Trigger.
41684
41685        @note The attribute 'persistent' is available in SBML Level&nbsp;3,
41686        but is not present in lower Levels of SBML.
41687
41688        """
41689        return _libsbml.Trigger_getPersistent(self)
41690
41691    def isSetMath(self):
41692        r"""
41693        isSetMath(Trigger self) -> bool
41694
41695        Predicate to test whether the math for this trigger is set.
41696
41697        @return @c True if the formula (meaning the 'math' subelement) of
41698        this Trigger is set, @c False otherwise.
41699
41700        """
41701        return _libsbml.Trigger_isSetMath(self)
41702
41703    def isSetInitialValue(self):
41704        r"""
41705        isSetInitialValue(Trigger self) -> bool
41706
41707        (SBML Level&nbsp;3 only) Predicate to test whether the 'initialValue'
41708        attribute for this trigger is set.
41709
41710        @return @c True if the initialValue attribute of
41711        this Trigger is set, @c False otherwise.
41712
41713        @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
41714        but is not present in lower Levels of SBML.
41715
41716        """
41717        return _libsbml.Trigger_isSetInitialValue(self)
41718
41719    def isSetPersistent(self):
41720        r"""
41721        isSetPersistent(Trigger self) -> bool
41722
41723        (SBML Level&nbsp;3 only) Predicate to test whether the 'persistent'
41724        attribute for this trigger is set.
41725
41726        @return @c True if the persistent attribute of
41727        this Trigger is set, @c False otherwise.
41728
41729        @note The attribute 'persistent' is available in SBML Level&nbsp;3,
41730        but is not present in lower Levels of SBML.
41731
41732        """
41733        return _libsbml.Trigger_isSetPersistent(self)
41734
41735    def setMath(self, math):
41736        r"""
41737        setMath(Trigger self, ASTNode math) -> int
41738
41739        Sets the trigger expression of this Trigger instance to a copy of the given
41740        ASTNode.
41741
41742        @param math an ASTNode representing a formula tree.
41743
41744        @return integer value indicating success/failure of the
41745        function.  @if clike The value is drawn from the
41746        enumeration #OperationReturnValues_t. @endif@~ The possible values
41747        returned by this function are:
41748        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
41749        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
41750
41751        """
41752        return _libsbml.Trigger_setMath(self, math)
41753
41754    def setInitialValue(self, initialValue):
41755        r"""
41756        setInitialValue(Trigger self, bool initialValue) -> int
41757
41758        (SBML Level&nbsp;3 only) Sets the 'initialValue' attribute of this Trigger instance.
41759
41760        @param initialValue a boolean representing the initialValue to be set.
41761
41762        @return integer value indicating success/failure of the
41763        function.  @if clike The value is drawn from the
41764        enumeration #OperationReturnValues_t. @endif@~ The possible values
41765        returned by this function are:
41766        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
41767        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
41768
41769        @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
41770        but is not present in lower Levels of SBML.
41771
41772        """
41773        return _libsbml.Trigger_setInitialValue(self, initialValue)
41774
41775    def setPersistent(self, persistent):
41776        r"""
41777        setPersistent(Trigger self, bool persistent) -> int
41778
41779        (SBML Level&nbsp;3 only) Sets the 'persistent' attribute of this Trigger instance.
41780
41781        @param persistent a boolean representing the persistent value to be set.
41782
41783        @return integer value indicating success/failure of the
41784        function.  @if clike The value is drawn from the
41785        enumeration #OperationReturnValues_t. @endif@~ The possible values
41786        returned by this function are:
41787        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
41788        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
41789
41790        @note The attribute 'persistent' is available in SBML Level&nbsp;3,
41791        but is not present in lower Levels of SBML.
41792
41793        """
41794        return _libsbml.Trigger_setPersistent(self, persistent)
41795
41796    def unsetInitialValue(self):
41797        r"""
41798        unsetInitialValue(Trigger self) -> int
41799
41800        (SBML Level&nbsp;3 only) Unsets the 'initialValue' attribute of this
41801        Trigger instance.
41802
41803        @return integer value indicating success/failure of the
41804        function.  @if clike The value is drawn from the
41805        enumeration #OperationReturnValues_t. @endif@~ The possible values
41806        returned by this function are:
41807        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
41808        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
41809
41810        @note The attribute 'initialValue' is available in SBML Level&nbsp;3,
41811        but is not present in lower Levels of SBML.
41812
41813        """
41814        return _libsbml.Trigger_unsetInitialValue(self)
41815
41816    def unsetPersistent(self):
41817        r"""
41818        unsetPersistent(Trigger self) -> int
41819
41820        (SBML Level&nbsp;3 only) Unsets the 'persistent' attribute of this
41821        Trigger instance.
41822
41823        @return integer value indicating success/failure of the
41824        function.  @if clike The value is drawn from the
41825        enumeration #OperationReturnValues_t. @endif@~ The possible values
41826        returned by this function are:
41827        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
41828        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
41829
41830        @note The attribute 'persistent' is available in SBML Level&nbsp;3,
41831        but is not present in lower Levels of SBML.
41832
41833        """
41834        return _libsbml.Trigger_unsetPersistent(self)
41835
41836    def getTypeCode(self):
41837        r"""
41838        getTypeCode(Trigger self) -> int
41839
41840        Returns the libSBML type code of this object instance.
41841
41842        @par
41843        LibSBML attaches an identifying code to every kind of SBML object.  These
41844        are integer constants known as <em>SBML type codes</em>.  The names of all
41845        the codes begin with the characters <code>SBML_</code>.
41846        @if clike The set of possible type codes for core elements is defined in
41847        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
41848        SBML Level&nbsp;3 packages define their own extra enumerations of type
41849        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
41850        package).@endif@if java In the Java language interface for libSBML, the
41851        type codes are defined as static integer constants in the interface class
41852        {@link libsbmlConstants}.  @endif@if python In the Python language
41853        interface for libSBML, the type codes are defined as static integer
41854        constants in the interface class @link libsbml@endlink.@endif@if csharp In
41855        the C# language interface for libSBML, the type codes are defined as
41856        static integer constants in the interface class
41857        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
41858        package plug-ins may use overlapping type codes; to identify the package
41859        to which a given object belongs, call the
41860        <code>@if conly SBase_getPackageName()
41861        @else SBase.getPackageName()
41862        @endif</code>
41863        method on the object.
41864
41865        The exception to this is lists:  all SBML-style list elements have the type
41866        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
41867        are from.
41868
41869        @return the SBML type code for this object:
41870        @link libsbml#SBML_TRIGGER SBML_TRIGGER@endlink (default).
41871
41872        @warning <span class='warning'>The specific integer values of the possible
41873        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
41874        packages,  To fully identify the correct code, <strong>it is necessary to
41875        invoke both getPackageName() and getTypeCode()</strong> (or
41876        ListOf.getItemTypeCode()).</span>
41877
41878        @see getElementName()
41879        @see getPackageName()
41880
41881        """
41882        return _libsbml.Trigger_getTypeCode(self)
41883
41884    def getElementName(self):
41885        r"""
41886        getElementName(Trigger self) -> string
41887
41888        Returns the XML element name of this object, which for Trigger, is
41889        always @c 'trigger'.
41890
41891        @return the name of this element, i.e., @c 'trigger'.
41892
41893        """
41894        return _libsbml.Trigger_getElementName(self)
41895
41896    def renameSIdRefs(self, oldid, newid):
41897        r"""
41898        renameSIdRefs(Trigger self, string oldid, string newid)
41899
41900        Replaces all uses of a given @c SIdRef type attribute value with another
41901        value.
41902
41903        @par
41904        In SBML, object identifiers are of a data type called <code>SId</code>.
41905        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
41906        introduced for attribute values that refer to <code>SId</code> values; in
41907        previous Levels of SBML, this data type did not exist and attributes were
41908        simply described to as 'referring to an identifier', but the effective
41909        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
41910        other methods of libSBML refer to the type <code>SIdRef</code> for all
41911        Levels of SBML, even if the corresponding SBML specification did not
41912        explicitly name the data type.
41913
41914        This method works by looking at all attributes and (if appropriate)
41915        mathematical formulas in MathML content, comparing the referenced
41916        identifiers to the value of @p oldid.  If any matches are found, the
41917        matching values are replaced with @p newid.  The method does @em not
41918        descend into child elements.
41919
41920        @param oldid the old identifier.
41921        @param newid the new identifier.
41922
41923        """
41924        return _libsbml.Trigger_renameSIdRefs(self, oldid, newid)
41925
41926    def renameUnitSIdRefs(self, oldid, newid):
41927        r"""
41928        renameUnitSIdRefs(Trigger self, string oldid, string newid)
41929
41930        Replaces all uses of a given @c UnitSIdRef type attribute value with
41931        another value.
41932
41933        @par
41934        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
41935        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
41936        introduced for attribute values that refer to <code>UnitSId</code> values; in
41937        previous Levels of SBML, this data type did not exist and attributes were
41938        simply described to as 'referring to a unit identifier', but the effective
41939        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
41940        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
41941        Levels of SBML, even if the corresponding SBML specification did not
41942        explicitly name the data type.
41943
41944        This method works by looking at all unit identifier attribute values
41945        (including, if appropriate, inside mathematical formulas), comparing the
41946        referenced unit identifiers to the value of @p oldid.  If any matches
41947        are found, the matching values are replaced with @p newid.  The method
41948        does @em not descend into child elements.
41949
41950        @param oldid the old identifier.
41951        @param newid the new identifier.
41952
41953        """
41954        return _libsbml.Trigger_renameUnitSIdRefs(self, oldid, newid)
41955
41956    def replaceSIDWithFunction(self, id, function):
41957        r"""
41958        replaceSIDWithFunction(Trigger self, string id, ASTNode function)
41959
41960        @internal
41961
41962        @internal
41963
41964        """
41965        return _libsbml.Trigger_replaceSIDWithFunction(self, id, function)
41966
41967    def hasRequiredElements(self):
41968        r"""
41969        hasRequiredElements(Trigger self) -> bool
41970
41971        Predicate returning @c True if
41972        all the required elements for this Trigger object
41973        have been set.
41974
41975        @note The required elements for a Trigger object are:
41976        @li 'math' inSBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
41977        (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
41978
41979        @return a boolean value indicating whether all the required
41980        elements for this object have been defined.
41981
41982        """
41983        return _libsbml.Trigger_hasRequiredElements(self)
41984
41985    def hasRequiredAttributes(self):
41986        r"""
41987        hasRequiredAttributes(Trigger self) -> bool
41988
41989        Predicate returning @c True if
41990        all the required attributes for this Trigger object
41991        have been set.
41992
41993        The required attributes for a Trigger object are:
41994        @li 'persistent' (required in SBML Level&nbsp;3)
41995        @li 'initialValue' (required in SBML Level&nbsp;3)
41996
41997        @return a boolean value indicating whether all the required
41998        attributes for this object have been defined.
41999
42000        """
42001        return _libsbml.Trigger_hasRequiredAttributes(self)
42002
42003    def removeFromParentAndDelete(self):
42004        r"""
42005        removeFromParentAndDelete(Trigger self) -> int
42006
42007        Finds this Trigger's Event parent and calls unsetTrigger() on it, indirectly deleting itself.  Overridden from the SBase function since the parent is not a ListOf.
42008
42009        @return integer value indicating success/failure of the
42010        function.  @if clike The value is drawn from the
42011        enumeration #OperationReturnValues_t. @endif@~ The possible values
42012        returned by this function are:
42013        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
42014        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
42015
42016        """
42017        return _libsbml.Trigger_removeFromParentAndDelete(self)
42018
42019# Register Trigger in _libsbml:
42020_libsbml.Trigger_swigregister(Trigger)
42021
42022class Delay(SBase):
42023    r"""
42024
42025    @sbmlpackage{core}
42026
42027    @htmlinclude pkg-marker-core.html A delay on the time of execution of an SBML <em>event</em>.
42028
42029    An Event object defines when the event can occur, the variables that
42030    are affected by the event, and how the variables are affected.  The
42031    effect of the event can optionally be delayed after the occurrence of
42032    the condition which invokes it.  An event delay is defined using an
42033    object of class Delay.
42034
42035    The object class Delay is derived from SBase and adds a single
42036    subelement called 'math'.  This subelement is used to hold MathML
42037    content.  The mathematical formula represented by 'math' must evaluate
42038    to a numerical value.  It is used as the length of time between when the
42039    event is @em triggered and when the event's assignments are
42040    actually @em executed.  If no delay is present on a given Event, a time
42041    delay of zero is assumed.
42042
42043    The expression in 'math' must be evaluated at the time the event is @em
42044    triggered.  The expression must always evaluate to a nonnegative number
42045    (otherwise, a nonsensical situation could arise where an event is
42046    defined to execute before it is triggered!).
42047
42048    @section delay-units The units of the mathematical expression in a Delay
42049
42050    In SBML Level&nbsp;2 versions before Version&nbsp;4, the units of the
42051    numerical value computed by the Delay's 'math' expression are @em
42052    required to be in units of time, or the model is considered to have a
42053    unit consistency error.  In Level&nbsp;2 Version&nbsp;4 as well as SBML
42054    Level&nbsp;3, this requirement is relaxed; these
42055    specifications only stipulate that the units of the numerical value
42056    computed by a Delay instance's 'math' expression @em should match the
42057    model's units of time (meaning the definition of the @c time units in
42058    the model).  LibSBML respects these requirements, and depending on
42059    whether an earlier Version of SBML Level&nbsp;2 is in use, libSBML may
42060    or may not flag unit inconsistencies as errors or merely warnings.
42061
42062    Note that <em>units are not predefined or assumed</em> for the contents
42063    of 'math' in a Delay object; rather, they must be defined explicitly for
42064    each instance of a Delay object in a model.  This is an important point
42065    to bear in mind when literal numbers are used in delay expressions.  For
42066    example, the following Event instance would result in a warning logged
42067    by SBMLDocument.checkConsistency() about the fact that libSBML cannot
42068    verify the consistency of the units of the expression.  The reason is
42069    that the formula inside the 'math' element does not have any declared
42070    units, whereas what is expected in this context is units of time:
42071    @verbatim
42072    <model>
42073        ...
42074        <listOfEvents>
42075            <event useValuesFromTriggerTime='true'>
42076                ...
42077                <delay>
42078                    <math xmlns='http://www.w3.org/1998/Math/MathML'>
42079                        <cn> 1 </cn>
42080                    </math>
42081                </delay>
42082                ...
42083            </event>
42084        </listOfEvents>
42085        ...
42086    </model>
42087    @endverbatim
42088
42089    The <code>&lt;cn&gt; 1 &lt;/cn&gt;</code> within the mathematical formula
42090    of the @c delay above has <em>no units declared</em>.  To make the
42091    expression have the needed units of time, literal numbers should be
42092    avoided in favor of defining Parameter objects for each quantity, and
42093    declaring units for the Parameter values.  The following fragment of
42094    SBML illustrates this approach:
42095    @verbatim
42096    <model>
42097        ...
42098        <listOfParameters>
42099            <parameter id='transcriptionDelay' value='10' units='second'/>
42100        </listOfParameters>
42101        ...
42102        <listOfEvents>
42103            <event useValuesFromTriggerTime='true'>
42104                ...
42105                <delay>
42106                    <math xmlns='http://www.w3.org/1998/Math/MathML'>
42107                        <ci> transcriptionDelay </ci>
42108                    </math>
42109                </delay>
42110                ...
42111            </event>
42112        </listOfEvents>
42113        ...
42114    </model>
42115    @endverbatim
42116
42117    In SBML Level&nbsp;3, an alternative approach is available in the form
42118    of the @c units attribute, which SBML Level&nbsp;3 allows to appear on
42119    MathML @c cn elements.  The value of this attribute can be used to
42120    indicate the unit of measurement to be associated with the number in the
42121    content of a @c cn element.  The attribute is named @c units but,
42122    because it appears inside MathML element (which is in the XML namespace
42123    for MathML and not the namespace for SBML), it must always be prefixed
42124    with an XML namespace prefix for an SBML Level&nbsp;3
42125    namespace.  The following is an example of this approach:
42126    @verbatim
42127    <model timeUnits='second' ...>
42128        ...
42129        <listOfEvents>
42130            <event useValuesFromTriggerTime='true'>
42131                ...
42132                <delay>
42133                    <math xmlns='http://www.w3.org/1998/Math/MathML'
42134                          xmlns:sbml='http://www.sbml.org/sbml/level3/version1/core'>
42135                        <cn sbml:units='second'> 10 </cn>
42136                    </math>
42137                </delay>
42138                ...
42139            </event>
42140        </listOfEvents>
42141        ...
42142    </model>
42143    @endverbatim
42144
42145    @section delay-restrictions Restrictions relaxed in SBML Level&nbsp;3 Version&nbsp;2
42146
42147    In SBML Level&nbsp;3 Version&nbsp;2, the requirement that a Delay
42148    have a 'math' subelement was relaxed, making it optional.  In
42149    this case, the Delay remains undefined, and unless that information
42150    is provided in some other form (such as with an SBML Level&nbsp;3
42151    package), the Event behaves as if it had no Delay.
42152
42153    """
42154
42155    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
42156    __repr__ = _swig_repr
42157    __swig_destroy__ = _libsbml.delete_Delay
42158
42159    def __init__(self, *args):
42160        r"""
42161        __init__(Delay self, unsigned int level, unsigned int version) -> Delay
42162        __init__(Delay self, SBMLNamespaces sbmlns) -> Delay
42163        __init__(Delay self, Delay orig) -> Delay
42164
42165        This method has multiple variants; they differ in the arguments
42166         they accept.  Each variant is described separately below.
42167
42168        @par
42169        <hr>
42170        <span class='variant-sig-heading'>Method variant with the following signature</span>:
42171         <pre class='signature'>Delay(SBMLNamespaces sbmlns)</pre>
42172
42173        Creates a new Delay using the given SBMLNamespaces object
42174        @p sbmlns.
42175
42176        @par
42177        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
42178        information.  It is used to communicate the SBML Level, Version, and (in
42179        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
42180        common approach to using libSBML's SBMLNamespaces facilities is to create an
42181        SBMLNamespaces object somewhere in a program once, then hand that object
42182        as needed to object constructors that accept SBMLNamespaces as arguments.
42183
42184        @param sbmlns an SBMLNamespaces object.
42185
42186        @throws SBMLConstructorException
42187        Thrown if the given @p sbmlns is inconsistent or incompatible
42188        with this object.
42189
42190        @note Attempting to add an object to an SBMLDocument having a different
42191        combination of SBML Level, Version and XML namespaces than the object
42192        itself will result in an error at the time a caller attempts to make the
42193        addition.  A parent object must have compatible Level, Version and XML
42194        namespaces.  (Strictly speaking, a parent may also have more XML
42195        namespaces than a child, but the reverse is not permitted.)  The
42196        restriction is necessary to ensure that an SBML model has a consistent
42197        overall structure.  This requires callers to manage their objects
42198        carefully, but the benefit is increased flexibility in how models can be
42199        created by permitting callers to create objects bottom-up if desired.  In
42200        situations where objects are not yet attached to parents (e.g.,
42201        SBMLDocument), knowledge of the intented SBML Level and Version help
42202        libSBML determine such things as whether it is valid to assign a
42203        particular value to an attribute.
42204
42205
42206        @par
42207        <hr>
42208        <span class='variant-sig-heading'>Method variant with the following signature</span>:
42209         <pre class='signature'>Delay(long level, long version)</pre>
42210
42211        Creates a new Delay using the given SBML @p level and @p version
42212        values.
42213
42214        @param level a long integer, the SBML Level to assign to this Delay.
42215
42216        @param version a long integer, the SBML Version to assign to this
42217        Delay.
42218
42219        @throws SBMLConstructorException
42220        Thrown if the given @p level and @p version combination are invalid
42221        or if this object is incompatible with the given level and version.
42222
42223        @note Attempting to add an object to an SBMLDocument having a different
42224        combination of SBML Level, Version and XML namespaces than the object
42225        itself will result in an error at the time a caller attempts to make the
42226        addition.  A parent object must have compatible Level, Version and XML
42227        namespaces.  (Strictly speaking, a parent may also have more XML
42228        namespaces than a child, but the reverse is not permitted.)  The
42229        restriction is necessary to ensure that an SBML model has a consistent
42230        overall structure.  This requires callers to manage their objects
42231        carefully, but the benefit is increased flexibility in how models can be
42232        created by permitting callers to create objects bottom-up if desired.  In
42233        situations where objects are not yet attached to parents (e.g.,
42234        SBMLDocument), knowledge of the intented SBML Level and Version help
42235        libSBML determine such things as whether it is valid to assign a
42236        particular value to an attribute.
42237
42238
42239        @par
42240        <hr>
42241        <span class='variant-sig-heading'>Method variant with the following signature</span>:
42242         <pre class='signature'>Delay(Delay orig)</pre>
42243
42244        Copy constructor; creates a copy of this Delay.
42245
42246        @param orig the object to copy.
42247
42248        """
42249        _libsbml.Delay_swiginit(self, _libsbml.new_Delay(*args))
42250
42251    def clone(self):
42252        r"""
42253        clone(Delay self) -> Delay
42254
42255        Creates and returns a deep copy of this Delay object.
42256
42257        @return the (deep) copy of this Delay object.
42258
42259        """
42260        return _libsbml.Delay_clone(self)
42261
42262    def getMath(self):
42263        r"""
42264        getMath(Delay self) -> ASTNode
42265
42266        Get the mathematical formula for the delay and return it
42267        as an AST.
42268
42269        @return the math of this Delay, or @c None if the math is not set.
42270
42271        """
42272        return _libsbml.Delay_getMath(self)
42273
42274    def isSetMath(self):
42275        r"""
42276        isSetMath(Delay self) -> bool
42277
42278        Predicate to test whether the formula for this delay is set.
42279
42280        @return @c True if the formula (meaning the @c math subelement) of
42281        this Delay is set, @c False otherwise.
42282
42283        """
42284        return _libsbml.Delay_isSetMath(self)
42285
42286    def setMath(self, math):
42287        r"""
42288        setMath(Delay self, ASTNode math) -> int
42289
42290        Sets the delay expression of this Delay instance to a copy of the given
42291        ASTNode.
42292
42293        @param math an ASTNode representing a formula tree.
42294
42295        @return integer value indicating success/failure of the
42296        function.  @if clike The value is drawn from the
42297        enumeration #OperationReturnValues_t. @endif@~ The possible values
42298        returned by this function are:
42299        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
42300        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
42301
42302        """
42303        return _libsbml.Delay_setMath(self, math)
42304
42305    def getDerivedUnitDefinition(self, *args):
42306        r"""
42307        getDerivedUnitDefinition(Delay self) -> UnitDefinition
42308        getDerivedUnitDefinition(Delay self) -> UnitDefinition
42309
42310        Calculates and returns a UnitDefinition that expresses the units
42311        of measurement assumed for the 'math' expression of this Delay.
42312
42313        @par
42314        Delay elements in SBML express a time delay for an Event.  Beginning
42315        with SBML Level&nbsp;2 Version&nbsp;2, the units of that time are
42316        calculated based on the mathematical expression and the model quantities
42317        referenced by <code>&lt;ci&gt;</code> elements used within that
42318        expression.  (In SBML Level&nbsp;2 Version&nbsp;1, there exists an
42319        attribute on Event called 'timeUnits'.  This attribute can be used to set
42320        the units of the Delay expression explicitly.)  The method
42321        Delay.getDerivedUnitDefinition() returns what libSBML computes the units
42322        to be, to the extent that libSBML can compute them.
42323
42324        @note The functionality that facilitates unit analysis depends on the
42325        model as a whole.  Thus, in cases where the object has not been added to
42326        a model or the model itself is incomplete, unit analysis is not possible
42327        and this method will return @c None.
42328
42329        @warning <span class='warning'>Note that it is possible the 'math'
42330        expression in the Delay contains literal numbers or parameters with
42331        undeclared units.  In those cases, it is not possible to calculate the
42332        units of the overall expression without making assumptions.  LibSBML does
42333        not make assumptions about the units, and
42334        Delay.getDerivedUnitDefinition() only returns the units as far as it is
42335        able to determine them.  For example, in an expression <em>X + Y</em>, if
42336        <em>X</em> has unambiguously-defined units and <em>Y</em> does not, it
42337        will return the units of <em>X</em>.  When using this method, <strong>it
42338        is critical that callers also invoke the method</strong>
42339        Delay.containsUndeclaredUnits() <strong>to determine whether this
42340        situation holds</strong>.  Callers should take suitable action in those
42341        situations.</span>
42342
42343        @return a UnitDefinition that expresses the units of the math
42344        expression of this Delay, or @c None if one cannot be constructed.
42345
42346        @see containsUndeclaredUnits()
42347
42348        """
42349        return _libsbml.Delay_getDerivedUnitDefinition(self, *args)
42350
42351    def containsUndeclaredUnits(self, *args):
42352        r"""
42353        containsUndeclaredUnits(Delay self) -> bool
42354        containsUndeclaredUnits(Delay self) -> bool
42355
42356        Predicate returning @c True if the 'math' expression in this Delay
42357        instance contains parameters with undeclared units or literal numbers.
42358
42359        @par
42360        Delay elements in SBML express a time delay for an Event.  Beginning
42361        with SBML Level&nbsp;2 Version&nbsp;2, the units of that time are
42362        calculated based on the mathematical expression and the model quantities
42363        referenced by <code>&lt;ci&gt;</code> elements used within that
42364        expression.  (In SBML Level&nbsp;2 Version&nbsp;1, there exists an
42365        attribute on Event called 'timeUnits'.  This attribute can be used to set
42366        the units of the Delay expression explicitly.)  The method
42367        Delay.getDerivedUnitDefinition() returns what libSBML computes the units
42368        to be, to the extent that libSBML can compute them.
42369
42370        If the expression contains literal numbers or parameters with undeclared
42371        units, <strong>libSBML may not be able to compute the full units of the
42372        expression</strong> and will only return what it can compute.  Callers
42373        should always use Delay.containsUndeclaredUnits() when using
42374        Delay.getDerivedUnitDefinition() to decide whether the returned units
42375        may be incomplete.
42376
42377        @return @c True if the math expression of this Delay includes
42378        numbers/parameters with undeclared units, @c False otherwise.
42379
42380        @note A return value of @c True indicates that the UnitDefinition
42381        returned by Delay.getDerivedUnitDefinition() may not accurately
42382        represent the units of the expression.
42383
42384        @see getDerivedUnitDefinition()
42385
42386        """
42387        return _libsbml.Delay_containsUndeclaredUnits(self, *args)
42388
42389    def getTypeCode(self):
42390        r"""
42391        getTypeCode(Delay self) -> int
42392
42393        Returns the libSBML type code of this object instance.
42394
42395        @par
42396        LibSBML attaches an identifying code to every kind of SBML object.  These
42397        are integer constants known as <em>SBML type codes</em>.  The names of all
42398        the codes begin with the characters <code>SBML_</code>.
42399        @if clike The set of possible type codes for core elements is defined in
42400        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
42401        SBML Level&nbsp;3 packages define their own extra enumerations of type
42402        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
42403        package).@endif@if java In the Java language interface for libSBML, the
42404        type codes are defined as static integer constants in the interface class
42405        {@link libsbmlConstants}.  @endif@if python In the Python language
42406        interface for libSBML, the type codes are defined as static integer
42407        constants in the interface class @link libsbml@endlink.@endif@if csharp In
42408        the C# language interface for libSBML, the type codes are defined as
42409        static integer constants in the interface class
42410        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
42411        package plug-ins may use overlapping type codes; to identify the package
42412        to which a given object belongs, call the
42413        <code>@if conly SBase_getPackageName()
42414        @else SBase.getPackageName()
42415        @endif</code>
42416        method on the object.
42417
42418        The exception to this is lists:  all SBML-style list elements have the type
42419        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
42420        are from.
42421
42422        @return the SBML type code for this object:
42423        @link libsbml#SBML_DELAY SBML_DELAY@endlink (default).
42424
42425        @warning <span class='warning'>The specific integer values of the possible
42426        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
42427        packages,  To fully identify the correct code, <strong>it is necessary to
42428        invoke both getPackageName() and getTypeCode()</strong> (or
42429        ListOf.getItemTypeCode()).</span>
42430
42431        @see getElementName()
42432        @see getPackageName()
42433
42434        """
42435        return _libsbml.Delay_getTypeCode(self)
42436
42437    def getElementName(self):
42438        r"""
42439        getElementName(Delay self) -> string
42440
42441        Returns the XML element name of this object, which for Delay, is
42442        always @c 'delay'.
42443
42444        @return the name of this element, i.e., @c 'delay'.
42445
42446        @see getTypeCode()
42447
42448        """
42449        return _libsbml.Delay_getElementName(self)
42450
42451    def hasRequiredElements(self):
42452        r"""
42453        hasRequiredElements(Delay self) -> bool
42454
42455        Predicate returning @c True if
42456        all the required elements for this Delay object
42457        have been set.
42458
42459        @note The required elements for a Delay object are:
42460        @li 'math' inSBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
42461        (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
42462
42463        @return a boolean value indicating whether all the required
42464        elements for this object have been defined.
42465
42466        """
42467        return _libsbml.Delay_hasRequiredElements(self)
42468
42469    def removeFromParentAndDelete(self):
42470        r"""
42471        removeFromParentAndDelete(Delay self) -> int
42472
42473        Finds this Delay's Event parent and calls unsetDelay() on it, indirectly
42474        deleting itself.
42475
42476        Overridden from the SBase function since the parent is not a ListOf.
42477
42478        @return integer value indicating success/failure of the
42479        function.  @if clike The value is drawn from the
42480        enumeration #OperationReturnValues_t. @endif@~ The possible values
42481        returned by this function are:
42482        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
42483        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
42484
42485        """
42486        return _libsbml.Delay_removeFromParentAndDelete(self)
42487
42488    def renameSIdRefs(self, oldid, newid):
42489        r"""
42490        renameSIdRefs(Delay self, string oldid, string newid)
42491
42492        Replaces all uses of a given @c SIdRef type attribute value with another
42493        value.
42494
42495        @par
42496        In SBML, object identifiers are of a data type called <code>SId</code>.
42497        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
42498        introduced for attribute values that refer to <code>SId</code> values; in
42499        previous Levels of SBML, this data type did not exist and attributes were
42500        simply described to as 'referring to an identifier', but the effective
42501        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
42502        other methods of libSBML refer to the type <code>SIdRef</code> for all
42503        Levels of SBML, even if the corresponding SBML specification did not
42504        explicitly name the data type.
42505
42506        This method works by looking at all attributes and (if appropriate)
42507        mathematical formulas in MathML content, comparing the referenced
42508        identifiers to the value of @p oldid.  If any matches are found, the
42509        matching values are replaced with @p newid.  The method does @em not
42510        descend into child elements.
42511
42512        @param oldid the old identifier.
42513        @param newid the new identifier.
42514
42515        """
42516        return _libsbml.Delay_renameSIdRefs(self, oldid, newid)
42517
42518    def renameUnitSIdRefs(self, oldid, newid):
42519        r"""
42520        renameUnitSIdRefs(Delay self, string oldid, string newid)
42521
42522        Replaces all uses of a given @c UnitSIdRef type attribute value with
42523        another value.
42524
42525        @par
42526        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
42527        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
42528        introduced for attribute values that refer to <code>UnitSId</code> values; in
42529        previous Levels of SBML, this data type did not exist and attributes were
42530        simply described to as 'referring to a unit identifier', but the effective
42531        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
42532        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
42533        Levels of SBML, even if the corresponding SBML specification did not
42534        explicitly name the data type.
42535
42536        This method works by looking at all unit identifier attribute values
42537        (including, if appropriate, inside mathematical formulas), comparing the
42538        referenced unit identifiers to the value of @p oldid.  If any matches
42539        are found, the matching values are replaced with @p newid.  The method
42540        does @em not descend into child elements.
42541
42542        @param oldid the old identifier.
42543        @param newid the new identifier.
42544
42545        """
42546        return _libsbml.Delay_renameUnitSIdRefs(self, oldid, newid)
42547
42548    def replaceSIDWithFunction(self, id, function):
42549        r"""
42550        replaceSIDWithFunction(Delay self, string id, ASTNode function)
42551
42552        @internal
42553
42554        @internal
42555
42556        """
42557        return _libsbml.Delay_replaceSIDWithFunction(self, id, function)
42558
42559# Register Delay in _libsbml:
42560_libsbml.Delay_swigregister(Delay)
42561
42562class Priority(SBase):
42563    r"""
42564
42565    @sbmlpackage{core}
42566
42567    @htmlinclude pkg-marker-core.html The priority of execution of an SBML <em>event</em>.
42568
42569    The Priority object class (which was introduced in SBML Level&nbsp;3
42570    Version&nbsp;1), like Delay, is derived from SBase and contains a MathML
42571    formula stored in the element 'math'.  This formula is used to compute a
42572    dimensionless numerical value that influences the order in which a
42573    simulator is to perform the assignments of two or more events that
42574    happen to be executed simultaneously.  The formula may evaluate to any
42575    @c float value (and thus may be a positive or negative number, or
42576    zero), with positive numbers taken to signifying a higher priority than
42577    zero or negative numbers.  If no Priority object is present on a given
42578    Event object, no priority is defined for that event.
42579
42580    @section priority-interp The interpretation of priorities on events in a model
42581
42582    For the purposes of SBML, <em>simultaneous event execution</em> is
42583    defined as the situation in which multiple events have identical
42584    times of execution.  The time of execution is calculated as the
42585    sum of the time at which a given event's Trigger is <em>triggered</em>
42586    plus its Delay duration, if any.  Here, <em>identical times</em> means
42587    <em>mathematically equal</em> instants in time.  (In practice,
42588    simulation software adhering to this specification may have to
42589    rely on numerical equality instead of strict mathematical
42590    equality; robust models will ensure that this difference will not
42591    cause significant discrepancies from expected behavior.)
42592
42593    If no Priority subobjects are defined for two or more Event objects,
42594    then those events are still executed simultaneously but their order of
42595    execution is <em>undefined by the SBML Level&nbsp;3
42596    specification</em>.  A software implementation may choose to execute
42597    such simultaneous events in any order, as long as each event is executed
42598    only once and the requirements of checking the 'persistent' attribute
42599    (and acting accordingly) are satisfied.
42600
42601    If Priority subobjects are defined for two or more
42602    simultaneously-triggered events, the order in which those particular
42603    events must be executed is dictated by their Priority objects,
42604    as follows.  If the values calculated using the two Priority
42605    objects' 'math' expressions differ, then the event having
42606    the higher priority value must be executed before the event with
42607    the lower value.  If, instead, the two priority values are
42608    mathematically equal, then the two events must be triggered in a
42609    <em>random</em> order.  It is important to note that a <em>random
42610    order is not the same as an undefined order</em>: given multiple
42611    runs of the same model with identical conditions, an undefined
42612    ordering would permit a system to execute the events in (for
42613    example) the same order every time (according to whatever scheme
42614    may have been implemented by the system), whereas the explicit
42615    requirement for random ordering means that the order of execution
42616    in different simulation runs depends on random chance.  In other
42617    words, given two events <em>A</em> and <em>B</em>, a randomly-determined
42618    order must lead to an equal chance of executing <em>A</em> first or
42619    <em>B</em> first, every time those two events are executed
42620    simultaneously.
42621
42622    A model may contain a mixture of events, some of which have
42623    Priority subobjects and some do not.  Should a combination of
42624    simultaneous events arise in which some events have priorities
42625    defined and others do not, the set of events with defined
42626    priorities must trigger in the order determined by their Priority
42627    objects, and the set of events without Priority objects must be
42628    executed in an <em>undefined</em> order with respect to each other
42629    and with respect to the events with Priority subobjects.  (Note
42630    that <em>undefined order</em> does not necessarily mean random
42631    order, although a random ordering would be a valid implementation
42632    of this requirement.)
42633
42634    The following example may help further clarify these points.
42635    Suppose a model contains four events that should be executed
42636    simultaneously, with two of the events having Priority objects
42637    with the same value and the other two events having Priority
42638    objects with the same, but different, value.  The two events with
42639    the higher priorities must be executed first, in a random order
42640    with respect to each other, and the remaining two events must be
42641    executed after them, again in a random order, for a total of four
42642    possible and equally-likely event executions: A-B-C-D, A-B-D-C,
42643    B-A-C-D, and B-A-D-C.  If, instead, the model contains four events
42644    all having the same Priority values, there are 4! or 24
42645    possible orderings, each of which must be equally likely to be
42646    chosen.  Finally, if none of the four events has a Priority
42647    subobject defined, or even if exactly one of the four events has a
42648    defined Priority, there are again 24 possible orderings, but the
42649    likelihood of choosing any particular ordering is undefined; the
42650    simulator can choose between events as it wishes.  (The SBML
42651    specification only defines the effects of priorities on Event
42652    objects with respect to <em>other</em> Event objects with
42653    priorities.  Putting a priority on a <em>single</em> Event object
42654    in a model does not cause it to fall within that scope.)
42655
42656    @section priority-eval Evaluation of Priority expressions
42657
42658    An event's Priority object 'math' expression must be
42659    evaluated at the time the Event is to be <em>executed</em>.  During
42660    a simulation, all simultaneous events have their Priority values
42661    calculated, and the event with the highest priority is selected for
42662    next execution.  Note that it is possible for the execution of one
42663    Event object to cause the Priority value of another
42664    simultaneously-executing Event object to change (as well as to
42665    trigger other events, as already noted).  Thus, after executing
42666    one event, and checking whether any other events in the model have
42667    been triggered, all remaining simultaneous events that
42668    <em>either</em> (i) have Trigger objects with attributes
42669    'persistent'=@c False <em>or</em> (ii) have Trigger
42670    expressions that did not transition from @c True to
42671    @c False, must have their Priority expression reevaluated.
42672    The highest-priority remaining event must then be selected for
42673    execution next.
42674
42675    @section priority-units Units of Priority object's mathematical expressions
42676
42677    The unit associated with the value of a Priority object's
42678    'math' expression should be @c dimensionless.  This is
42679    because the priority expression only serves to provide a relative
42680    ordering between different events, and only has meaning with
42681    respect to other Priority object expressions.  The value of
42682    Priority objects is not comparable to any other kind of object in
42683    an SBML model.
42684
42685    @note The Priority construct exists only in SBML Level&nbsp;3; it cannot
42686    be used in SBML Level&nbsp;2 or Level&nbsp;1 models.
42687
42688    @section priority-restrictions Restrictions relaxed in SBML Level&nbsp;3 Version&nbsp;2
42689
42690    In SBML Level&nbsp;3 Version&nbsp;2, the requirement that a Priority
42691    have a 'math' subelement was relaxed, making it optional.  In
42692    this case, the Priority remains undefined, and unless that information
42693    is provided in some other form (such as with an SBML Level&nbsp;3
42694    package), the Event behaves as if it had no Priority.
42695
42696    @see Event
42697    @see Delay
42698    @see EventAssignment
42699
42700    """
42701
42702    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
42703    __repr__ = _swig_repr
42704    __swig_destroy__ = _libsbml.delete_Priority
42705
42706    def __init__(self, *args):
42707        r"""
42708        __init__(Priority self, unsigned int level, unsigned int version) -> Priority
42709        __init__(Priority self, SBMLNamespaces sbmlns) -> Priority
42710        __init__(Priority self, Priority orig) -> Priority
42711
42712        This method has multiple variants; they differ in the arguments
42713         they accept.  Each variant is described separately below.
42714
42715        @par
42716        <hr>
42717        <span class='variant-sig-heading'>Method variant with the following signature</span>:
42718         <pre class='signature'>Priority(SBMLNamespaces sbmlns)</pre>
42719
42720        Creates a new Priority object using the given SBMLNamespaces object
42721        @p sbmlns.
42722
42723        @par
42724        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
42725        information.  It is used to communicate the SBML Level, Version, and (in
42726        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
42727        common approach to using libSBML's SBMLNamespaces facilities is to create an
42728        SBMLNamespaces object somewhere in a program once, then hand that object
42729        as needed to object constructors that accept SBMLNamespaces as arguments.
42730
42731        @param sbmlns an SBMLNamespaces object.
42732
42733        @throws SBMLConstructorException
42734        Thrown if the given @p sbmlns is inconsistent or incompatible
42735        with this object.
42736
42737        @note Attempting to add an object to an SBMLDocument having a different
42738        combination of SBML Level, Version and XML namespaces than the object
42739        itself will result in an error at the time a caller attempts to make the
42740        addition.  A parent object must have compatible Level, Version and XML
42741        namespaces.  (Strictly speaking, a parent may also have more XML
42742        namespaces than a child, but the reverse is not permitted.)  The
42743        restriction is necessary to ensure that an SBML model has a consistent
42744        overall structure.  This requires callers to manage their objects
42745        carefully, but the benefit is increased flexibility in how models can be
42746        created by permitting callers to create objects bottom-up if desired.  In
42747        situations where objects are not yet attached to parents (e.g.,
42748        SBMLDocument), knowledge of the intented SBML Level and Version help
42749        libSBML determine such things as whether it is valid to assign a
42750        particular value to an attribute.
42751
42752        @note The Priority construct exists only in SBML Level&nbsp;3; it
42753        cannot be used in SBML Level&nbsp;2 or Level&nbsp;1 models.
42754
42755
42756        @par
42757        <hr>
42758        <span class='variant-sig-heading'>Method variant with the following signature</span>:
42759         <pre class='signature'>Priority(long level, long version)</pre>
42760
42761        Creates a new Priority object using the given SBML @p level and @p
42762        version values.
42763
42764        @param level a long integer, the SBML Level to assign to this Priority.
42765
42766        @param version a long integer, the SBML Version to assign to this
42767        Priority.
42768
42769        @throws SBMLConstructorException
42770        Thrown if the given @p level and @p version combination are invalid
42771        or if this object is incompatible with the given level and version.
42772
42773        @note Attempting to add an object to an SBMLDocument having a different
42774        combination of SBML Level, Version and XML namespaces than the object
42775        itself will result in an error at the time a caller attempts to make the
42776        addition.  A parent object must have compatible Level, Version and XML
42777        namespaces.  (Strictly speaking, a parent may also have more XML
42778        namespaces than a child, but the reverse is not permitted.)  The
42779        restriction is necessary to ensure that an SBML model has a consistent
42780        overall structure.  This requires callers to manage their objects
42781        carefully, but the benefit is increased flexibility in how models can be
42782        created by permitting callers to create objects bottom-up if desired.  In
42783        situations where objects are not yet attached to parents (e.g.,
42784        SBMLDocument), knowledge of the intented SBML Level and Version help
42785        libSBML determine such things as whether it is valid to assign a
42786        particular value to an attribute.
42787
42788        @note The Priority construct exists only in SBML Level&nbsp;3; it
42789        cannot be used in SBML Level&nbsp;2 or Level&nbsp;1 models.
42790
42791
42792
42793        @par
42794        <hr>
42795        <span class='variant-sig-heading'>Method variant with the following signature</span>:
42796         <pre class='signature'>Priority(Priority orig)</pre>
42797
42798        Copy constructor; creates a copy of this Priority.
42799
42800        @param orig the object to copy.
42801
42802        """
42803        _libsbml.Priority_swiginit(self, _libsbml.new_Priority(*args))
42804
42805    def clone(self):
42806        r"""
42807        clone(Priority self) -> Priority
42808
42809        Creates and returns a deep copy of this Priority object.
42810
42811        @return the (deep) copy of this Priority object.
42812
42813        """
42814        return _libsbml.Priority_clone(self)
42815
42816    def getMath(self):
42817        r"""
42818        getMath(Priority self) -> ASTNode
42819
42820        Get the mathematical formula for the priority and return it
42821        as an AST.
42822
42823        @return the math of this Priority, or @c None if the math is not set.
42824
42825        """
42826        return _libsbml.Priority_getMath(self)
42827
42828    def isSetMath(self):
42829        r"""
42830        isSetMath(Priority self) -> bool
42831
42832        Predicate to test whether the formula for this delay is set.
42833
42834        @return @c True if the formula (meaning the @c math subelement) of
42835        this Priority is set, @c False otherwise.
42836
42837        """
42838        return _libsbml.Priority_isSetMath(self)
42839
42840    def setMath(self, math):
42841        r"""
42842        setMath(Priority self, ASTNode math) -> int
42843
42844        Sets the math expression of this Priority instance to a copy of the given
42845        ASTNode.
42846
42847        @param math an ASTNode representing a formula tree.
42848
42849        @return integer value indicating success/failure of the
42850        function.  @if clike The value is drawn from the
42851        enumeration #OperationReturnValues_t. @endif@~ The possible values
42852        returned by this function are:
42853        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
42854        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
42855
42856        """
42857        return _libsbml.Priority_setMath(self, math)
42858
42859    def getTypeCode(self):
42860        r"""
42861        getTypeCode(Priority self) -> int
42862
42863        Returns the libSBML type code of this object instance.
42864
42865        @par
42866        LibSBML attaches an identifying code to every kind of SBML object.  These
42867        are integer constants known as <em>SBML type codes</em>.  The names of all
42868        the codes begin with the characters <code>SBML_</code>.
42869        @if clike The set of possible type codes for core elements is defined in
42870        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
42871        SBML Level&nbsp;3 packages define their own extra enumerations of type
42872        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
42873        package).@endif@if java In the Java language interface for libSBML, the
42874        type codes are defined as static integer constants in the interface class
42875        {@link libsbmlConstants}.  @endif@if python In the Python language
42876        interface for libSBML, the type codes are defined as static integer
42877        constants in the interface class @link libsbml@endlink.@endif@if csharp In
42878        the C# language interface for libSBML, the type codes are defined as
42879        static integer constants in the interface class
42880        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
42881        package plug-ins may use overlapping type codes; to identify the package
42882        to which a given object belongs, call the
42883        <code>@if conly SBase_getPackageName()
42884        @else SBase.getPackageName()
42885        @endif</code>
42886        method on the object.
42887
42888        The exception to this is lists:  all SBML-style list elements have the type
42889        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
42890        are from.
42891
42892        @return the SBML type code for this object:
42893        @link libsbml#SBML_PRIORITY SBML_PRIORITY@endlink (default).
42894        @warning <span class='warning'>The specific integer values of the possible
42895        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
42896        packages,  To fully identify the correct code, <strong>it is necessary to
42897        invoke both getPackageName() and getTypeCode()</strong> (or
42898        ListOf.getItemTypeCode()).</span>
42899
42900        @see getElementName()
42901        @see getPackageName()
42902
42903        """
42904        return _libsbml.Priority_getTypeCode(self)
42905
42906    def getElementName(self):
42907        r"""
42908        getElementName(Priority self) -> string
42909
42910        Returns the XML element name of this object, which for Priority, is
42911        always @c 'priority'.
42912
42913        @return the name of this element, i.e., @c 'priority'.
42914
42915        @see getTypeCode()
42916
42917        """
42918        return _libsbml.Priority_getElementName(self)
42919
42920    def hasRequiredElements(self):
42921        r"""
42922        hasRequiredElements(Priority self) -> bool
42923
42924        Predicate returning @c True if all the required elements for this
42925        Priority object have been set.
42926
42927        @note The required elements for a Priority object are:
42928        @li 'math' inSBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
42929        (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
42930
42931        @return a boolean value indicating whether all the required
42932        elements for this object have been defined.
42933
42934        """
42935        return _libsbml.Priority_hasRequiredElements(self)
42936
42937    def removeFromParentAndDelete(self):
42938        r"""
42939        removeFromParentAndDelete(Priority self) -> int
42940
42941        Finds this Priority's Event parent and calls unsetPriority() on it,
42942        indirectly deleting itself.
42943
42944        Overridden from the SBase function since the parent is not a ListOf.
42945
42946        @return integer value indicating success/failure of the
42947        function.  @if clike The value is drawn from the
42948        enumeration #OperationReturnValues_t. @endif@~ The possible values
42949        returned by this function are:
42950        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
42951        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
42952
42953        """
42954        return _libsbml.Priority_removeFromParentAndDelete(self)
42955
42956    def renameSIdRefs(self, oldid, newid):
42957        r"""
42958        renameSIdRefs(Priority self, string oldid, string newid)
42959
42960        Replaces all uses of a given @c SIdRef type attribute value with another
42961        value.
42962
42963        @par
42964        In SBML, object identifiers are of a data type called <code>SId</code>.
42965        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
42966        introduced for attribute values that refer to <code>SId</code> values; in
42967        previous Levels of SBML, this data type did not exist and attributes were
42968        simply described to as 'referring to an identifier', but the effective
42969        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
42970        other methods of libSBML refer to the type <code>SIdRef</code> for all
42971        Levels of SBML, even if the corresponding SBML specification did not
42972        explicitly name the data type.
42973
42974        This method works by looking at all attributes and (if appropriate)
42975        mathematical formulas in MathML content, comparing the referenced
42976        identifiers to the value of @p oldid.  If any matches are found, the
42977        matching values are replaced with @p newid.  The method does @em not
42978        descend into child elements.
42979
42980        @param oldid the old identifier.
42981        @param newid the new identifier.
42982
42983        """
42984        return _libsbml.Priority_renameSIdRefs(self, oldid, newid)
42985
42986    def renameUnitSIdRefs(self, oldid, newid):
42987        r"""
42988        renameUnitSIdRefs(Priority self, string oldid, string newid)
42989
42990        Replaces all uses of a given @c UnitSIdRef type attribute value with
42991        another value.
42992
42993        @par
42994        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
42995        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
42996        introduced for attribute values that refer to <code>UnitSId</code> values; in
42997        previous Levels of SBML, this data type did not exist and attributes were
42998        simply described to as 'referring to a unit identifier', but the effective
42999        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
43000        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
43001        Levels of SBML, even if the corresponding SBML specification did not
43002        explicitly name the data type.
43003
43004        This method works by looking at all unit identifier attribute values
43005        (including, if appropriate, inside mathematical formulas), comparing the
43006        referenced unit identifiers to the value of @p oldid.  If any matches
43007        are found, the matching values are replaced with @p newid.  The method
43008        does @em not descend into child elements.
43009
43010        @param oldid the old identifier.
43011        @param newid the new identifier.
43012
43013        """
43014        return _libsbml.Priority_renameUnitSIdRefs(self, oldid, newid)
43015
43016    def replaceSIDWithFunction(self, id, function):
43017        r"""
43018        replaceSIDWithFunction(Priority self, string id, ASTNode function)
43019
43020        @internal
43021
43022        @internal
43023
43024        """
43025        return _libsbml.Priority_replaceSIDWithFunction(self, id, function)
43026
43027# Register Priority in _libsbml:
43028_libsbml.Priority_swigregister(Priority)
43029
43030class SBO(object):
43031    r"""
43032
43033    @sbmlpackage{core}
43034
43035    @htmlinclude pkg-marker-core.html Facilities for using the Systems Biology Ontology.
43036
43037    @htmlinclude not-sbml-warning.html
43038
43039    The values of 'id' attributes on SBML components allow the components to
43040    be cross-referenced within a model. The values of 'name' attributes on
43041    SBML components provide the opportunity to assign them meaningful labels
43042    suitable for display to humans.  The specific identifiers and labels
43043    used in a model necessarily must be unrestricted by SBML, so that
43044    software and users are free to pick whatever they need.  However, this
43045    freedom makes it more difficult for software tools to determine, without
43046    additional human intervention, the semantics of models more precisely
43047    than the semantics provided by the SBML object classes defined in other
43048    sections of this document.  For example, there is nothing inherent in a
43049    parameter with identifier <code>k</code> that would indicate to a
43050    software tool it is a first-order rate constant (if that's what
43051    <code>k</code> happened to be in some given model).  However, one may
43052    need to convert a model between different representations (e.g.,
43053    Henri-Michaelis-Menten versus elementary steps), or to use it with
43054    different modeling approaches (discrete or continuous).  One may also
43055    need to relate the model components with other description formats such
43056    as SBGN (<a target='_blank'
43057    href='http://www.sbgn.org/'>http://www.sbgn.org/</a>) using deeper
43058    semantics.  Although an advanced software tool <em>might</em> be able to
43059    deduce the semantics of some model components through detailed analysis
43060    of the kinetic rate expressions and other parts of the model, this
43061    quickly becomes infeasible for any but the simplest of models.
43062
43063    An approach to solving this problem is to associate model components
43064    with terms from carefully curated controlled vocabularies (CVs).  This
43065    is the purpose of the optional 'sboTerm' attribute provided on the SBML
43066    class SBase.  The 'sboTerm' attribute always refers to terms belonging
43067    to the Systems Biology Ontology (SBO).
43068
43069    @section use Use of SBO
43070
43071    Labeling model components with terms from shared controlled vocabularies
43072    allows a software tool to identify each component using identifiers that
43073    are not tool-specific.  An example of where this is useful is the desire
43074    by many software developers to provide users with meaningful names for
43075    reaction rate equations.  Software tools with editing interfaces
43076    frequently provide these names in menus or lists of choices for users.
43077    However, without a standardized set of names or identifiers shared
43078    between developers, a given software package cannot reliably interpret
43079    the names or identifiers of reactions used in models written by other
43080    tools.
43081
43082    The first solution that might come to mind is to stipulate that certain
43083    common reactions always have the same name (e.g., 'Michaelis-Menten'), but
43084    this is simply impossible to do: not only do humans often disagree on
43085    the names themselves, but it would not allow for correction of errors or
43086    updates to the list of predefined names except by issuing new releases
43087    of the SBML specification---to say nothing of many other limitations
43088    with this approach.  Moreover, the parameters and variables that appear
43089    in rate expressions also need to be identified in a way that software
43090    tools can interpret mechanically, implying that the names of these
43091    entities would also need to be regulated.
43092
43093    The Systems Biology Ontology (SBO) provides terms for identifying most
43094    elements of SBML. The relationship implied by an 'sboTerm' on an SBML
43095    model component is <em>is-a</em> between the characteristic of the
43096    component meant to be described by %SBO on this element and the %SBO
43097    term identified by the value of the 'sboTerm'. By adding %SBO term
43098    references on the components of a model, a software tool can provide
43099    additional details using independent, shared vocabularies that can
43100    enable <em>other</em> software tools to recognize precisely what the
43101    component is meant to be.  Those tools can then act on that information.
43102    For example, if the %SBO identifier @c 'SBO:0000049' is assigned
43103    to the concept of 'first-order irreversible mass-action kinetics,
43104    continuous framework', and a given KineticLaw object in a model has an
43105    'sboTerm' attribute with this value, then regardless of the identifier
43106    and name given to the reaction itself, a software tool could use this to
43107    inform users that the reaction is a first-order irreversible mass-action
43108    reaction.  This kind of reverse engineering of the meaning of reactions
43109    in a model would be difficult to do otherwise, especially for more
43110    complex reaction types.
43111
43112    The presence of %SBO labels on Compartment, Species, and Reaction
43113    objects in SBML can help map those entities to equivalent concepts in
43114    other standards, such as (but not limited to) BioPAX (<a target='_blank'
43115    href='http://www.biopax.org/'>http://www.biopax.org/</a>), PSI-MI (<a
43116    target='_blank'
43117    href='http://www.psidev.info/index.php?q=node/60'>http://www.psidev.info</a>),
43118    or the Systems Biology Graphical Notation (SBGN, <a target='_blank'
43119    href='http://www.sbgn.org/'>http://www.sbgn.org/</a>).  Such mappings
43120    can be used in conversion procedures, or to build interfaces, with %SBO
43121    becoming a kind of 'glue' between standards of representation.
43122
43123    The presence of the label on a kinetic expression can also allow
43124    software tools to make more intelligent decisions about reaction rate
43125    expressions.  For example, an application could recognize certain types
43126    of reaction formulas as being ones it knows how to solve with optimized
43127    procedures.  The application could then use internal, optimized code
43128    implementing the rate formula indexed by identifiers such as
43129    @c 'SBO:0000049' appearing in SBML models.
43130
43131    Finally, %SBO labels may be very valuable when it comes to model
43132    integration, by helping identify interfaces, convert mathematical
43133    expressions and parameters etc.
43134
43135    Although the use of %SBO can be beneficial, it is critical to keep in
43136    mind that the presence of an 'sboTerm' value on an object <em>must not
43137    change the fundamental mathematical meaning</em> of the model.  An SBML
43138    model must be defined such that it stands on its own and does not depend
43139    on additional information added by %SBO terms for a correct mathematical
43140    interpretation.  %SBO term definitions will not imply any alternative
43141    mathematical semantics for any SBML object labeled with that term.  Two
43142    important reasons motivate this principle.  First, it would be too
43143    limiting to require all software tools to be able to understand the %SBO
43144    vocabularies in addition to understanding SBML.  Supporting %SBO is not
43145    only additional work for the software developer; for some kinds of
43146    applications, it may not make sense.  If %SBO terms on a model are
43147    optional, it follows that the SBML model <em>must</em> remain
43148    unambiguous and fully interpretable without them, because an application
43149    reading the model may ignore the terms.  Second, we believe allowing the
43150    use of 'sboTerm' to alter the mathematical meaning of a model would
43151    allow too much leeway to shoehorn inconsistent concepts into SBML
43152    objects, ultimately reducing the interoperability of the models.
43153
43154    @section relationship Relationships between SBO and SBML
43155
43156    The goal of %SBO labeling for SBML is to clarify to the fullest extent
43157    possible the nature of each element in a model.  The approach taken in
43158    %SBO begins with a hierarchically-structured set of controlled
43159    vocabularies with six main divisions: (1) entity, (2) participant role,
43160    (3) quantitative parameter, (4) modeling framework, (5) mathematical
43161    expression, and (6) interaction.  The web site for %SBO (<a
43162    target='_blank'
43163    href='http://biomodels.net/sbo'>http://biomodels.net</a>) should be
43164    consulted for the current version of the ontology.
43165
43166    The Systems Biology Ontology (SBO) is not part of SBML; it is being
43167    developed separately, to allow the modeling community to evolve the
43168    ontology independently of SBML.  However, the terms in the ontology are
43169    being designed keeping SBML components in mind, and are classified into
43170    subsets that can be directly related with SBML components such as
43171    reaction rate expressions, parameters, and others.  The use of 'sboTerm'
43172    attributes is optional, and the presence of 'sboTerm' on an element does
43173    not change the way the model is <em>interpreted</em>.  Annotating SBML
43174    elements with %SBO terms adds additional semantic information that may
43175    be used to <em>convert</em> the model into another model, or another
43176    format.  Although %SBO support provides an important source of
43177    information to understand the meaning of a model, software does not need
43178    to support 'sboTerm' to be considered SBML-compliant.
43179
43180    """
43181
43182    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
43183    __repr__ = _swig_repr
43184
43185    @staticmethod
43186    def isQuantitativeParameter(term):
43187        r"""
43188        isQuantitativeParameter(unsigned int term) -> bool
43189
43190        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43191
43192        @note The @em 'quantitative parameter' SBO term is now known as 'systems description parameter'.
43193
43194        @return @c True if @p term is-a %SBO <em>'quantiative parameter'</em>, @c False
43195        otherwise.
43196
43197        @if python @note Because this is a static method on a class, the Python
43198        language interface for libSBML will contain two variants.  One will be the
43199        expected, normal static method on the class (i.e., a regular
43200        <em>methodName</em>), and the other will be a standalone top-level
43201        function with the name <em>ClassName_methodName()</em>. This is merely an
43202        artifact of how the language interfaces are created in libSBML.  The
43203        methods are functionally identical. @endif@~
43204
43205        """
43206        return _libsbml.SBO_isQuantitativeParameter(term)
43207
43208    @staticmethod
43209    def isParticipantRole(term):
43210        r"""
43211        isParticipantRole(unsigned int term) -> bool
43212
43213        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43214
43215        @return @c True if @p term is-a %SBO <em>'participant role'</em>, @c False otherwise.
43216
43217        @if python @note Because this is a static method on a class, the Python
43218        language interface for libSBML will contain two variants.  One will be the
43219        expected, normal static method on the class (i.e., a regular
43220        <em>methodName</em>), and the other will be a standalone top-level
43221        function with the name <em>ClassName_methodName()</em>. This is merely an
43222        artifact of how the language interfaces are created in libSBML.  The
43223        methods are functionally identical. @endif@~
43224
43225        """
43226        return _libsbml.SBO_isParticipantRole(term)
43227
43228    @staticmethod
43229    def isModellingFramework(term):
43230        r"""
43231        isModellingFramework(unsigned int term) -> bool
43232
43233        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43234
43235        @return @c True if @p term is-a %SBO <em>'modeling framework'</em>, @c False otherwise.
43236
43237        @if python @note Because this is a static method on a class, the Python
43238        language interface for libSBML will contain two variants.  One will be the
43239        expected, normal static method on the class (i.e., a regular
43240        <em>methodName</em>), and the other will be a standalone top-level
43241        function with the name <em>ClassName_methodName()</em>. This is merely an
43242        artifact of how the language interfaces are created in libSBML.  The
43243        methods are functionally identical. @endif@~
43244
43245        """
43246        return _libsbml.SBO_isModellingFramework(term)
43247
43248    @staticmethod
43249    def isMathematicalExpression(term):
43250        r"""
43251        isMathematicalExpression(unsigned int term) -> bool
43252
43253        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43254
43255        @return @c True if @p term is-a %SBO <em>'mathematical expression'</em>, @c False otherwise.
43256
43257        @if python @note Because this is a static method on a class, the Python
43258        language interface for libSBML will contain two variants.  One will be the
43259        expected, normal static method on the class (i.e., a regular
43260        <em>methodName</em>), and the other will be a standalone top-level
43261        function with the name <em>ClassName_methodName()</em>. This is merely an
43262        artifact of how the language interfaces are created in libSBML.  The
43263        methods are functionally identical. @endif@~
43264
43265        """
43266        return _libsbml.SBO_isMathematicalExpression(term)
43267
43268    @staticmethod
43269    def isKineticConstant(term):
43270        r"""
43271        isKineticConstant(unsigned int term) -> bool
43272
43273        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43274
43275        @return @c True if @p term is-a %SBO <em>'kinetic constant'</em>, @c False otherwise.
43276
43277        @if python @note Because this is a static method on a class, the Python
43278        language interface for libSBML will contain two variants.  One will be the
43279        expected, normal static method on the class (i.e., a regular
43280        <em>methodName</em>), and the other will be a standalone top-level
43281        function with the name <em>ClassName_methodName()</em>. This is merely an
43282        artifact of how the language interfaces are created in libSBML.  The
43283        methods are functionally identical. @endif@~
43284
43285        """
43286        return _libsbml.SBO_isKineticConstant(term)
43287
43288    @staticmethod
43289    def isReactant(term):
43290        r"""
43291        isReactant(unsigned int term) -> bool
43292
43293        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43294
43295        @return @c True if @p term is-a %SBO <em>'reactant'</em>, @c False otherwise.
43296
43297        @if python @note Because this is a static method on a class, the Python
43298        language interface for libSBML will contain two variants.  One will be the
43299        expected, normal static method on the class (i.e., a regular
43300        <em>methodName</em>), and the other will be a standalone top-level
43301        function with the name <em>ClassName_methodName()</em>. This is merely an
43302        artifact of how the language interfaces are created in libSBML.  The
43303        methods are functionally identical. @endif@~
43304
43305        """
43306        return _libsbml.SBO_isReactant(term)
43307
43308    @staticmethod
43309    def isProduct(term):
43310        r"""
43311        isProduct(unsigned int term) -> bool
43312
43313        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43314
43315        @return @c True if @p term is-a %SBO <em>'product'</em>, @c False otherwise.
43316
43317        @if python @note Because this is a static method on a class, the Python
43318        language interface for libSBML will contain two variants.  One will be the
43319        expected, normal static method on the class (i.e., a regular
43320        <em>methodName</em>), and the other will be a standalone top-level
43321        function with the name <em>ClassName_methodName()</em>. This is merely an
43322        artifact of how the language interfaces are created in libSBML.  The
43323        methods are functionally identical. @endif@~
43324
43325        """
43326        return _libsbml.SBO_isProduct(term)
43327
43328    @staticmethod
43329    def isModifier(term):
43330        r"""
43331        isModifier(unsigned int term) -> bool
43332
43333        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43334
43335        @return @c True if @p term is-a %SBO <em>'modifier'</em>, @c False otherwise.
43336
43337        @if python @note Because this is a static method on a class, the Python
43338        language interface for libSBML will contain two variants.  One will be the
43339        expected, normal static method on the class (i.e., a regular
43340        <em>methodName</em>), and the other will be a standalone top-level
43341        function with the name <em>ClassName_methodName()</em>. This is merely an
43342        artifact of how the language interfaces are created in libSBML.  The
43343        methods are functionally identical. @endif@~
43344
43345        """
43346        return _libsbml.SBO_isModifier(term)
43347
43348    @staticmethod
43349    def isRateLaw(term):
43350        r"""
43351        isRateLaw(unsigned int term) -> bool
43352
43353        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43354
43355        @return @c True if @p term is-a %SBO <em>'rate law'</em>, @c False otherwise.
43356
43357        @if python @note Because this is a static method on a class, the Python
43358        language interface for libSBML will contain two variants.  One will be the
43359        expected, normal static method on the class (i.e., a regular
43360        <em>methodName</em>), and the other will be a standalone top-level
43361        function with the name <em>ClassName_methodName()</em>. This is merely an
43362        artifact of how the language interfaces are created in libSBML.  The
43363        methods are functionally identical. @endif@~
43364
43365        """
43366        return _libsbml.SBO_isRateLaw(term)
43367
43368    @staticmethod
43369    def isEvent(term):
43370        r"""
43371        isEvent(unsigned int term) -> bool
43372
43373        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43374
43375        @return @c True if @p term is-a %SBO <em>'event'</em>, @c False otherwise.
43376
43377        @if python @note Because this is a static method on a class, the Python
43378        language interface for libSBML will contain two variants.  One will be the
43379        expected, normal static method on the class (i.e., a regular
43380        <em>methodName</em>), and the other will be a standalone top-level
43381        function with the name <em>ClassName_methodName()</em>. This is merely an
43382        artifact of how the language interfaces are created in libSBML.  The
43383        methods are functionally identical. @endif@~
43384
43385        """
43386        return _libsbml.SBO_isEvent(term)
43387
43388    @staticmethod
43389    def isPhysicalParticipant(term):
43390        r"""
43391        isPhysicalParticipant(unsigned int term) -> bool
43392
43393        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43394
43395        @return @c True if @p term is-a %SBO <em>'physical participant</em>, @c False otherwise.
43396
43397        @if python @note Because this is a static method on a class, the Python
43398        language interface for libSBML will contain two variants.  One will be the
43399        expected, normal static method on the class (i.e., a regular
43400        <em>methodName</em>), and the other will be a standalone top-level
43401        function with the name <em>ClassName_methodName()</em>. This is merely an
43402        artifact of how the language interfaces are created in libSBML.  The
43403        methods are functionally identical. @endif@~
43404
43405        """
43406        return _libsbml.SBO_isPhysicalParticipant(term)
43407
43408    @staticmethod
43409    def isParticipant(term):
43410        r"""
43411        isParticipant(unsigned int term) -> bool
43412
43413        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43414
43415        @return @c True if @p term is-a %SBO <em>'participant'</em>, @c False otherwise.
43416
43417        @if python @note Because this is a static method on a class, the Python
43418        language interface for libSBML will contain two variants.  One will be the
43419        expected, normal static method on the class (i.e., a regular
43420        <em>methodName</em>), and the other will be a standalone top-level
43421        function with the name <em>ClassName_methodName()</em>. This is merely an
43422        artifact of how the language interfaces are created in libSBML.  The
43423        methods are functionally identical. @endif@~
43424
43425        """
43426        return _libsbml.SBO_isParticipant(term)
43427
43428    @staticmethod
43429    def isInteraction(term):
43430        r"""
43431        isInteraction(unsigned int term) -> bool
43432
43433        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43434
43435        @note The @em 'interaction' SBO term is now known as 'occurring entity representation'.
43436
43437        @return @c True if @p term is-a %SBO <em>'interaction'</em>, @c False otherwise.
43438
43439        @if python @note Because this is a static method on a class, the Python
43440        language interface for libSBML will contain two variants.  One will be the
43441        expected, normal static method on the class (i.e., a regular
43442        <em>methodName</em>), and the other will be a standalone top-level
43443        function with the name <em>ClassName_methodName()</em>. This is merely an
43444        artifact of how the language interfaces are created in libSBML.  The
43445        methods are functionally identical. @endif@~
43446
43447        """
43448        return _libsbml.SBO_isInteraction(term)
43449
43450    @staticmethod
43451    def isEntity(term):
43452        r"""
43453        isEntity(unsigned int term) -> bool
43454
43455        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43456
43457        @note The @em 'entity' SBO term is now known as 'physical entity representation'.
43458
43459        @return @c True if @p term is-a %SBO <em>'entity'</em>, @c False otherwise.
43460
43461        @if python @note Because this is a static method on a class, the Python
43462        language interface for libSBML will contain two variants.  One will be the
43463        expected, normal static method on the class (i.e., a regular
43464        <em>methodName</em>), and the other will be a standalone top-level
43465        function with the name <em>ClassName_methodName()</em>. This is merely an
43466        artifact of how the language interfaces are created in libSBML.  The
43467        methods are functionally identical. @endif@~
43468
43469        """
43470        return _libsbml.SBO_isEntity(term)
43471
43472    @staticmethod
43473    def isFunctionalEntity(term):
43474        r"""
43475        isFunctionalEntity(unsigned int term) -> bool
43476
43477        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43478
43479        @return @c True if @p term is-a %SBO <em>'functional entity'</em>, @c False otherwise.
43480
43481        @if python @note Because this is a static method on a class, the Python
43482        language interface for libSBML will contain two variants.  One will be the
43483        expected, normal static method on the class (i.e., a regular
43484        <em>methodName</em>), and the other will be a standalone top-level
43485        function with the name <em>ClassName_methodName()</em>. This is merely an
43486        artifact of how the language interfaces are created in libSBML.  The
43487        methods are functionally identical. @endif@~
43488
43489        """
43490        return _libsbml.SBO_isFunctionalEntity(term)
43491
43492    @staticmethod
43493    def isMaterialEntity(term):
43494        r"""
43495        isMaterialEntity(unsigned int term) -> bool
43496
43497        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43498
43499        @return @c True if @p term is-a %SBO <em>'material entity'</em>, @c False otherwise.
43500
43501        @if python @note Because this is a static method on a class, the Python
43502        language interface for libSBML will contain two variants.  One will be the
43503        expected, normal static method on the class (i.e., a regular
43504        <em>methodName</em>), and the other will be a standalone top-level
43505        function with the name <em>ClassName_methodName()</em>. This is merely an
43506        artifact of how the language interfaces are created in libSBML.  The
43507        methods are functionally identical. @endif@~
43508
43509        """
43510        return _libsbml.SBO_isMaterialEntity(term)
43511
43512    @staticmethod
43513    def isConservationLaw(term):
43514        r"""
43515        isConservationLaw(unsigned int term) -> bool
43516
43517        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43518
43519        @return @c True if @p term is-a %SBO <em>'conservation law'</em>, @c False otherwise.
43520
43521        @if python @note Because this is a static method on a class, the Python
43522        language interface for libSBML will contain two variants.  One will be the
43523        expected, normal static method on the class (i.e., a regular
43524        <em>methodName</em>), and the other will be a standalone top-level
43525        function with the name <em>ClassName_methodName()</em>. This is merely an
43526        artifact of how the language interfaces are created in libSBML.  The
43527        methods are functionally identical. @endif@~
43528
43529        """
43530        return _libsbml.SBO_isConservationLaw(term)
43531
43532    @staticmethod
43533    def isSteadyStateExpression(term):
43534        r"""
43535        isSteadyStateExpression(unsigned int term) -> bool
43536
43537        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43538
43539        @return @c True if @p term is-a %SBO <em>'steady state expression'</em>, @c False otherwise.
43540
43541        @if python @note Because this is a static method on a class, the Python
43542        language interface for libSBML will contain two variants.  One will be the
43543        expected, normal static method on the class (i.e., a regular
43544        <em>methodName</em>), and the other will be a standalone top-level
43545        function with the name <em>ClassName_methodName()</em>. This is merely an
43546        artifact of how the language interfaces are created in libSBML.  The
43547        methods are functionally identical. @endif@~
43548
43549        """
43550        return _libsbml.SBO_isSteadyStateExpression(term)
43551
43552    @staticmethod
43553    def isFunctionalCompartment(term):
43554        r"""
43555        isFunctionalCompartment(unsigned int term) -> bool
43556
43557        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43558
43559        @return @c True if @p term is-a %SBO <em>'functional compartment'</em>, @c False otherwise.
43560
43561        @if python @note Because this is a static method on a class, the Python
43562        language interface for libSBML will contain two variants.  One will be the
43563        expected, normal static method on the class (i.e., a regular
43564        <em>methodName</em>), and the other will be a standalone top-level
43565        function with the name <em>ClassName_methodName()</em>. This is merely an
43566        artifact of how the language interfaces are created in libSBML.  The
43567        methods are functionally identical. @endif@~
43568
43569        """
43570        return _libsbml.SBO_isFunctionalCompartment(term)
43571
43572    @staticmethod
43573    def isContinuousFramework(term):
43574        r"""
43575        isContinuousFramework(unsigned int term) -> bool
43576
43577        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43578
43579        @return @c True if @p term is-a %SBO <em>'continuous framework'</em>, @c False otherwise.
43580
43581        @if python @note Because this is a static method on a class, the Python
43582        language interface for libSBML will contain two variants.  One will be the
43583        expected, normal static method on the class (i.e., a regular
43584        <em>methodName</em>), and the other will be a standalone top-level
43585        function with the name <em>ClassName_methodName()</em>. This is merely an
43586        artifact of how the language interfaces are created in libSBML.  The
43587        methods are functionally identical. @endif@~
43588
43589        """
43590        return _libsbml.SBO_isContinuousFramework(term)
43591
43592    @staticmethod
43593    def isDiscreteFramework(term):
43594        r"""
43595        isDiscreteFramework(unsigned int term) -> bool
43596
43597        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43598
43599        @return @c True if @p term is-a %SBO <em>'discrete framework'</em>, @c False otherwise.
43600
43601        @if python @note Because this is a static method on a class, the Python
43602        language interface for libSBML will contain two variants.  One will be the
43603        expected, normal static method on the class (i.e., a regular
43604        <em>methodName</em>), and the other will be a standalone top-level
43605        function with the name <em>ClassName_methodName()</em>. This is merely an
43606        artifact of how the language interfaces are created in libSBML.  The
43607        methods are functionally identical. @endif@~
43608
43609        """
43610        return _libsbml.SBO_isDiscreteFramework(term)
43611
43612    @staticmethod
43613    def isLogicalFramework(term):
43614        r"""
43615        isLogicalFramework(unsigned int term) -> bool
43616
43617        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43618
43619        @return @c True if @p term is-a %SBO <em>'logical framework'</em>, @c False otherwise.
43620
43621        @if python @note Because this is a static method on a class, the Python
43622        language interface for libSBML will contain two variants.  One will be the
43623        expected, normal static method on the class (i.e., a regular
43624        <em>methodName</em>), and the other will be a standalone top-level
43625        function with the name <em>ClassName_methodName()</em>. This is merely an
43626        artifact of how the language interfaces are created in libSBML.  The
43627        methods are functionally identical. @endif@~
43628
43629        """
43630        return _libsbml.SBO_isLogicalFramework(term)
43631
43632    @staticmethod
43633    def isMetadataRepresentation(term):
43634        r"""
43635        isMetadataRepresentation(unsigned int term) -> bool
43636
43637        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43638
43639        @return @c True if @p term is-a %SBO <em>'metadata representation'</em>, @c False otherwise.
43640
43641        @if python @note Because this is a static method on a class, the Python
43642        language interface for libSBML will contain two variants.  One will be the
43643        expected, normal static method on the class (i.e., a regular
43644        <em>methodName</em>), and the other will be a standalone top-level
43645        function with the name <em>ClassName_methodName()</em>. This is merely an
43646        artifact of how the language interfaces are created in libSBML.  The
43647        methods are functionally identical. @endif@~
43648
43649        """
43650        return _libsbml.SBO_isMetadataRepresentation(term)
43651
43652    @staticmethod
43653    def isOccurringEntityRepresentation(term):
43654        r"""
43655        isOccurringEntityRepresentation(unsigned int term) -> bool
43656
43657        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43658
43659        @return @c True if @p term is-a %SBO <em>'occurring entity representation'</em>, @c False otherwise.
43660
43661        @if python @note Because this is a static method on a class, the Python
43662        language interface for libSBML will contain two variants.  One will be the
43663        expected, normal static method on the class (i.e., a regular
43664        <em>methodName</em>), and the other will be a standalone top-level
43665        function with the name <em>ClassName_methodName()</em>. This is merely an
43666        artifact of how the language interfaces are created in libSBML.  The
43667        methods are functionally identical. @endif@~
43668
43669        """
43670        return _libsbml.SBO_isOccurringEntityRepresentation(term)
43671
43672    @staticmethod
43673    def isPhysicalEntityRepresentation(term):
43674        r"""
43675        isPhysicalEntityRepresentation(unsigned int term) -> bool
43676
43677        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43678
43679        @return @c True if @p term is-a %SBO <em>'physical entity representation'</em>, @c False otherwise.
43680
43681        @if python @note Because this is a static method on a class, the Python
43682        language interface for libSBML will contain two variants.  One will be the
43683        expected, normal static method on the class (i.e., a regular
43684        <em>methodName</em>), and the other will be a standalone top-level
43685        function with the name <em>ClassName_methodName()</em>. This is merely an
43686        artifact of how the language interfaces are created in libSBML.  The
43687        methods are functionally identical. @endif@~
43688
43689        """
43690        return _libsbml.SBO_isPhysicalEntityRepresentation(term)
43691
43692    @staticmethod
43693    def isSystemsDescriptionParameter(term):
43694        r"""
43695        isSystemsDescriptionParameter(unsigned int term) -> bool
43696
43697        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43698
43699        @return @c True if @p term is-a %SBO <em>'systems description parameter'</em>, @c False otherwise.
43700
43701        @if python @note Because this is a static method on a class, the Python
43702        language interface for libSBML will contain two variants.  One will be the
43703        expected, normal static method on the class (i.e., a regular
43704        <em>methodName</em>), and the other will be a standalone top-level
43705        function with the name <em>ClassName_methodName()</em>. This is merely an
43706        artifact of how the language interfaces are created in libSBML.  The
43707        methods are functionally identical. @endif@~
43708
43709        """
43710        return _libsbml.SBO_isSystemsDescriptionParameter(term)
43711
43712    @staticmethod
43713    def isQuantitativeSystemsDescriptionParameter(term):
43714        r"""
43715        isQuantitativeSystemsDescriptionParameter(unsigned int term) -> bool
43716
43717        Returns @c True if the given term identifier comes from the stated branch of %SBO.
43718
43719        @return @c True if @p term is-a %SBO <em>'quantiative systems description parameter'</em>, @c False
43720        otherwise.
43721
43722        @if python @note Because this is a static method on a class, the Python
43723        language interface for libSBML will contain two variants.  One will be the
43724        expected, normal static method on the class (i.e., a regular
43725        <em>methodName</em>), and the other will be a standalone top-level
43726        function with the name <em>ClassName_methodName()</em>. This is merely an
43727        artifact of how the language interfaces are created in libSBML.  The
43728        methods are functionally identical. @endif@~
43729
43730        """
43731        return _libsbml.SBO_isQuantitativeSystemsDescriptionParameter(term)
43732
43733    @staticmethod
43734    def isObselete(term):
43735        r"""
43736        isObselete(unsigned int term) -> bool
43737
43738        Predicate for checking whether the given term is obsolete.
43739
43740        @return @c True if @p term is-a %SBO <em>'obsolete'</em> term, @c False otherwise.
43741
43742        @if python @note Because this is a static method on a class, the Python
43743        language interface for libSBML will contain two variants.  One will be the
43744        expected, normal static method on the class (i.e., a regular
43745        <em>methodName</em>), and the other will be a standalone top-level
43746        function with the name <em>ClassName_methodName()</em>. This is merely an
43747        artifact of how the language interfaces are created in libSBML.  The
43748        methods are functionally identical. @endif@~
43749
43750        """
43751        return _libsbml.SBO_isObselete(term)
43752
43753    @staticmethod
43754    def intToString(sboTerm):
43755        r"""
43756        intToString(int sboTerm) -> string
43757
43758        Returns the integer as a correctly formatted %SBO identifier string.
43759
43760        @return the given integer sboTerm as a zero-padded seven digit string.
43761
43762        @note If the sboTerm is not in the correct range
43763        (0000000&ndash;9999999), an empty string is returned.
43764
43765        @if python @note Because this is a static method on a class, the Python
43766        language interface for libSBML will contain two variants.  One will be the
43767        expected, normal static method on the class (i.e., a regular
43768        <em>methodName</em>), and the other will be a standalone top-level
43769        function with the name <em>ClassName_methodName()</em>. This is merely an
43770        artifact of how the language interfaces are created in libSBML.  The
43771        methods are functionally identical. @endif@~
43772
43773        """
43774        return _libsbml.SBO_intToString(sboTerm)
43775
43776    @staticmethod
43777    def stringToInt(sboTerm):
43778        r"""
43779        stringToInt(string sboTerm) -> int
43780
43781        Returns the string as a correctly formatted %SBO integer portion.
43782
43783        @return the given string sboTerm as an integer.  If the sboTerm is not
43784        in the correct format (a zero-padded, seven digit string), <code>-1</code> is
43785        returned.
43786
43787        @if python @note Because this is a static method on a class, the Python
43788        language interface for libSBML will contain two variants.  One will be the
43789        expected, normal static method on the class (i.e., a regular
43790        <em>methodName</em>), and the other will be a standalone top-level
43791        function with the name <em>ClassName_methodName()</em>. This is merely an
43792        artifact of how the language interfaces are created in libSBML.  The
43793        methods are functionally identical. @endif@~
43794
43795        """
43796        return _libsbml.SBO_stringToInt(sboTerm)
43797
43798    @staticmethod
43799    def checkTerm(*args):
43800        r"""
43801        checkTerm(string sboTerm) -> bool
43802        checkTerm(int sboTerm) -> bool
43803
43804        This method has multiple variants; they differ in the arguments
43805         they accept.  Each variant is described separately below.
43806
43807        @par
43808        <hr>
43809        <span class='variant-sig-heading'>Method variant with the following signature</span>:
43810         <pre class='signature'>checkTerm(string sboTerm)</pre>
43811
43812        Checks the format of the given %SBO identifier string.
43813
43814        @return @c True if sboTerm is in the correct format (a zero-padded, seven
43815        digit string), @c False otherwise.
43816
43817        @if python @note Because this is a static method on a class, the Python
43818        language interface for libSBML will contain two variants.  One will be the
43819        expected, normal static method on the class (i.e., a regular
43820        <em>methodName</em>), and the other will be a standalone top-level
43821        function with the name <em>ClassName_methodName()</em>. This is merely an
43822        artifact of how the language interfaces are created in libSBML.  The
43823        methods are functionally identical. @endif@~
43824
43825
43826        @par
43827        <hr>
43828        <span class='variant-sig-heading'>Method variant with the following signature</span>:
43829         <pre class='signature'>checkTerm(int sboTerm)</pre>
43830
43831        Checks the format of the given %SBO identifier, given in the form of
43832        the integer portion alone.
43833
43834        @return @c True if sboTerm is in the range (0000000&ndash;9999999), @c False
43835        otherwise.
43836
43837        @if python @note Because this is a static method on a class, the Python
43838        language interface for libSBML will contain two variants.  One will be the
43839        expected, normal static method on the class (i.e., a regular
43840        <em>methodName</em>), and the other will be a standalone top-level
43841        function with the name <em>ClassName_methodName()</em>. This is merely an
43842        artifact of how the language interfaces are created in libSBML.  The
43843        methods are functionally identical. @endif@~
43844
43845        """
43846        return _libsbml.SBO_checkTerm(*args)
43847
43848    @staticmethod
43849    def getParentBranch(term):
43850        r"""
43851        getParentBranch(unsigned int term) -> unsigned int
43852
43853        @internal
43854
43855        @internal
43856
43857        """
43858        return _libsbml.SBO_getParentBranch(term)
43859
43860    def __init__(self):
43861        r"""
43862        __init__(SBO self) -> SBO
43863
43864        @internal
43865
43866        """
43867        _libsbml.SBO_swiginit(self, _libsbml.new_SBO())
43868    __swig_destroy__ = _libsbml.delete_SBO
43869
43870# Register SBO in _libsbml:
43871_libsbml.SBO_swigregister(SBO)
43872
43873def SBO_isQuantitativeParameter(term):
43874    r"""
43875    SBO_isQuantitativeParameter(unsigned int term) -> bool
43876
43877    Returns @c True if the given term identifier comes from the stated branch of %SBO.
43878
43879    @note The @em 'quantitative parameter' SBO term is now known as 'systems description parameter'.
43880
43881    @return @c True if @p term is-a %SBO <em>'quantiative parameter'</em>, @c False
43882    otherwise.
43883
43884    @if python @note Because this is a static method on a class, the Python
43885    language interface for libSBML will contain two variants.  One will be the
43886    expected, normal static method on the class (i.e., a regular
43887    <em>methodName</em>), and the other will be a standalone top-level
43888    function with the name <em>ClassName_methodName()</em>. This is merely an
43889    artifact of how the language interfaces are created in libSBML.  The
43890    methods are functionally identical. @endif@~
43891
43892    """
43893    return _libsbml.SBO_isQuantitativeParameter(term)
43894
43895def SBO_isParticipantRole(term):
43896    r"""
43897    SBO_isParticipantRole(unsigned int term) -> bool
43898
43899    Returns @c True if the given term identifier comes from the stated branch of %SBO.
43900
43901    @return @c True if @p term is-a %SBO <em>'participant role'</em>, @c False otherwise.
43902
43903    @if python @note Because this is a static method on a class, the Python
43904    language interface for libSBML will contain two variants.  One will be the
43905    expected, normal static method on the class (i.e., a regular
43906    <em>methodName</em>), and the other will be a standalone top-level
43907    function with the name <em>ClassName_methodName()</em>. This is merely an
43908    artifact of how the language interfaces are created in libSBML.  The
43909    methods are functionally identical. @endif@~
43910
43911    """
43912    return _libsbml.SBO_isParticipantRole(term)
43913
43914def SBO_isModellingFramework(term):
43915    r"""
43916    SBO_isModellingFramework(unsigned int term) -> bool
43917
43918    Returns @c True if the given term identifier comes from the stated branch of %SBO.
43919
43920    @return @c True if @p term is-a %SBO <em>'modeling framework'</em>, @c False otherwise.
43921
43922    @if python @note Because this is a static method on a class, the Python
43923    language interface for libSBML will contain two variants.  One will be the
43924    expected, normal static method on the class (i.e., a regular
43925    <em>methodName</em>), and the other will be a standalone top-level
43926    function with the name <em>ClassName_methodName()</em>. This is merely an
43927    artifact of how the language interfaces are created in libSBML.  The
43928    methods are functionally identical. @endif@~
43929
43930    """
43931    return _libsbml.SBO_isModellingFramework(term)
43932
43933def SBO_isMathematicalExpression(term):
43934    r"""
43935    SBO_isMathematicalExpression(unsigned int term) -> bool
43936
43937    Returns @c True if the given term identifier comes from the stated branch of %SBO.
43938
43939    @return @c True if @p term is-a %SBO <em>'mathematical expression'</em>, @c False otherwise.
43940
43941    @if python @note Because this is a static method on a class, the Python
43942    language interface for libSBML will contain two variants.  One will be the
43943    expected, normal static method on the class (i.e., a regular
43944    <em>methodName</em>), and the other will be a standalone top-level
43945    function with the name <em>ClassName_methodName()</em>. This is merely an
43946    artifact of how the language interfaces are created in libSBML.  The
43947    methods are functionally identical. @endif@~
43948
43949    """
43950    return _libsbml.SBO_isMathematicalExpression(term)
43951
43952def SBO_isKineticConstant(term):
43953    r"""
43954    SBO_isKineticConstant(unsigned int term) -> bool
43955
43956    Returns @c True if the given term identifier comes from the stated branch of %SBO.
43957
43958    @return @c True if @p term is-a %SBO <em>'kinetic constant'</em>, @c False otherwise.
43959
43960    @if python @note Because this is a static method on a class, the Python
43961    language interface for libSBML will contain two variants.  One will be the
43962    expected, normal static method on the class (i.e., a regular
43963    <em>methodName</em>), and the other will be a standalone top-level
43964    function with the name <em>ClassName_methodName()</em>. This is merely an
43965    artifact of how the language interfaces are created in libSBML.  The
43966    methods are functionally identical. @endif@~
43967
43968    """
43969    return _libsbml.SBO_isKineticConstant(term)
43970
43971def SBO_isReactant(term):
43972    r"""
43973    SBO_isReactant(unsigned int term) -> bool
43974
43975    Returns @c True if the given term identifier comes from the stated branch of %SBO.
43976
43977    @return @c True if @p term is-a %SBO <em>'reactant'</em>, @c False otherwise.
43978
43979    @if python @note Because this is a static method on a class, the Python
43980    language interface for libSBML will contain two variants.  One will be the
43981    expected, normal static method on the class (i.e., a regular
43982    <em>methodName</em>), and the other will be a standalone top-level
43983    function with the name <em>ClassName_methodName()</em>. This is merely an
43984    artifact of how the language interfaces are created in libSBML.  The
43985    methods are functionally identical. @endif@~
43986
43987    """
43988    return _libsbml.SBO_isReactant(term)
43989
43990def SBO_isProduct(term):
43991    r"""
43992    SBO_isProduct(unsigned int term) -> bool
43993
43994    Returns @c True if the given term identifier comes from the stated branch of %SBO.
43995
43996    @return @c True if @p term is-a %SBO <em>'product'</em>, @c False otherwise.
43997
43998    @if python @note Because this is a static method on a class, the Python
43999    language interface for libSBML will contain two variants.  One will be the
44000    expected, normal static method on the class (i.e., a regular
44001    <em>methodName</em>), and the other will be a standalone top-level
44002    function with the name <em>ClassName_methodName()</em>. This is merely an
44003    artifact of how the language interfaces are created in libSBML.  The
44004    methods are functionally identical. @endif@~
44005
44006    """
44007    return _libsbml.SBO_isProduct(term)
44008
44009def SBO_isModifier(term):
44010    r"""
44011    SBO_isModifier(unsigned int term) -> bool
44012
44013    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44014
44015    @return @c True if @p term is-a %SBO <em>'modifier'</em>, @c False otherwise.
44016
44017    @if python @note Because this is a static method on a class, the Python
44018    language interface for libSBML will contain two variants.  One will be the
44019    expected, normal static method on the class (i.e., a regular
44020    <em>methodName</em>), and the other will be a standalone top-level
44021    function with the name <em>ClassName_methodName()</em>. This is merely an
44022    artifact of how the language interfaces are created in libSBML.  The
44023    methods are functionally identical. @endif@~
44024
44025    """
44026    return _libsbml.SBO_isModifier(term)
44027
44028def SBO_isRateLaw(term):
44029    r"""
44030    SBO_isRateLaw(unsigned int term) -> bool
44031
44032    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44033
44034    @return @c True if @p term is-a %SBO <em>'rate law'</em>, @c False otherwise.
44035
44036    @if python @note Because this is a static method on a class, the Python
44037    language interface for libSBML will contain two variants.  One will be the
44038    expected, normal static method on the class (i.e., a regular
44039    <em>methodName</em>), and the other will be a standalone top-level
44040    function with the name <em>ClassName_methodName()</em>. This is merely an
44041    artifact of how the language interfaces are created in libSBML.  The
44042    methods are functionally identical. @endif@~
44043
44044    """
44045    return _libsbml.SBO_isRateLaw(term)
44046
44047def SBO_isEvent(term):
44048    r"""
44049    SBO_isEvent(unsigned int term) -> bool
44050
44051    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44052
44053    @return @c True if @p term is-a %SBO <em>'event'</em>, @c False otherwise.
44054
44055    @if python @note Because this is a static method on a class, the Python
44056    language interface for libSBML will contain two variants.  One will be the
44057    expected, normal static method on the class (i.e., a regular
44058    <em>methodName</em>), and the other will be a standalone top-level
44059    function with the name <em>ClassName_methodName()</em>. This is merely an
44060    artifact of how the language interfaces are created in libSBML.  The
44061    methods are functionally identical. @endif@~
44062
44063    """
44064    return _libsbml.SBO_isEvent(term)
44065
44066def SBO_isPhysicalParticipant(term):
44067    r"""
44068    SBO_isPhysicalParticipant(unsigned int term) -> bool
44069
44070    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44071
44072    @return @c True if @p term is-a %SBO <em>'physical participant</em>, @c False otherwise.
44073
44074    @if python @note Because this is a static method on a class, the Python
44075    language interface for libSBML will contain two variants.  One will be the
44076    expected, normal static method on the class (i.e., a regular
44077    <em>methodName</em>), and the other will be a standalone top-level
44078    function with the name <em>ClassName_methodName()</em>. This is merely an
44079    artifact of how the language interfaces are created in libSBML.  The
44080    methods are functionally identical. @endif@~
44081
44082    """
44083    return _libsbml.SBO_isPhysicalParticipant(term)
44084
44085def SBO_isParticipant(term):
44086    r"""
44087    SBO_isParticipant(unsigned int term) -> bool
44088
44089    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44090
44091    @return @c True if @p term is-a %SBO <em>'participant'</em>, @c False otherwise.
44092
44093    @if python @note Because this is a static method on a class, the Python
44094    language interface for libSBML will contain two variants.  One will be the
44095    expected, normal static method on the class (i.e., a regular
44096    <em>methodName</em>), and the other will be a standalone top-level
44097    function with the name <em>ClassName_methodName()</em>. This is merely an
44098    artifact of how the language interfaces are created in libSBML.  The
44099    methods are functionally identical. @endif@~
44100
44101    """
44102    return _libsbml.SBO_isParticipant(term)
44103
44104def SBO_isInteraction(term):
44105    r"""
44106    SBO_isInteraction(unsigned int term) -> bool
44107
44108    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44109
44110    @note The @em 'interaction' SBO term is now known as 'occurring entity representation'.
44111
44112    @return @c True if @p term is-a %SBO <em>'interaction'</em>, @c False otherwise.
44113
44114    @if python @note Because this is a static method on a class, the Python
44115    language interface for libSBML will contain two variants.  One will be the
44116    expected, normal static method on the class (i.e., a regular
44117    <em>methodName</em>), and the other will be a standalone top-level
44118    function with the name <em>ClassName_methodName()</em>. This is merely an
44119    artifact of how the language interfaces are created in libSBML.  The
44120    methods are functionally identical. @endif@~
44121
44122    """
44123    return _libsbml.SBO_isInteraction(term)
44124
44125def SBO_isEntity(term):
44126    r"""
44127    SBO_isEntity(unsigned int term) -> bool
44128
44129    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44130
44131    @note The @em 'entity' SBO term is now known as 'physical entity representation'.
44132
44133    @return @c True if @p term is-a %SBO <em>'entity'</em>, @c False otherwise.
44134
44135    @if python @note Because this is a static method on a class, the Python
44136    language interface for libSBML will contain two variants.  One will be the
44137    expected, normal static method on the class (i.e., a regular
44138    <em>methodName</em>), and the other will be a standalone top-level
44139    function with the name <em>ClassName_methodName()</em>. This is merely an
44140    artifact of how the language interfaces are created in libSBML.  The
44141    methods are functionally identical. @endif@~
44142
44143    """
44144    return _libsbml.SBO_isEntity(term)
44145
44146def SBO_isFunctionalEntity(term):
44147    r"""
44148    SBO_isFunctionalEntity(unsigned int term) -> bool
44149
44150    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44151
44152    @return @c True if @p term is-a %SBO <em>'functional entity'</em>, @c False otherwise.
44153
44154    @if python @note Because this is a static method on a class, the Python
44155    language interface for libSBML will contain two variants.  One will be the
44156    expected, normal static method on the class (i.e., a regular
44157    <em>methodName</em>), and the other will be a standalone top-level
44158    function with the name <em>ClassName_methodName()</em>. This is merely an
44159    artifact of how the language interfaces are created in libSBML.  The
44160    methods are functionally identical. @endif@~
44161
44162    """
44163    return _libsbml.SBO_isFunctionalEntity(term)
44164
44165def SBO_isMaterialEntity(term):
44166    r"""
44167    SBO_isMaterialEntity(unsigned int term) -> bool
44168
44169    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44170
44171    @return @c True if @p term is-a %SBO <em>'material entity'</em>, @c False otherwise.
44172
44173    @if python @note Because this is a static method on a class, the Python
44174    language interface for libSBML will contain two variants.  One will be the
44175    expected, normal static method on the class (i.e., a regular
44176    <em>methodName</em>), and the other will be a standalone top-level
44177    function with the name <em>ClassName_methodName()</em>. This is merely an
44178    artifact of how the language interfaces are created in libSBML.  The
44179    methods are functionally identical. @endif@~
44180
44181    """
44182    return _libsbml.SBO_isMaterialEntity(term)
44183
44184def SBO_isConservationLaw(term):
44185    r"""
44186    SBO_isConservationLaw(unsigned int term) -> bool
44187
44188    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44189
44190    @return @c True if @p term is-a %SBO <em>'conservation law'</em>, @c False otherwise.
44191
44192    @if python @note Because this is a static method on a class, the Python
44193    language interface for libSBML will contain two variants.  One will be the
44194    expected, normal static method on the class (i.e., a regular
44195    <em>methodName</em>), and the other will be a standalone top-level
44196    function with the name <em>ClassName_methodName()</em>. This is merely an
44197    artifact of how the language interfaces are created in libSBML.  The
44198    methods are functionally identical. @endif@~
44199
44200    """
44201    return _libsbml.SBO_isConservationLaw(term)
44202
44203def SBO_isSteadyStateExpression(term):
44204    r"""
44205    SBO_isSteadyStateExpression(unsigned int term) -> bool
44206
44207    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44208
44209    @return @c True if @p term is-a %SBO <em>'steady state expression'</em>, @c False otherwise.
44210
44211    @if python @note Because this is a static method on a class, the Python
44212    language interface for libSBML will contain two variants.  One will be the
44213    expected, normal static method on the class (i.e., a regular
44214    <em>methodName</em>), and the other will be a standalone top-level
44215    function with the name <em>ClassName_methodName()</em>. This is merely an
44216    artifact of how the language interfaces are created in libSBML.  The
44217    methods are functionally identical. @endif@~
44218
44219    """
44220    return _libsbml.SBO_isSteadyStateExpression(term)
44221
44222def SBO_isFunctionalCompartment(term):
44223    r"""
44224    SBO_isFunctionalCompartment(unsigned int term) -> bool
44225
44226    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44227
44228    @return @c True if @p term is-a %SBO <em>'functional compartment'</em>, @c False otherwise.
44229
44230    @if python @note Because this is a static method on a class, the Python
44231    language interface for libSBML will contain two variants.  One will be the
44232    expected, normal static method on the class (i.e., a regular
44233    <em>methodName</em>), and the other will be a standalone top-level
44234    function with the name <em>ClassName_methodName()</em>. This is merely an
44235    artifact of how the language interfaces are created in libSBML.  The
44236    methods are functionally identical. @endif@~
44237
44238    """
44239    return _libsbml.SBO_isFunctionalCompartment(term)
44240
44241def SBO_isContinuousFramework(term):
44242    r"""
44243    SBO_isContinuousFramework(unsigned int term) -> bool
44244
44245    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44246
44247    @return @c True if @p term is-a %SBO <em>'continuous framework'</em>, @c False otherwise.
44248
44249    @if python @note Because this is a static method on a class, the Python
44250    language interface for libSBML will contain two variants.  One will be the
44251    expected, normal static method on the class (i.e., a regular
44252    <em>methodName</em>), and the other will be a standalone top-level
44253    function with the name <em>ClassName_methodName()</em>. This is merely an
44254    artifact of how the language interfaces are created in libSBML.  The
44255    methods are functionally identical. @endif@~
44256
44257    """
44258    return _libsbml.SBO_isContinuousFramework(term)
44259
44260def SBO_isDiscreteFramework(term):
44261    r"""
44262    SBO_isDiscreteFramework(unsigned int term) -> bool
44263
44264    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44265
44266    @return @c True if @p term is-a %SBO <em>'discrete framework'</em>, @c False otherwise.
44267
44268    @if python @note Because this is a static method on a class, the Python
44269    language interface for libSBML will contain two variants.  One will be the
44270    expected, normal static method on the class (i.e., a regular
44271    <em>methodName</em>), and the other will be a standalone top-level
44272    function with the name <em>ClassName_methodName()</em>. This is merely an
44273    artifact of how the language interfaces are created in libSBML.  The
44274    methods are functionally identical. @endif@~
44275
44276    """
44277    return _libsbml.SBO_isDiscreteFramework(term)
44278
44279def SBO_isLogicalFramework(term):
44280    r"""
44281    SBO_isLogicalFramework(unsigned int term) -> bool
44282
44283    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44284
44285    @return @c True if @p term is-a %SBO <em>'logical framework'</em>, @c False otherwise.
44286
44287    @if python @note Because this is a static method on a class, the Python
44288    language interface for libSBML will contain two variants.  One will be the
44289    expected, normal static method on the class (i.e., a regular
44290    <em>methodName</em>), and the other will be a standalone top-level
44291    function with the name <em>ClassName_methodName()</em>. This is merely an
44292    artifact of how the language interfaces are created in libSBML.  The
44293    methods are functionally identical. @endif@~
44294
44295    """
44296    return _libsbml.SBO_isLogicalFramework(term)
44297
44298def SBO_isMetadataRepresentation(term):
44299    r"""
44300    SBO_isMetadataRepresentation(unsigned int term) -> bool
44301
44302    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44303
44304    @return @c True if @p term is-a %SBO <em>'metadata representation'</em>, @c False otherwise.
44305
44306    @if python @note Because this is a static method on a class, the Python
44307    language interface for libSBML will contain two variants.  One will be the
44308    expected, normal static method on the class (i.e., a regular
44309    <em>methodName</em>), and the other will be a standalone top-level
44310    function with the name <em>ClassName_methodName()</em>. This is merely an
44311    artifact of how the language interfaces are created in libSBML.  The
44312    methods are functionally identical. @endif@~
44313
44314    """
44315    return _libsbml.SBO_isMetadataRepresentation(term)
44316
44317def SBO_isOccurringEntityRepresentation(term):
44318    r"""
44319    SBO_isOccurringEntityRepresentation(unsigned int term) -> bool
44320
44321    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44322
44323    @return @c True if @p term is-a %SBO <em>'occurring entity representation'</em>, @c False otherwise.
44324
44325    @if python @note Because this is a static method on a class, the Python
44326    language interface for libSBML will contain two variants.  One will be the
44327    expected, normal static method on the class (i.e., a regular
44328    <em>methodName</em>), and the other will be a standalone top-level
44329    function with the name <em>ClassName_methodName()</em>. This is merely an
44330    artifact of how the language interfaces are created in libSBML.  The
44331    methods are functionally identical. @endif@~
44332
44333    """
44334    return _libsbml.SBO_isOccurringEntityRepresentation(term)
44335
44336def SBO_isPhysicalEntityRepresentation(term):
44337    r"""
44338    SBO_isPhysicalEntityRepresentation(unsigned int term) -> bool
44339
44340    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44341
44342    @return @c True if @p term is-a %SBO <em>'physical entity representation'</em>, @c False otherwise.
44343
44344    @if python @note Because this is a static method on a class, the Python
44345    language interface for libSBML will contain two variants.  One will be the
44346    expected, normal static method on the class (i.e., a regular
44347    <em>methodName</em>), and the other will be a standalone top-level
44348    function with the name <em>ClassName_methodName()</em>. This is merely an
44349    artifact of how the language interfaces are created in libSBML.  The
44350    methods are functionally identical. @endif@~
44351
44352    """
44353    return _libsbml.SBO_isPhysicalEntityRepresentation(term)
44354
44355def SBO_isSystemsDescriptionParameter(term):
44356    r"""
44357    SBO_isSystemsDescriptionParameter(unsigned int term) -> bool
44358
44359    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44360
44361    @return @c True if @p term is-a %SBO <em>'systems description parameter'</em>, @c False otherwise.
44362
44363    @if python @note Because this is a static method on a class, the Python
44364    language interface for libSBML will contain two variants.  One will be the
44365    expected, normal static method on the class (i.e., a regular
44366    <em>methodName</em>), and the other will be a standalone top-level
44367    function with the name <em>ClassName_methodName()</em>. This is merely an
44368    artifact of how the language interfaces are created in libSBML.  The
44369    methods are functionally identical. @endif@~
44370
44371    """
44372    return _libsbml.SBO_isSystemsDescriptionParameter(term)
44373
44374def SBO_isQuantitativeSystemsDescriptionParameter(term):
44375    r"""
44376    SBO_isQuantitativeSystemsDescriptionParameter(unsigned int term) -> bool
44377
44378    Returns @c True if the given term identifier comes from the stated branch of %SBO.
44379
44380    @return @c True if @p term is-a %SBO <em>'quantiative systems description parameter'</em>, @c False
44381    otherwise.
44382
44383    @if python @note Because this is a static method on a class, the Python
44384    language interface for libSBML will contain two variants.  One will be the
44385    expected, normal static method on the class (i.e., a regular
44386    <em>methodName</em>), and the other will be a standalone top-level
44387    function with the name <em>ClassName_methodName()</em>. This is merely an
44388    artifact of how the language interfaces are created in libSBML.  The
44389    methods are functionally identical. @endif@~
44390
44391    """
44392    return _libsbml.SBO_isQuantitativeSystemsDescriptionParameter(term)
44393
44394def SBO_isObselete(term):
44395    r"""
44396    SBO_isObselete(unsigned int term) -> bool
44397
44398    Predicate for checking whether the given term is obsolete.
44399
44400    @return @c True if @p term is-a %SBO <em>'obsolete'</em> term, @c False otherwise.
44401
44402    @if python @note Because this is a static method on a class, the Python
44403    language interface for libSBML will contain two variants.  One will be the
44404    expected, normal static method on the class (i.e., a regular
44405    <em>methodName</em>), and the other will be a standalone top-level
44406    function with the name <em>ClassName_methodName()</em>. This is merely an
44407    artifact of how the language interfaces are created in libSBML.  The
44408    methods are functionally identical. @endif@~
44409
44410    """
44411    return _libsbml.SBO_isObselete(term)
44412
44413def SBO_intToString(sboTerm):
44414    r"""
44415    SBO_intToString(int sboTerm) -> string
44416
44417    Returns the integer as a correctly formatted %SBO identifier string.
44418
44419    @return the given integer sboTerm as a zero-padded seven digit string.
44420
44421    @note If the sboTerm is not in the correct range
44422    (0000000&ndash;9999999), an empty string is returned.
44423
44424    @if python @note Because this is a static method on a class, the Python
44425    language interface for libSBML will contain two variants.  One will be the
44426    expected, normal static method on the class (i.e., a regular
44427    <em>methodName</em>), and the other will be a standalone top-level
44428    function with the name <em>ClassName_methodName()</em>. This is merely an
44429    artifact of how the language interfaces are created in libSBML.  The
44430    methods are functionally identical. @endif@~
44431
44432    """
44433    return _libsbml.SBO_intToString(sboTerm)
44434
44435def SBO_stringToInt(sboTerm):
44436    r"""
44437    SBO_stringToInt(string sboTerm) -> int
44438
44439    Returns the string as a correctly formatted %SBO integer portion.
44440
44441    @return the given string sboTerm as an integer.  If the sboTerm is not
44442    in the correct format (a zero-padded, seven digit string), <code>-1</code> is
44443    returned.
44444
44445    @if python @note Because this is a static method on a class, the Python
44446    language interface for libSBML will contain two variants.  One will be the
44447    expected, normal static method on the class (i.e., a regular
44448    <em>methodName</em>), and the other will be a standalone top-level
44449    function with the name <em>ClassName_methodName()</em>. This is merely an
44450    artifact of how the language interfaces are created in libSBML.  The
44451    methods are functionally identical. @endif@~
44452
44453    """
44454    return _libsbml.SBO_stringToInt(sboTerm)
44455
44456def SBO_checkTerm(*args):
44457    r"""
44458    SBO_checkTerm(string sboTerm) -> bool
44459    SBO_checkTerm(int sboTerm) -> bool
44460
44461    This method has multiple variants; they differ in the arguments
44462     they accept.  Each variant is described separately below.
44463
44464    @par
44465    <hr>
44466    <span class='variant-sig-heading'>Method variant with the following signature</span>:
44467     <pre class='signature'>checkTerm(string sboTerm)</pre>
44468
44469    Checks the format of the given %SBO identifier string.
44470
44471    @return @c True if sboTerm is in the correct format (a zero-padded, seven
44472    digit string), @c False otherwise.
44473
44474    @if python @note Because this is a static method on a class, the Python
44475    language interface for libSBML will contain two variants.  One will be the
44476    expected, normal static method on the class (i.e., a regular
44477    <em>methodName</em>), and the other will be a standalone top-level
44478    function with the name <em>ClassName_methodName()</em>. This is merely an
44479    artifact of how the language interfaces are created in libSBML.  The
44480    methods are functionally identical. @endif@~
44481
44482
44483    @par
44484    <hr>
44485    <span class='variant-sig-heading'>Method variant with the following signature</span>:
44486     <pre class='signature'>checkTerm(int sboTerm)</pre>
44487
44488    Checks the format of the given %SBO identifier, given in the form of
44489    the integer portion alone.
44490
44491    @return @c True if sboTerm is in the range (0000000&ndash;9999999), @c False
44492    otherwise.
44493
44494    @if python @note Because this is a static method on a class, the Python
44495    language interface for libSBML will contain two variants.  One will be the
44496    expected, normal static method on the class (i.e., a regular
44497    <em>methodName</em>), and the other will be a standalone top-level
44498    function with the name <em>ClassName_methodName()</em>. This is merely an
44499    artifact of how the language interfaces are created in libSBML.  The
44500    methods are functionally identical. @endif@~
44501
44502    """
44503    return _libsbml.SBO_checkTerm(*args)
44504
44505def SBO_getParentBranch(term):
44506    r"""
44507    SBO_getParentBranch(unsigned int term) -> unsigned int
44508
44509    @internal
44510
44511    @internal
44512
44513    """
44514    return _libsbml.SBO_getParentBranch(term)
44515
44516class SyntaxChecker(object):
44517    r"""
44518
44519    @sbmlpackage{core}
44520
44521    @htmlinclude pkg-marker-core.html Methods for checking the validity of SBML identifiers.
44522
44523    @htmlinclude not-sbml-warning.html
44524
44525    This utility class provides static methods for checking the syntax of
44526    identifiers and other text used in an SBML model.  The methods allow
44527    callers to verify that strings such as SBML identifiers and XHTML notes
44528    text conform to the SBML specifications.
44529
44530    """
44531
44532    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
44533    __repr__ = _swig_repr
44534
44535    @staticmethod
44536    def isValidSBMLSId(sid):
44537        r"""
44538        isValidSBMLSId(string sid) -> bool
44539
44540        Returns @c True or @c False depending on whether the argument
44541        string conforms to the syntax of SBML identifiers.
44542
44543        @par
44544        In SBML, identifiers that are the values of 'id' attributes on objects
44545        must conform to a data type called <code>SId</code> in the SBML
44546        specifications.  LibSBML does not provide an explicit <code>SId</code>
44547        data type; it uses ordinary character strings, which is easier for
44548        applications to support.  (LibSBML does, however, test for identifier
44549        validity at various times, such as when reading in models from files
44550        and data streams.)
44551
44552        This method provides programs with the ability to test explicitly that
44553        the identifier strings they create conform to the SBML identifier
44554        syntax.
44555
44556        @param sid string to be checked for conformance to SBML identifier
44557        syntax.
44558
44559        @return @c True if the string conforms to type SBML data type
44560        <code>SId</code>, @c False otherwise.
44561
44562        The identifier given by an object's 'id' attribute value
44563        is used to identify the object within the SBML model definition.
44564        Other objects can refer to the component using this identifier.  The
44565        data type of 'id' is always <code>SId</code> or a type derived
44566        from that, such as <code>UnitSId</code>, depending on the object in
44567        question.  All data types are defined as follows:
44568        <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
44569        letter ::= 'a'..'z','A'..'Z'
44570        digit  ::= '0'..'9'
44571        idChar ::= letter | digit | '_'
44572        SId    ::= ( letter | '_' ) idChar*
44573        </pre>
44574
44575        The equality of <code>SId</code> and <code>SId</code>-derived values
44576        in SBML is determined by an exact character sequence match; i.e.,
44577        comparisons of these identifiers must be performed in a case-sensitive
44578        manner.  This applies to all uses of <code>SId</code>,
44579        <code>SIdRef</code>, and derived types.
44580
44581        @if python @note Because this is a static method on a class, the Python
44582        language interface for libSBML will contain two variants.  One will be the
44583        expected, normal static method on the class (i.e., a regular
44584        <em>methodName</em>), and the other will be a standalone top-level
44585        function with the name <em>ClassName_methodName()</em>. This is merely an
44586        artifact of how the language interfaces are created in libSBML.  The
44587        methods are functionally identical. @endif@~
44588
44589        @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~
44590        @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~
44591
44592        """
44593        return _libsbml.SyntaxChecker_isValidSBMLSId(sid)
44594
44595    @staticmethod
44596    def isValidXMLID(id):
44597        r"""
44598        isValidXMLID(string id) -> bool
44599
44600        Returns @c True or @c False depending on whether the argument string
44601        conforms to the XML data type <code>ID</code>.
44602
44603        @par
44604        The optional attribute named 'metaid', present on every major SBML
44605        component type, is for supporting metadata annotations using RDF (<a
44606        href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
44607        attribute value has the data type <a
44608        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
44609        identifier type, which means each 'metaid' value must be globally unique
44610        within an SBML file.  The latter point is important, because the
44611        uniqueness criterion applies across <em>any</em> attribute with type
44612        <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
44613        by SBML---something to be aware of if your application-specific XML
44614        content inside the 'annotation' subelement happens to use the XML
44615        <code>ID</code> type.  Although SBML itself specifies the use of <a
44616        href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
44617        the 'metaid' attribute, SBML-compatible applications should be careful if
44618        they use XML <code>ID</code>'s in XML portions of a model that are not
44619        defined by SBML, such as in the application-specific content of the
44620        'annotation' subelement.  Finally, note that LibSBML does not provide an
44621        explicit XML <code>ID</code> data type; it uses ordinary character
44622        strings, which is easier for applications to support.
44623
44624        This method provides programs with the ability to test explicitly that
44625        the identifier strings they create conform to the SBML identifier
44626        syntax.
44627
44628        @param id string to be checked for conformance to the syntax of
44629        <a target='_blank' href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.
44630
44631        @return @c True if the string is a syntactically-valid value for the
44632        XML type <a target='_blank'
44633        href='http://www.w3.org/TR/REC-xml/#id'>ID</a>, @c False otherwise.
44634
44635        @note @htmlinclude xmlid-syntax.html
44636
44637        @if python @note Because this is a static method on a class, the Python
44638        language interface for libSBML will contain two variants.  One will be the
44639        expected, normal static method on the class (i.e., a regular
44640        <em>methodName</em>), and the other will be a standalone top-level
44641        function with the name <em>ClassName_methodName()</em>. This is merely an
44642        artifact of how the language interfaces are created in libSBML.  The
44643        methods are functionally identical. @endif@~
44644
44645        @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~
44646        @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~
44647
44648        """
44649        return _libsbml.SyntaxChecker_isValidXMLID(id)
44650
44651    @staticmethod
44652    def isValidXMLanyURI(uri):
44653        r"""
44654        isValidXMLanyURI(string uri) -> bool
44655
44656        Returns @c True or @c False depending on whether the @p uri argument string
44657        conforms to the XML data type <code>anyURI</code>.
44658
44659        Type anyURI is defined by XML Schema 1.0. It is a character string
44660        data type whose values are interpretable as URIs (Universal Resource
44661        Identifiers) as described by the W3C document RFC 3986.  LibSBML
44662        does not provide an explicit XML <code>anyURI</code> data type; it uses
44663        ordinary character strings, which is easier for applications to
44664        support.  LibSBML does, however, test for anyURI validity at
44665        various times, such as when reading in models from files and data
44666        streams.
44667
44668        This method provides programs with the ability to test explicitly that
44669        the strings they create conform to the XML anyURI syntax.
44670
44671        @param uri string to be checked for conformance to the syntax of
44672        <a target='_blank'
44673        href='http://www.w3.org/TR/xmlschema-2/#anyURI'>anyURI</a>.
44674
44675        @return @c True if the string is a syntactically-valid value for the
44676        XML type <a target='_blank'
44677        href='http://www.w3.org/TR/xmlschema-2/#anyURI'>anyURI</a>,
44678        @c False otherwise.
44679
44680        @if python @note Because this is a static method on a class, the Python
44681        language interface for libSBML will contain two variants.  One will be the
44682        expected, normal static method on the class (i.e., a regular
44683        <em>methodName</em>), and the other will be a standalone top-level
44684        function with the name <em>ClassName_methodName()</em>. This is merely an
44685        artifact of how the language interfaces are created in libSBML.  The
44686        methods are functionally identical. @endif@~
44687
44688        """
44689        return _libsbml.SyntaxChecker_isValidXMLanyURI(uri)
44690
44691    @staticmethod
44692    def isValidUnitSId(units):
44693        r"""
44694        isValidUnitSId(string units) -> bool
44695
44696        Returns @c True or @c False depending on whether the argument string
44697        conforms to the syntax of SBML unit identifiers.
44698
44699        In SBML, the identifiers of units (of both the predefined units and
44700        user-defined units) must conform to a data type called
44701        <code>UnitSId</code> in the SBML specifications.  LibSBML does not
44702        provide an explicit <code>UnitSId</code> data type; it uses ordinary
44703        character strings, which is easier for applications to support.
44704        LibSBML does, however, test for identifier validity at various times,
44705        such as when reading in models from files and data streams.
44706
44707        This method provides programs with the ability to test explicitly that
44708        the identifier strings they create conform to the SBML identifier
44709        syntax.
44710
44711        @param units string to be checked for conformance to SBML unit
44712        identifier syntax.
44713
44714        @return @c True if the string conforms to type SBML data type
44715        <code>UnitSId</code>, @c False otherwise.
44716
44717        @note @htmlinclude unitid-syntax.html
44718
44719        @if python @note Because this is a static method on a class, the Python
44720        language interface for libSBML will contain two variants.  One will be the
44721        expected, normal static method on the class (i.e., a regular
44722        <em>methodName</em>), and the other will be a standalone top-level
44723        function with the name <em>ClassName_methodName()</em>. This is merely an
44724        artifact of how the language interfaces are created in libSBML.  The
44725        methods are functionally identical. @endif@~
44726
44727        @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~
44728        @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~
44729
44730        """
44731        return _libsbml.SyntaxChecker_isValidUnitSId(units)
44732
44733    @staticmethod
44734    def hasExpectedXHTMLSyntax(xhtml, sbmlns=None):
44735        r"""
44736        hasExpectedXHTMLSyntax(XMLNode xhtml, SBMLNamespaces sbmlns=None) -> bool
44737
44738        Returns @c True or @c False depending on whether the given XMLNode
44739        object contains valid XHTML content.
44740
44741        @par
44742        The optional SBML element named 'notes', present on every major SBML
44743        component type (and in SBML Level&nbsp;3, the 'message' subelement of
44744        Constraint), is intended as a place for storing optional information
44745        intended to be seen by humans.  An example use of the 'notes' element
44746        would be to contain formatted user comments about the model element in
44747        which the 'notes' element is enclosed.  Every object derived directly or
44748        indirectly from type SBase can have a separate value for 'notes', allowing
44749        users considerable freedom when adding comments to their models.
44750
44751        The format of 'notes' elements conform to the definition of <a
44752        target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
44753        However, the content cannot be @em entirely free-form; it must satisfy
44754        certain requirements defined in the <a target='_blank'
44755        href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
44756        for specific SBML Levels.  To help verify the formatting of 'notes'
44757        content, libSBML provides the static utility method
44758        SyntaxChecker.hasExpectedXHTMLSyntax(); this
44759        method implements a verification process that lets callers check whether
44760        the content of a given XMLNode object conforms to the SBML requirements
44761        for 'notes' and 'message' structure.  Developers are urged to consult the
44762        appropriate <a target='_blank'
44763        href='http://sbml.org/Documents/Specifications'>SBML specification
44764        document</a> for the Level and Version of their model for more in-depth
44765        explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and&nbsp;3
44766        specifications have considerable detail about how 'notes' element content
44767        must be structured.
44768
44769        An aspect of XHTML validity is that the content is declared to be in
44770        the XML namespace for XHTML&nbsp;1.0.  There is more than one way in
44771        which this can be done in XML.  In particular, a model might not
44772        contain the declaration within the 'notes' or 'message' subelement
44773        itself, but might instead place the declaration on an enclosing
44774        element and use an XML namespace prefix within the 'notes' element to
44775        refer to it.  In other words, the following is valid:
44776        @verbatim
44777        <sbml xmlns='http://www.sbml.org/sbml/level2/version3' level='2' version='3'
44778              xmlns:xhtml='http://www.w3.org/1999/xhtml'>
44779          <model>
44780            <notes>
44781              <xhtml:body>
44782                <xhtml:center><xhtml:h2>A Simple Mitotic Oscillator</xhtml:h2></xhtml:center>
44783                <xhtml:p>A minimal cascade model for the mitotic oscillator.</xhtml:p>
44784              </xhtml:body>
44785            </notes>
44786          ... rest of model ...
44787        </sbml>
44788        @endverbatim
44789        Contrast the above with the following, self-contained version, which
44790        places the XML namespace declaration within the <code>&lt;notes&gt;</code>
44791        element itself:
44792        @verbatim
44793        <sbml xmlns='http://www.sbml.org/sbml/level2/version3' level='2' version='3'>
44794          <model>
44795            <notes>
44796              <html xmlns='http://www.w3.org/1999/xhtml'>
44797                <head>
44798                  <title/>
44799                </head>
44800                <body>
44801                  <center><h2>A Simple Mitotic Oscillator</h2></center>
44802                  <p>A minimal cascade model for the mitotic oscillator.</p>
44803                </body>
44804              </html>
44805            </notes>
44806          ... rest of model ...
44807        </sbml>
44808        @endverbatim
44809
44810        Both of the above are valid XML.  The purpose of the @p sbmlns
44811        argument to this method is to allow callers to check the validity of
44812        'notes' and 'message' subelements whose XML namespace declarations
44813        have been put elsewhere in the manner illustrated above.  Callers can
44814        can pass in the SBMLNamespaces object of a higher-level model
44815        component if the XMLNode object does not itself have the XML namespace
44816        declaration for XHTML&nbsp;1.0.
44817
44818        @param xhtml the XMLNode to be checked for conformance.
44819        @param sbmlns the SBMLNamespaces associated with the object.
44820
44821        @return @c True if the XMLNode content conforms, @c False otherwise.
44822
44823        @if python @note Because this is a static method on a class, the Python
44824        language interface for libSBML will contain two variants.  One will be the
44825        expected, normal static method on the class (i.e., a regular
44826        <em>methodName</em>), and the other will be a standalone top-level
44827        function with the name <em>ClassName_methodName()</em>. This is merely an
44828        artifact of how the language interfaces are created in libSBML.  The
44829        methods are functionally identical. @endif@~
44830
44831        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
44832
44833
44834
44835        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
44836
44837        """
44838        return _libsbml.SyntaxChecker_hasExpectedXHTMLSyntax(xhtml, sbmlns)
44839
44840    @staticmethod
44841    def isValidInternalSId(sid):
44842        r"""
44843        isValidInternalSId(string sid) -> bool
44844
44845        @internal
44846
44847        @internal
44848
44849        """
44850        return _libsbml.SyntaxChecker_isValidInternalSId(sid)
44851
44852    @staticmethod
44853    def isValidInternalUnitSId(sid):
44854        r"""
44855        isValidInternalUnitSId(string sid) -> bool
44856
44857        @internal
44858
44859        @internal
44860
44861        """
44862        return _libsbml.SyntaxChecker_isValidInternalUnitSId(sid)
44863
44864    def __init__(self):
44865        r"""
44866        __init__(SyntaxChecker self) -> SyntaxChecker
44867
44868        @internal
44869
44870        """
44871        _libsbml.SyntaxChecker_swiginit(self, _libsbml.new_SyntaxChecker())
44872    __swig_destroy__ = _libsbml.delete_SyntaxChecker
44873
44874# Register SyntaxChecker in _libsbml:
44875_libsbml.SyntaxChecker_swigregister(SyntaxChecker)
44876
44877def SyntaxChecker_isValidSBMLSId(sid):
44878    r"""
44879    SyntaxChecker_isValidSBMLSId(string sid) -> bool
44880
44881    Returns @c True or @c False depending on whether the argument
44882    string conforms to the syntax of SBML identifiers.
44883
44884    @par
44885    In SBML, identifiers that are the values of 'id' attributes on objects
44886    must conform to a data type called <code>SId</code> in the SBML
44887    specifications.  LibSBML does not provide an explicit <code>SId</code>
44888    data type; it uses ordinary character strings, which is easier for
44889    applications to support.  (LibSBML does, however, test for identifier
44890    validity at various times, such as when reading in models from files
44891    and data streams.)
44892
44893    This method provides programs with the ability to test explicitly that
44894    the identifier strings they create conform to the SBML identifier
44895    syntax.
44896
44897    @param sid string to be checked for conformance to SBML identifier
44898    syntax.
44899
44900    @return @c True if the string conforms to type SBML data type
44901    <code>SId</code>, @c False otherwise.
44902
44903    The identifier given by an object's 'id' attribute value
44904    is used to identify the object within the SBML model definition.
44905    Other objects can refer to the component using this identifier.  The
44906    data type of 'id' is always <code>SId</code> or a type derived
44907    from that, such as <code>UnitSId</code>, depending on the object in
44908    question.  All data types are defined as follows:
44909    <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
44910    letter ::= 'a'..'z','A'..'Z'
44911    digit  ::= '0'..'9'
44912    idChar ::= letter | digit | '_'
44913    SId    ::= ( letter | '_' ) idChar*
44914    </pre>
44915
44916    The equality of <code>SId</code> and <code>SId</code>-derived values
44917    in SBML is determined by an exact character sequence match; i.e.,
44918    comparisons of these identifiers must be performed in a case-sensitive
44919    manner.  This applies to all uses of <code>SId</code>,
44920    <code>SIdRef</code>, and derived types.
44921
44922    @if python @note Because this is a static method on a class, the Python
44923    language interface for libSBML will contain two variants.  One will be the
44924    expected, normal static method on the class (i.e., a regular
44925    <em>methodName</em>), and the other will be a standalone top-level
44926    function with the name <em>ClassName_methodName()</em>. This is merely an
44927    artifact of how the language interfaces are created in libSBML.  The
44928    methods are functionally identical. @endif@~
44929
44930    @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~
44931    @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~
44932
44933    """
44934    return _libsbml.SyntaxChecker_isValidSBMLSId(sid)
44935
44936def SyntaxChecker_isValidXMLID(id):
44937    r"""
44938    SyntaxChecker_isValidXMLID(string id) -> bool
44939
44940    Returns @c True or @c False depending on whether the argument string
44941    conforms to the XML data type <code>ID</code>.
44942
44943    @par
44944    The optional attribute named 'metaid', present on every major SBML
44945    component type, is for supporting metadata annotations using RDF (<a
44946    href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
44947    attribute value has the data type <a
44948    href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
44949    identifier type, which means each 'metaid' value must be globally unique
44950    within an SBML file.  The latter point is important, because the
44951    uniqueness criterion applies across <em>any</em> attribute with type
44952    <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
44953    by SBML---something to be aware of if your application-specific XML
44954    content inside the 'annotation' subelement happens to use the XML
44955    <code>ID</code> type.  Although SBML itself specifies the use of <a
44956    href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
44957    the 'metaid' attribute, SBML-compatible applications should be careful if
44958    they use XML <code>ID</code>'s in XML portions of a model that are not
44959    defined by SBML, such as in the application-specific content of the
44960    'annotation' subelement.  Finally, note that LibSBML does not provide an
44961    explicit XML <code>ID</code> data type; it uses ordinary character
44962    strings, which is easier for applications to support.
44963
44964    This method provides programs with the ability to test explicitly that
44965    the identifier strings they create conform to the SBML identifier
44966    syntax.
44967
44968    @param id string to be checked for conformance to the syntax of
44969    <a target='_blank' href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.
44970
44971    @return @c True if the string is a syntactically-valid value for the
44972    XML type <a target='_blank'
44973    href='http://www.w3.org/TR/REC-xml/#id'>ID</a>, @c False otherwise.
44974
44975    @note @htmlinclude xmlid-syntax.html
44976
44977    @if python @note Because this is a static method on a class, the Python
44978    language interface for libSBML will contain two variants.  One will be the
44979    expected, normal static method on the class (i.e., a regular
44980    <em>methodName</em>), and the other will be a standalone top-level
44981    function with the name <em>ClassName_methodName()</em>. This is merely an
44982    artifact of how the language interfaces are created in libSBML.  The
44983    methods are functionally identical. @endif@~
44984
44985    @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~
44986    @see @if clike isValidUnitSId(string sid) @else SyntaxChecker.isValidUnitSId() @endif@~
44987
44988    """
44989    return _libsbml.SyntaxChecker_isValidXMLID(id)
44990
44991def SyntaxChecker_isValidXMLanyURI(uri):
44992    r"""
44993    SyntaxChecker_isValidXMLanyURI(string uri) -> bool
44994
44995    Returns @c True or @c False depending on whether the @p uri argument string
44996    conforms to the XML data type <code>anyURI</code>.
44997
44998    Type anyURI is defined by XML Schema 1.0. It is a character string
44999    data type whose values are interpretable as URIs (Universal Resource
45000    Identifiers) as described by the W3C document RFC 3986.  LibSBML
45001    does not provide an explicit XML <code>anyURI</code> data type; it uses
45002    ordinary character strings, which is easier for applications to
45003    support.  LibSBML does, however, test for anyURI validity at
45004    various times, such as when reading in models from files and data
45005    streams.
45006
45007    This method provides programs with the ability to test explicitly that
45008    the strings they create conform to the XML anyURI syntax.
45009
45010    @param uri string to be checked for conformance to the syntax of
45011    <a target='_blank'
45012    href='http://www.w3.org/TR/xmlschema-2/#anyURI'>anyURI</a>.
45013
45014    @return @c True if the string is a syntactically-valid value for the
45015    XML type <a target='_blank'
45016    href='http://www.w3.org/TR/xmlschema-2/#anyURI'>anyURI</a>,
45017    @c False otherwise.
45018
45019    @if python @note Because this is a static method on a class, the Python
45020    language interface for libSBML will contain two variants.  One will be the
45021    expected, normal static method on the class (i.e., a regular
45022    <em>methodName</em>), and the other will be a standalone top-level
45023    function with the name <em>ClassName_methodName()</em>. This is merely an
45024    artifact of how the language interfaces are created in libSBML.  The
45025    methods are functionally identical. @endif@~
45026
45027    """
45028    return _libsbml.SyntaxChecker_isValidXMLanyURI(uri)
45029
45030def SyntaxChecker_isValidUnitSId(units):
45031    r"""
45032    SyntaxChecker_isValidUnitSId(string units) -> bool
45033
45034    Returns @c True or @c False depending on whether the argument string
45035    conforms to the syntax of SBML unit identifiers.
45036
45037    In SBML, the identifiers of units (of both the predefined units and
45038    user-defined units) must conform to a data type called
45039    <code>UnitSId</code> in the SBML specifications.  LibSBML does not
45040    provide an explicit <code>UnitSId</code> data type; it uses ordinary
45041    character strings, which is easier for applications to support.
45042    LibSBML does, however, test for identifier validity at various times,
45043    such as when reading in models from files and data streams.
45044
45045    This method provides programs with the ability to test explicitly that
45046    the identifier strings they create conform to the SBML identifier
45047    syntax.
45048
45049    @param units string to be checked for conformance to SBML unit
45050    identifier syntax.
45051
45052    @return @c True if the string conforms to type SBML data type
45053    <code>UnitSId</code>, @c False otherwise.
45054
45055    @note @htmlinclude unitid-syntax.html
45056
45057    @if python @note Because this is a static method on a class, the Python
45058    language interface for libSBML will contain two variants.  One will be the
45059    expected, normal static method on the class (i.e., a regular
45060    <em>methodName</em>), and the other will be a standalone top-level
45061    function with the name <em>ClassName_methodName()</em>. This is merely an
45062    artifact of how the language interfaces are created in libSBML.  The
45063    methods are functionally identical. @endif@~
45064
45065    @see @if clike isValidSBMLSId(string sid) @else SyntaxChecker.isValidSBMLSId() @endif@~
45066    @see @if clike isValidXMLID(string sid) @else SyntaxChecker.isValidXMLID() @endif@~
45067
45068    """
45069    return _libsbml.SyntaxChecker_isValidUnitSId(units)
45070
45071def SyntaxChecker_hasExpectedXHTMLSyntax(xhtml, sbmlns=None):
45072    r"""
45073    SyntaxChecker_hasExpectedXHTMLSyntax(XMLNode xhtml, SBMLNamespaces sbmlns=None) -> bool
45074
45075    Returns @c True or @c False depending on whether the given XMLNode
45076    object contains valid XHTML content.
45077
45078    @par
45079    The optional SBML element named 'notes', present on every major SBML
45080    component type (and in SBML Level&nbsp;3, the 'message' subelement of
45081    Constraint), is intended as a place for storing optional information
45082    intended to be seen by humans.  An example use of the 'notes' element
45083    would be to contain formatted user comments about the model element in
45084    which the 'notes' element is enclosed.  Every object derived directly or
45085    indirectly from type SBase can have a separate value for 'notes', allowing
45086    users considerable freedom when adding comments to their models.
45087
45088    The format of 'notes' elements conform to the definition of <a
45089    target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
45090    However, the content cannot be @em entirely free-form; it must satisfy
45091    certain requirements defined in the <a target='_blank'
45092    href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
45093    for specific SBML Levels.  To help verify the formatting of 'notes'
45094    content, libSBML provides the static utility method
45095    SyntaxChecker.hasExpectedXHTMLSyntax(); this
45096    method implements a verification process that lets callers check whether
45097    the content of a given XMLNode object conforms to the SBML requirements
45098    for 'notes' and 'message' structure.  Developers are urged to consult the
45099    appropriate <a target='_blank'
45100    href='http://sbml.org/Documents/Specifications'>SBML specification
45101    document</a> for the Level and Version of their model for more in-depth
45102    explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and&nbsp;3
45103    specifications have considerable detail about how 'notes' element content
45104    must be structured.
45105
45106    An aspect of XHTML validity is that the content is declared to be in
45107    the XML namespace for XHTML&nbsp;1.0.  There is more than one way in
45108    which this can be done in XML.  In particular, a model might not
45109    contain the declaration within the 'notes' or 'message' subelement
45110    itself, but might instead place the declaration on an enclosing
45111    element and use an XML namespace prefix within the 'notes' element to
45112    refer to it.  In other words, the following is valid:
45113    @verbatim
45114    <sbml xmlns='http://www.sbml.org/sbml/level2/version3' level='2' version='3'
45115          xmlns:xhtml='http://www.w3.org/1999/xhtml'>
45116      <model>
45117        <notes>
45118          <xhtml:body>
45119            <xhtml:center><xhtml:h2>A Simple Mitotic Oscillator</xhtml:h2></xhtml:center>
45120            <xhtml:p>A minimal cascade model for the mitotic oscillator.</xhtml:p>
45121          </xhtml:body>
45122        </notes>
45123      ... rest of model ...
45124    </sbml>
45125    @endverbatim
45126    Contrast the above with the following, self-contained version, which
45127    places the XML namespace declaration within the <code>&lt;notes&gt;</code>
45128    element itself:
45129    @verbatim
45130    <sbml xmlns='http://www.sbml.org/sbml/level2/version3' level='2' version='3'>
45131      <model>
45132        <notes>
45133          <html xmlns='http://www.w3.org/1999/xhtml'>
45134            <head>
45135              <title/>
45136            </head>
45137            <body>
45138              <center><h2>A Simple Mitotic Oscillator</h2></center>
45139              <p>A minimal cascade model for the mitotic oscillator.</p>
45140            </body>
45141          </html>
45142        </notes>
45143      ... rest of model ...
45144    </sbml>
45145    @endverbatim
45146
45147    Both of the above are valid XML.  The purpose of the @p sbmlns
45148    argument to this method is to allow callers to check the validity of
45149    'notes' and 'message' subelements whose XML namespace declarations
45150    have been put elsewhere in the manner illustrated above.  Callers can
45151    can pass in the SBMLNamespaces object of a higher-level model
45152    component if the XMLNode object does not itself have the XML namespace
45153    declaration for XHTML&nbsp;1.0.
45154
45155    @param xhtml the XMLNode to be checked for conformance.
45156    @param sbmlns the SBMLNamespaces associated with the object.
45157
45158    @return @c True if the XMLNode content conforms, @c False otherwise.
45159
45160    @if python @note Because this is a static method on a class, the Python
45161    language interface for libSBML will contain two variants.  One will be the
45162    expected, normal static method on the class (i.e., a regular
45163    <em>methodName</em>), and the other will be a standalone top-level
45164    function with the name <em>ClassName_methodName()</em>. This is merely an
45165    artifact of how the language interfaces are created in libSBML.  The
45166    methods are functionally identical. @endif@~
45167
45168    @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
45169
45170
45171
45172    @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
45173
45174    """
45175    return _libsbml.SyntaxChecker_hasExpectedXHTMLSyntax(xhtml, sbmlns)
45176
45177def SyntaxChecker_isValidInternalSId(sid):
45178    r"""
45179    SyntaxChecker_isValidInternalSId(string sid) -> bool
45180
45181    @internal
45182
45183    @internal
45184
45185    """
45186    return _libsbml.SyntaxChecker_isValidInternalSId(sid)
45187
45188def SyntaxChecker_isValidInternalUnitSId(sid):
45189    r"""
45190    SyntaxChecker_isValidInternalUnitSId(string sid) -> bool
45191
45192    @internal
45193
45194    @internal
45195
45196    """
45197    return _libsbml.SyntaxChecker_isValidInternalUnitSId(sid)
45198
45199class StoichiometryMath(SBase):
45200    r"""
45201
45202    @sbmlpackage{core}
45203
45204    @htmlinclude pkg-marker-core.html Stochiometry expressions in SBML Level 2 reactions.
45205
45206    @section l2-stoichiometries Stoichiometries in SBML Level 2
45207
45208    In SBML Level 2, product and reactant stoichiometries can be specified
45209    using @em either the 'stoichiometry' attribute or a 'stoichiometryMath'
45210    element in a SpeciesReference object.  The 'stoichiometry' attribute is
45211    of type @c float and should contain values greater than zero (0).  The
45212    'stoichiometryMath' element is implemented as an element containing a
45213    MathML expression.  These two are mutually exclusive; only one of
45214    'stoichiometry' or 'stoichiometryMath' should be defined in a given
45215    SpeciesReference instance.  When neither the attribute nor the element
45216    is present, the value of 'stoichiometry' in the enclosing
45217    SpeciesReference instance defaults to @c 1.
45218
45219    For maximum interoperability, SpeciesReference's 'stoichiometry'
45220    attribute should be used in preference to 'stoichiometryMath' when a
45221    species' stoichiometry is a simple scalar number (integer or decimal).
45222    When the stoichiometry is a rational number, or when it is a more
45223    complicated formula, 'stoichiometryMath' must be used.  The MathML
45224    expression in 'stoichiometryMath' may also refer to identifiers of
45225    entities in a model (except reaction identifiers).  However, the only
45226    species identifiers that can be used in 'stoichiometryMath' are those
45227    referenced in the enclosing Reaction's list of reactants, products and
45228    modifiers.
45229
45230    The 'stoichiometry' attribute and the 'stoichiometryMath' element, when
45231    either is used, is each interpreted as a factor applied to the reaction
45232    rate to produce the rate of change of the species identified by the
45233    'species' attribute in the enclosing SpeciesReference.  This is the
45234    normal interpretation of a stoichiometry, but in SBML, one additional
45235    consideration has to be taken into account.  The reaction rate, which is
45236    the result of the KineticLaw's 'math' element, is always in the model's
45237    @em substance per @em time units.  However, the rate of change of the
45238    species will involve the species' @em substance units (i.e., the units
45239    identified by the Species object's 'substanceUnits' attribute), and
45240    these units may be different from the model's default @em substance
45241    units.  If the units @em are different, the stoichiometry must
45242    incorporate a conversion factor for converting the model's @em substance
45243    units to the species' @em substance units.  The conversion factor is
45244    assumed to be included in the scalar value of the 'stoichiometry'
45245    attribute if 'stoichiometry' is used.  If instead 'stoichiometryMath' is
45246    used, then the product of the model's 'substance' units times the
45247    'stoichiometryMath' units must match the @em substance units of the
45248    species.  Note that in either case, if the species' units and the
45249    model's default @em substance units are the same, the stoichiometry ends
45250    up being a dimensionless number and equivalent to the standard chemical
45251    stoichiometry found in textbooks.  Examples and more explanations of
45252    this are given in the SBML specification.
45253
45254    The following is a simple example of a species reference for species
45255    @c 'X0', with stoichiometry @c 2, in a list of reactants within a reaction
45256    having the identifier @c 'J1':
45257    @verbatim
45258     <model>
45259         ...
45260         <listOfReactions>
45261             <reaction id='J1'>
45262                 <listOfReactants>
45263                     <speciesReference species='X0' stoichiometry='2'>
45264                 </listOfReactants>
45265                 ...
45266             </reaction>
45267             ...
45268         </listOfReactions>
45269         ...
45270     </model>
45271     @endverbatim
45272
45273    The following is a more complex example of a species reference for
45274    species @c 'X0', with a stoichiometry formula consisting of
45275    a rational number:
45276    @verbatim
45277     <model>
45278         ...
45279         <listOfReactions>
45280             <reaction id='J1'>
45281                 <listOfReactants>
45282                     <speciesReference species='X0'>
45283                         <stoichiometryMath>
45284                             <math xmlns='http://www.w3.org/1998/Math/MathML'>
45285                                 <cn type='rational'> 3 <sep/> 2 </cn>
45286                             </math>
45287                         </stoichiometryMath>
45288                     </speciesReference>
45289                 </listOfReactants>
45290                 ...
45291             </reaction>
45292             ...
45293         </listOfReactions>
45294         ...
45295     </model>
45296     @endverbatim
45297
45298    Additional discussions of stoichiometries and implications for species
45299    and reactions are included in the documentation of SpeciesReference
45300    class.
45301
45302    @section l3-stoichiometries Stoichiometries in SBML Level 3
45303
45304    The StoichiometryMath construct is not defined in SBML Level&nbsp;3.
45305    Instead, Level&nbsp;3 defines the identifier of
45306    SpeciesReference objects as a stand-in for the stoichiometry of the
45307    reactant or product being referenced, and allows that identifier to be
45308    used elsewhere in SBML models, including (for example) InitialAssignment
45309    objects.  This makes it possible to achieve the same effect as
45310    StoichiometryMath, but with other SBML objects.  For instance, to
45311    produce a stoichiometry value that is a rational number, a model can use
45312    InitialAssignment to assign the identifier of a SpeciesReference object
45313    to a MathML expression evaluating to a rational number.  This is
45314    analogous to the same way that, in Level&nbsp;2, the model would use
45315    StoichiometryMath with a MathML expression evaluating to a rational
45316    number.
45317
45318    In SBML Level 2, the stoichiometry of a reactant or product is a
45319    combination of both a <em>biochemical stoichiometry</em> (meaning, the
45320    standard stoichiometry of a species in a reaction) and any necessary
45321    unit conversion factors. The introduction of an explicit attribute on
45322    the Species object for a conversion factor allows Level&nbsp;3 to avoid
45323    having to overload the meaning of stoichiometry.  In Level&nbsp;3, the
45324    stoichiometry given by a SpeciesReference object in a reaction is a
45325    'proper' biochemical stoichiometry, meaning a dimensionless number free
45326    of unit conversions.
45327
45328    @see SpeciesReference
45329    @see Reaction
45330
45331    """
45332
45333    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
45334    __repr__ = _swig_repr
45335    __swig_destroy__ = _libsbml.delete_StoichiometryMath
45336
45337    def __init__(self, *args):
45338        r"""
45339        __init__(StoichiometryMath self, unsigned int level, unsigned int version) -> StoichiometryMath
45340        __init__(StoichiometryMath self, SBMLNamespaces sbmlns) -> StoichiometryMath
45341        __init__(StoichiometryMath self, StoichiometryMath orig) -> StoichiometryMath
45342
45343        This method has multiple variants; they differ in the arguments
45344         they accept.  Each variant is described separately below.
45345
45346        @par
45347        <hr>
45348        <span class='variant-sig-heading'>Method variant with the following signature</span>:
45349         <pre class='signature'>StoichiometryMath(SBMLNamespaces sbmlns)</pre>
45350
45351        Creates a new StoichiometryMath object using the given SBMLNamespaces object
45352        @p sbmlns.
45353
45354        @par
45355        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
45356        information.  It is used to communicate the SBML Level, Version, and (in
45357        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
45358        common approach to using libSBML's SBMLNamespaces facilities is to create an
45359        SBMLNamespaces object somewhere in a program once, then hand that object
45360        as needed to object constructors that accept SBMLNamespaces as arguments.
45361
45362        @param sbmlns an SBMLNamespaces object.
45363
45364        @throws SBMLConstructorException
45365        Thrown if the given @p sbmlns is inconsistent or incompatible
45366        with this object.
45367
45368        @note The StoichiometryMath construct exists only in SBML Level&nbsp;2.
45369        It is an optional construct available for defining the stoichiometries of
45370        reactants and products in Reaction objects.  Note that a different
45371        mechanism is used in SBML Level&nbsp;3, where StoichiometryMath is not
45372        available.  Please consult the top of this libSBML StoichiometryMath
45373        documentation for more information about the differences between SBML
45374        Level&nbsp;2 and&nbsp;3 with respect to stoichiometries.
45375
45376        @note Attempting to add an object to an SBMLDocument having a different
45377        combination of SBML Level, Version and XML namespaces than the object
45378        itself will result in an error at the time a caller attempts to make the
45379        addition.  A parent object must have compatible Level, Version and XML
45380        namespaces.  (Strictly speaking, a parent may also have more XML
45381        namespaces than a child, but the reverse is not permitted.)  The
45382        restriction is necessary to ensure that an SBML model has a consistent
45383        overall structure.  This requires callers to manage their objects
45384        carefully, but the benefit is increased flexibility in how models can be
45385        created by permitting callers to create objects bottom-up if desired.  In
45386        situations where objects are not yet attached to parents (e.g.,
45387        SBMLDocument), knowledge of the intented SBML Level and Version help
45388        libSBML determine such things as whether it is valid to assign a
45389        particular value to an attribute.
45390
45391
45392        @par
45393        <hr>
45394        <span class='variant-sig-heading'>Method variant with the following signature</span>:
45395         <pre class='signature'>StoichiometryMath(long level, long version)</pre>
45396
45397        Creates a new StoichiometryMath object using the given SBML @p level
45398        values.
45399
45400        @param level a long integer, the SBML Level to assign to this StoichiometryMath.
45401
45402        @param version a long integer, the SBML Version to assign to this
45403        StoichiometryMath.
45404
45405        @throws SBMLConstructorException
45406        Thrown if the given @p level and @p version combination are invalid
45407        or if this object is incompatible with the given level and version.
45408
45409        @note The StoichiometryMath construct exists only in SBML Level&nbsp;2.
45410        It is an optional construct available for defining the stoichiometries of
45411        reactants and products in Reaction objects.  Note that a different
45412        mechanism is used in SBML Level&nbsp;3, where StoichiometryMath is not
45413        available.  Please consult the top of this libSBML StoichiometryMath
45414        documentation for more information about the differences between SBML
45415        Level&nbsp;2 and&nbsp;3 with respect to stoichiometries.
45416
45417        @note Attempting to add an object to an SBMLDocument having a different
45418        combination of SBML Level, Version and XML namespaces than the object
45419        itself will result in an error at the time a caller attempts to make the
45420        addition.  A parent object must have compatible Level, Version and XML
45421        namespaces.  (Strictly speaking, a parent may also have more XML
45422        namespaces than a child, but the reverse is not permitted.)  The
45423        restriction is necessary to ensure that an SBML model has a consistent
45424        overall structure.  This requires callers to manage their objects
45425        carefully, but the benefit is increased flexibility in how models can be
45426        created by permitting callers to create objects bottom-up if desired.  In
45427        situations where objects are not yet attached to parents (e.g.,
45428        SBMLDocument), knowledge of the intented SBML Level and Version help
45429        libSBML determine such things as whether it is valid to assign a
45430        particular value to an attribute.
45431
45432
45433        @par
45434        <hr>
45435        <span class='variant-sig-heading'>Method variant with the following signature</span>:
45436         <pre class='signature'>StoichiometryMath(StoichiometryMath orig)</pre>
45437
45438        Copy constructor; creates a copy of this StoichiometryMath.
45439
45440        @param orig the object to copy.
45441
45442        """
45443        _libsbml.StoichiometryMath_swiginit(self, _libsbml.new_StoichiometryMath(*args))
45444
45445    def clone(self):
45446        r"""
45447        clone(StoichiometryMath self) -> StoichiometryMath
45448
45449        Creates and returns a deep copy of this StoichiometryMath object.
45450
45451        @return the (deep) copy of this StoichiometryMath object.
45452
45453        """
45454        return _libsbml.StoichiometryMath_clone(self)
45455
45456    def getMath(self):
45457        r"""
45458        getMath(StoichiometryMath self) -> ASTNode
45459
45460        Retrieves the mathematical formula within this StoichiometryMath and
45461        return it as an AST.
45462
45463        @return the math of this StoichiometryMath, or @c None if the math is not set.
45464
45465        @note The StoichiometryMath construct exists only in SBML Level&nbsp;2.
45466        It is an optional construct available for defining the stoichiometries of
45467        reactants and products in Reaction objects.  Note that a different
45468        mechanism is used in SBML Level&nbsp;3, where StoichiometryMath is not
45469        available.  Please consult the top of this libSBML StoichiometryMath
45470        documentation for more information about the differences between SBML
45471        Level&nbsp;2 and&nbsp;3 with respect to stoichiometries.
45472
45473        """
45474        return _libsbml.StoichiometryMath_getMath(self)
45475
45476    def isSetMath(self):
45477        r"""
45478        isSetMath(StoichiometryMath self) -> bool
45479
45480        Predicate to test whether the math for this StoichiometryMath object
45481        is set.
45482
45483        @return @c True if the formula (meaning the @c math subelement) of
45484        this StoichiometryMath is set, @c False otherwise.
45485
45486        @note The StoichiometryMath construct exists only in SBML Level&nbsp;2.
45487        It is an optional construct available for defining the stoichiometries of
45488        reactants and products in Reaction objects.  Note that a different
45489        mechanism is used in SBML Level&nbsp;3, where StoichiometryMath is not
45490        available.  Please consult the top of this libSBML StoichiometryMath
45491        documentation for more information about the differences between SBML
45492        Level&nbsp;2 and&nbsp;3 with respect to stoichiometries.
45493
45494        """
45495        return _libsbml.StoichiometryMath_isSetMath(self)
45496
45497    def setMath(self, math):
45498        r"""
45499        setMath(StoichiometryMath self, ASTNode math) -> int
45500
45501        Sets the 'math' expression of this StoichiometryMath instance to a
45502        copy of the given ASTNode.
45503
45504        @param math an ASTNode representing a formula tree.
45505
45506        @return integer value indicating success/failure of the
45507        function.  @if clike The value is drawn from the
45508        enumeration #OperationReturnValues_t. @endif@~ The possible values
45509        returned by this function are:
45510        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
45511        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
45512
45513        @note The StoichiometryMath construct exists only in SBML Level&nbsp;2.
45514        It is an optional construct available for defining the stoichiometries of
45515        reactants and products in Reaction objects.  Note that a different
45516        mechanism is used in SBML Level&nbsp;3, where StoichiometryMath is not
45517        available.  Please consult the top of this libSBML StoichiometryMath
45518        documentation for more information about the differences between SBML
45519        Level&nbsp;2 and&nbsp;3 with respect to stoichiometries.
45520
45521        """
45522        return _libsbml.StoichiometryMath_setMath(self, math)
45523
45524    def getDerivedUnitDefinition(self, *args):
45525        r"""
45526        getDerivedUnitDefinition(StoichiometryMath self) -> UnitDefinition
45527        getDerivedUnitDefinition(StoichiometryMath self) -> UnitDefinition
45528
45529        Calculates and returns a UnitDefinition object that expresses the
45530        units returned by the math expression in this StoichiometryMath
45531        object.
45532
45533        The units are calculated based on the mathematical expression in the
45534        StoichiometryMath and the model quantities referenced by
45535        <code>&lt;ci&gt;</code> elements used within that expression.  The
45536        StoichiometryMath.getDerivedUnitDefinition() method returns the
45537        calculated units.
45538
45539        Note that the functionality that facilitates unit analysis depends
45540        on the model as a whole.  Thus, in cases where the object has not
45541        been added to a model or the model itself is incomplete,
45542        unit analysis is not possible and this method will return @c None.
45543
45544        @return a UnitDefinition that expresses the units of the math,
45545        or @c None if one cannot be constructed.
45546
45547        @warning <span class='warning'>Note that it is possible the 'math'
45548        expression in the StoichiometryMath instance contains literal numbers or
45549        parameters with undeclared units.  In those cases, it is not possible to
45550        calculate the units of the overall expression without making
45551        assumptions.  LibSBML does not make assumptions about the units, and
45552        StoichiometryMath.getDerivedUnitDefinition() only returns the units as
45553        far as it is able to determine them.  For example, in an expression
45554        <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and
45555        <em>Y</em> does not, it will return the units of <em>X</em>.  When using
45556        this method, <strong>it is critical that callers also invoke the
45557        method</strong> StoichiometryMath.containsUndeclaredUnits() <strong>to
45558        determine whether this situation holds</strong>.  Callers should take
45559        suitable action in those situations.</span>
45560
45561        @see containsUndeclaredUnits()
45562
45563        """
45564        return _libsbml.StoichiometryMath_getDerivedUnitDefinition(self, *args)
45565
45566    def containsUndeclaredUnits(self, *args):
45567        r"""
45568        containsUndeclaredUnits(StoichiometryMath self) -> bool
45569        containsUndeclaredUnits(StoichiometryMath self) -> bool
45570
45571        Predicate returning @c True if the math
45572        expression of this StoichiometryMath object contains literal numbers
45573        or parameters with undeclared units.
45574
45575        The StoichiometryMath.getDerivedUnitDefinition() method returns what
45576        libSBML computes the units of the Stoichiometry to be, to the extent
45577        that libSBML can compute them.  However, if the expression contains
45578        literal numbers or parameters with undeclared units, libSBML may not
45579        be able to compute the full units of the expression and will only
45580        return what it can compute.  Callers should always use
45581        StoichiometryMath.containsUndeclaredUnits() when using
45582        StoichiometryMath.getDerivedUnitDefinition() to decide whether the
45583        returned units may be incomplete.
45584
45585        @return @c True if the math expression of this StoichiometryMath
45586        includes numbers/parameters with undeclared units, @c False otherwise.
45587
45588        @note A return value of @c True indicates that the UnitDefinition
45589        returned by StoichiometryMath.getDerivedUnitDefinition() may not
45590        accurately represent the units of the expression.
45591
45592        @see getDerivedUnitDefinition()
45593
45594        """
45595        return _libsbml.StoichiometryMath_containsUndeclaredUnits(self, *args)
45596
45597    def getTypeCode(self):
45598        r"""
45599        getTypeCode(StoichiometryMath self) -> int
45600
45601        Returns the libSBML type code of this object instance.
45602
45603        @par
45604        LibSBML attaches an identifying code to every kind of SBML object.  These
45605        are integer constants known as <em>SBML type codes</em>.  The names of all
45606        the codes begin with the characters <code>SBML_</code>.
45607        @if clike The set of possible type codes for core elements is defined in
45608        the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
45609        SBML Level&nbsp;3 packages define their own extra enumerations of type
45610        codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
45611        package).@endif@if java In the Java language interface for libSBML, the
45612        type codes are defined as static integer constants in the interface class
45613        {@link libsbmlConstants}.  @endif@if python In the Python language
45614        interface for libSBML, the type codes are defined as static integer
45615        constants in the interface class @link libsbml@endlink.@endif@if csharp In
45616        the C# language interface for libSBML, the type codes are defined as
45617        static integer constants in the interface class
45618        @link libsbmlcs.libsbml@endlink.@endif@~  Note that different Level&nbsp;3
45619        package plug-ins may use overlapping type codes; to identify the package
45620        to which a given object belongs, call the
45621        <code>@if conly SBase_getPackageName()
45622        @else SBase.getPackageName()
45623        @endif</code>
45624        method on the object.
45625
45626        The exception to this is lists:  all SBML-style list elements have the type
45627        @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
45628        are from.
45629
45630        @return the SBML type code for this object:
45631        @link libsbml#SBML_STOICHIOMETRY_MATH SBML_STOICHIOMETRY_MATH@endlink (default).
45632
45633        @warning <span class='warning'>The specific integer values of the possible
45634        type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
45635        packages,  To fully identify the correct code, <strong>it is necessary to
45636        invoke both getPackageName() and getTypeCode()</strong> (or
45637        ListOf.getItemTypeCode()).</span>
45638
45639        @see getElementName()
45640        @see getPackageName()
45641
45642        """
45643        return _libsbml.StoichiometryMath_getTypeCode(self)
45644
45645    def getElementName(self):
45646        r"""
45647        getElementName(StoichiometryMath self) -> string
45648
45649        Returns the XML element name of this object, which for StoichiometryMath, is
45650        always @c 'stoichiometryMath'.
45651
45652        @return the name of this element, i.e., @c 'stoichiometryMath'.
45653
45654        """
45655        return _libsbml.StoichiometryMath_getElementName(self)
45656
45657    def hasRequiredElements(self):
45658        r"""
45659        hasRequiredElements(StoichiometryMath self) -> bool
45660
45661        Predicate returning @c True if
45662        all the required elements for this StoichiometryMath object
45663        have been set.
45664
45665        @note The required elements for a StoichiometryMath object are:
45666        @li 'math'
45667
45668        @return a boolean value indicating whether all the required
45669        elements for this object have been defined.
45670
45671        """
45672        return _libsbml.StoichiometryMath_hasRequiredElements(self)
45673
45674    def removeFromParentAndDelete(self):
45675        r"""
45676        removeFromParentAndDelete(StoichiometryMath self) -> int
45677
45678        Finds this StoichiometryMath's SpeciesReference parent and calls
45679        unsetStoichiometryMath() on it, indirectly deleting itself.
45680
45681        Overridden from the SBase function since the parent is not a ListOf.
45682
45683        @return integer value indicating success/failure of the
45684        function.  @if clike The value is drawn from the
45685        enumeration #OperationReturnValues_t. @endif@~ The possible values
45686        returned by this function are:
45687        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
45688        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
45689
45690        """
45691        return _libsbml.StoichiometryMath_removeFromParentAndDelete(self)
45692
45693    def renameSIdRefs(self, oldid, newid):
45694        r"""
45695        renameSIdRefs(StoichiometryMath self, string oldid, string newid)
45696
45697        Replaces all uses of a given @c SIdRef type attribute value with another
45698        value.
45699
45700        @par
45701        In SBML, object identifiers are of a data type called <code>SId</code>.
45702        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
45703        introduced for attribute values that refer to <code>SId</code> values; in
45704        previous Levels of SBML, this data type did not exist and attributes were
45705        simply described to as 'referring to an identifier', but the effective
45706        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
45707        other methods of libSBML refer to the type <code>SIdRef</code> for all
45708        Levels of SBML, even if the corresponding SBML specification did not
45709        explicitly name the data type.
45710
45711        This method works by looking at all attributes and (if appropriate)
45712        mathematical formulas in MathML content, comparing the referenced
45713        identifiers to the value of @p oldid.  If any matches are found, the
45714        matching values are replaced with @p newid.  The method does @em not
45715        descend into child elements.
45716
45717        @param oldid the old identifier.
45718        @param newid the new identifier.
45719
45720        """
45721        return _libsbml.StoichiometryMath_renameSIdRefs(self, oldid, newid)
45722
45723    def renameUnitSIdRefs(self, oldid, newid):
45724        r"""
45725        renameUnitSIdRefs(StoichiometryMath self, string oldid, string newid)
45726
45727        Replaces all uses of a given @c UnitSIdRef type attribute value with
45728        another value.
45729
45730        @par
45731        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
45732        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
45733        introduced for attribute values that refer to <code>UnitSId</code> values; in
45734        previous Levels of SBML, this data type did not exist and attributes were
45735        simply described to as 'referring to a unit identifier', but the effective
45736        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
45737        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
45738        Levels of SBML, even if the corresponding SBML specification did not
45739        explicitly name the data type.
45740
45741        This method works by looking at all unit identifier attribute values
45742        (including, if appropriate, inside mathematical formulas), comparing the
45743        referenced unit identifiers to the value of @p oldid.  If any matches
45744        are found, the matching values are replaced with @p newid.  The method
45745        does @em not descend into child elements.
45746
45747        @param oldid the old identifier.
45748        @param newid the new identifier.
45749
45750        """
45751        return _libsbml.StoichiometryMath_renameUnitSIdRefs(self, oldid, newid)
45752
45753    def replaceSIDWithFunction(self, id, function):
45754        r"""
45755        replaceSIDWithFunction(StoichiometryMath self, string id, ASTNode function)
45756
45757        @internal
45758
45759        @internal
45760
45761        """
45762        return _libsbml.StoichiometryMath_replaceSIDWithFunction(self, id, function)
45763
45764# Register StoichiometryMath in _libsbml:
45765_libsbml.StoichiometryMath_swigregister(StoichiometryMath)
45766
45767class SBMLNamespaces(object):
45768    r"""
45769
45770    @sbmlpackage{core}
45771
45772    @htmlinclude pkg-marker-core.html Set of SBML Level + Version + namespace triples.
45773
45774    @htmlinclude not-sbml-warning.html
45775
45776    There are differences in the definitions of components between different
45777    SBML Levels, as well as Versions within Levels.  For example, the
45778    'sboTerm' attribute was not introduced until Level&nbsp;2
45779    Version&nbsp;2, and then only on certain component classes; the SBML
45780    Level&nbsp;2 Version&nbsp;3 specification moved the 'sboTerm' attribute
45781    to the SBase class, thereby allowing nearly all components to have SBO
45782    annotations.  As a result of differences such as those, libSBML needs to
45783    track the SBML Level and Version of every object created.
45784
45785    The purpose of the SBMLNamespaces object class is to make it easier to
45786    communicate SBML Level and Version data between libSBML constructors and
45787    other methods.  The SBMLNamespaces object class tracks 3-tuples
45788    (triples) consisting of SBML Level, Version, and the corresponding SBML
45789    XML namespace.
45790
45791    The plural name (SBMLNamespaces) is not a mistake, because in SBML
45792    Level&nbsp;3, objects may have extensions added by Level&nbsp;3 packages
45793    used by a given model and therefore may have multiple namespaces
45794    associated with them; however, until the introduction of SBML
45795    Level&nbsp;3, the SBMLNamespaces object only records one SBML
45796    Level/Version/namespace combination at a time.  Most constructors for
45797    SBML objects in libSBML take a SBMLNamespaces object as an argument,
45798    thereby allowing the constructor to produce the proper combination of
45799    attributes and other internal data structures for the given SBML Level
45800    and Version.
45801
45802    """
45803
45804    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
45805    __repr__ = _swig_repr
45806    __swig_destroy__ = _libsbml.delete_SBMLNamespaces
45807
45808    def __init__(self, *args):
45809        r"""
45810        __init__(SBMLNamespaces self, unsigned int level=SBML_DEFAULT_LEVEL, unsigned int version=SBML_DEFAULT_VERSION) -> SBMLNamespaces
45811        __init__(SBMLNamespaces self, unsigned int level, unsigned int version, string pkgName, unsigned int pkgVersion, string pkgPrefix="") -> SBMLNamespaces
45812        __init__(SBMLNamespaces self, SBMLNamespaces orig) -> SBMLNamespaces
45813
45814        This method has multiple variants; they differ in the arguments
45815         they accept.  Each variant is described separately below.
45816
45817        @par
45818        <hr>
45819        <span class='variant-sig-heading'>Method variant with the following signature</span>:
45820         <pre class='signature'>SBMLNamespaces(SBMLNamespaces orig)</pre>
45821
45822        Copy constructor; creates a copy of a SBMLNamespaces.
45823
45824        @param orig the SBMLNamespaces instance to copy.
45825
45826
45827        @par
45828        <hr>
45829        <span class='variant-sig-heading'>Method variant with the following signature</span>:
45830         <pre class='signature'>SBMLNamespaces(long level, long version, string &pkgName, long pkgVersion, string pkgPrefix = '')</pre>
45831
45832        (For extensions) Creates a new SBMLNamespaces object corresponding to
45833        the combination of (1) the given SBML @p level and @p version, and (2)
45834        the given @p package with the @p package @p version.
45835
45836        @par
45837        SBMLNamespaces objects are used in libSBML to communicate SBML Level and
45838        Version data between constructors and other methods.  The SBMLNamespaces
45839        object class holds triples consisting of SBML Level, Version, and the
45840        corresponding SBML XML namespace.  Most constructors for SBML objects in
45841        libSBML take a SBMLNamespaces object as an argument, thereby allowing
45842        the constructor to produce the proper combination of attributes and
45843        other internal data structures for the given SBML Level and Version.
45844
45845        The plural name (SBMLNamespaces) is not a mistake, because in SBML
45846        Level&nbsp;3, objects may have extensions added by Level&nbsp;3 packages
45847        used by a given model and therefore may have multiple namespaces
45848        associated with them.  In SBML Levels below Level&nbsp;3, the
45849        SBMLNamespaces object only records one SBML Level/Version/namespace
45850        combination at a time.  Most constructors for SBML objects in libSBML
45851        take a SBMLNamespaces object as an argument, thereby allowing the
45852        constructor to produce the proper combination of attributes and other
45853        internal data structures for the given SBML Level and Version.
45854
45855        @param level   the SBML Level.
45856        @param version the SBML Version.
45857        @param pkgName the string of package name (e.g. 'layout', 'multi').
45858        @param pkgVersion the package version.
45859        @param pkgPrefix the prefix of the package namespace (e.g. 'layout', 'multi') to be added.
45860        The package's name will be used if the given string is empty (default).
45861
45862        @throws SBMLExtensionException if the extension module that supports the
45863        combination of the given SBML Level, SBML Version, package name, and
45864        package version has not been registered with libSBML.
45865
45866
45867
45868        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
45869
45870
45871        @par
45872        <hr>
45873        <span class='variant-sig-heading'>Method variant with the following signature</span>:
45874         <pre class='signature'>SBMLNamespaces(long level = SBML_DEFAULT_LEVEL, long version = SBML_DEFAULT_VERSION)</pre>
45875
45876        Creates a new SBMLNamespaces object corresponding to the given SBML
45877        @p level and @p version.
45878
45879        @par
45880        SBMLNamespaces objects are used in libSBML to communicate SBML Level and
45881        Version data between constructors and other methods.  The SBMLNamespaces
45882        object class holds triples consisting of SBML Level, Version, and the
45883        corresponding SBML XML namespace.  Most constructors for SBML objects in
45884        libSBML take a SBMLNamespaces object as an argument, thereby allowing
45885        the constructor to produce the proper combination of attributes and
45886        other internal data structures for the given SBML Level and Version.
45887
45888        The plural name (SBMLNamespaces) is not a mistake, because in SBML
45889        Level&nbsp;3, objects may have extensions added by Level&nbsp;3 packages
45890        used by a given model and therefore may have multiple namespaces
45891        associated with them.  In SBML Levels below Level&nbsp;3, the
45892        SBMLNamespaces object only records one SBML Level/Version/namespace
45893        combination at a time.  Most constructors for SBML objects in libSBML
45894        take a SBMLNamespaces object as an argument, thereby allowing the
45895        constructor to produce the proper combination of attributes and other
45896        internal data structures for the given SBML Level and Version.
45897
45898        @param level the SBML level.
45899        @param version the SBML version.
45900
45901        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
45902
45903
45904
45905        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
45906
45907        """
45908        _libsbml.SBMLNamespaces_swiginit(self, _libsbml.new_SBMLNamespaces(*args))
45909
45910    def clone(self):
45911        r"""
45912        clone(SBMLNamespaces self) -> SBMLNamespaces
45913
45914        Creates and returns a deep copy of this SBMLNamespaces object.
45915
45916        @return the (deep) copy of this SBMLNamespaces object.
45917
45918        """
45919        return _libsbml.SBMLNamespaces_clone(self)
45920
45921    @staticmethod
45922    def getSBMLNamespaceURI(level, version):
45923        r"""
45924        getSBMLNamespaceURI(unsigned int level, unsigned int version) -> string
45925
45926        Returns a string representing the SBML XML namespace for the
45927        given @p level and @p version of SBML.
45928
45929        @param level the SBML level.
45930        @param version the SBML version.
45931
45932        @return a string representing the SBML namespace that reflects the
45933        SBML Level and Version specified.
45934
45935        @if python @note Because this is a static method on a class, the Python
45936        language interface for libSBML will contain two variants.  One will be the
45937        expected, normal static method on the class (i.e., a regular
45938        <em>methodName</em>), and the other will be a standalone top-level
45939        function with the name <em>ClassName_methodName()</em>. This is merely an
45940        artifact of how the language interfaces are created in libSBML.  The
45941        methods are functionally identical. @endif@~
45942
45943        """
45944        return _libsbml.SBMLNamespaces_getSBMLNamespaceURI(level, version)
45945
45946    @staticmethod
45947    def getSupportedNamespaces():
45948        r"""
45949        getSupportedNamespaces() -> List const *
45950
45951        Returns a list of all supported SBMLNamespaces in this version of
45952        libsbml.
45953
45954        @return a list with supported SBML namespaces.
45955
45956        @if python @note Because this is a static method on a class, the Python
45957        language interface for libSBML will contain two variants.  One will be the
45958        expected, normal static method on the class (i.e., a regular
45959        <em>methodName</em>), and the other will be a standalone top-level
45960        function with the name <em>ClassName_methodName()</em>. This is merely an
45961        artifact of how the language interfaces are created in libSBML.  The
45962        methods are functionally identical. @endif@~
45963
45964        """
45965        return _libsbml.SBMLNamespaces_getSupportedNamespaces()
45966
45967    @staticmethod
45968    def freeSBMLNamespaces(supportedNS):
45969        r"""
45970        freeSBMLNamespaces(List * supportedNS)
45971
45972        Frees the list of supported namespaces as generated by
45973        getSupportedNamespaces().
45974
45975        @param supportedNS the list to be freed.
45976
45977        @if python @note Because this is a static method on a class, the Python
45978        language interface for libSBML will contain two variants.  One will be the
45979        expected, normal static method on the class (i.e., a regular
45980        <em>methodName</em>), and the other will be a standalone top-level
45981        function with the name <em>ClassName_methodName()</em>. This is merely an
45982        artifact of how the language interfaces are created in libSBML.  The
45983        methods are functionally identical. @endif@~
45984
45985        """
45986        return _libsbml.SBMLNamespaces_freeSBMLNamespaces(supportedNS)
45987
45988    def getURI(self):
45989        r"""
45990        getURI(SBMLNamespaces self) -> string
45991
45992        Returns a string representing the SBML XML namespace of this
45993        object.
45994
45995        @return a string representing the SBML namespace that reflects the
45996        SBML Level and Version of this object.
45997
45998        """
45999        return _libsbml.SBMLNamespaces_getURI(self)
46000
46001    def getLevel(self, *args):
46002        r"""
46003        getLevel(SBMLNamespaces self) -> unsigned int
46004        getLevel(SBMLNamespaces self) -> unsigned int
46005
46006        Get the SBML Level of this SBMLNamespaces object.
46007
46008        @return the SBML Level of this SBMLNamespaces object.
46009
46010        """
46011        return _libsbml.SBMLNamespaces_getLevel(self, *args)
46012
46013    def getVersion(self, *args):
46014        r"""
46015        getVersion(SBMLNamespaces self) -> unsigned int
46016        getVersion(SBMLNamespaces self) -> unsigned int
46017
46018        Get the SBML Version of this SBMLNamespaces object.
46019
46020        @return the SBML Version of this SBMLNamespaces object.
46021
46022        """
46023        return _libsbml.SBMLNamespaces_getVersion(self, *args)
46024
46025    def getNamespaces(self, *args):
46026        r"""
46027        getNamespaces(SBMLNamespaces self) -> XMLNamespaces
46028        getNamespaces(SBMLNamespaces self) -> XMLNamespaces
46029
46030        Get the XML namespaces list for this SBMLNamespaces object.
46031
46032        @par
46033        SBMLNamespaces objects are used in libSBML to communicate SBML Level and
46034        Version data between constructors and other methods.  The SBMLNamespaces
46035        object class holds triples consisting of SBML Level, Version, and the
46036        corresponding SBML XML namespace.  Most constructors for SBML objects in
46037        libSBML take a SBMLNamespaces object as an argument, thereby allowing
46038        the constructor to produce the proper combination of attributes and
46039        other internal data structures for the given SBML Level and Version.
46040
46041        The plural name (SBMLNamespaces) is not a mistake, because in SBML
46042        Level&nbsp;3, objects may have extensions added by Level&nbsp;3 packages
46043        used by a given model and therefore may have multiple namespaces
46044        associated with them.  In SBML Levels below Level&nbsp;3, the
46045        SBMLNamespaces object only records one SBML Level/Version/namespace
46046        combination at a time.  Most constructors for SBML objects in libSBML
46047        take a SBMLNamespaces object as an argument, thereby allowing the
46048        constructor to produce the proper combination of attributes and other
46049        internal data structures for the given SBML Level and Version.
46050
46051        @return the XML namespaces of this SBMLNamespaces object.
46052
46053        """
46054        return _libsbml.SBMLNamespaces_getNamespaces(self, *args)
46055
46056    def addNamespaces(self, xmlns):
46057        r"""
46058        addNamespaces(SBMLNamespaces self, XMLNamespaces xmlns) -> int
46059
46060        Add the given XML namespaces list to the set of namespaces within this
46061        SBMLNamespaces object.
46062
46063        The following code gives an example of how one could add the XHTML
46064        namespace to the list of namespaces recorded by the top-level
46065        <code>&lt;sbml&gt;</code> element of a model.  It gives the new
46066        namespace a prefix of <code>html</code>.
46067        @if cpp
46068        @code{.cpp}
46069        SBMLDocument sd;
46070        try
46071        {
46072            sd = new SBMLDocument(3, 1);
46073        }
46074        catch (SBMLConstructorException e)
46075        {
46076            // Here, have code to handle a truly exceptional situation. Candidate
46077            // causes include invalid combinations of SBML Level and Version
46078            // (impossible if hardwired as given here), running out of memory, and
46079            // unknown system exceptions.
46080        }
46081
46082        SBMLNamespaces sn = sd->getNamespaces();
46083        if (sn != None)
46084        {
46085            sn->add('http://www.w3.org/1999/xhtml', 'html');
46086        }
46087        else
46088        {
46089            // Handle another truly exceptional situation.
46090        }
46091        @endcode
46092        @endif
46093        @if java
46094        @code{.java}
46095        SBMLDocument sd;
46096        try
46097        {
46098            sd = new SBMLDocument(3, 1);
46099        }
46100        catch (SBMLConstructorException e)
46101        {
46102            // Here, have code to handle a truly exceptional situation. Candidate
46103            // causes include invalid combinations of SBML Level and Version
46104            // (impossible if hardwired as given here), running out of memory, and
46105            // unknown system exceptions.
46106        }
46107
46108        SBMLNamespaces sn = sd.getNamespaces();
46109        if (sn != null)
46110        {
46111            sn.add('http://www.w3.org/1999/xhtml', 'html');
46112        }
46113        else
46114        {
46115            // Handle another truly exceptional situation.
46116         }
46117        @endcode
46118        @endif
46119        @if python
46120        @code{.py}
46121        sbmlDoc = None
46122        try:
46123          sbmlDoc = SBMLDocument(3, 1)
46124        except ValueError:
46125          # Do something to handle exceptional situation.  Candidate
46126          # causes include invalid combinations of SBML Level and Version
46127          # (impossible if hardwired as given here), running out of memory, and
46128          # unknown system exceptions.
46129
46130        namespaces = sbmlDoc.getNamespaces()
46131        if namespaces == None:
46132          # Do something to handle case of no namespaces.
46133
46134        status = namespaces.add('http://www.w3.org/1999/xhtml', 'html')
46135        if status != LIBSBML_OPERATION_SUCCESS:
46136          # Do something to handle failure.
46137        @endcode
46138        @endif
46139        @if csharp
46140        @code{.cs}
46141        SBMLDocument sd = null;
46142        try
46143        {
46144            sd = new SBMLDocument(3, 1);
46145        }
46146        catch (SBMLConstructorException e)
46147        {
46148            // Here, have code to handle a truly exceptional situation.
46149            // Candidate causes include invalid combinations of SBML
46150            // Level and Version (impossible if hardwired as given here),
46151            // running out of memory, and unknown system exceptions.
46152        }
46153
46154        XMLNamespaces sn = sd.getNamespaces();
46155        if (sn != null)
46156        {
46157            sn.add('http://www.w3.org/1999/xhtml', 'html');
46158        }
46159        else
46160        {
46161            // Handle another truly exceptional situation.
46162        }
46163        @endcode
46164        @endif@~
46165
46166        @param xmlns the XML namespaces to be added.
46167
46168        @return integer value indicating success/failure of the
46169        function.  @if clike The value is drawn from the
46170        enumeration #OperationReturnValues_t. @endif@~ The possible values
46171        returned by this function are:
46172        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
46173        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
46174        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
46175
46176        """
46177        return _libsbml.SBMLNamespaces_addNamespaces(self, xmlns)
46178
46179    def addNamespace(self, uri, prefix):
46180        r"""
46181        addNamespace(SBMLNamespaces self, string uri, string prefix) -> int
46182
46183        Add an XML namespace (a pair of URI and prefix) to the set of namespaces
46184        within this SBMLNamespaces object.
46185
46186        @param uri    the XML namespace to be added.
46187        @param prefix the prefix of the namespace to be added.
46188
46189        @return integer value indicating success/failure of the
46190        function.  @if clike The value is drawn from the
46191        enumeration #OperationReturnValues_t. @endif@~ The possible values
46192        returned by this function are:
46193        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
46194        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
46195        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
46196
46197        """
46198        return _libsbml.SBMLNamespaces_addNamespace(self, uri, prefix)
46199
46200    def removeNamespace(self, uri):
46201        r"""
46202        removeNamespace(SBMLNamespaces self, string uri) -> int
46203
46204        Removes an XML namespace from the set of namespaces within this
46205        SBMLNamespaces object.
46206
46207        @param uri    the XML namespace to be added.
46208
46209        @return integer value indicating success/failure of the
46210        function.  @if clike The value is drawn from the
46211        enumeration #OperationReturnValues_t. @endif@~ The possible values
46212        returned by this function are:
46213        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
46214        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
46215
46216        """
46217        return _libsbml.SBMLNamespaces_removeNamespace(self, uri)
46218
46219    def addPackageNamespace(self, *args):
46220        r"""
46221        addPackageNamespace(SBMLNamespaces self, string pkgName, unsigned int pkgVersion, string prefix="") -> int
46222
46223        Add an XML namespace (a pair of URI and prefix) of a package extension
46224        to the set of namespaces within this SBMLNamespaces object.
46225
46226        The SBML Level and SBML Version of this object is used.
46227
46228        @param pkgName the string of package name (e.g. 'layout', 'multi').
46229        @param pkgVersion the package version.
46230        @param prefix the prefix of the package namespace to be added.
46231        The package's name will be used if the given string is empty (default).
46232
46233        @return integer value indicating success/failure of the
46234        function.  @if clike The value is drawn from the
46235        enumeration #OperationReturnValues_t. @endif@~ The possible values
46236        returned by this function are:
46237        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
46238        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
46239
46240        @note An XML namespace of a non-registered package extension can't be
46241        added by this function (@link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
46242        will be returned).
46243
46244        @see addNamespace()
46245
46246
46247
46248        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
46249
46250        """
46251        return _libsbml.SBMLNamespaces_addPackageNamespace(self, *args)
46252
46253    def addPackageNamespaces(self, xmlns):
46254        r"""
46255        addPackageNamespaces(SBMLNamespaces self, XMLNamespaces xmlns) -> int
46256
46257        Add the XML namespaces of package extensions in the given XMLNamespace
46258        object to the set of namespaces within this SBMLNamespaces object
46259        (Non-package XML namespaces are not added by this function).
46260
46261        @param xmlns the XML namespaces to be added.
46262
46263        @return integer value indicating success/failure of the
46264        function.  @if clike The value is drawn from the
46265        enumeration #OperationReturnValues_t. @endif@~ The possible values
46266        returned by this function are:
46267        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
46268        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
46269
46270        @note XML namespaces of a non-registered package extensions are not
46271        added (just ignored) by this function. @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink will be returned if the given
46272        xmlns is @c None.
46273
46274        """
46275        return _libsbml.SBMLNamespaces_addPackageNamespaces(self, xmlns)
46276
46277    def removePackageNamespace(self, level, version, pkgName, pkgVersion):
46278        r"""
46279        removePackageNamespace(SBMLNamespaces self, unsigned int level, unsigned int version, string pkgName, unsigned int pkgVersion) -> int
46280
46281        Removes an XML namespace of a package extension from the set of namespaces
46282        within this SBMLNamespaces object.
46283
46284        @param level   the SBML level.
46285        @param version the SBML version.
46286        @param pkgName the string of package name (e.g. 'layout', 'multi').
46287        @param pkgVersion the package version.
46288
46289        @return integer value indicating success/failure of the
46290        function.  @if clike The value is drawn from the
46291        enumeration #OperationReturnValues_t. @endif@~ The possible values
46292        returned by this function are:
46293        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
46294        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
46295        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
46296
46297        """
46298        return _libsbml.SBMLNamespaces_removePackageNamespace(self, level, version, pkgName, pkgVersion)
46299
46300    def addPkgNamespace(self, *args):
46301        r"""
46302        addPkgNamespace(SBMLNamespaces self, string pkgName, unsigned int pkgVersion, string prefix="") -> int
46303
46304        @internal
46305
46306
46307        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
46308
46309        @internal
46310
46311        """
46312        return _libsbml.SBMLNamespaces_addPkgNamespace(self, *args)
46313
46314    def addPkgNamespaces(self, xmlns):
46315        r"""
46316        addPkgNamespaces(SBMLNamespaces self, XMLNamespaces xmlns) -> int
46317
46318        @internal
46319
46320        @internal
46321
46322        """
46323        return _libsbml.SBMLNamespaces_addPkgNamespaces(self, xmlns)
46324
46325    def removePkgNamespace(self, level, version, pkgName, pkgVersion):
46326        r"""
46327        removePkgNamespace(SBMLNamespaces self, unsigned int level, unsigned int version, string pkgName, unsigned int pkgVersion) -> int
46328
46329        @internal
46330
46331        @internal
46332
46333        """
46334        return _libsbml.SBMLNamespaces_removePkgNamespace(self, level, version, pkgName, pkgVersion)
46335
46336    @staticmethod
46337    def isSBMLNamespace(uri):
46338        r"""
46339        isSBMLNamespace(string uri) -> bool
46340
46341        Predicate returning @c True if the given URL is one of SBML XML
46342        namespaces.
46343
46344        @param uri the URI of namespace.
46345
46346        @return @c True if the 'uri' is one of SBML namespaces, @c False otherwise.
46347
46348        @if python @note Because this is a static method on a class, the Python
46349        language interface for libSBML will contain two variants.  One will be the
46350        expected, normal static method on the class (i.e., a regular
46351        <em>methodName</em>), and the other will be a standalone top-level
46352        function with the name <em>ClassName_methodName()</em>. This is merely an
46353        artifact of how the language interfaces are created in libSBML.  The
46354        methods are functionally identical. @endif@~
46355
46356        """
46357        return _libsbml.SBMLNamespaces_isSBMLNamespace(uri)
46358
46359    def isValidCombination(self):
46360        r"""
46361        isValidCombination(SBMLNamespaces self) -> bool
46362
46363        Predicate returning @c True if the given set of namespaces represent a
46364        valid set
46365
46366        @return @c True if the set of namespaces is valid, @c False otherwise.
46367
46368        """
46369        return _libsbml.SBMLNamespaces_isValidCombination(self)
46370
46371    def setLevel(self, level):
46372        r"""
46373        setLevel(SBMLNamespaces self, unsigned int level)
46374
46375        @internal
46376
46377        @internal
46378
46379        """
46380        return _libsbml.SBMLNamespaces_setLevel(self, level)
46381
46382    def setVersion(self, version):
46383        r"""
46384        setVersion(SBMLNamespaces self, unsigned int version)
46385
46386        @internal
46387
46388        @internal
46389
46390        """
46391        return _libsbml.SBMLNamespaces_setVersion(self, version)
46392
46393    def setNamespaces(self, xmlns):
46394        r"""
46395        setNamespaces(SBMLNamespaces self, XMLNamespaces xmlns)
46396
46397        @internal
46398
46399        @internal
46400
46401        """
46402        return _libsbml.SBMLNamespaces_setNamespaces(self, xmlns)
46403
46404    def getPackageName(self):
46405        r"""
46406        getPackageName(SBMLNamespaces self) -> string
46407
46408        Returns the name of the main package for this namespace.
46409
46410        @return the name of the main package for this namespace.
46411        'core' will be returned if this namespace is defined in the SBML
46412        core.
46413
46414        """
46415        return _libsbml.SBMLNamespaces_getPackageName(self)
46416
46417    __metaclass__ = AutoProperty
46418
46419
46420    def __eq__(self, rhs):
46421      if ((self is None) and (rhs is None)): return True
46422      if ((self is None) or  (rhs is None)): return False
46423      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
46424        if (self.this == rhs.this): return True
46425      return False
46426
46427    def __ne__(self, rhs):
46428      if ((self is None) and (rhs is None)): return False
46429      if ((self is None) or  (rhs is None)): return True
46430      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
46431        if (self.this == rhs.this): return False
46432      return True
46433
46434
46435# Register SBMLNamespaces in _libsbml:
46436_libsbml.SBMLNamespaces_swigregister(SBMLNamespaces)
46437
46438def SBMLNamespaces_getSBMLNamespaceURI(level, version):
46439    r"""
46440    SBMLNamespaces_getSBMLNamespaceURI(unsigned int level, unsigned int version) -> string
46441
46442    Returns a string representing the SBML XML namespace for the
46443    given @p level and @p version of SBML.
46444
46445    @param level the SBML level.
46446    @param version the SBML version.
46447
46448    @return a string representing the SBML namespace that reflects the
46449    SBML Level and Version specified.
46450
46451    @if python @note Because this is a static method on a class, the Python
46452    language interface for libSBML will contain two variants.  One will be the
46453    expected, normal static method on the class (i.e., a regular
46454    <em>methodName</em>), and the other will be a standalone top-level
46455    function with the name <em>ClassName_methodName()</em>. This is merely an
46456    artifact of how the language interfaces are created in libSBML.  The
46457    methods are functionally identical. @endif@~
46458
46459    """
46460    return _libsbml.SBMLNamespaces_getSBMLNamespaceURI(level, version)
46461
46462def SBMLNamespaces_getSupportedNamespaces():
46463    r"""
46464    SBMLNamespaces_getSupportedNamespaces() -> List const *
46465
46466    Returns a list of all supported SBMLNamespaces in this version of
46467    libsbml.
46468
46469    @return a list with supported SBML namespaces.
46470
46471    @if python @note Because this is a static method on a class, the Python
46472    language interface for libSBML will contain two variants.  One will be the
46473    expected, normal static method on the class (i.e., a regular
46474    <em>methodName</em>), and the other will be a standalone top-level
46475    function with the name <em>ClassName_methodName()</em>. This is merely an
46476    artifact of how the language interfaces are created in libSBML.  The
46477    methods are functionally identical. @endif@~
46478
46479    """
46480    return _libsbml.SBMLNamespaces_getSupportedNamespaces()
46481
46482def SBMLNamespaces_freeSBMLNamespaces(supportedNS):
46483    r"""
46484    SBMLNamespaces_freeSBMLNamespaces(List * supportedNS)
46485
46486    Frees the list of supported namespaces as generated by
46487    getSupportedNamespaces().
46488
46489    @param supportedNS the list to be freed.
46490
46491    @if python @note Because this is a static method on a class, the Python
46492    language interface for libSBML will contain two variants.  One will be the
46493    expected, normal static method on the class (i.e., a regular
46494    <em>methodName</em>), and the other will be a standalone top-level
46495    function with the name <em>ClassName_methodName()</em>. This is merely an
46496    artifact of how the language interfaces are created in libSBML.  The
46497    methods are functionally identical. @endif@~
46498
46499    """
46500    return _libsbml.SBMLNamespaces_freeSBMLNamespaces(supportedNS)
46501
46502def SBMLNamespaces_isSBMLNamespace(uri):
46503    r"""
46504    SBMLNamespaces_isSBMLNamespace(string uri) -> bool
46505
46506    Predicate returning @c True if the given URL is one of SBML XML
46507    namespaces.
46508
46509    @param uri the URI of namespace.
46510
46511    @return @c True if the 'uri' is one of SBML namespaces, @c False otherwise.
46512
46513    @if python @note Because this is a static method on a class, the Python
46514    language interface for libSBML will contain two variants.  One will be the
46515    expected, normal static method on the class (i.e., a regular
46516    <em>methodName</em>), and the other will be a standalone top-level
46517    function with the name <em>ClassName_methodName()</em>. This is merely an
46518    artifact of how the language interfaces are created in libSBML.  The
46519    methods are functionally identical. @endif@~
46520
46521    """
46522    return _libsbml.SBMLNamespaces_isSBMLNamespace(uri)
46523
46524class SBMLTransforms(object):
46525    r"""
46526
46527    @sbmlpackage{core}
46528
46529    @htmlinclude pkg-marker-core.html Methods for transform elements of SBML
46530
46531    @internal
46532
46533    """
46534
46535    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
46536    __repr__ = _swig_repr
46537
46538    @staticmethod
46539    def replaceFD(*args):
46540        r"""
46541        replaceFD(ASTNode math, FunctionDefinition fd, IdList idsToExclude=None)
46542        replaceFD(ASTNode math, ListOfFunctionDefinitions lofd, IdList idsToExclude=None)
46543        """
46544        return _libsbml.SBMLTransforms_replaceFD(*args)
46545
46546    @staticmethod
46547    def expandInitialAssignments(m):
46548        r"""
46549        expandInitialAssignments(Model m) -> bool
46550
46551        @internal
46552
46553        @internal
46554
46555        """
46556        return _libsbml.SBMLTransforms_expandInitialAssignments(m)
46557
46558    @staticmethod
46559    def evaluateASTNode(node, m=None):
46560        r"""
46561        evaluateASTNode(ASTNode node, Model m=None) -> double
46562
46563        @internal
46564
46565
46566        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
46567
46568        @internal
46569
46570        """
46571        return _libsbml.SBMLTransforms_evaluateASTNode(node, m)
46572
46573    @staticmethod
46574    def expandL3V2InitialAssignments(m):
46575        r"""
46576        expandL3V2InitialAssignments(Model m) -> bool
46577
46578        @internal
46579
46580        @internal
46581
46582        """
46583        return _libsbml.SBMLTransforms_expandL3V2InitialAssignments(m)
46584
46585    @staticmethod
46586    def mapComponentValues(m):
46587        r"""mapComponentValues(Model m) -> IdList"""
46588        return _libsbml.SBMLTransforms_mapComponentValues(m)
46589
46590    @staticmethod
46591    def clearComponentValues():
46592        r"""clearComponentValues()"""
46593        return _libsbml.SBMLTransforms_clearComponentValues()
46594
46595    @staticmethod
46596    def nodeContainsId(node, ids):
46597        r"""nodeContainsId(ASTNode node, IdList ids) -> bool"""
46598        return _libsbml.SBMLTransforms_nodeContainsId(node, ids)
46599
46600    def __init__(self):
46601        r"""
46602        __init__(SBMLTransforms self) -> SBMLTransforms
46603
46604        @sbmlpackage{core}
46605
46606        @htmlinclude pkg-marker-core.html Methods for transform elements of SBML
46607
46608        @internal
46609
46610        """
46611        _libsbml.SBMLTransforms_swiginit(self, _libsbml.new_SBMLTransforms())
46612    __swig_destroy__ = _libsbml.delete_SBMLTransforms
46613
46614# Register SBMLTransforms in _libsbml:
46615_libsbml.SBMLTransforms_swigregister(SBMLTransforms)
46616
46617def SBMLTransforms_replaceFD(*args):
46618    r"""
46619    SBMLTransforms_replaceFD(ASTNode math, FunctionDefinition fd, IdList idsToExclude=None)
46620    SBMLTransforms_replaceFD(ASTNode math, ListOfFunctionDefinitions lofd, IdList idsToExclude=None)
46621    """
46622    return _libsbml.SBMLTransforms_replaceFD(*args)
46623
46624def SBMLTransforms_expandInitialAssignments(m):
46625    r"""
46626    SBMLTransforms_expandInitialAssignments(Model m) -> bool
46627
46628    @internal
46629
46630    @internal
46631
46632    """
46633    return _libsbml.SBMLTransforms_expandInitialAssignments(m)
46634
46635def SBMLTransforms_evaluateASTNode(node, m=None):
46636    r"""
46637    SBMLTransforms_evaluateASTNode(ASTNode node, Model m=None) -> double
46638
46639    @internal
46640
46641
46642    @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
46643
46644    @internal
46645
46646    """
46647    return _libsbml.SBMLTransforms_evaluateASTNode(node, m)
46648
46649def SBMLTransforms_expandL3V2InitialAssignments(m):
46650    r"""
46651    SBMLTransforms_expandL3V2InitialAssignments(Model m) -> bool
46652
46653    @internal
46654
46655    @internal
46656
46657    """
46658    return _libsbml.SBMLTransforms_expandL3V2InitialAssignments(m)
46659
46660def SBMLTransforms_mapComponentValues(m):
46661    r"""SBMLTransforms_mapComponentValues(Model m) -> IdList"""
46662    return _libsbml.SBMLTransforms_mapComponentValues(m)
46663
46664def SBMLTransforms_clearComponentValues():
46665    r"""SBMLTransforms_clearComponentValues()"""
46666    return _libsbml.SBMLTransforms_clearComponentValues()
46667
46668def SBMLTransforms_nodeContainsId(node, ids):
46669    r"""SBMLTransforms_nodeContainsId(ASTNode node, IdList ids) -> bool"""
46670    return _libsbml.SBMLTransforms_nodeContainsId(node, ids)
46671
46672CNV_TYPE_BOOL = _libsbml.CNV_TYPE_BOOL
46673
46674CNV_TYPE_DOUBLE = _libsbml.CNV_TYPE_DOUBLE
46675
46676CNV_TYPE_INT = _libsbml.CNV_TYPE_INT
46677
46678CNV_TYPE_SINGLE = _libsbml.CNV_TYPE_SINGLE
46679
46680CNV_TYPE_STRING = _libsbml.CNV_TYPE_STRING
46681
46682class ConversionOption(object):
46683    r"""
46684
46685    @sbmlpackage{core}
46686
46687    @htmlinclude pkg-marker-core.html A single configuration setting for an SBML converter.
46688
46689    @htmlinclude libsbml-facility-only-warning.html
46690
46691    LibSBML provides a number of converters that can perform transformations
46692    on SBML documents.  These converters allow their behaviors to be
46693    controlled by setting property values.  Converter properties are
46694    communicated using objects of class ConversionProperties, and within
46695    such objects, individual options are encapsulated using ConversionOption
46696    objects.
46697
46698    A ConversionOption @if conly structure @else object@endif@~ consists of
46699    four parts:
46700    @li A @em key, acting as the name of the option.
46701    @li A @em value of this option.
46702    @li A @em type for the value; the type code is chosen from @if clike
46703    an enumeration @else a set of integer constants@endif@~ whose names all
46704    begin with the prefix <code>CNV_TYPE_</code>.  (See the separate <a
46705    class='el' href='#ConversionOptionType_t'>subsection</a> below for more
46706    information.)
46707    @li A @em description consisting of a text string that describes the
46708    option in some way.
46709
46710    There are no constraints on the values of keys or descriptions;
46711    authors of SBML converters are free to choose them as they see fit.
46712
46713    @section ConversionOptionType_t Conversion option data types
46714
46715    An option in ConversionOption must have a data type declared, to
46716    indicate whether it is a string value, an integer, and so forth.  The
46717    possible types of values are taken from
46718    @if clike the enumeration #ConversionOptionType_t @else a set of
46719    constants whose symbol names begin with the prefix
46720    <code>CNV_TYPE_</code>@endif. The following are the possible values:
46721
46722    <p>
46723    <center>
46724    <table width='90%' cellspacing='1' cellpadding='1' border='0' class='normal-font'>
46725    <tr style='background: lightgray' class='normal-font'>
46726    <td><strong>Enumerator</strong></td>
46727    <td><strong>Meaning</strong></td>
46728    </tr>
46729    <tr>
46730    <td><code>@link libsbml#CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink</code></td>
46731    <td>Indicates the value type is a Boolean.</td>
46732    </tr>
46733    <tr>
46734    <td><code>@link libsbml#CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink</code></td>
46735    <td>Indicates the value type is a double-sized float.</td>
46736    </tr>
46737    <tr>
46738    <td><code>@link libsbml#CNV_TYPE_INT CNV_TYPE_INT@endlink</code></td>
46739    <td>Indicates the value type is an integer.</td>
46740    </tr>
46741    <tr>
46742    <td><code>@link libsbml#CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink</code></td>
46743    <td>Indicates the value type is a float.</td>
46744    </tr>
46745    <tr>
46746    <td><code>@link libsbml#CNV_TYPE_STRING CNV_TYPE_STRING@endlink</code></td>
46747    <td>Indicates the value type is a string.</td>
46748    </tr>
46749    </table>
46750    </center>
46751
46752    @see ConversionProperties
46753
46754    """
46755
46756    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
46757    __repr__ = _swig_repr
46758
46759    def __init__(self, *args):
46760        r"""
46761        __init__(ConversionOption self, string key, string value="", ConversionOptionType_t type=CNV_TYPE_STRING, string description="") -> ConversionOption
46762        __init__(ConversionOption self, string key, char const * value, string description="") -> ConversionOption
46763        __init__(ConversionOption self, string key, bool value, string description="") -> ConversionOption
46764        __init__(ConversionOption self, string key, double value, string description="") -> ConversionOption
46765        __init__(ConversionOption self, string key, float value, string description="") -> ConversionOption
46766        __init__(ConversionOption self, string key, int value, string description="") -> ConversionOption
46767        __init__(ConversionOption self, ConversionOption orig) -> ConversionOption
46768
46769        This method has multiple variants; they differ in the arguments
46770         they accept.  Each variant is described separately below.
46771
46772        @par
46773        <hr>
46774        <span class='variant-sig-heading'>Method variant with the following signature</span>:
46775         <pre class='signature'>ConversionOption(string key, bool value, string description='')</pre>
46776
46777        Creates a new ConversionOption specialized for Boolean-type options.
46778
46779        @param key the key for this option.
46780        @param value the value for this option.
46781        @param description an optional description.
46782
46783        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
46784
46785
46786        @par
46787        <hr>
46788        <span class='variant-sig-heading'>Method variant with the following signature</span>:
46789         <pre class='signature'>ConversionOption(string key, string value='', ConversionOptionType_t type=CNV_TYPE_STRING, string description='')</pre>
46790
46791        Creates a new ConversionOption.
46792
46793        This is the general constructor, taking arguments for all aspects of
46794        an option.  Other constructors exist with different arguments.
46795
46796        @par
46797        The conversion @p type argument value must be one of
46798        @if clike the values defined in the enumeration
46799        #ConversionOptionType_t.@endif@if java the constants whose names begin
46800        with the characters <code>CNV_TYPE_</code> in the interface class
46801        {@link libsbmlConstants}.@endif@if python the constants whose names begin
46802        with the characters <code>CNV_TYPE_</code> in the interface class
46803        @link libsbml libsbml@endlink.@endif
46804
46805        @param key the key for this option.
46806        @param value an optional value for this option.
46807        @param type the type of this option.
46808        @param description the description for this option.
46809
46810        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
46811
46812
46813        @par
46814        <hr>
46815        <span class='variant-sig-heading'>Method variant with the following signature</span>:
46816         <pre class='signature'>ConversionOption(string key, string value, string description='')</pre>
46817
46818        Creates a new ConversionOption specialized for string-type options.
46819
46820        @param key the key for this option.
46821        @param value the value for this option.
46822        @param description an optional description.
46823
46824        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
46825
46826
46827        @par
46828        <hr>
46829        <span class='variant-sig-heading'>Method variant with the following signature</span>:
46830         <pre class='signature'>ConversionOption(string key, double value, string description='')</pre>
46831
46832        Creates a new ConversionOption specialized for double-type options.
46833
46834        @param key the key for this option.
46835        @param value the value for this option.
46836        @param description an optional description.
46837
46838        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
46839
46840
46841        @par
46842        <hr>
46843        <span class='variant-sig-heading'>Method variant with the following signature</span>:
46844         <pre class='signature'>ConversionOption(string key, float value, string description='')</pre>
46845
46846        Creates a new ConversionOption specialized for float-type options.
46847
46848        @param key the key for this option.
46849        @param value the value for this option.
46850        @param description an optional description.
46851
46852        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
46853
46854
46855        @par
46856        <hr>
46857        <span class='variant-sig-heading'>Method variant with the following signature</span>:
46858         <pre class='signature'>ConversionOption(string key, int value, string description='')</pre>
46859
46860        Creates a new ConversionOption specialized for integer-type options.
46861
46862        @param key the key for this option.
46863        @param value the value for this option.
46864        @param description an optional description.
46865
46866        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
46867
46868
46869        @par
46870        <hr>
46871        <span class='variant-sig-heading'>Method variant with the following signature</span>:
46872         <pre class='signature'>ConversionOption(ConversionOption orig)</pre>
46873
46874        Copy constructor; creates a copy of an ConversionOption object.
46875
46876        @param orig the ConversionOption object to copy.
46877
46878        """
46879        _libsbml.ConversionOption_swiginit(self, _libsbml.new_ConversionOption(*args))
46880    __swig_destroy__ = _libsbml.delete_ConversionOption
46881
46882    def clone(self):
46883        r"""
46884        clone(ConversionOption self) -> ConversionOption
46885
46886        Creates and returns a deep copy of this ConversionOption object.
46887
46888        @return the (deep) copy of this ConversionOption object.
46889
46890        """
46891        return _libsbml.ConversionOption_clone(self)
46892
46893    def getKey(self):
46894        r"""
46895        getKey(ConversionOption self) -> string
46896
46897        Returns the key for this option.
46898
46899        @return the key, as a string.
46900
46901        """
46902        return _libsbml.ConversionOption_getKey(self)
46903
46904    def setKey(self, key):
46905        r"""
46906        setKey(ConversionOption self, string key)
46907
46908        Sets the key for this option.
46909
46910        @param key a string representing the key to set.
46911
46912        """
46913        return _libsbml.ConversionOption_setKey(self, key)
46914
46915    def getValue(self):
46916        r"""
46917        getValue(ConversionOption self) -> string
46918
46919        Returns the value of this option.
46920
46921        @return the value of this option, as a string.
46922
46923        """
46924        return _libsbml.ConversionOption_getValue(self)
46925
46926    def setValue(self, value):
46927        r"""
46928        setValue(ConversionOption self, string value)
46929
46930        Sets the value for this option.
46931
46932        @param value the value to set, as a string.
46933
46934        """
46935        return _libsbml.ConversionOption_setValue(self, value)
46936
46937    def getDescription(self):
46938        r"""
46939        getDescription(ConversionOption self) -> string
46940
46941        Returns the description string for this option.
46942
46943        @return the description of this option.
46944
46945        """
46946        return _libsbml.ConversionOption_getDescription(self)
46947
46948    def setDescription(self, description):
46949        r"""
46950        setDescription(ConversionOption self, string description)
46951
46952        Sets the description text for this option.
46953
46954        @param description the description to set for this option.
46955
46956        """
46957        return _libsbml.ConversionOption_setDescription(self, description)
46958
46959    def getType(self):
46960        r"""
46961        getType(ConversionOption self) -> ConversionOptionType_t
46962
46963        Returns the type of this option
46964
46965        @return the type of this option.
46966
46967        """
46968        return _libsbml.ConversionOption_getType(self)
46969
46970    def setType(self, type):
46971        r"""
46972        setType(ConversionOption self, ConversionOptionType_t type)
46973
46974        Sets the type of this option.
46975
46976        @par
46977        The conversion @p type argument value must be one of
46978        @if clike the values defined in the enumeration
46979        #ConversionOptionType_t.@endif@if java the constants whose names begin
46980        with the characters <code>CNV_TYPE_</code> in the interface class
46981        {@link libsbmlConstants}.@endif@if python the constants whose names begin
46982        with the characters <code>CNV_TYPE_</code> in the interface class
46983        @link libsbml libsbml@endlink.@endif
46984
46985        @param type the type value to use.
46986
46987        """
46988        return _libsbml.ConversionOption_setType(self, type)
46989
46990    def getBoolValue(self):
46991        r"""
46992        getBoolValue(ConversionOption self) -> bool
46993
46994        Returns the value of this option as a Boolean.
46995
46996        @return the value of this option.
46997
46998        """
46999        return _libsbml.ConversionOption_getBoolValue(self)
47000
47001    def setBoolValue(self, value):
47002        r"""
47003        setBoolValue(ConversionOption self, bool value)
47004
47005        Set the value of this option to a given Boolean value.
47006
47007        Invoking this method will also set the type of the option to
47008        @link libsbml#CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink.
47009
47010        @param value the Boolean value to set.
47011
47012        """
47013        return _libsbml.ConversionOption_setBoolValue(self, value)
47014
47015    def getDoubleValue(self):
47016        r"""
47017        getDoubleValue(ConversionOption self) -> double
47018
47019        Returns the value of this option as a @c float.
47020
47021        @return the value of this option.
47022
47023        """
47024        return _libsbml.ConversionOption_getDoubleValue(self)
47025
47026    def setDoubleValue(self, value):
47027        r"""
47028        setDoubleValue(ConversionOption self, double value)
47029
47030        Set the value of this option to a given @c float value.
47031
47032        Invoking this method will also set the type of the option to
47033        @link libsbml#CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink.
47034
47035        @param value the value to set.
47036
47037        """
47038        return _libsbml.ConversionOption_setDoubleValue(self, value)
47039
47040    def getFloatValue(self):
47041        r"""
47042        getFloatValue(ConversionOption self) -> float
47043
47044        Returns the value of this option as a @c float.
47045
47046        @return the value of this option as a float.
47047
47048        """
47049        return _libsbml.ConversionOption_getFloatValue(self)
47050
47051    def setFloatValue(self, value):
47052        r"""
47053        setFloatValue(ConversionOption self, float value)
47054
47055        Set the value of this option to a given @c float value.
47056
47057        Invoking this method will also set the type of the option to
47058        @link libsbml#CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink.
47059
47060        @param value the value to set.
47061
47062        """
47063        return _libsbml.ConversionOption_setFloatValue(self, value)
47064
47065    def getIntValue(self):
47066        r"""
47067        getIntValue(ConversionOption self) -> int
47068
47069        Returns the value of this option as an @c integer.
47070
47071        @return the value of this option, as an int.
47072
47073        """
47074        return _libsbml.ConversionOption_getIntValue(self)
47075
47076    def setIntValue(self, value):
47077        r"""
47078        setIntValue(ConversionOption self, int value)
47079
47080        Set the value of this option to a given @c int value.
47081
47082        Invoking this method will also set the type of the option to
47083        @link libsbml#CNV_TYPE_INT CNV_TYPE_INT@endlink.
47084
47085        @param value the value to set.
47086
47087        """
47088        return _libsbml.ConversionOption_setIntValue(self, value)
47089
47090# Register ConversionOption in _libsbml:
47091_libsbml.ConversionOption_swigregister(ConversionOption)
47092
47093class ConversionProperties(object):
47094    r"""
47095
47096    @sbmlpackage{core}
47097
47098    @htmlinclude pkg-marker-core.html Set of configuration option values for a converter.
47099
47100    @htmlinclude libsbml-facility-only-warning.html
47101
47102    LibSBML provides a number of converters that can perform transformations
47103    on SBML documents. The properties of SBML converters are communicated
47104    using objects of class ConversionProperties, and within such objects,
47105    individual options are encapsulated using ConversionOption objects.  The
47106    ConversionProperties class provides numerous methods for setting and
47107    getting options.
47108
47109    ConversionProperties objects are also used to determine the target SBML
47110    namespace when an SBML converter's behavior depends on the intended
47111    Level+Version combination of SBML.  In addition, it is conceivable that
47112    conversions may be affected by SBML Level&nbsp;3 packages being used by an
47113    SBML document; consequently, the packages in use are also communicated by
47114    the values of the SBML namespaces set on a ConversionProperties object.
47115
47116    @section using-converters General information about the use of SBML converters
47117
47118    The use of all the converters follows a similar approach.  First, one
47119    creates a ConversionProperties object and calls
47120    ConversionProperties.addOption()
47121    on this object with one argument: a text string that identifies the desired
47122    converter.  (The text string is specific to each converter; consult the
47123    documentation for a given converter to find out how it should be enabled.)
47124
47125    Next, for some converters, the caller can optionally set some
47126    converter-specific properties using additional calls to
47127    ConversionProperties.addOption().
47128    Many converters provide the ability to
47129    configure their behavior to some extent; this is realized through the use
47130    of properties that offer different options.  The default property values
47131    for each converter can be interrogated using the method
47132    SBMLConverter.getDefaultProperties() on the converter class in question .
47133
47134    Finally, the caller should invoke the method
47135    SBMLDocument.convert()
47136    with the ConversionProperties object as an argument.
47137
47138    @subsection converter-example Example of invoking an SBML converter
47139
47140    The following code fragment illustrates an example using
47141    SBMLReactionConverter, which is invoked using the option string
47142    @c 'replaceReactions':
47143
47144    @if cpp
47145    @code{.cpp}
47146    ConversionProperties props;
47147    props.addOption('replaceReactions');
47148    @endcode
47149    @endif
47150    @if python
47151    @code{.py}
47152    config = ConversionProperties()
47153    if config != None:
47154      config.addOption('replaceReactions')
47155    @endcode
47156    @endif
47157    @if java
47158    @code{.java}
47159    ConversionProperties props = new ConversionProperties();
47160    if (props != null) {
47161      props.addOption('replaceReactions');
47162    } else {
47163      // Deal with error.
47164    }
47165    @endcode
47166    @endif
47167
47168    In the case of SBMLReactionConverter, there are no options to affect
47169    its behavior, so the next step is simply to invoke the converter on
47170    an SBMLDocument object.  Continuing the example code:
47171
47172    @if cpp
47173    @code{.cpp}
47174    // Assume that the variable 'document' has been set to an SBMLDocument object.
47175    int status = document->convert(props);
47176    if (status != LIBSBML_OPERATION_SUCCESS)
47177    {
47178      cerr << 'Unable to perform conversion due to the following:' << endl;
47179      document->printErrors(cerr);
47180    }
47181    @endcode
47182    @endif
47183    @if python
47184    @code{.py}
47185      # Assume that the variable 'document' has been set to an SBMLDocument object.
47186      status = document.convert(config)
47187      if status != LIBSBML_OPERATION_SUCCESS:
47188        # Handle error somehow.
47189        print('Error: conversion failed due to the following:')
47190        document.printErrors()
47191    @endcode
47192    @endif
47193    @if java
47194    @code{.java}
47195      // Assume that the variable 'document' has been set to an SBMLDocument object.
47196      status = document.convert(config);
47197      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
47198      {
47199        // Handle error somehow.
47200        System.out.println('Error: conversion failed due to the following:');
47201        document.printErrors();
47202      }
47203    @endcode
47204    @endif
47205
47206    Here is an example of using a converter that offers an option. The
47207    following code invokes SBMLStripPackageConverter to remove the
47208    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
47209    of the package to be removed by adding a value for the option named
47210    @c 'package' defined by that converter:
47211
47212    @if cpp
47213    @code{.cpp}
47214    ConversionProperties props;
47215    props.addOption('stripPackage');
47216    props.addOption('package', 'layout');
47217
47218    int status = document->convert(props);
47219    if (status != LIBSBML_OPERATION_SUCCESS)
47220    {
47221        cerr << 'Unable to strip the Layout package from the model';
47222        cerr << 'Error returned: ' << status;
47223    }
47224    @endcode
47225    @endif
47226    @if python
47227    @code{.py}
47228    def strip_layout_example(document):
47229      config = ConversionProperties()
47230      if config != None:
47231        config.addOption('stripPackage')
47232        config.addOption('package', 'layout')
47233        status = document.convert(config)
47234        if status != LIBSBML_OPERATION_SUCCESS:
47235          # Handle error somehow.
47236          print('Error: unable to strip the Layout package.')
47237          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
47238      else:
47239        # Handle error somehow.
47240        print('Error: unable to create ConversionProperties object')
47241    @endcode
47242    @endif
47243    @if java
47244    @code{.java}
47245    ConversionProperties config = new ConversionProperties();
47246    if (config != None) {
47247      config.addOption('stripPackage');
47248      config.addOption('package', 'layout');
47249      status = document.convert(config);
47250      if (status != LIBSBML_OPERATION_SUCCESS) {
47251        // Handle error somehow.
47252        System.out.println('Error: unable to strip the Layout package');
47253        document.printErrors();
47254      }
47255    } else {
47256      // Handle error somehow.
47257      System.out.println('Error: unable to create ConversionProperties object');
47258    }
47259    @endcode
47260    @endif
47261
47262    @subsection available-converters Available SBML converters in libSBML
47263
47264    LibSBML provides a number of built-in converters; by convention, their
47265    names end in @em Converter. The following are the built-in converters
47266    provided by libSBML @htmlinclude libsbml-version.html:
47267
47268    @copydetails doc_list_of_libsbml_converters
47269
47270    @see ConversionOption
47271    @see SBMLNamespaces
47272
47273    """
47274
47275    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
47276    __repr__ = _swig_repr
47277
47278    def __init__(self, *args):
47279        r"""
47280        __init__(ConversionProperties self, SBMLNamespaces targetNS=None) -> ConversionProperties
47281        __init__(ConversionProperties self, ConversionProperties orig) -> ConversionProperties
47282
47283        This method has multiple variants; they differ in the arguments
47284         they accept.  Each variant is described separately below.
47285
47286        @par
47287        <hr>
47288        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47289         <pre class='signature'>ConversionProperties(ConversionProperties orig)</pre>
47290
47291        Copy constructor.
47292
47293        @param orig the object to copy.
47294
47295
47296        @par
47297        <hr>
47298        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47299         <pre class='signature'>ConversionProperties(SBMLNamespaces targetNS=None)</pre>
47300
47301        Constructor that initializes the conversion properties
47302        with a specific SBML target namespace.
47303
47304        @param targetNS the target namespace to convert to.
47305
47306        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
47307
47308        """
47309        _libsbml.ConversionProperties_swiginit(self, _libsbml.new_ConversionProperties(*args))
47310
47311    def clone(self):
47312        r"""
47313        clone(ConversionProperties self) -> ConversionProperties
47314
47315        Creates and returns a deep copy of this ConversionProperties object.
47316
47317        @return the (deep) copy of this ConversionProperties object.
47318
47319        """
47320        return _libsbml.ConversionProperties_clone(self)
47321    __swig_destroy__ = _libsbml.delete_ConversionProperties
47322
47323    def getTargetNamespaces(self):
47324        r"""
47325        getTargetNamespaces(ConversionProperties self) -> SBMLNamespaces
47326
47327        Returns the current target SBML namespace.
47328
47329        @return the SBMLNamepaces object expressing the target namespace.
47330
47331        """
47332        return _libsbml.ConversionProperties_getTargetNamespaces(self)
47333
47334    def hasTargetNamespaces(self):
47335        r"""
47336        hasTargetNamespaces(ConversionProperties self) -> bool
47337
47338        Returns @c True if the target SBML namespace has been set.
47339
47340        @return @c True if the target namespace has been set, @c False
47341        otherwise.
47342
47343        """
47344        return _libsbml.ConversionProperties_hasTargetNamespaces(self)
47345
47346    def setTargetNamespaces(self, targetNS):
47347        r"""
47348        setTargetNamespaces(ConversionProperties self, SBMLNamespaces targetNS)
47349
47350        Sets the target namespace.
47351
47352        @param targetNS the target namespace to use.
47353
47354        """
47355        return _libsbml.ConversionProperties_setTargetNamespaces(self, targetNS)
47356
47357    def getDescription(self, key):
47358        r"""
47359        getDescription(ConversionProperties self, string key) -> string
47360
47361        Returns the description string for a given option in this properties
47362        object.
47363
47364        @param key the key for the option.
47365
47366        @return the description text of the option with the given key.
47367
47368        """
47369        return _libsbml.ConversionProperties_getDescription(self, key)
47370
47371    def getType(self, key):
47372        r"""
47373        getType(ConversionProperties self, string key) -> ConversionOptionType_t
47374
47375        Returns the type of a given option in this properties object.
47376
47377        @param key the key for the option.
47378
47379        @return the type of the option with the given key.
47380
47381        """
47382        return _libsbml.ConversionProperties_getType(self, key)
47383
47384    def getOption(self, *args):
47385        r"""
47386        getOption(ConversionProperties self, string key) -> ConversionOption
47387        getOption(ConversionProperties self, int index) -> ConversionOption
47388
47389        This method has multiple variants; they differ in the arguments
47390         they accept.  Each variant is described separately below.
47391
47392        @par
47393        <hr>
47394        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47395         <pre class='signature'>getOption(int index)</pre>
47396
47397        Returns the ConversionOption object for the given @p index.
47398
47399        @param index the index for the option.
47400
47401        @return the option with the given @p index.
47402
47403
47404        @par
47405        <hr>
47406        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47407         <pre class='signature'>getOption(string key)</pre>
47408
47409        Returns the ConversionOption object for a given key.
47410
47411        @param key the key for the option.
47412
47413        @return the option with the given key.
47414
47415        """
47416        return _libsbml.ConversionProperties_getOption(self, *args)
47417
47418    def addOption(self, *args):
47419        r"""
47420        addOption(ConversionProperties self, ConversionOption option)
47421        addOption(ConversionProperties self, string key, string value="", ConversionOptionType_t type=CNV_TYPE_STRING, string description="")
47422        addOption(ConversionProperties self, string key, char const * value, string description="")
47423        addOption(ConversionProperties self, string key, bool value, string description="")
47424        addOption(ConversionProperties self, string key, double value, string description="")
47425        addOption(ConversionProperties self, string key, float value, string description="")
47426        addOption(ConversionProperties self, string key, int value, string description="")
47427
47428        This method has multiple variants; they differ in the arguments
47429         they accept.  Each variant is described separately below.
47430
47431        @par
47432        <hr>
47433        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47434         <pre class='signature'>addOption(ConversionOption option)</pre>
47435
47436        Adds a copy of the given option to this properties object.
47437
47438        @param option the option to add.
47439
47440
47441        @par
47442        <hr>
47443        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47444         <pre class='signature'>addOption(string key, double value, string description='')</pre>
47445
47446        Adds a new ConversionOption object with the given parameters.
47447
47448        @param key the key for the new option.
47449        @param value the double value of that option.
47450        @param description (optional) the description for the option.
47451
47452        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
47453
47454
47455        @par
47456        <hr>
47457        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47458         <pre class='signature'>addOption(string key, string value='', ConversionOptionType_t type=CNV_TYPE_STRING, string description='')</pre>
47459
47460        Adds a new ConversionOption object with the given parameters.
47461
47462        @param key the key for the new option.
47463        @param value (optional) the value of that option.
47464        @param type (optional) the type of the option (see the documentation
47465        for ConversionOption for more information about the types).
47466        @param description (optional) the description for the option.
47467
47468        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
47469
47470
47471        @par
47472        <hr>
47473        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47474         <pre class='signature'>addOption(string key, string value, string description='')</pre>
47475
47476        Adds a new ConversionOption object with the given parameters.
47477
47478        @param key the key for the new option.
47479        @param value the string value of that option.
47480        @param description (optional) the description for the option.
47481
47482        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
47483
47484
47485        @par
47486        <hr>
47487        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47488         <pre class='signature'>addOption(string key, bool value, string description='')</pre>
47489
47490        Adds a new ConversionOption object with the given parameters.
47491
47492        @param key the key for the new option.
47493        @param value the boolean value of that option.
47494        @param description (optional) the description for the option.
47495
47496        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
47497
47498
47499        @par
47500        <hr>
47501        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47502         <pre class='signature'>addOption(string key, float value, string description='')</pre>
47503
47504        Adds a new ConversionOption object with the given parameters.
47505
47506        @param key the key for the new option.
47507        @param value the float value of that option.
47508        @param description (optional) the description for the option.
47509
47510        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
47511
47512
47513        @par
47514        <hr>
47515        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47516         <pre class='signature'>addOption(string key, int value, string description='')</pre>
47517
47518        Adds a new ConversionOption object with the given parameters.
47519
47520        @param key the key for the new option.
47521        @param value the integer value of that option.
47522        @param description (optional) the description for the option.
47523
47524        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
47525
47526        """
47527        return _libsbml.ConversionProperties_addOption(self, *args)
47528
47529    def removeOption(self, key):
47530        r"""
47531        removeOption(ConversionProperties self, string key) -> ConversionOption
47532
47533        Removes the option with the given key from this properties object.
47534
47535        @param key the key for the new option to remove.
47536        @return the removed option.
47537
47538        """
47539        return _libsbml.ConversionProperties_removeOption(self, key)
47540
47541    def hasOption(self, key):
47542        r"""
47543        hasOption(ConversionProperties self, string key) -> bool
47544
47545        Returns @c True if this properties object contains an option with
47546        the given key.
47547
47548        @param key the key of the option to find.
47549
47550        @return @c True if an option with the given @p key exists in
47551        this properties object, @c False otherwise.
47552
47553        """
47554        return _libsbml.ConversionProperties_hasOption(self, key)
47555
47556    def getValue(self, key):
47557        r"""
47558        getValue(ConversionProperties self, string key) -> string
47559
47560        Returns the value of the given option as a string.
47561
47562        @param key the key for the option.
47563
47564        @return the string value of the option with the given key.
47565
47566        """
47567        return _libsbml.ConversionProperties_getValue(self, key)
47568
47569    def setValue(self, key, value):
47570        r"""
47571        setValue(ConversionProperties self, string key, string value)
47572
47573        Sets the value of the given option to a string.
47574
47575        @param key the key for the option.
47576        @param value the new value.
47577
47578        """
47579        return _libsbml.ConversionProperties_setValue(self, key, value)
47580
47581    def getBoolValue(self, key):
47582        r"""
47583        getBoolValue(ConversionProperties self, string key) -> bool
47584
47585        Returns the value of the given option as a Boolean.
47586
47587        @param key the key for the option.
47588
47589        @return the boolean value of the option with the given key.
47590
47591        """
47592        return _libsbml.ConversionProperties_getBoolValue(self, key)
47593
47594    def setBoolValue(self, key, value):
47595        r"""
47596        setBoolValue(ConversionProperties self, string key, bool value)
47597
47598        Sets the value of the given option to a Boolean.
47599
47600        @param key the key for the option.
47601
47602        @param value the new Boolean value.
47603
47604        """
47605        return _libsbml.ConversionProperties_setBoolValue(self, key, value)
47606
47607    def getDoubleValue(self, key):
47608        r"""
47609        getDoubleValue(ConversionProperties self, string key) -> double
47610
47611        Returns the value of the given option as a @c float.
47612
47613        @param key the key for the option.
47614
47615        @return the double value of the option with the given key.
47616
47617        """
47618        return _libsbml.ConversionProperties_getDoubleValue(self, key)
47619
47620    def setDoubleValue(self, key, value):
47621        r"""
47622        setDoubleValue(ConversionProperties self, string key, double value)
47623
47624        Sets the value of the given option to a @c float.
47625
47626        @param key the key for the option.
47627
47628        @param value the new double value.
47629
47630        """
47631        return _libsbml.ConversionProperties_setDoubleValue(self, key, value)
47632
47633    def getFloatValue(self, key):
47634        r"""
47635        getFloatValue(ConversionProperties self, string key) -> float
47636
47637        Returns the value of the given option as a @c float.
47638
47639        @param key the key for the option.
47640
47641        @return the float value of the option with the given key.
47642
47643        """
47644        return _libsbml.ConversionProperties_getFloatValue(self, key)
47645
47646    def setFloatValue(self, key, value):
47647        r"""
47648        setFloatValue(ConversionProperties self, string key, float value)
47649
47650        Sets the value of the given option to a @c float.
47651
47652        @param key the key for the option.
47653
47654        @param value the new float value.
47655
47656        """
47657        return _libsbml.ConversionProperties_setFloatValue(self, key, value)
47658
47659    def getIntValue(self, key):
47660        r"""
47661        getIntValue(ConversionProperties self, string key) -> int
47662
47663        Returns the value of the given option as an integer.
47664
47665        @param key the key for the option.
47666
47667        @return the int value of the option with the given key.
47668
47669        """
47670        return _libsbml.ConversionProperties_getIntValue(self, key)
47671
47672    def setIntValue(self, key, value):
47673        r"""
47674        setIntValue(ConversionProperties self, string key, int value)
47675
47676        Sets the value of the given option to an integer.
47677
47678        @param key the key for the option.
47679
47680        @param value the new integer value.
47681
47682        """
47683        return _libsbml.ConversionProperties_setIntValue(self, key, value)
47684
47685    def getNumOptions(self):
47686        r"""
47687        getNumOptions(ConversionProperties self) -> int
47688
47689        Returns the number of options in this Conversion Properties object
47690
47691        @return the number of options in this properties object.
47692
47693        """
47694        return _libsbml.ConversionProperties_getNumOptions(self)
47695
47696# Register ConversionProperties in _libsbml:
47697_libsbml.ConversionProperties_swigregister(ConversionProperties)
47698
47699class SBMLConverter(object):
47700    r"""
47701
47702    @sbmlpackage{core}
47703
47704    @htmlinclude pkg-marker-core.html Base class for SBML converters.
47705
47706    @htmlinclude libsbml-facility-only-warning.html
47707
47708    The SBMLConverter class is the base class for the various SBML @em
47709    converters: classes of objects that transform or convert SBML documents.
47710    These transformations can involve essentially anything that can be written
47711    algorithmically; examples include converting the units of measurement in a
47712    model, or converting from one Level+Version combination of SBML to
47713    another.  Applications can also create their own converters by subclassing
47714    SBMLConverter and following the examples of the existing converters.
47715
47716    @section using-converters General information about the use of SBML converters
47717
47718    The use of all the converters follows a similar approach.  First, one
47719    creates a ConversionProperties object and calls
47720    ConversionProperties.addOption()
47721    on this object with one argument: a text string that identifies the desired
47722    converter.  (The text string is specific to each converter; consult the
47723    documentation for a given converter to find out how it should be enabled.)
47724
47725    Next, for some converters, the caller can optionally set some
47726    converter-specific properties using additional calls to
47727    ConversionProperties.addOption().
47728    Many converters provide the ability to
47729    configure their behavior to some extent; this is realized through the use
47730    of properties that offer different options.  The default property values
47731    for each converter can be interrogated using the method
47732    SBMLConverter.getDefaultProperties() on the converter class in question .
47733
47734    Finally, the caller should invoke the method
47735    SBMLDocument.convert()
47736    with the ConversionProperties object as an argument.
47737
47738    @subsection converter-example Example of invoking an SBML converter
47739
47740    The following code fragment illustrates an example using
47741    SBMLReactionConverter, which is invoked using the option string
47742    @c 'replaceReactions':
47743
47744    @if cpp
47745    @code{.cpp}
47746    ConversionProperties props;
47747    props.addOption('replaceReactions');
47748    @endcode
47749    @endif
47750    @if python
47751    @code{.py}
47752    config = ConversionProperties()
47753    if config != None:
47754      config.addOption('replaceReactions')
47755    @endcode
47756    @endif
47757    @if java
47758    @code{.java}
47759    ConversionProperties props = new ConversionProperties();
47760    if (props != null) {
47761      props.addOption('replaceReactions');
47762    } else {
47763      // Deal with error.
47764    }
47765    @endcode
47766    @endif
47767
47768    In the case of SBMLReactionConverter, there are no options to affect
47769    its behavior, so the next step is simply to invoke the converter on
47770    an SBMLDocument object.  Continuing the example code:
47771
47772    @if cpp
47773    @code{.cpp}
47774    // Assume that the variable 'document' has been set to an SBMLDocument object.
47775    int status = document->convert(props);
47776    if (status != LIBSBML_OPERATION_SUCCESS)
47777    {
47778      cerr << 'Unable to perform conversion due to the following:' << endl;
47779      document->printErrors(cerr);
47780    }
47781    @endcode
47782    @endif
47783    @if python
47784    @code{.py}
47785      # Assume that the variable 'document' has been set to an SBMLDocument object.
47786      status = document.convert(config)
47787      if status != LIBSBML_OPERATION_SUCCESS:
47788        # Handle error somehow.
47789        print('Error: conversion failed due to the following:')
47790        document.printErrors()
47791    @endcode
47792    @endif
47793    @if java
47794    @code{.java}
47795      // Assume that the variable 'document' has been set to an SBMLDocument object.
47796      status = document.convert(config);
47797      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
47798      {
47799        // Handle error somehow.
47800        System.out.println('Error: conversion failed due to the following:');
47801        document.printErrors();
47802      }
47803    @endcode
47804    @endif
47805
47806    Here is an example of using a converter that offers an option. The
47807    following code invokes SBMLStripPackageConverter to remove the
47808    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
47809    of the package to be removed by adding a value for the option named
47810    @c 'package' defined by that converter:
47811
47812    @if cpp
47813    @code{.cpp}
47814    ConversionProperties props;
47815    props.addOption('stripPackage');
47816    props.addOption('package', 'layout');
47817
47818    int status = document->convert(props);
47819    if (status != LIBSBML_OPERATION_SUCCESS)
47820    {
47821        cerr << 'Unable to strip the Layout package from the model';
47822        cerr << 'Error returned: ' << status;
47823    }
47824    @endcode
47825    @endif
47826    @if python
47827    @code{.py}
47828    def strip_layout_example(document):
47829      config = ConversionProperties()
47830      if config != None:
47831        config.addOption('stripPackage')
47832        config.addOption('package', 'layout')
47833        status = document.convert(config)
47834        if status != LIBSBML_OPERATION_SUCCESS:
47835          # Handle error somehow.
47836          print('Error: unable to strip the Layout package.')
47837          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
47838      else:
47839        # Handle error somehow.
47840        print('Error: unable to create ConversionProperties object')
47841    @endcode
47842    @endif
47843    @if java
47844    @code{.java}
47845    ConversionProperties config = new ConversionProperties();
47846    if (config != None) {
47847      config.addOption('stripPackage');
47848      config.addOption('package', 'layout');
47849      status = document.convert(config);
47850      if (status != LIBSBML_OPERATION_SUCCESS) {
47851        // Handle error somehow.
47852        System.out.println('Error: unable to strip the Layout package');
47853        document.printErrors();
47854      }
47855    } else {
47856      // Handle error somehow.
47857      System.out.println('Error: unable to create ConversionProperties object');
47858    }
47859    @endcode
47860    @endif
47861
47862    @subsection available-converters Available SBML converters in libSBML
47863
47864    LibSBML provides a number of built-in converters; by convention, their
47865    names end in @em Converter. The following are the built-in converters
47866    provided by libSBML @htmlinclude libsbml-version.html:
47867
47868    @copydetails doc_list_of_libsbml_converters
47869
47870    """
47871
47872    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
47873    __repr__ = _swig_repr
47874
47875    def __init__(self, *args):
47876        r"""
47877        __init__(SBMLConverter self) -> SBMLConverter
47878        __init__(SBMLConverter self, string name) -> SBMLConverter
47879        __init__(SBMLConverter self, SBMLConverter orig) -> SBMLConverter
47880
47881        This method has multiple variants; they differ in the arguments
47882         they accept.  Each variant is described separately below.
47883
47884        @par
47885        <hr>
47886        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47887         <pre class='signature'>SBMLConverter()</pre>
47888
47889        Creates a new SBMLConverter object.
47890
47891
47892        @par
47893        <hr>
47894        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47895         <pre class='signature'>SBMLConverter(SBMLConverter orig)</pre>
47896
47897        Copy constructor.
47898
47899        This creates a copy of an SBMLConverter object.
47900
47901        @param orig the SBMLConverter object to copy.
47902
47903
47904        @par
47905        <hr>
47906        <span class='variant-sig-heading'>Method variant with the following signature</span>:
47907         <pre class='signature'>SBMLConverter(string name)</pre>
47908
47909        Creates a new SBMLConverter object with a given name.
47910
47911        @param name the name for the converter to create.
47912
47913        """
47914        if self.__class__ == SBMLConverter:
47915            _self = None
47916        else:
47917            _self = self
47918        _libsbml.SBMLConverter_swiginit(self, _libsbml.new_SBMLConverter(_self, *args))
47919    __swig_destroy__ = _libsbml.delete_SBMLConverter
47920
47921    def clone(self):
47922        r"""
47923        clone(SBMLConverter self) -> SBMLConverter
47924
47925        Creates and returns a deep copy of this SBMLConverter object.
47926
47927        @return the (deep) copy of this SBMLConverter object.
47928
47929        """
47930        return _libsbml.SBMLConverter_clone(self)
47931
47932    def getDocument(self, *args):
47933        r"""
47934        getDocument(SBMLConverter self) -> SBMLDocument
47935        getDocument(SBMLConverter self) -> SBMLDocument
47936
47937        Returns the SBML document that is the subject of the conversions.
47938
47939        @return the current SBMLDocument object.
47940
47941        """
47942        return _libsbml.SBMLConverter_getDocument(self, *args)
47943
47944    def getDefaultProperties(self):
47945        r"""
47946        getDefaultProperties(SBMLConverter self) -> ConversionProperties
47947
47948        Returns the default properties of this converter.
47949
47950        A given converter exposes one or more properties that can be adjusted
47951        in order to influence the behavior of the converter.  This method
47952        returns the @em default property settings for this converter.  It is
47953        meant to be called in order to discover all the settings for the
47954        converter object.  The run-time properties of the converter object can
47955        be adjusted by using the method
47956        SBMLConverter.setProperties().
47957
47958        @return the default properties for the converter.
47959
47960        @see setProperties()
47961        @see matchesProperties()
47962
47963        """
47964        return _libsbml.SBMLConverter_getDefaultProperties(self)
47965
47966    def getTargetNamespaces(self):
47967        r"""
47968        getTargetNamespaces(SBMLConverter self) -> SBMLNamespaces
47969
47970        Returns the target SBML namespaces of the currently set properties.
47971
47972        SBML namespaces are used by libSBML to express the Level+Version of the
47973        SBML document (and, possibly, any SBML Level&nbsp;3 packages in
47974        use). Some converters' behavior is affected by the SBML namespace
47975        configured in the converter.  For example, in SBMLLevelVersionConverter
47976        (the converter for converting SBML documents from one Level+Version
47977        combination to another), the actions are fundamentally dependent on the
47978        SBML namespaces targeted.
47979
47980        @return the SBMLNamespaces object that describes the SBML namespaces
47981        in effect, or @c None if none are set.
47982
47983        """
47984        return _libsbml.SBMLConverter_getTargetNamespaces(self)
47985
47986    def matchesProperties(self, props):
47987        r"""
47988        matchesProperties(SBMLConverter self, ConversionProperties props) -> bool
47989
47990        Returns @c True if this converter matches the given properties.
47991
47992        Given a ConversionProperties object @p props, this method checks that @p
47993        props possesses an option value to enable this converter.  If it does,
47994        this method returns @c True.
47995
47996        @param props the properties to match.
47997
47998        @return @c True if the properties @p props would match the necessary
47999        properties for this type of converter, @c False otherwise.
48000
48001        """
48002        return _libsbml.SBMLConverter_matchesProperties(self, props)
48003
48004    def setDocument(self, doc):
48005        r"""
48006        setDocument(SBMLConverter self, SBMLDocument doc) -> int
48007
48008        This method has multiple variants; they differ in the arguments
48009         they accept.  Each variant is described separately below.
48010
48011        @par
48012        <hr>
48013        <span class='variant-sig-heading'>Method variant with the following signature</span>:
48014         <pre class='signature'>setDocument(SBMLDocument doc)</pre>
48015
48016        Sets the SBML document to be converted.
48017
48018        @param doc the document to use for this conversion.
48019
48020        @return integer value indicating the success/failure of the operation.
48021        @if clike The value is drawn from the enumeration
48022        #OperationReturnValues_t. @endif@~ The set of possible values that may
48023        be returned ultimately depends on the specific subclass of
48024        SBMLConverter being used, but the default method can return the
48025        following:
48026        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
48027
48028        @if cpp
48029        @warning Even though the argument @p doc is '', it is immediately
48030        cast to a non- version, which is then usually changed by the
48031        converter upon a successful conversion.  This variant of the
48032        setDocument() method is here solely to preserve backwards compatibility.
48033        @endif
48034
48035
48036        @par
48037        <hr>
48038        <span class='variant-sig-heading'>Method variant with the following signature</span>:
48039         <pre class='signature'>setDocument(SBMLDocument doc)</pre>
48040
48041        Sets the SBML document to be converted.
48042
48043        @param doc the document to use for this conversion.
48044
48045        @return integer value indicating the success/failure of the operation.
48046        @if clike The value is drawn from the enumeration
48047        #OperationReturnValues_t. @endif@~ The set of possible values that may
48048        be returned ultimately depends on the specific subclass of
48049        SBMLConverter being used, but the default method can return the
48050        following:
48051        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
48052
48053        """
48054        return _libsbml.SBMLConverter_setDocument(self, doc)
48055
48056    def setProperties(self, props):
48057        r"""
48058        setProperties(SBMLConverter self, ConversionProperties props) -> int
48059
48060        Sets the configuration properties to be used by this converter.
48061
48062        @param props the ConversionProperties object defining the properties
48063        to set.
48064
48065        @return integer value indicating the success/failure of the operation.
48066        @if clike The value is drawn from the enumeration
48067        #OperationReturnValues_t. @endif@~ The set of possible values that may
48068        be returned ultimately depends on the specific subclass of
48069        SBMLConverter being used, but the default method can return the
48070        following values:
48071        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
48072        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
48073
48074        @see getProperties()
48075        @see matchesProperties()
48076
48077        """
48078        return _libsbml.SBMLConverter_setProperties(self, props)
48079
48080    def getProperties(self):
48081        r"""
48082        getProperties(SBMLConverter self) -> ConversionProperties
48083
48084        Returns the current properties in effect for this converter.
48085
48086        A given converter exposes one or more properties that can be adjusted
48087        in order to influence the behavior of the converter.  This method
48088        returns the current properties for this converter; in other words, the
48089        settings in effect at this moment.  To change the property values, you
48090        can use SBMLConverter.setProperties().
48091
48092        @return the currently set configuration properties.
48093
48094        @see setProperties()
48095        @see matchesProperties()
48096
48097        """
48098        return _libsbml.SBMLConverter_getProperties(self)
48099
48100    def convert(self):
48101        r"""
48102        convert(SBMLConverter self) -> int
48103
48104        Perform the conversion.
48105
48106        This method causes the converter to do the actual conversion work,
48107        that is, to convert the SBMLDocument object set by
48108        SBMLConverter.setDocument() and
48109        with the configuration options set by
48110        SBMLConverter.setProperties().
48111
48112        @return  integer value indicating the success/failure of the operation.
48113        @if clike The value is drawn from the enumeration
48114        #OperationReturnValues_t. @endif@~ The set of possible values that may
48115        be returned depends on the converter subclass; please consult
48116        the documentation for the relevant class to find out what the
48117        possibilities are.
48118
48119        """
48120        return _libsbml.SBMLConverter_convert(self)
48121
48122    def getName(self):
48123        r"""
48124        getName(SBMLConverter self) -> string
48125
48126        Returns the name of this converter.
48127
48128        @return a string, the name of this converter.
48129
48130        """
48131        return _libsbml.SBMLConverter_getName(self)
48132    def __disown__(self):
48133        self.this.disown()
48134        _libsbml.disown_SBMLConverter(self)
48135        return weakref.proxy(self)
48136
48137# Register SBMLConverter in _libsbml:
48138_libsbml.SBMLConverter_swigregister(SBMLConverter)
48139
48140class SBMLConverterRegistry(object):
48141    r"""
48142
48143    @sbmlpackage{core}
48144
48145    @htmlinclude pkg-marker-core.html Registry of all libSBML SBML converters.
48146
48147    @htmlinclude libsbml-facility-only-warning.html
48148
48149    LibSBML provides facilities for transforming and converting SBML
48150    documents in various ways.  These transformations can involve
48151    essentially anything that can be written algorithmically; examples
48152    include converting the units of measurement in a model, or converting
48153    from one Level+Version combination of SBML to another.  Converters are
48154    implemented as objects derived from the class SBMLConverter.
48155
48156    The converter registry, implemented as a singleton object of class
48157    SBMLConverterRegistry, maintains a list of known converters and provides
48158    methods for discovering them.  Callers can use the method
48159    SBMLConverterRegistry.getNumConverters() to find out how many
48160    converters are registered, then use
48161    SBMLConverterRegistry.getConverterByIndex() to
48162    iterate over each one; alternatively, callers can use
48163    SBMLConverterRegistry.getConverterFor()
48164    to search for a converter having specific properties.
48165
48166    """
48167
48168    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
48169
48170    def __init__(self, *args, **kwargs):
48171        raise AttributeError("No constructor defined")
48172    __repr__ = _swig_repr
48173
48174    @staticmethod
48175    def getInstance():
48176        r"""
48177        getInstance() -> SBMLConverterRegistry
48178
48179        Returns the singleton instance for the converter registry.
48180
48181        Prior to using the registry, callers have to obtain a copy of the
48182        registry.  This static method provides the means for doing that.
48183
48184        @return the singleton for the converter registry.
48185
48186        """
48187        return _libsbml.SBMLConverterRegistry_getInstance()
48188
48189    def addConverter(self, converter):
48190        r"""
48191        addConverter(SBMLConverterRegistry self, SBMLConverter converter) -> int
48192
48193        Adds the given converter to the registry of SBML converters.
48194
48195        @param converter the converter to add to the registry.
48196
48197        @return integer value indicating success/failure of the
48198        function.  @if clike The value is drawn from the
48199        enumeration #OperationReturnValues_t. @endif@~ The possible values
48200        returned by this function are:
48201        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
48202        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
48203
48204        """
48205        return _libsbml.SBMLConverterRegistry_addConverter(self, converter)
48206
48207    def getConverterByIndex(self, index):
48208        r"""
48209        getConverterByIndex(SBMLConverterRegistry self, int index) -> SBMLConverter
48210
48211        Returns the converter with the given index number.
48212
48213        Converters are given arbitrary index numbers by the registry.  Callers
48214        can use the method SBMLConverterRegistry.getNumConverters() to find
48215        out how many converters are registered, then use this method to
48216        iterate over the list and obtain each one in turn.
48217
48218        @param index the zero-based index of the converter to fetch.
48219
48220        @return the converter with the given index number, or @c None if the
48221        number is less than @c 0 or there is no converter at the given index
48222        position.
48223
48224        """
48225        return _libsbml.SBMLConverterRegistry_getConverterByIndex(self, index)
48226
48227    def getConverterFor(self, props):
48228        r"""
48229        getConverterFor(SBMLConverterRegistry self, ConversionProperties props) -> SBMLConverter
48230
48231        Returns the converter that best matches the given configuration
48232        properties.
48233
48234        Many converters provide the ability to configure their behavior.  This
48235        is realized through the use of @em properties that offer different @em
48236        options.  The present method allows callers to search for converters
48237        that have specific property values.  Callers can do this by creating a
48238        ConversionProperties object, adding the desired option(s) to the
48239        object, then passing the object to this method.
48240
48241        @param props a ConversionProperties object defining the properties
48242        to match against.
48243
48244        @return the converter matching the properties, or @c None if no
48245        suitable converter is found.
48246
48247        @see getConverterByIndex()
48248
48249        """
48250        return _libsbml.SBMLConverterRegistry_getConverterFor(self, props)
48251
48252    def getNumConverters(self):
48253        r"""
48254        getNumConverters(SBMLConverterRegistry self) -> int
48255
48256        Returns the number of converters known by the registry.
48257
48258        @return the number of registered converters.
48259
48260        @see getConverterByIndex()
48261
48262        """
48263        return _libsbml.SBMLConverterRegistry_getNumConverters(self)
48264    __swig_destroy__ = _libsbml.delete_SBMLConverterRegistry
48265
48266# Register SBMLConverterRegistry in _libsbml:
48267_libsbml.SBMLConverterRegistry_swigregister(SBMLConverterRegistry)
48268
48269def SBMLConverterRegistry_getInstance():
48270    r"""
48271    SBMLConverterRegistry_getInstance() -> SBMLConverterRegistry
48272
48273    Returns the singleton instance for the converter registry.
48274
48275    Prior to using the registry, callers have to obtain a copy of the
48276    registry.  This static method provides the means for doing that.
48277
48278    @return the singleton for the converter registry.
48279
48280    """
48281    return _libsbml.SBMLConverterRegistry_getInstance()
48282
48283class SBMLFunctionDefinitionConverter(SBMLConverter):
48284    r"""
48285
48286    @sbmlpackage{core}
48287
48288    @htmlinclude pkg-marker-core.html Converter to expand user-defined functions in-line.
48289
48290    @htmlinclude libsbml-facility-only-warning.html
48291
48292    This converter manipulates user-defined functions in an SBML file.  When
48293    invoked on a model, it performs the following operations:
48294
48295    @li Reads the list of user-defined functions in the model (i.e., the list
48296    of FunctionDefinition objects);
48297    @li Looks for invocations of the function in mathematical expressions
48298    throughout the model; and
48299    @li For each invocation found, replaces the invocation with a in-line copy
48300    of the function's body, similar to how macro expansions might be performed
48301    in scripting and programming languages.
48302
48303    For example, suppose the model contains a function definition
48304    representing the function <code>f(x, y) = x * y</code>.  Further
48305    suppose this functions invoked somewhere else in the model, in
48306    a mathematical formula, as <code>f(s, p)</code>.  The outcome of running
48307    SBMLFunctionDefinitionConverter on the model will be to replace
48308    the call to <code>f</code> with the expression <code>s * p</code>.
48309
48310    @section usage Configuration and use of SBMLFunctionDefinitionConverter
48311
48312    SBMLFunctionDefinitionConverter is enabled by creating a
48313    ConversionProperties object with the option
48314    @c 'expandFunctionDefinitions', and passing this properties object to
48315    SBMLDocument.convert().
48316    The converter accepts one option:
48317
48318    @li @c 'skipIds': if set, it should be a string containing a
48319    comma-separated list of identifiers (SBML 'id' values) that are to be
48320    skipped during function conversion.  Functions whose identifiers are
48321    found in this list will not be converted.
48322
48323    @section using-converters General information about the use of SBML converters
48324
48325    The use of all the converters follows a similar approach.  First, one
48326    creates a ConversionProperties object and calls
48327    ConversionProperties.addOption()
48328    on this object with one argument: a text string that identifies the desired
48329    converter.  (The text string is specific to each converter; consult the
48330    documentation for a given converter to find out how it should be enabled.)
48331
48332    Next, for some converters, the caller can optionally set some
48333    converter-specific properties using additional calls to
48334    ConversionProperties.addOption().
48335    Many converters provide the ability to
48336    configure their behavior to some extent; this is realized through the use
48337    of properties that offer different options.  The default property values
48338    for each converter can be interrogated using the method
48339    SBMLConverter.getDefaultProperties() on the converter class in question .
48340
48341    Finally, the caller should invoke the method
48342    SBMLDocument.convert()
48343    with the ConversionProperties object as an argument.
48344
48345    @subsection converter-example Example of invoking an SBML converter
48346
48347    The following code fragment illustrates an example using
48348    SBMLReactionConverter, which is invoked using the option string
48349    @c 'replaceReactions':
48350
48351    @if cpp
48352    @code{.cpp}
48353    ConversionProperties props;
48354    props.addOption('replaceReactions');
48355    @endcode
48356    @endif
48357    @if python
48358    @code{.py}
48359    config = ConversionProperties()
48360    if config != None:
48361      config.addOption('replaceReactions')
48362    @endcode
48363    @endif
48364    @if java
48365    @code{.java}
48366    ConversionProperties props = new ConversionProperties();
48367    if (props != null) {
48368      props.addOption('replaceReactions');
48369    } else {
48370      // Deal with error.
48371    }
48372    @endcode
48373    @endif
48374
48375    In the case of SBMLReactionConverter, there are no options to affect
48376    its behavior, so the next step is simply to invoke the converter on
48377    an SBMLDocument object.  Continuing the example code:
48378
48379    @if cpp
48380    @code{.cpp}
48381    // Assume that the variable 'document' has been set to an SBMLDocument object.
48382    int status = document->convert(props);
48383    if (status != LIBSBML_OPERATION_SUCCESS)
48384    {
48385      cerr << 'Unable to perform conversion due to the following:' << endl;
48386      document->printErrors(cerr);
48387    }
48388    @endcode
48389    @endif
48390    @if python
48391    @code{.py}
48392      # Assume that the variable 'document' has been set to an SBMLDocument object.
48393      status = document.convert(config)
48394      if status != LIBSBML_OPERATION_SUCCESS:
48395        # Handle error somehow.
48396        print('Error: conversion failed due to the following:')
48397        document.printErrors()
48398    @endcode
48399    @endif
48400    @if java
48401    @code{.java}
48402      // Assume that the variable 'document' has been set to an SBMLDocument object.
48403      status = document.convert(config);
48404      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
48405      {
48406        // Handle error somehow.
48407        System.out.println('Error: conversion failed due to the following:');
48408        document.printErrors();
48409      }
48410    @endcode
48411    @endif
48412
48413    Here is an example of using a converter that offers an option. The
48414    following code invokes SBMLStripPackageConverter to remove the
48415    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
48416    of the package to be removed by adding a value for the option named
48417    @c 'package' defined by that converter:
48418
48419    @if cpp
48420    @code{.cpp}
48421    ConversionProperties props;
48422    props.addOption('stripPackage');
48423    props.addOption('package', 'layout');
48424
48425    int status = document->convert(props);
48426    if (status != LIBSBML_OPERATION_SUCCESS)
48427    {
48428        cerr << 'Unable to strip the Layout package from the model';
48429        cerr << 'Error returned: ' << status;
48430    }
48431    @endcode
48432    @endif
48433    @if python
48434    @code{.py}
48435    def strip_layout_example(document):
48436      config = ConversionProperties()
48437      if config != None:
48438        config.addOption('stripPackage')
48439        config.addOption('package', 'layout')
48440        status = document.convert(config)
48441        if status != LIBSBML_OPERATION_SUCCESS:
48442          # Handle error somehow.
48443          print('Error: unable to strip the Layout package.')
48444          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
48445      else:
48446        # Handle error somehow.
48447        print('Error: unable to create ConversionProperties object')
48448    @endcode
48449    @endif
48450    @if java
48451    @code{.java}
48452    ConversionProperties config = new ConversionProperties();
48453    if (config != None) {
48454      config.addOption('stripPackage');
48455      config.addOption('package', 'layout');
48456      status = document.convert(config);
48457      if (status != LIBSBML_OPERATION_SUCCESS) {
48458        // Handle error somehow.
48459        System.out.println('Error: unable to strip the Layout package');
48460        document.printErrors();
48461      }
48462    } else {
48463      // Handle error somehow.
48464      System.out.println('Error: unable to create ConversionProperties object');
48465    }
48466    @endcode
48467    @endif
48468
48469    @subsection available-converters Available SBML converters in libSBML
48470
48471    LibSBML provides a number of built-in converters; by convention, their
48472    names end in @em Converter. The following are the built-in converters
48473    provided by libSBML @htmlinclude libsbml-version.html:
48474
48475    @copydetails doc_list_of_libsbml_converters
48476
48477    """
48478
48479    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
48480    __repr__ = _swig_repr
48481
48482    @staticmethod
48483    def init():
48484        r"""
48485        init()
48486
48487        @internal
48488
48489        @internal
48490
48491        """
48492        return _libsbml.SBMLFunctionDefinitionConverter_init()
48493
48494    def __init__(self, *args):
48495        r"""
48496        __init__(SBMLFunctionDefinitionConverter self) -> SBMLFunctionDefinitionConverter
48497        __init__(SBMLFunctionDefinitionConverter self, SBMLFunctionDefinitionConverter obj) -> SBMLFunctionDefinitionConverter
48498
48499        This method has multiple variants; they differ in the arguments
48500         they accept.  Each variant is described separately below.
48501
48502        @par
48503        <hr>
48504        <span class='variant-sig-heading'>Method variant with the following signature</span>:
48505         <pre class='signature'>SBMLFunctionDefinitionConverter()</pre>
48506
48507        Creates a new SBMLFunctionDefinitionConverter object.
48508
48509
48510        @par
48511        <hr>
48512        <span class='variant-sig-heading'>Method variant with the following signature</span>:
48513         <pre class='signature'>SBMLFunctionDefinitionConverter(SBMLFunctionDefinitionConverter obj)</pre>
48514
48515        Copy constructor; creates a copy of an SBMLFunctionDefinitionConverter
48516        object.
48517
48518        @param obj the SBMLFunctionDefinitionConverter object to copy.
48519
48520        """
48521        _libsbml.SBMLFunctionDefinitionConverter_swiginit(self, _libsbml.new_SBMLFunctionDefinitionConverter(*args))
48522
48523    def clone(self):
48524        r"""
48525        clone(SBMLFunctionDefinitionConverter self) -> SBMLFunctionDefinitionConverter
48526
48527        Creates and returns a deep copy of this SBMLFunctionDefinitionConverter
48528        object.
48529
48530        @return a (deep) copy of this converter.
48531
48532        """
48533        return _libsbml.SBMLFunctionDefinitionConverter_clone(self)
48534    __swig_destroy__ = _libsbml.delete_SBMLFunctionDefinitionConverter
48535
48536    def matchesProperties(self, props):
48537        r"""
48538        matchesProperties(SBMLFunctionDefinitionConverter self, ConversionProperties props) -> bool
48539
48540        Returns @c True if this converter object's properties match the given
48541        properties.
48542
48543        A typical use of this method involves creating a ConversionProperties
48544        object, setting the options desired, and then calling this method on
48545        an SBMLFunctionDefinitionConverter object to find out if the object's
48546        property values match the given ones.  This method is also used by
48547        SBMLConverterRegistry.getConverterFor()
48548        to search across all registered converters for one matching particular
48549        properties.
48550
48551        @param props the properties to match.
48552
48553        @return @c True if this converter's properties match, @c False
48554        otherwise.
48555
48556        """
48557        return _libsbml.SBMLFunctionDefinitionConverter_matchesProperties(self, props)
48558
48559    def convert(self):
48560        r"""
48561        convert(SBMLFunctionDefinitionConverter self) -> int
48562
48563        Perform the conversion.
48564
48565        This method causes the converter to do the actual conversion work,
48566        that is, to convert the SBMLDocument object set by
48567        SBMLConverter.setDocument() and
48568        with the configuration options set by
48569        SBMLConverter.setProperties().
48570
48571        @return integer value indicating success/failure of the
48572        function.  @if clike The value is drawn from the
48573        enumeration #OperationReturnValues_t. @endif@~ The possible values
48574        returned by this function are:
48575        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
48576        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
48577        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
48578        @li @link libsbml#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink
48579
48580        """
48581        return _libsbml.SBMLFunctionDefinitionConverter_convert(self)
48582
48583    def getDefaultProperties(self):
48584        r"""
48585        getDefaultProperties(SBMLFunctionDefinitionConverter self) -> ConversionProperties
48586
48587        Returns the default properties of this converter.
48588
48589        A given converter exposes one or more properties that can be adjusted
48590        in order to influence the behavior of the converter.  This method
48591        returns the @em default property settings for this converter.  It is
48592        meant to be called in order to discover all the settings for the
48593        converter object.
48594
48595        @return the ConversionProperties object describing the default properties
48596        for this converter.
48597
48598        """
48599        return _libsbml.SBMLFunctionDefinitionConverter_getDefaultProperties(self)
48600
48601# Register SBMLFunctionDefinitionConverter in _libsbml:
48602_libsbml.SBMLFunctionDefinitionConverter_swigregister(SBMLFunctionDefinitionConverter)
48603
48604def SBMLFunctionDefinitionConverter_init():
48605    r"""
48606    SBMLFunctionDefinitionConverter_init()
48607
48608    @internal
48609
48610    @internal
48611
48612    """
48613    return _libsbml.SBMLFunctionDefinitionConverter_init()
48614
48615class SBMLIdConverter(SBMLConverter):
48616    r"""
48617
48618    @sbmlpackage{core}
48619
48620    @htmlinclude pkg-marker-core.html Converter for replacing object identifiers.
48621
48622    @htmlinclude libsbml-facility-only-warning.html
48623
48624    This converter translates all instances of a given identifier (i.e., SBML object 'id'
48625    attribute value) of type 'SId' in a Model to another identifier.  It does this based on a list of source
48626    identifiers, translating each one to its corresponding replacement value
48627    in a list of replacement identifiers.  It also updates all references to
48628    the identifiers so replaced.  (More technically, it replaces all values
48629    known as type @c SIdRef in the SBML Level&nbsp;3 specifications.)
48630
48631    This converter only searches the global SId namespace for the Model child of the
48632    SBMLDocument.  It does not replace any IDs or SIdRefs for LocalParameters, nor
48633    does it replace any UnitSIds or UnitSIdRefs.  It likewise does not replace any IDs
48634    in a new namespace introduced by a package, such as the PortSId namespace
48635    from the Hierarchical %Model Composition package, nor any Model objects that are
48636    not the direct child of the SBMLDocument, such as the ModelDefinitions from
48637    the Hierarchical %Model Composition package.
48638
48639    If, however, a package introduces a new element with an 'id' attribute
48640    of type SId, any attribute of type SIdRef, or child of type SIdRef (such as
48641    a new Math child of a package element), those IDs will be replaced if they
48642    match a source identifier.
48643
48644    @section SBMLIdConverter-usage Configuration and use of SBMLIdConverter
48645
48646    SBMLIdConverter is enabled by creating a ConversionProperties object with
48647    the option @c 'renameSIds', and passing this properties object to
48648    SBMLDocument.convert().
48649    The converter accepts two options, and both must
48650    be set or else no conversion is performed:
48651
48652    @li @c 'currentIds': A comma-separated list of identifiers to replace.
48653    @li @c 'newIds': A comma-separated list of identifiers to use as the
48654    replacements.  The values should correspond one-to-one with the identifiers
48655    in @c 'currentIds' that should be replaced.
48656
48657    @section using-converters General information about the use of SBML converters
48658
48659    The use of all the converters follows a similar approach.  First, one
48660    creates a ConversionProperties object and calls
48661    ConversionProperties.addOption()
48662    on this object with one argument: a text string that identifies the desired
48663    converter.  (The text string is specific to each converter; consult the
48664    documentation for a given converter to find out how it should be enabled.)
48665
48666    Next, for some converters, the caller can optionally set some
48667    converter-specific properties using additional calls to
48668    ConversionProperties.addOption().
48669    Many converters provide the ability to
48670    configure their behavior to some extent; this is realized through the use
48671    of properties that offer different options.  The default property values
48672    for each converter can be interrogated using the method
48673    SBMLConverter.getDefaultProperties() on the converter class in question .
48674
48675    Finally, the caller should invoke the method
48676    SBMLDocument.convert()
48677    with the ConversionProperties object as an argument.
48678
48679    @subsection converter-example Example of invoking an SBML converter
48680
48681    The following code fragment illustrates an example using
48682    SBMLReactionConverter, which is invoked using the option string
48683    @c 'replaceReactions':
48684
48685    @if cpp
48686    @code{.cpp}
48687    ConversionProperties props;
48688    props.addOption('replaceReactions');
48689    @endcode
48690    @endif
48691    @if python
48692    @code{.py}
48693    config = ConversionProperties()
48694    if config != None:
48695      config.addOption('replaceReactions')
48696    @endcode
48697    @endif
48698    @if java
48699    @code{.java}
48700    ConversionProperties props = new ConversionProperties();
48701    if (props != null) {
48702      props.addOption('replaceReactions');
48703    } else {
48704      // Deal with error.
48705    }
48706    @endcode
48707    @endif
48708
48709    In the case of SBMLReactionConverter, there are no options to affect
48710    its behavior, so the next step is simply to invoke the converter on
48711    an SBMLDocument object.  Continuing the example code:
48712
48713    @if cpp
48714    @code{.cpp}
48715    // Assume that the variable 'document' has been set to an SBMLDocument object.
48716    int status = document->convert(props);
48717    if (status != LIBSBML_OPERATION_SUCCESS)
48718    {
48719      cerr << 'Unable to perform conversion due to the following:' << endl;
48720      document->printErrors(cerr);
48721    }
48722    @endcode
48723    @endif
48724    @if python
48725    @code{.py}
48726      # Assume that the variable 'document' has been set to an SBMLDocument object.
48727      status = document.convert(config)
48728      if status != LIBSBML_OPERATION_SUCCESS:
48729        # Handle error somehow.
48730        print('Error: conversion failed due to the following:')
48731        document.printErrors()
48732    @endcode
48733    @endif
48734    @if java
48735    @code{.java}
48736      // Assume that the variable 'document' has been set to an SBMLDocument object.
48737      status = document.convert(config);
48738      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
48739      {
48740        // Handle error somehow.
48741        System.out.println('Error: conversion failed due to the following:');
48742        document.printErrors();
48743      }
48744    @endcode
48745    @endif
48746
48747    Here is an example of using a converter that offers an option. The
48748    following code invokes SBMLStripPackageConverter to remove the
48749    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
48750    of the package to be removed by adding a value for the option named
48751    @c 'package' defined by that converter:
48752
48753    @if cpp
48754    @code{.cpp}
48755    ConversionProperties props;
48756    props.addOption('stripPackage');
48757    props.addOption('package', 'layout');
48758
48759    int status = document->convert(props);
48760    if (status != LIBSBML_OPERATION_SUCCESS)
48761    {
48762        cerr << 'Unable to strip the Layout package from the model';
48763        cerr << 'Error returned: ' << status;
48764    }
48765    @endcode
48766    @endif
48767    @if python
48768    @code{.py}
48769    def strip_layout_example(document):
48770      config = ConversionProperties()
48771      if config != None:
48772        config.addOption('stripPackage')
48773        config.addOption('package', 'layout')
48774        status = document.convert(config)
48775        if status != LIBSBML_OPERATION_SUCCESS:
48776          # Handle error somehow.
48777          print('Error: unable to strip the Layout package.')
48778          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
48779      else:
48780        # Handle error somehow.
48781        print('Error: unable to create ConversionProperties object')
48782    @endcode
48783    @endif
48784    @if java
48785    @code{.java}
48786    ConversionProperties config = new ConversionProperties();
48787    if (config != None) {
48788      config.addOption('stripPackage');
48789      config.addOption('package', 'layout');
48790      status = document.convert(config);
48791      if (status != LIBSBML_OPERATION_SUCCESS) {
48792        // Handle error somehow.
48793        System.out.println('Error: unable to strip the Layout package');
48794        document.printErrors();
48795      }
48796    } else {
48797      // Handle error somehow.
48798      System.out.println('Error: unable to create ConversionProperties object');
48799    }
48800    @endcode
48801    @endif
48802
48803    @subsection available-converters Available SBML converters in libSBML
48804
48805    LibSBML provides a number of built-in converters; by convention, their
48806    names end in @em Converter. The following are the built-in converters
48807    provided by libSBML @htmlinclude libsbml-version.html:
48808
48809    @copydetails doc_list_of_libsbml_converters
48810
48811    """
48812
48813    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
48814    __repr__ = _swig_repr
48815
48816    @staticmethod
48817    def init():
48818        r"""
48819        init()
48820
48821        @internal
48822
48823        @internal
48824
48825        """
48826        return _libsbml.SBMLIdConverter_init()
48827
48828    def __init__(self, *args):
48829        r"""
48830        __init__(SBMLIdConverter self) -> SBMLIdConverter
48831        __init__(SBMLIdConverter self, SBMLIdConverter obj) -> SBMLIdConverter
48832
48833        This method has multiple variants; they differ in the arguments
48834         they accept.  Each variant is described separately below.
48835
48836        @par
48837        <hr>
48838        <span class='variant-sig-heading'>Method variant with the following signature</span>:
48839         <pre class='signature'>SBMLIdConverter(SBMLIdConverter obj)</pre>
48840
48841        Copy constructor; creates a copy of an SBMLIdConverter
48842        object.
48843
48844        @param obj the SBMLIdConverter object to copy.
48845
48846
48847        @par
48848        <hr>
48849        <span class='variant-sig-heading'>Method variant with the following signature</span>:
48850         <pre class='signature'>SBMLIdConverter()</pre>
48851
48852        Creates a new SBMLIdConverter object.
48853
48854        """
48855        _libsbml.SBMLIdConverter_swiginit(self, _libsbml.new_SBMLIdConverter(*args))
48856
48857    def clone(self):
48858        r"""
48859        clone(SBMLIdConverter self) -> SBMLIdConverter
48860
48861        Creates and returns a deep copy of this SBMLIdConverter
48862        object.
48863
48864        @return a (deep) copy of this converter.
48865
48866        """
48867        return _libsbml.SBMLIdConverter_clone(self)
48868    __swig_destroy__ = _libsbml.delete_SBMLIdConverter
48869
48870    def matchesProperties(self, props):
48871        r"""
48872        matchesProperties(SBMLIdConverter self, ConversionProperties props) -> bool
48873
48874        Returns @c True if this converter object's properties match the given
48875        properties.
48876
48877        A typical use of this method involves creating a ConversionProperties
48878        object, setting the options desired, and then calling this method on
48879        an SBMLIdConverter object to find out if the object's
48880        property values match the given ones.  This method is also used by
48881        SBMLConverterRegistry.getConverterFor()
48882        to search across all registered converters for one matching particular
48883        properties.
48884
48885        @param props the properties to match.
48886
48887        @return @c True if this converter's properties match, @c False
48888        otherwise.
48889
48890        """
48891        return _libsbml.SBMLIdConverter_matchesProperties(self, props)
48892
48893    def convert(self):
48894        r"""
48895        convert(SBMLIdConverter self) -> int
48896
48897        Perform the conversion.
48898
48899        This method causes the converter to do the actual conversion work,
48900        that is, to convert the SBMLDocument object set by
48901        SBMLConverter.setDocument() and
48902        with the configuration options set by
48903        SBMLConverter.setProperties().
48904
48905        @return integer value indicating success/failure of the
48906        function.  @if clike The value is drawn from the
48907        enumeration #OperationReturnValues_t. @endif@~ The possible values
48908        returned by this function are:
48909        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
48910        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
48911        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
48912        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
48913        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
48914
48915        """
48916        return _libsbml.SBMLIdConverter_convert(self)
48917
48918    def getDefaultProperties(self):
48919        r"""
48920        getDefaultProperties(SBMLIdConverter self) -> ConversionProperties
48921
48922        Returns the default properties of this converter.
48923
48924        A given converter exposes one or more properties that can be adjusted
48925        in order to influence the behavior of the converter.  This method
48926        returns the @em default property settings for this converter.  It is
48927        meant to be called in order to discover all the settings for the
48928        converter object.
48929
48930        @return the ConversionProperties object describing the default properties
48931        for this converter.
48932
48933        """
48934        return _libsbml.SBMLIdConverter_getDefaultProperties(self)
48935
48936# Register SBMLIdConverter in _libsbml:
48937_libsbml.SBMLIdConverter_swigregister(SBMLIdConverter)
48938
48939def SBMLIdConverter_init():
48940    r"""
48941    SBMLIdConverter_init()
48942
48943    @internal
48944
48945    @internal
48946
48947    """
48948    return _libsbml.SBMLIdConverter_init()
48949
48950class SBMLInferUnitsConverter(SBMLConverter):
48951    r"""
48952
48953    @sbmlpackage{core}
48954
48955    @htmlinclude pkg-marker-core.html Converter for inferring and setting parameter units.
48956
48957    @htmlinclude libsbml-facility-only-warning.html
48958
48959    This SBML converter takes an SBML document and attempts to infer units for
48960    any Parameter objects whose units are undeclared.  It then sets the
48961    'units' attribute of those parameters to the units inferred (if necessary,
48962    creating new UnitDefinition objects on the model in the process).
48963
48964    @section SBMLInferUnitsConverter-usage Configuration and use of SBMLInferUnitsConverter
48965
48966    SBMLInferUnitsConverter is enabled by creating a ConversionProperties
48967    object with the option @c 'inferUnits', and passing this
48968    properties object to SBMLDocument.convert().
48969    The converter offers no other options.
48970
48971    @section using-converters General information about the use of SBML converters
48972
48973    The use of all the converters follows a similar approach.  First, one
48974    creates a ConversionProperties object and calls
48975    ConversionProperties.addOption()
48976    on this object with one argument: a text string that identifies the desired
48977    converter.  (The text string is specific to each converter; consult the
48978    documentation for a given converter to find out how it should be enabled.)
48979
48980    Next, for some converters, the caller can optionally set some
48981    converter-specific properties using additional calls to
48982    ConversionProperties.addOption().
48983    Many converters provide the ability to
48984    configure their behavior to some extent; this is realized through the use
48985    of properties that offer different options.  The default property values
48986    for each converter can be interrogated using the method
48987    SBMLConverter.getDefaultProperties() on the converter class in question .
48988
48989    Finally, the caller should invoke the method
48990    SBMLDocument.convert()
48991    with the ConversionProperties object as an argument.
48992
48993    @subsection converter-example Example of invoking an SBML converter
48994
48995    The following code fragment illustrates an example using
48996    SBMLReactionConverter, which is invoked using the option string
48997    @c 'replaceReactions':
48998
48999    @if cpp
49000    @code{.cpp}
49001    ConversionProperties props;
49002    props.addOption('replaceReactions');
49003    @endcode
49004    @endif
49005    @if python
49006    @code{.py}
49007    config = ConversionProperties()
49008    if config != None:
49009      config.addOption('replaceReactions')
49010    @endcode
49011    @endif
49012    @if java
49013    @code{.java}
49014    ConversionProperties props = new ConversionProperties();
49015    if (props != null) {
49016      props.addOption('replaceReactions');
49017    } else {
49018      // Deal with error.
49019    }
49020    @endcode
49021    @endif
49022
49023    In the case of SBMLReactionConverter, there are no options to affect
49024    its behavior, so the next step is simply to invoke the converter on
49025    an SBMLDocument object.  Continuing the example code:
49026
49027    @if cpp
49028    @code{.cpp}
49029    // Assume that the variable 'document' has been set to an SBMLDocument object.
49030    int status = document->convert(props);
49031    if (status != LIBSBML_OPERATION_SUCCESS)
49032    {
49033      cerr << 'Unable to perform conversion due to the following:' << endl;
49034      document->printErrors(cerr);
49035    }
49036    @endcode
49037    @endif
49038    @if python
49039    @code{.py}
49040      # Assume that the variable 'document' has been set to an SBMLDocument object.
49041      status = document.convert(config)
49042      if status != LIBSBML_OPERATION_SUCCESS:
49043        # Handle error somehow.
49044        print('Error: conversion failed due to the following:')
49045        document.printErrors()
49046    @endcode
49047    @endif
49048    @if java
49049    @code{.java}
49050      // Assume that the variable 'document' has been set to an SBMLDocument object.
49051      status = document.convert(config);
49052      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
49053      {
49054        // Handle error somehow.
49055        System.out.println('Error: conversion failed due to the following:');
49056        document.printErrors();
49057      }
49058    @endcode
49059    @endif
49060
49061    Here is an example of using a converter that offers an option. The
49062    following code invokes SBMLStripPackageConverter to remove the
49063    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
49064    of the package to be removed by adding a value for the option named
49065    @c 'package' defined by that converter:
49066
49067    @if cpp
49068    @code{.cpp}
49069    ConversionProperties props;
49070    props.addOption('stripPackage');
49071    props.addOption('package', 'layout');
49072
49073    int status = document->convert(props);
49074    if (status != LIBSBML_OPERATION_SUCCESS)
49075    {
49076        cerr << 'Unable to strip the Layout package from the model';
49077        cerr << 'Error returned: ' << status;
49078    }
49079    @endcode
49080    @endif
49081    @if python
49082    @code{.py}
49083    def strip_layout_example(document):
49084      config = ConversionProperties()
49085      if config != None:
49086        config.addOption('stripPackage')
49087        config.addOption('package', 'layout')
49088        status = document.convert(config)
49089        if status != LIBSBML_OPERATION_SUCCESS:
49090          # Handle error somehow.
49091          print('Error: unable to strip the Layout package.')
49092          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
49093      else:
49094        # Handle error somehow.
49095        print('Error: unable to create ConversionProperties object')
49096    @endcode
49097    @endif
49098    @if java
49099    @code{.java}
49100    ConversionProperties config = new ConversionProperties();
49101    if (config != None) {
49102      config.addOption('stripPackage');
49103      config.addOption('package', 'layout');
49104      status = document.convert(config);
49105      if (status != LIBSBML_OPERATION_SUCCESS) {
49106        // Handle error somehow.
49107        System.out.println('Error: unable to strip the Layout package');
49108        document.printErrors();
49109      }
49110    } else {
49111      // Handle error somehow.
49112      System.out.println('Error: unable to create ConversionProperties object');
49113    }
49114    @endcode
49115    @endif
49116
49117    @subsection available-converters Available SBML converters in libSBML
49118
49119    LibSBML provides a number of built-in converters; by convention, their
49120    names end in @em Converter. The following are the built-in converters
49121    provided by libSBML @htmlinclude libsbml-version.html:
49122
49123    @copydetails doc_list_of_libsbml_converters
49124
49125    """
49126
49127    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
49128    __repr__ = _swig_repr
49129
49130    @staticmethod
49131    def init():
49132        r"""
49133        init()
49134
49135        @internal
49136
49137        @internal
49138
49139        """
49140        return _libsbml.SBMLInferUnitsConverter_init()
49141
49142    def __init__(self, *args):
49143        r"""
49144        __init__(SBMLInferUnitsConverter self) -> SBMLInferUnitsConverter
49145        __init__(SBMLInferUnitsConverter self, SBMLInferUnitsConverter obj) -> SBMLInferUnitsConverter
49146
49147        This method has multiple variants; they differ in the arguments
49148         they accept.  Each variant is described separately below.
49149
49150        @par
49151        <hr>
49152        <span class='variant-sig-heading'>Method variant with the following signature</span>:
49153         <pre class='signature'>SBMLInferUnitsConverter()</pre>
49154
49155        Creates a new SBMLInferUnitsConverter object.
49156
49157
49158        @par
49159        <hr>
49160        <span class='variant-sig-heading'>Method variant with the following signature</span>:
49161         <pre class='signature'>SBMLInferUnitsConverter(SBMLInferUnitsConverter obj)</pre>
49162
49163        Copy constructor; creates a copy of an SBMLInferUnitsConverter
49164        object.
49165
49166        @param obj the SBMLInferUnitsConverter object to copy.
49167
49168        """
49169        _libsbml.SBMLInferUnitsConverter_swiginit(self, _libsbml.new_SBMLInferUnitsConverter(*args))
49170    __swig_destroy__ = _libsbml.delete_SBMLInferUnitsConverter
49171
49172    def clone(self):
49173        r"""
49174        clone(SBMLInferUnitsConverter self) -> SBMLInferUnitsConverter
49175
49176        Creates and returns a deep copy of this SBMLInferUnitsConverter
49177        object.
49178
49179        @return a (deep) copy of this converter.
49180
49181        """
49182        return _libsbml.SBMLInferUnitsConverter_clone(self)
49183
49184    def matchesProperties(self, props):
49185        r"""
49186        matchesProperties(SBMLInferUnitsConverter self, ConversionProperties props) -> bool
49187
49188        Returns @c True if this converter object's properties match the given
49189        properties.
49190
49191        A typical use of this method involves creating a ConversionProperties
49192        object, setting the options desired, and then calling this method on
49193        an SBMLInferUnitsConverter object to find out if the object's
49194        property values match the given ones.  This method is also used by
49195        SBMLConverterRegistry.getConverterFor()
49196        to search across all registered converters for one matching particular
49197        properties.
49198
49199        @param props the properties to match.
49200
49201        @return @c True if this converter's properties match, @c False
49202        otherwise.
49203
49204        """
49205        return _libsbml.SBMLInferUnitsConverter_matchesProperties(self, props)
49206
49207    def convert(self):
49208        r"""
49209        convert(SBMLInferUnitsConverter self) -> int
49210
49211        Perform the conversion.
49212
49213        This method causes the converter to do the actual conversion work,
49214        that is, to convert the SBMLDocument object set by
49215        SBMLConverter.setDocument() and
49216        with the configuration options set by
49217        SBMLConverter.setProperties().
49218
49219        @return integer value indicating success/failure of the
49220        function.  @if clike The value is drawn from the
49221        enumeration #OperationReturnValues_t. @endif@~ The possible values
49222        returned by this function are:
49223        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
49224        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
49225        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
49226        @li @link libsbml#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink
49227
49228        """
49229        return _libsbml.SBMLInferUnitsConverter_convert(self)
49230
49231    def getDefaultProperties(self):
49232        r"""
49233        getDefaultProperties(SBMLInferUnitsConverter self) -> ConversionProperties
49234
49235        Returns the default properties of this converter.
49236
49237        A given converter exposes one or more properties that can be adjusted
49238        in order to influence the behavior of the converter.  This method
49239        returns the @em default property settings for this converter.  It is
49240        meant to be called in order to discover all the settings for the
49241        converter object.
49242
49243        @return the ConversionProperties object describing the default properties
49244        for this converter.
49245
49246        """
49247        return _libsbml.SBMLInferUnitsConverter_getDefaultProperties(self)
49248
49249# Register SBMLInferUnitsConverter in _libsbml:
49250_libsbml.SBMLInferUnitsConverter_swigregister(SBMLInferUnitsConverter)
49251
49252def SBMLInferUnitsConverter_init():
49253    r"""
49254    SBMLInferUnitsConverter_init()
49255
49256    @internal
49257
49258    @internal
49259
49260    """
49261    return _libsbml.SBMLInferUnitsConverter_init()
49262
49263class SBMLInitialAssignmentConverter(SBMLConverter):
49264    r"""
49265
49266    @sbmlpackage{core}
49267
49268    @htmlinclude pkg-marker-core.html Converter that removes SBML <em>initial assignments</em>.
49269
49270    @htmlinclude libsbml-facility-only-warning.html
49271
49272    This is an SBML converter for replacing InitialAssignment objects, when
49273    possible, by setting the initial value attributes on the model objects
49274    being assigned.  In other words, for every object that is the target of an
49275    initial assignment in the model, the converter evaluates the mathematical
49276    expression of the assignment to get a @em numerical value, and then sets
49277    the corresponding attribute of the object to the value.  The effects for
49278    different kinds of SBML components are as follows:
49279
49280    <center>
49281    <table border='0' class='text-table width80 normal-font alt-row-colors'>
49282    <tr style='background: lightgray; font-size: 14px;'>
49283    <th align='left' width='200'>Component</th>
49284    <th align='left'>Effect</th>
49285    </tr>
49286    <tr>
49287    <td>Compartment</td>
49288    <td>Sets the value of the <code>size</code> attribute.</td>
49289    </tr>
49290    <tr>
49291    <td>Species</td>
49292    <td>Sets the value of either the <code>initialAmount</code>
49293    or the <code>initialConcentration</code> attributes, depending
49294    on the value of the Species object's
49295    <code>hasOnlySubstanceUnits</code> attribute.</td>
49296    </tr>
49297    <tr>
49298    <td>Parameter</td>
49299    <td>Sets the value of the <code>value</code> attribute.</td>
49300    </tr>
49301    <tr>
49302    <td>SpeciesReference</td>
49303    <td>Sets the value of the <code>stoichiometry</code> attribute
49304    in the Reaction object where the SpeciesReference object appears.</td>
49305    </tr>
49306    </table>
49307    </center>
49308
49309    @section SBMLInitialAssignmentConverter-usage Configuration and use of SBMLInitialAssignmentConverter
49310
49311    SBMLInitialAssignmentConverter is enabled by creating a
49312    ConversionProperties object with the option @c 'expandInitialAssignments',
49313    and passing this properties object to SBMLDocument.convert().  The converter offers no other options.
49314
49315    @section using-converters General information about the use of SBML converters
49316
49317    The use of all the converters follows a similar approach.  First, one
49318    creates a ConversionProperties object and calls
49319    ConversionProperties.addOption()
49320    on this object with one argument: a text string that identifies the desired
49321    converter.  (The text string is specific to each converter; consult the
49322    documentation for a given converter to find out how it should be enabled.)
49323
49324    Next, for some converters, the caller can optionally set some
49325    converter-specific properties using additional calls to
49326    ConversionProperties.addOption().
49327    Many converters provide the ability to
49328    configure their behavior to some extent; this is realized through the use
49329    of properties that offer different options.  The default property values
49330    for each converter can be interrogated using the method
49331    SBMLConverter.getDefaultProperties() on the converter class in question .
49332
49333    Finally, the caller should invoke the method
49334    SBMLDocument.convert()
49335    with the ConversionProperties object as an argument.
49336
49337    @subsection converter-example Example of invoking an SBML converter
49338
49339    The following code fragment illustrates an example using
49340    SBMLReactionConverter, which is invoked using the option string
49341    @c 'replaceReactions':
49342
49343    @if cpp
49344    @code{.cpp}
49345    ConversionProperties props;
49346    props.addOption('replaceReactions');
49347    @endcode
49348    @endif
49349    @if python
49350    @code{.py}
49351    config = ConversionProperties()
49352    if config != None:
49353      config.addOption('replaceReactions')
49354    @endcode
49355    @endif
49356    @if java
49357    @code{.java}
49358    ConversionProperties props = new ConversionProperties();
49359    if (props != null) {
49360      props.addOption('replaceReactions');
49361    } else {
49362      // Deal with error.
49363    }
49364    @endcode
49365    @endif
49366
49367    In the case of SBMLReactionConverter, there are no options to affect
49368    its behavior, so the next step is simply to invoke the converter on
49369    an SBMLDocument object.  Continuing the example code:
49370
49371    @if cpp
49372    @code{.cpp}
49373    // Assume that the variable 'document' has been set to an SBMLDocument object.
49374    int status = document->convert(props);
49375    if (status != LIBSBML_OPERATION_SUCCESS)
49376    {
49377      cerr << 'Unable to perform conversion due to the following:' << endl;
49378      document->printErrors(cerr);
49379    }
49380    @endcode
49381    @endif
49382    @if python
49383    @code{.py}
49384      # Assume that the variable 'document' has been set to an SBMLDocument object.
49385      status = document.convert(config)
49386      if status != LIBSBML_OPERATION_SUCCESS:
49387        # Handle error somehow.
49388        print('Error: conversion failed due to the following:')
49389        document.printErrors()
49390    @endcode
49391    @endif
49392    @if java
49393    @code{.java}
49394      // Assume that the variable 'document' has been set to an SBMLDocument object.
49395      status = document.convert(config);
49396      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
49397      {
49398        // Handle error somehow.
49399        System.out.println('Error: conversion failed due to the following:');
49400        document.printErrors();
49401      }
49402    @endcode
49403    @endif
49404
49405    Here is an example of using a converter that offers an option. The
49406    following code invokes SBMLStripPackageConverter to remove the
49407    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
49408    of the package to be removed by adding a value for the option named
49409    @c 'package' defined by that converter:
49410
49411    @if cpp
49412    @code{.cpp}
49413    ConversionProperties props;
49414    props.addOption('stripPackage');
49415    props.addOption('package', 'layout');
49416
49417    int status = document->convert(props);
49418    if (status != LIBSBML_OPERATION_SUCCESS)
49419    {
49420        cerr << 'Unable to strip the Layout package from the model';
49421        cerr << 'Error returned: ' << status;
49422    }
49423    @endcode
49424    @endif
49425    @if python
49426    @code{.py}
49427    def strip_layout_example(document):
49428      config = ConversionProperties()
49429      if config != None:
49430        config.addOption('stripPackage')
49431        config.addOption('package', 'layout')
49432        status = document.convert(config)
49433        if status != LIBSBML_OPERATION_SUCCESS:
49434          # Handle error somehow.
49435          print('Error: unable to strip the Layout package.')
49436          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
49437      else:
49438        # Handle error somehow.
49439        print('Error: unable to create ConversionProperties object')
49440    @endcode
49441    @endif
49442    @if java
49443    @code{.java}
49444    ConversionProperties config = new ConversionProperties();
49445    if (config != None) {
49446      config.addOption('stripPackage');
49447      config.addOption('package', 'layout');
49448      status = document.convert(config);
49449      if (status != LIBSBML_OPERATION_SUCCESS) {
49450        // Handle error somehow.
49451        System.out.println('Error: unable to strip the Layout package');
49452        document.printErrors();
49453      }
49454    } else {
49455      // Handle error somehow.
49456      System.out.println('Error: unable to create ConversionProperties object');
49457    }
49458    @endcode
49459    @endif
49460
49461    @subsection available-converters Available SBML converters in libSBML
49462
49463    LibSBML provides a number of built-in converters; by convention, their
49464    names end in @em Converter. The following are the built-in converters
49465    provided by libSBML @htmlinclude libsbml-version.html:
49466
49467    @copydetails doc_list_of_libsbml_converters
49468
49469    """
49470
49471    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
49472    __repr__ = _swig_repr
49473
49474    @staticmethod
49475    def init():
49476        r"""
49477        init()
49478
49479        @internal
49480
49481        @internal
49482
49483        """
49484        return _libsbml.SBMLInitialAssignmentConverter_init()
49485
49486    def __init__(self, *args):
49487        r"""
49488        __init__(SBMLInitialAssignmentConverter self) -> SBMLInitialAssignmentConverter
49489        __init__(SBMLInitialAssignmentConverter self, SBMLInitialAssignmentConverter obj) -> SBMLInitialAssignmentConverter
49490
49491        This method has multiple variants; they differ in the arguments
49492         they accept.  Each variant is described separately below.
49493
49494        @par
49495        <hr>
49496        <span class='variant-sig-heading'>Method variant with the following signature</span>:
49497         <pre class='signature'>SBMLInitialAssignmentConverter(SBMLInitialAssignmentConverter obj)</pre>
49498
49499        Copy constructor; creates a copy of an SBMLInitialAssignmentConverter
49500        object.
49501
49502        @param obj the SBMLInitialAssignmentConverter object to copy.
49503
49504
49505        @par
49506        <hr>
49507        <span class='variant-sig-heading'>Method variant with the following signature</span>:
49508         <pre class='signature'>SBMLInitialAssignmentConverter()</pre>
49509
49510        Creates a new SBMLInitialAssignmentConverter object.
49511
49512        """
49513        _libsbml.SBMLInitialAssignmentConverter_swiginit(self, _libsbml.new_SBMLInitialAssignmentConverter(*args))
49514
49515    def clone(self):
49516        r"""
49517        clone(SBMLInitialAssignmentConverter self) -> SBMLInitialAssignmentConverter
49518
49519        Creates and returns a deep copy of this SBMLInitialAssignmentConverter
49520        object.
49521
49522        @return a (deep) copy of this converter.
49523
49524        """
49525        return _libsbml.SBMLInitialAssignmentConverter_clone(self)
49526    __swig_destroy__ = _libsbml.delete_SBMLInitialAssignmentConverter
49527
49528    def matchesProperties(self, props):
49529        r"""
49530        matchesProperties(SBMLInitialAssignmentConverter self, ConversionProperties props) -> bool
49531
49532        Returns @c True if this converter object's properties match the given
49533        properties.
49534
49535        A typical use of this method involves creating a ConversionProperties
49536        object, setting the options desired, and then calling this method on
49537        an SBMLInitialAssignmentConverter object to find out if the object's
49538        property values match the given ones.  This method is also used by
49539        SBMLConverterRegistry.getConverterFor()
49540        to search across all registered converters for one matching particular
49541        properties.
49542
49543        @param props the properties to match.
49544
49545        @return @c True if this converter's properties match, @c False
49546        otherwise.
49547
49548        """
49549        return _libsbml.SBMLInitialAssignmentConverter_matchesProperties(self, props)
49550
49551    def convert(self):
49552        r"""
49553        convert(SBMLInitialAssignmentConverter self) -> int
49554
49555        Perform the conversion.
49556
49557        This method causes the converter to do the actual conversion work,
49558        that is, to convert the SBMLDocument object set by
49559        SBMLConverter.setDocument() and
49560        with the configuration options set by
49561        SBMLConverter.setProperties().
49562
49563        @return integer value indicating success/failure of the
49564        function.  @if clike The value is drawn from the
49565        enumeration #OperationReturnValues_t. @endif@~ The possible values
49566        returned by this function are:
49567        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
49568        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
49569        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
49570
49571        """
49572        return _libsbml.SBMLInitialAssignmentConverter_convert(self)
49573
49574    def getDefaultProperties(self):
49575        r"""
49576        getDefaultProperties(SBMLInitialAssignmentConverter self) -> ConversionProperties
49577
49578        Returns the default properties of this converter.
49579
49580        A given converter exposes one or more properties that can be adjusted
49581        in order to influence the behavior of the converter.  This method
49582        returns the @em default property settings for this converter.  It is
49583        meant to be called in order to discover all the settings for the
49584        converter object.
49585
49586        @return the ConversionProperties object describing the default properties
49587        for this converter.
49588
49589        """
49590        return _libsbml.SBMLInitialAssignmentConverter_getDefaultProperties(self)
49591
49592# Register SBMLInitialAssignmentConverter in _libsbml:
49593_libsbml.SBMLInitialAssignmentConverter_swigregister(SBMLInitialAssignmentConverter)
49594
49595def SBMLInitialAssignmentConverter_init():
49596    r"""
49597    SBMLInitialAssignmentConverter_init()
49598
49599    @internal
49600
49601    @internal
49602
49603    """
49604    return _libsbml.SBMLInitialAssignmentConverter_init()
49605
49606class SBMLLevelVersionConverter(SBMLConverter):
49607    r"""
49608
49609    @sbmlpackage{core}
49610
49611    @htmlinclude pkg-marker-core.html Whole-document SBML Level/Version converter.
49612
49613    @htmlinclude libsbml-facility-only-warning.html
49614
49615    This SBML converter takes an SBML document having one SBML Level+Version
49616    combination, and attempts to convert it to an SBML document having a
49617    different Level+Version combination.
49618
49619    This class is also the basis for
49620    SBMLDocument.setLevelAndVersion().
49621
49622    @section SBMLLevelVersionConverter-usage Configuration and use of SBMLLevelVersionConverter
49623
49624    SBMLLevelVersionConverter is enabled by creating a ConversionProperties
49625    object with the option @c 'setLevelAndVersion', and passing this
49626    properties object to SBMLDocument.convert().  The target SBML Level and Version
49627    combination are determined by the value of the SBML namespace set on the
49628    ConversionProperties object (using
49629    ConversionProperties.setTargetNamespaces()).
49630
49631    In addition, this converter offers the following options:
49632
49633    @li @c 'strict': If this option has the value @c True, then the validity
49634    of the SBML document will be strictly preserved.  This means that SBML
49635    validation will be performed, and if the original model is not valid or
49636    semantics cannot be preserved in the converted model, then conversion will
49637    not be performed.  Conversely, if this option is set to @c False, model
49638    conversion will always be performed; if any errors are detected related to
49639    altered semantics, the errors will be logged in the usual way (i.e., the
49640    error log on the SBMLDocument object).
49641
49642    @li @c 'addDefaultUnits': By default, a conversion from SBML Level&nbsp;2
49643    to Level&nbsp;3 will explicitly add UnitDefinition objects and unit
49644    attributes on the Model object to define units that are implicitly defined
49645    in SBML Level&nbsp;2.  This is usually desirable because in SBML
49646    Level&nbsp;3, there are no default units and a conversion from
49647    Level&nbsp;2 that did @em not add unit definitions would actually result
49648    in a loss of information.  However, some users or software tools may not
49649    need or want this, or worse, may be fooled into thinking that libSBML has
49650    somehow inferred the proper units for model quantities.  (It has not; it
49651    merely adds generic predefined units.)  This option lets callers control
49652    this behavior.
49653
49654    @section using-converters General information about the use of SBML converters
49655
49656    The use of all the converters follows a similar approach.  First, one
49657    creates a ConversionProperties object and calls
49658    ConversionProperties.addOption()
49659    on this object with one argument: a text string that identifies the desired
49660    converter.  (The text string is specific to each converter; consult the
49661    documentation for a given converter to find out how it should be enabled.)
49662
49663    Next, for some converters, the caller can optionally set some
49664    converter-specific properties using additional calls to
49665    ConversionProperties.addOption().
49666    Many converters provide the ability to
49667    configure their behavior to some extent; this is realized through the use
49668    of properties that offer different options.  The default property values
49669    for each converter can be interrogated using the method
49670    SBMLConverter.getDefaultProperties() on the converter class in question .
49671
49672    Finally, the caller should invoke the method
49673    SBMLDocument.convert()
49674    with the ConversionProperties object as an argument.
49675
49676    @subsection converter-example Example of invoking an SBML converter
49677
49678    The following code fragment illustrates an example using
49679    SBMLReactionConverter, which is invoked using the option string
49680    @c 'replaceReactions':
49681
49682    @if cpp
49683    @code{.cpp}
49684    ConversionProperties props;
49685    props.addOption('replaceReactions');
49686    @endcode
49687    @endif
49688    @if python
49689    @code{.py}
49690    config = ConversionProperties()
49691    if config != None:
49692      config.addOption('replaceReactions')
49693    @endcode
49694    @endif
49695    @if java
49696    @code{.java}
49697    ConversionProperties props = new ConversionProperties();
49698    if (props != null) {
49699      props.addOption('replaceReactions');
49700    } else {
49701      // Deal with error.
49702    }
49703    @endcode
49704    @endif
49705
49706    In the case of SBMLReactionConverter, there are no options to affect
49707    its behavior, so the next step is simply to invoke the converter on
49708    an SBMLDocument object.  Continuing the example code:
49709
49710    @if cpp
49711    @code{.cpp}
49712    // Assume that the variable 'document' has been set to an SBMLDocument object.
49713    int status = document->convert(props);
49714    if (status != LIBSBML_OPERATION_SUCCESS)
49715    {
49716      cerr << 'Unable to perform conversion due to the following:' << endl;
49717      document->printErrors(cerr);
49718    }
49719    @endcode
49720    @endif
49721    @if python
49722    @code{.py}
49723      # Assume that the variable 'document' has been set to an SBMLDocument object.
49724      status = document.convert(config)
49725      if status != LIBSBML_OPERATION_SUCCESS:
49726        # Handle error somehow.
49727        print('Error: conversion failed due to the following:')
49728        document.printErrors()
49729    @endcode
49730    @endif
49731    @if java
49732    @code{.java}
49733      // Assume that the variable 'document' has been set to an SBMLDocument object.
49734      status = document.convert(config);
49735      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
49736      {
49737        // Handle error somehow.
49738        System.out.println('Error: conversion failed due to the following:');
49739        document.printErrors();
49740      }
49741    @endcode
49742    @endif
49743
49744    Here is an example of using a converter that offers an option. The
49745    following code invokes SBMLStripPackageConverter to remove the
49746    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
49747    of the package to be removed by adding a value for the option named
49748    @c 'package' defined by that converter:
49749
49750    @if cpp
49751    @code{.cpp}
49752    ConversionProperties props;
49753    props.addOption('stripPackage');
49754    props.addOption('package', 'layout');
49755
49756    int status = document->convert(props);
49757    if (status != LIBSBML_OPERATION_SUCCESS)
49758    {
49759        cerr << 'Unable to strip the Layout package from the model';
49760        cerr << 'Error returned: ' << status;
49761    }
49762    @endcode
49763    @endif
49764    @if python
49765    @code{.py}
49766    def strip_layout_example(document):
49767      config = ConversionProperties()
49768      if config != None:
49769        config.addOption('stripPackage')
49770        config.addOption('package', 'layout')
49771        status = document.convert(config)
49772        if status != LIBSBML_OPERATION_SUCCESS:
49773          # Handle error somehow.
49774          print('Error: unable to strip the Layout package.')
49775          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
49776      else:
49777        # Handle error somehow.
49778        print('Error: unable to create ConversionProperties object')
49779    @endcode
49780    @endif
49781    @if java
49782    @code{.java}
49783    ConversionProperties config = new ConversionProperties();
49784    if (config != None) {
49785      config.addOption('stripPackage');
49786      config.addOption('package', 'layout');
49787      status = document.convert(config);
49788      if (status != LIBSBML_OPERATION_SUCCESS) {
49789        // Handle error somehow.
49790        System.out.println('Error: unable to strip the Layout package');
49791        document.printErrors();
49792      }
49793    } else {
49794      // Handle error somehow.
49795      System.out.println('Error: unable to create ConversionProperties object');
49796    }
49797    @endcode
49798    @endif
49799
49800    @subsection available-converters Available SBML converters in libSBML
49801
49802    LibSBML provides a number of built-in converters; by convention, their
49803    names end in @em Converter. The following are the built-in converters
49804    provided by libSBML @htmlinclude libsbml-version.html:
49805
49806    @copydetails doc_list_of_libsbml_converters
49807
49808    """
49809
49810    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
49811    __repr__ = _swig_repr
49812
49813    @staticmethod
49814    def init():
49815        r"""
49816        init()
49817
49818        @internal
49819
49820        @internal
49821
49822        """
49823        return _libsbml.SBMLLevelVersionConverter_init()
49824
49825    def __init__(self, *args):
49826        r"""
49827        __init__(SBMLLevelVersionConverter self) -> SBMLLevelVersionConverter
49828        __init__(SBMLLevelVersionConverter self, SBMLLevelVersionConverter obj) -> SBMLLevelVersionConverter
49829
49830        This method has multiple variants; they differ in the arguments
49831         they accept.  Each variant is described separately below.
49832
49833        @par
49834        <hr>
49835        <span class='variant-sig-heading'>Method variant with the following signature</span>:
49836         <pre class='signature'>SBMLLevelVersionConverter()</pre>
49837
49838        Creates a new SBMLLevelVersionConverter object.
49839
49840
49841        @par
49842        <hr>
49843        <span class='variant-sig-heading'>Method variant with the following signature</span>:
49844         <pre class='signature'>SBMLLevelVersionConverter(SBMLLevelVersionConverter obj)</pre>
49845
49846        Copy constructor; creates a copy of an SBMLLevelVersionConverter
49847        object.
49848
49849        @param obj the SBMLLevelVersionConverter object to copy.
49850
49851        """
49852        _libsbml.SBMLLevelVersionConverter_swiginit(self, _libsbml.new_SBMLLevelVersionConverter(*args))
49853    __swig_destroy__ = _libsbml.delete_SBMLLevelVersionConverter
49854
49855    def clone(self):
49856        r"""
49857        clone(SBMLLevelVersionConverter self) -> SBMLLevelVersionConverter
49858
49859        Creates and returns a deep copy of this SBMLLevelVersionConverter
49860        object.
49861
49862        @return a (deep) copy of this converter.
49863
49864        """
49865        return _libsbml.SBMLLevelVersionConverter_clone(self)
49866
49867    def matchesProperties(self, props):
49868        r"""
49869        matchesProperties(SBMLLevelVersionConverter self, ConversionProperties props) -> bool
49870
49871        Returns @c True if this converter object's properties match the given
49872        properties.
49873
49874        A typical use of this method involves creating a ConversionProperties
49875        object, setting the options desired, and then calling this method on
49876        an SBMLLevelVersionConverter object to find out if the object's
49877        property values match the given ones.  This method is also used by
49878        SBMLConverterRegistry.getConverterFor()
49879        to search across all registered converters for one matching particular
49880        properties.
49881
49882        @param props the properties to match.
49883
49884        @return @c True if this converter's properties match, @c False
49885        otherwise.
49886
49887        """
49888        return _libsbml.SBMLLevelVersionConverter_matchesProperties(self, props)
49889
49890    def convert(self):
49891        r"""
49892        convert(SBMLLevelVersionConverter self) -> int
49893
49894        Perform the conversion.
49895
49896        This method causes the converter to do the actual conversion work,
49897        that is, to convert the SBMLDocument object set by
49898        SBMLConverter.setDocument() and
49899        with the configuration options set by
49900        SBMLConverter.setProperties().
49901
49902        @return integer value indicating success/failure of the
49903        function.  @if clike The value is drawn from the
49904        enumeration #OperationReturnValues_t. @endif@~ The possible values
49905        returned by this function are:
49906        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
49907        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
49908        @li @link libsbml#LIBSBML_CONV_INVALID_TARGET_NAMESPACE LIBSBML_CONV_INVALID_TARGET_NAMESPACE@endlink
49909        @li @link libsbml#LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE@endlink
49910        @li @link libsbml#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink
49911
49912        """
49913        return _libsbml.SBMLLevelVersionConverter_convert(self)
49914
49915    def getDefaultProperties(self):
49916        r"""
49917        getDefaultProperties(SBMLLevelVersionConverter self) -> ConversionProperties
49918
49919        Returns the default properties of this converter.
49920
49921        A given converter exposes one or more properties that can be adjusted
49922        in order to influence the behavior of the converter.  This method
49923        returns the @em default property settings for this converter.  It is
49924        meant to be called in order to discover all the settings for the
49925        converter object.
49926
49927        @return the ConversionProperties object describing the default properties
49928        for this converter.
49929
49930        """
49931        return _libsbml.SBMLLevelVersionConverter_getDefaultProperties(self)
49932
49933    def getTargetLevel(self):
49934        r"""
49935        getTargetLevel(SBMLLevelVersionConverter self) -> unsigned int
49936
49937        Returns the target SBML Level for the conversion.
49938
49939        @return an integer indicating the SBML Level.
49940
49941        """
49942        return _libsbml.SBMLLevelVersionConverter_getTargetLevel(self)
49943
49944    def getTargetVersion(self):
49945        r"""
49946        getTargetVersion(SBMLLevelVersionConverter self) -> unsigned int
49947
49948        Returns the target SBML Version for the conversion.
49949
49950        @return an integer indicating the Version within the SBML Level.
49951
49952        """
49953        return _libsbml.SBMLLevelVersionConverter_getTargetVersion(self)
49954
49955    def getValidityFlag(self):
49956        r"""
49957        getValidityFlag(SBMLLevelVersionConverter self) -> bool
49958
49959        Returns the flag indicating whether the conversion has been set to 'strict'.
49960
49961        @return @c True if strict validity has been requested, @c False
49962        otherwise.
49963
49964        """
49965        return _libsbml.SBMLLevelVersionConverter_getValidityFlag(self)
49966
49967    def getAddDefaultUnits(self):
49968        r"""
49969        getAddDefaultUnits(SBMLLevelVersionConverter self) -> bool
49970
49971        Returns the flag indicating whether default units should be added when
49972        converting to L3 or not.
49973
49974        @return @c True if default units should be added, @c False
49975        otherwise.
49976
49977        """
49978        return _libsbml.SBMLLevelVersionConverter_getAddDefaultUnits(self)
49979
49980# Register SBMLLevelVersionConverter in _libsbml:
49981_libsbml.SBMLLevelVersionConverter_swigregister(SBMLLevelVersionConverter)
49982
49983def SBMLLevelVersionConverter_init():
49984    r"""
49985    SBMLLevelVersionConverter_init()
49986
49987    @internal
49988
49989    @internal
49990
49991    """
49992    return _libsbml.SBMLLevelVersionConverter_init()
49993
49994class SBMLLevel1Version1Converter(SBMLConverter):
49995    r"""
49996
49997    @sbmlpackage{core}
49998
49999    @htmlinclude pkg-marker-core.html Whole-document SBML Level/Version converter.
50000
50001    @htmlinclude libsbml-facility-only-warning.html
50002
50003    This SBML converter takes an SBML document having one SBML Level+Version
50004    combination, and attempts to convert it to an SBML document having a
50005    different Level+Version combination.  This converter
50006    (SBMLLevel1Version1Converter) converts models to SBML Level&nbsp;1
50007    Version&nbsp;1, to the extent possible by the limited features of
50008    that Level/Version combination of SBML.
50009
50010    @section SBMLLevel1Version1Converter-usage Configuration and use of SBMLLevel1Version1Converter
50011
50012    SBMLLevel1Version1Converter is enabled by creating a ConversionProperties
50013    object with the option @c 'convertToL1V1', and passing this
50014    properties object to SBMLDocument.convert().  The target SBML Level and Version
50015    combination are determined by the value of the SBML namespace set on the
50016    ConversionProperties object (using
50017    ConversionProperties.setTargetNamespaces()).
50018
50019    In addition, this converter offers the following options:
50020
50021    @li @c 'changePow': Mathematical expressions for exponentiation of
50022    the form <code>pow(s1, 2)</code> will be converted to the expression
50023    <code>s1^2</code>.
50024
50025    @li @c 'inlineCompartmentSizes': Back in the days of SBML Level&nbsp;1
50026    Version&nbsp;1, many software tools assumed that the 'kinetic laws' of
50027    SBML were written in terms of units of
50028    <em>concentration</em>/<em>time</em>.  These tools would not expect (and
50029    thus not handle) rate expressions such as
50030    <code>CompartmentOfS1 * k * S1</code>.
50031    When the option @c 'inlineCompartmentSizes' is enabled, libSBML will
50032    replace the references to compartments (such as @c 'CompartmentOfS1' in
50033    this example) with their initial sizes.  This is not strictly correct in
50034    all cases; in particular, if the compartment volume varies during
50035    simulation, this conversion will not reflect the expected behavior.
50036    However, many models do not have time-varying compartment sizes, so this
50037    option makes it easy to get modern SBML rate expressions into a form that
50038    old software tools may better understand.
50039
50040    @section using-converters General information about the use of SBML converters
50041
50042    The use of all the converters follows a similar approach.  First, one
50043    creates a ConversionProperties object and calls
50044    ConversionProperties.addOption()
50045    on this object with one argument: a text string that identifies the desired
50046    converter.  (The text string is specific to each converter; consult the
50047    documentation for a given converter to find out how it should be enabled.)
50048
50049    Next, for some converters, the caller can optionally set some
50050    converter-specific properties using additional calls to
50051    ConversionProperties.addOption().
50052    Many converters provide the ability to
50053    configure their behavior to some extent; this is realized through the use
50054    of properties that offer different options.  The default property values
50055    for each converter can be interrogated using the method
50056    SBMLConverter.getDefaultProperties() on the converter class in question .
50057
50058    Finally, the caller should invoke the method
50059    SBMLDocument.convert()
50060    with the ConversionProperties object as an argument.
50061
50062    @subsection converter-example Example of invoking an SBML converter
50063
50064    The following code fragment illustrates an example using
50065    SBMLReactionConverter, which is invoked using the option string
50066    @c 'replaceReactions':
50067
50068    @if cpp
50069    @code{.cpp}
50070    ConversionProperties props;
50071    props.addOption('replaceReactions');
50072    @endcode
50073    @endif
50074    @if python
50075    @code{.py}
50076    config = ConversionProperties()
50077    if config != None:
50078      config.addOption('replaceReactions')
50079    @endcode
50080    @endif
50081    @if java
50082    @code{.java}
50083    ConversionProperties props = new ConversionProperties();
50084    if (props != null) {
50085      props.addOption('replaceReactions');
50086    } else {
50087      // Deal with error.
50088    }
50089    @endcode
50090    @endif
50091
50092    In the case of SBMLReactionConverter, there are no options to affect
50093    its behavior, so the next step is simply to invoke the converter on
50094    an SBMLDocument object.  Continuing the example code:
50095
50096    @if cpp
50097    @code{.cpp}
50098    // Assume that the variable 'document' has been set to an SBMLDocument object.
50099    int status = document->convert(props);
50100    if (status != LIBSBML_OPERATION_SUCCESS)
50101    {
50102      cerr << 'Unable to perform conversion due to the following:' << endl;
50103      document->printErrors(cerr);
50104    }
50105    @endcode
50106    @endif
50107    @if python
50108    @code{.py}
50109      # Assume that the variable 'document' has been set to an SBMLDocument object.
50110      status = document.convert(config)
50111      if status != LIBSBML_OPERATION_SUCCESS:
50112        # Handle error somehow.
50113        print('Error: conversion failed due to the following:')
50114        document.printErrors()
50115    @endcode
50116    @endif
50117    @if java
50118    @code{.java}
50119      // Assume that the variable 'document' has been set to an SBMLDocument object.
50120      status = document.convert(config);
50121      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
50122      {
50123        // Handle error somehow.
50124        System.out.println('Error: conversion failed due to the following:');
50125        document.printErrors();
50126      }
50127    @endcode
50128    @endif
50129
50130    Here is an example of using a converter that offers an option. The
50131    following code invokes SBMLStripPackageConverter to remove the
50132    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
50133    of the package to be removed by adding a value for the option named
50134    @c 'package' defined by that converter:
50135
50136    @if cpp
50137    @code{.cpp}
50138    ConversionProperties props;
50139    props.addOption('stripPackage');
50140    props.addOption('package', 'layout');
50141
50142    int status = document->convert(props);
50143    if (status != LIBSBML_OPERATION_SUCCESS)
50144    {
50145        cerr << 'Unable to strip the Layout package from the model';
50146        cerr << 'Error returned: ' << status;
50147    }
50148    @endcode
50149    @endif
50150    @if python
50151    @code{.py}
50152    def strip_layout_example(document):
50153      config = ConversionProperties()
50154      if config != None:
50155        config.addOption('stripPackage')
50156        config.addOption('package', 'layout')
50157        status = document.convert(config)
50158        if status != LIBSBML_OPERATION_SUCCESS:
50159          # Handle error somehow.
50160          print('Error: unable to strip the Layout package.')
50161          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
50162      else:
50163        # Handle error somehow.
50164        print('Error: unable to create ConversionProperties object')
50165    @endcode
50166    @endif
50167    @if java
50168    @code{.java}
50169    ConversionProperties config = new ConversionProperties();
50170    if (config != None) {
50171      config.addOption('stripPackage');
50172      config.addOption('package', 'layout');
50173      status = document.convert(config);
50174      if (status != LIBSBML_OPERATION_SUCCESS) {
50175        // Handle error somehow.
50176        System.out.println('Error: unable to strip the Layout package');
50177        document.printErrors();
50178      }
50179    } else {
50180      // Handle error somehow.
50181      System.out.println('Error: unable to create ConversionProperties object');
50182    }
50183    @endcode
50184    @endif
50185
50186    @subsection available-converters Available SBML converters in libSBML
50187
50188    LibSBML provides a number of built-in converters; by convention, their
50189    names end in @em Converter. The following are the built-in converters
50190    provided by libSBML @htmlinclude libsbml-version.html:
50191
50192    @copydetails doc_list_of_libsbml_converters
50193
50194    """
50195
50196    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
50197    __repr__ = _swig_repr
50198
50199    @staticmethod
50200    def init():
50201        r"""
50202        init()
50203
50204        @internal
50205
50206        @internal
50207
50208        """
50209        return _libsbml.SBMLLevel1Version1Converter_init()
50210
50211    def __init__(self, *args):
50212        r"""
50213        __init__(SBMLLevel1Version1Converter self) -> SBMLLevel1Version1Converter
50214        __init__(SBMLLevel1Version1Converter self, SBMLLevel1Version1Converter obj) -> SBMLLevel1Version1Converter
50215
50216        This method has multiple variants; they differ in the arguments
50217         they accept.  Each variant is described separately below.
50218
50219        @par
50220        <hr>
50221        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50222         <pre class='signature'>SBMLLevel1Version1Converter()</pre>
50223
50224        Creates a new SBMLLevel1Version1Converter object.
50225
50226
50227        @par
50228        <hr>
50229        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50230         <pre class='signature'>SBMLLevel1Version1Converter(SBMLLevel1Version1Converter obj)</pre>
50231
50232        Copy constructor; creates a copy of an SBMLLevel1Version1Converter
50233        object.
50234
50235        @param obj the SBMLLevel1Version1Converter object to copy.
50236
50237        """
50238        _libsbml.SBMLLevel1Version1Converter_swiginit(self, _libsbml.new_SBMLLevel1Version1Converter(*args))
50239    __swig_destroy__ = _libsbml.delete_SBMLLevel1Version1Converter
50240
50241    def clone(self):
50242        r"""
50243        clone(SBMLLevel1Version1Converter self) -> SBMLLevel1Version1Converter
50244
50245        Creates and returns a deep copy of this SBMLLevel1Version1Converter
50246        object.
50247
50248        @return a (deep) copy of this converter.
50249
50250        """
50251        return _libsbml.SBMLLevel1Version1Converter_clone(self)
50252
50253    def matchesProperties(self, props):
50254        r"""
50255        matchesProperties(SBMLLevel1Version1Converter self, ConversionProperties props) -> bool
50256
50257        Returns @c True if this converter object's properties match the given
50258        properties.
50259
50260        A typical use of this method involves creating a ConversionProperties
50261        object, setting the options desired, and then calling this method on
50262        an SBMLLevel1Version1Converter object to find out if the object's
50263        property values match the given ones.  This method is also used by
50264        SBMLConverterRegistry.getConverterFor()
50265        to search across all registered converters for one matching particular
50266        properties.
50267
50268        @param props the properties to match.
50269
50270        @return @c True if this converter's properties match, @c False
50271        otherwise.
50272
50273        """
50274        return _libsbml.SBMLLevel1Version1Converter_matchesProperties(self, props)
50275
50276    def convert(self):
50277        r"""
50278        convert(SBMLLevel1Version1Converter self) -> int
50279
50280        Perform the conversion.
50281
50282        This method causes the converter to do the actual conversion work,
50283        that is, to convert the SBMLDocument object set by
50284        SBMLConverter.setDocument() and
50285        with the configuration options set by
50286        SBMLConverter.setProperties().
50287
50288        @return integer value indicating success/failure of the
50289        function.  @if clike The value is drawn from the
50290        enumeration #OperationReturnValues_t. @endif@~ The possible values
50291        returned by this function are:
50292        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
50293        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
50294        @li @link libsbml#LIBSBML_CONV_INVALID_TARGET_NAMESPACE LIBSBML_CONV_INVALID_TARGET_NAMESPACE@endlink
50295        @li @link libsbml#LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE@endlink
50296        @li @link libsbml#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink
50297
50298        """
50299        return _libsbml.SBMLLevel1Version1Converter_convert(self)
50300
50301    def getDefaultProperties(self):
50302        r"""
50303        getDefaultProperties(SBMLLevel1Version1Converter self) -> ConversionProperties
50304
50305        Returns the default properties of this converter.
50306
50307        A given converter exposes one or more properties that can be adjusted
50308        in order to influence the behavior of the converter.  This method
50309        returns the @em default property settings for this converter.  It is
50310        meant to be called in order to discover all the settings for the
50311        converter object.
50312
50313        @return the ConversionProperties object describing the default properties
50314        for this converter.
50315
50316        """
50317        return _libsbml.SBMLLevel1Version1Converter_getDefaultProperties(self)
50318
50319# Register SBMLLevel1Version1Converter in _libsbml:
50320_libsbml.SBMLLevel1Version1Converter_swigregister(SBMLLevel1Version1Converter)
50321
50322def SBMLLevel1Version1Converter_init():
50323    r"""
50324    SBMLLevel1Version1Converter_init()
50325
50326    @internal
50327
50328    @internal
50329
50330    """
50331    return _libsbml.SBMLLevel1Version1Converter_init()
50332
50333class SBMLLocalParameterConverter(SBMLConverter):
50334    r"""
50335
50336    @sbmlpackage{core}
50337
50338    @htmlinclude pkg-marker-core.html Converter to turn local parameters into global ones.
50339
50340    @htmlinclude libsbml-facility-only-warning.html
50341
50342    This converter essentially promotes local parameters to global parameters.
50343    It works by examining every Reaction object for LocalParameter objects,
50344    then creating Parameter objects on the model for each one found, and
50345    finally removing the original LocalParameter objects.  It creates new
50346    identifiers for the fresh Parameter objects by concatenating the
50347    identifier of the reaction with the identifier of the original
50348    LocalParameter object.
50349
50350    This converter can be useful for software applications that do not have
50351    the ability to handle local parameters on reactions.  Such applications
50352    could check incoming models for local parameters and run those models
50353    through this converter before proceeding with other steps.
50354
50355    @section SBMLLocalParameterConverter-usage Configuration and use of SBMLLocalParameterConverter
50356
50357    SBMLLocalParameterConverter is enabled by creating a ConversionProperties
50358    object with the option @c 'promoteLocalParameters', and passing this
50359    properties object to SBMLDocument.convert().  The converter offers no other options.
50360
50361    @section using-converters General information about the use of SBML converters
50362
50363    The use of all the converters follows a similar approach.  First, one
50364    creates a ConversionProperties object and calls
50365    ConversionProperties.addOption()
50366    on this object with one argument: a text string that identifies the desired
50367    converter.  (The text string is specific to each converter; consult the
50368    documentation for a given converter to find out how it should be enabled.)
50369
50370    Next, for some converters, the caller can optionally set some
50371    converter-specific properties using additional calls to
50372    ConversionProperties.addOption().
50373    Many converters provide the ability to
50374    configure their behavior to some extent; this is realized through the use
50375    of properties that offer different options.  The default property values
50376    for each converter can be interrogated using the method
50377    SBMLConverter.getDefaultProperties() on the converter class in question .
50378
50379    Finally, the caller should invoke the method
50380    SBMLDocument.convert()
50381    with the ConversionProperties object as an argument.
50382
50383    @subsection converter-example Example of invoking an SBML converter
50384
50385    The following code fragment illustrates an example using
50386    SBMLReactionConverter, which is invoked using the option string
50387    @c 'replaceReactions':
50388
50389    @if cpp
50390    @code{.cpp}
50391    ConversionProperties props;
50392    props.addOption('replaceReactions');
50393    @endcode
50394    @endif
50395    @if python
50396    @code{.py}
50397    config = ConversionProperties()
50398    if config != None:
50399      config.addOption('replaceReactions')
50400    @endcode
50401    @endif
50402    @if java
50403    @code{.java}
50404    ConversionProperties props = new ConversionProperties();
50405    if (props != null) {
50406      props.addOption('replaceReactions');
50407    } else {
50408      // Deal with error.
50409    }
50410    @endcode
50411    @endif
50412
50413    In the case of SBMLReactionConverter, there are no options to affect
50414    its behavior, so the next step is simply to invoke the converter on
50415    an SBMLDocument object.  Continuing the example code:
50416
50417    @if cpp
50418    @code{.cpp}
50419    // Assume that the variable 'document' has been set to an SBMLDocument object.
50420    int status = document->convert(props);
50421    if (status != LIBSBML_OPERATION_SUCCESS)
50422    {
50423      cerr << 'Unable to perform conversion due to the following:' << endl;
50424      document->printErrors(cerr);
50425    }
50426    @endcode
50427    @endif
50428    @if python
50429    @code{.py}
50430      # Assume that the variable 'document' has been set to an SBMLDocument object.
50431      status = document.convert(config)
50432      if status != LIBSBML_OPERATION_SUCCESS:
50433        # Handle error somehow.
50434        print('Error: conversion failed due to the following:')
50435        document.printErrors()
50436    @endcode
50437    @endif
50438    @if java
50439    @code{.java}
50440      // Assume that the variable 'document' has been set to an SBMLDocument object.
50441      status = document.convert(config);
50442      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
50443      {
50444        // Handle error somehow.
50445        System.out.println('Error: conversion failed due to the following:');
50446        document.printErrors();
50447      }
50448    @endcode
50449    @endif
50450
50451    Here is an example of using a converter that offers an option. The
50452    following code invokes SBMLStripPackageConverter to remove the
50453    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
50454    of the package to be removed by adding a value for the option named
50455    @c 'package' defined by that converter:
50456
50457    @if cpp
50458    @code{.cpp}
50459    ConversionProperties props;
50460    props.addOption('stripPackage');
50461    props.addOption('package', 'layout');
50462
50463    int status = document->convert(props);
50464    if (status != LIBSBML_OPERATION_SUCCESS)
50465    {
50466        cerr << 'Unable to strip the Layout package from the model';
50467        cerr << 'Error returned: ' << status;
50468    }
50469    @endcode
50470    @endif
50471    @if python
50472    @code{.py}
50473    def strip_layout_example(document):
50474      config = ConversionProperties()
50475      if config != None:
50476        config.addOption('stripPackage')
50477        config.addOption('package', 'layout')
50478        status = document.convert(config)
50479        if status != LIBSBML_OPERATION_SUCCESS:
50480          # Handle error somehow.
50481          print('Error: unable to strip the Layout package.')
50482          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
50483      else:
50484        # Handle error somehow.
50485        print('Error: unable to create ConversionProperties object')
50486    @endcode
50487    @endif
50488    @if java
50489    @code{.java}
50490    ConversionProperties config = new ConversionProperties();
50491    if (config != None) {
50492      config.addOption('stripPackage');
50493      config.addOption('package', 'layout');
50494      status = document.convert(config);
50495      if (status != LIBSBML_OPERATION_SUCCESS) {
50496        // Handle error somehow.
50497        System.out.println('Error: unable to strip the Layout package');
50498        document.printErrors();
50499      }
50500    } else {
50501      // Handle error somehow.
50502      System.out.println('Error: unable to create ConversionProperties object');
50503    }
50504    @endcode
50505    @endif
50506
50507    @subsection available-converters Available SBML converters in libSBML
50508
50509    LibSBML provides a number of built-in converters; by convention, their
50510    names end in @em Converter. The following are the built-in converters
50511    provided by libSBML @htmlinclude libsbml-version.html:
50512
50513    @copydetails doc_list_of_libsbml_converters
50514
50515    """
50516
50517    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
50518    __repr__ = _swig_repr
50519
50520    @staticmethod
50521    def init():
50522        r"""
50523        init()
50524
50525        @internal
50526
50527        @internal
50528
50529        """
50530        return _libsbml.SBMLLocalParameterConverter_init()
50531
50532    def __init__(self, *args):
50533        r"""
50534        __init__(SBMLLocalParameterConverter self) -> SBMLLocalParameterConverter
50535        __init__(SBMLLocalParameterConverter self, SBMLLocalParameterConverter obj) -> SBMLLocalParameterConverter
50536
50537        This method has multiple variants; they differ in the arguments
50538         they accept.  Each variant is described separately below.
50539
50540        @par
50541        <hr>
50542        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50543         <pre class='signature'>SBMLLocalParameterConverter(SBMLLocalParameterConverter obj)</pre>
50544
50545        Copy constructor; creates a copy of an SBMLLocalParameterConverter
50546        object.
50547
50548        @param obj the SBMLLocalParameterConverter object to copy.
50549
50550
50551        @par
50552        <hr>
50553        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50554         <pre class='signature'>SBMLLocalParameterConverter()</pre>
50555
50556        Creates a new SBMLLocalParameterConverter object.
50557
50558        """
50559        _libsbml.SBMLLocalParameterConverter_swiginit(self, _libsbml.new_SBMLLocalParameterConverter(*args))
50560
50561    def clone(self):
50562        r"""
50563        clone(SBMLLocalParameterConverter self) -> SBMLLocalParameterConverter
50564
50565        Creates and returns a deep copy of this SBMLLocalParameterConverter
50566        object.
50567
50568        @return a (deep) copy of this converter.
50569
50570        """
50571        return _libsbml.SBMLLocalParameterConverter_clone(self)
50572    __swig_destroy__ = _libsbml.delete_SBMLLocalParameterConverter
50573
50574    def matchesProperties(self, props):
50575        r"""
50576        matchesProperties(SBMLLocalParameterConverter self, ConversionProperties props) -> bool
50577
50578        Returns @c True if this converter object's properties match the given
50579        properties.
50580
50581        A typical use of this method involves creating a ConversionProperties
50582        object, setting the options desired, and then calling this method on
50583        an SBMLLocalParameterConverter object to find out if the object's
50584        property values match the given ones.  This method is also used by
50585        SBMLConverterRegistry.getConverterFor()
50586        to search across all registered converters for one matching particular
50587        properties.
50588
50589        @param props the properties to match.
50590
50591        @return @c True if this converter's properties match, @c False
50592        otherwise.
50593
50594        """
50595        return _libsbml.SBMLLocalParameterConverter_matchesProperties(self, props)
50596
50597    def convert(self):
50598        r"""
50599        convert(SBMLLocalParameterConverter self) -> int
50600
50601        Perform the conversion.
50602
50603        This method causes the converter to do the actual conversion work,
50604        that is, to convert the SBMLDocument object set by
50605        SBMLConverter.setDocument() and
50606        with the configuration options set by
50607        SBMLConverter.setProperties().
50608
50609        @return integer value indicating success/failure of the
50610        function.  @if clike The value is drawn from the
50611        enumeration #OperationReturnValues_t. @endif@~ The possible values
50612        returned by this function are:
50613        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
50614        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
50615        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
50616
50617        """
50618        return _libsbml.SBMLLocalParameterConverter_convert(self)
50619
50620    def getDefaultProperties(self):
50621        r"""
50622        getDefaultProperties(SBMLLocalParameterConverter self) -> ConversionProperties
50623
50624        Returns the default properties of this converter.
50625
50626        A given converter exposes one or more properties that can be adjusted
50627        in order to influence the behavior of the converter.  This method
50628        returns the @em default property settings for this converter.  It is
50629        meant to be called in order to discover all the settings for the
50630        converter object.
50631
50632        @return the ConversionProperties object describing the default properties
50633        for this converter.
50634
50635        """
50636        return _libsbml.SBMLLocalParameterConverter_getDefaultProperties(self)
50637
50638# Register SBMLLocalParameterConverter in _libsbml:
50639_libsbml.SBMLLocalParameterConverter_swigregister(SBMLLocalParameterConverter)
50640
50641def SBMLLocalParameterConverter_init():
50642    r"""
50643    SBMLLocalParameterConverter_init()
50644
50645    @internal
50646
50647    @internal
50648
50649    """
50650    return _libsbml.SBMLLocalParameterConverter_init()
50651
50652class SBMLReactionConverter(SBMLConverter):
50653    r"""
50654
50655    @sbmlpackage{core}
50656
50657    @htmlinclude pkg-marker-core.html Converter to replace reactions with SBML <em>rate rules</em>.
50658
50659    @htmlinclude libsbml-facility-only-warning.html
50660
50661    This converter will take an SBML model and replace the definitions of
50662    reactions in the model with definitions of SBML rate rules.  Equivalent
50663    RateRule objects are only created for species mentioned in reactions that
50664    have KineticLaw subobjects, since those are the only reactions that have
50665    an effect on the rates of change of species in the model; however, the
50666    converter removes all Reaction objects in the model after it is done.
50667
50668    @section SBMLReactionConverter-usage Configuration and use of SBMLReactionConverter
50669
50670    SBMLReactionConverter is enabled by creating a ConversionProperties object
50671    with the option @c 'replaceReactions', and passing this properties object
50672    to SBMLDocument.convert().  This
50673    converter does not offer any additional configuration options.
50674
50675    @section using-converters General information about the use of SBML converters
50676
50677    The use of all the converters follows a similar approach.  First, one
50678    creates a ConversionProperties object and calls
50679    ConversionProperties.addOption()
50680    on this object with one argument: a text string that identifies the desired
50681    converter.  (The text string is specific to each converter; consult the
50682    documentation for a given converter to find out how it should be enabled.)
50683
50684    Next, for some converters, the caller can optionally set some
50685    converter-specific properties using additional calls to
50686    ConversionProperties.addOption().
50687    Many converters provide the ability to
50688    configure their behavior to some extent; this is realized through the use
50689    of properties that offer different options.  The default property values
50690    for each converter can be interrogated using the method
50691    SBMLConverter.getDefaultProperties() on the converter class in question .
50692
50693    Finally, the caller should invoke the method
50694    SBMLDocument.convert()
50695    with the ConversionProperties object as an argument.
50696
50697    @subsection converter-example Example of invoking an SBML converter
50698
50699    The following code fragment illustrates an example using
50700    SBMLReactionConverter, which is invoked using the option string
50701    @c 'replaceReactions':
50702
50703    @if cpp
50704    @code{.cpp}
50705    ConversionProperties props;
50706    props.addOption('replaceReactions');
50707    @endcode
50708    @endif
50709    @if python
50710    @code{.py}
50711    config = ConversionProperties()
50712    if config != None:
50713      config.addOption('replaceReactions')
50714    @endcode
50715    @endif
50716    @if java
50717    @code{.java}
50718    ConversionProperties props = new ConversionProperties();
50719    if (props != null) {
50720      props.addOption('replaceReactions');
50721    } else {
50722      // Deal with error.
50723    }
50724    @endcode
50725    @endif
50726
50727    In the case of SBMLReactionConverter, there are no options to affect
50728    its behavior, so the next step is simply to invoke the converter on
50729    an SBMLDocument object.  Continuing the example code:
50730
50731    @if cpp
50732    @code{.cpp}
50733    // Assume that the variable 'document' has been set to an SBMLDocument object.
50734    int status = document->convert(props);
50735    if (status != LIBSBML_OPERATION_SUCCESS)
50736    {
50737      cerr << 'Unable to perform conversion due to the following:' << endl;
50738      document->printErrors(cerr);
50739    }
50740    @endcode
50741    @endif
50742    @if python
50743    @code{.py}
50744      # Assume that the variable 'document' has been set to an SBMLDocument object.
50745      status = document.convert(config)
50746      if status != LIBSBML_OPERATION_SUCCESS:
50747        # Handle error somehow.
50748        print('Error: conversion failed due to the following:')
50749        document.printErrors()
50750    @endcode
50751    @endif
50752    @if java
50753    @code{.java}
50754      // Assume that the variable 'document' has been set to an SBMLDocument object.
50755      status = document.convert(config);
50756      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
50757      {
50758        // Handle error somehow.
50759        System.out.println('Error: conversion failed due to the following:');
50760        document.printErrors();
50761      }
50762    @endcode
50763    @endif
50764
50765    Here is an example of using a converter that offers an option. The
50766    following code invokes SBMLStripPackageConverter to remove the
50767    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
50768    of the package to be removed by adding a value for the option named
50769    @c 'package' defined by that converter:
50770
50771    @if cpp
50772    @code{.cpp}
50773    ConversionProperties props;
50774    props.addOption('stripPackage');
50775    props.addOption('package', 'layout');
50776
50777    int status = document->convert(props);
50778    if (status != LIBSBML_OPERATION_SUCCESS)
50779    {
50780        cerr << 'Unable to strip the Layout package from the model';
50781        cerr << 'Error returned: ' << status;
50782    }
50783    @endcode
50784    @endif
50785    @if python
50786    @code{.py}
50787    def strip_layout_example(document):
50788      config = ConversionProperties()
50789      if config != None:
50790        config.addOption('stripPackage')
50791        config.addOption('package', 'layout')
50792        status = document.convert(config)
50793        if status != LIBSBML_OPERATION_SUCCESS:
50794          # Handle error somehow.
50795          print('Error: unable to strip the Layout package.')
50796          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
50797      else:
50798        # Handle error somehow.
50799        print('Error: unable to create ConversionProperties object')
50800    @endcode
50801    @endif
50802    @if java
50803    @code{.java}
50804    ConversionProperties config = new ConversionProperties();
50805    if (config != None) {
50806      config.addOption('stripPackage');
50807      config.addOption('package', 'layout');
50808      status = document.convert(config);
50809      if (status != LIBSBML_OPERATION_SUCCESS) {
50810        // Handle error somehow.
50811        System.out.println('Error: unable to strip the Layout package');
50812        document.printErrors();
50813      }
50814    } else {
50815      // Handle error somehow.
50816      System.out.println('Error: unable to create ConversionProperties object');
50817    }
50818    @endcode
50819    @endif
50820
50821    @subsection available-converters Available SBML converters in libSBML
50822
50823    LibSBML provides a number of built-in converters; by convention, their
50824    names end in @em Converter. The following are the built-in converters
50825    provided by libSBML @htmlinclude libsbml-version.html:
50826
50827    @copydetails doc_list_of_libsbml_converters
50828
50829    """
50830
50831    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
50832    __repr__ = _swig_repr
50833
50834    @staticmethod
50835    def init():
50836        r"""
50837        init()
50838
50839        @internal
50840
50841        @internal
50842
50843        """
50844        return _libsbml.SBMLReactionConverter_init()
50845
50846    def __init__(self, *args):
50847        r"""
50848        __init__(SBMLReactionConverter self) -> SBMLReactionConverter
50849        __init__(SBMLReactionConverter self, SBMLReactionConverter obj) -> SBMLReactionConverter
50850
50851        This method has multiple variants; they differ in the arguments
50852         they accept.  Each variant is described separately below.
50853
50854        @par
50855        <hr>
50856        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50857         <pre class='signature'>SBMLReactionConverter(SBMLReactionConverter obj)</pre>
50858
50859        Copy constructor; creates a copy of an SBMLReactionConverter
50860        object.
50861
50862        @param obj the SBMLReactionConverter object to copy.
50863
50864
50865        @par
50866        <hr>
50867        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50868         <pre class='signature'>SBMLReactionConverter()</pre>
50869
50870        Creates a new SBMLReactionConverter object.
50871
50872        """
50873        _libsbml.SBMLReactionConverter_swiginit(self, _libsbml.new_SBMLReactionConverter(*args))
50874
50875    def clone(self):
50876        r"""
50877        clone(SBMLReactionConverter self) -> SBMLReactionConverter
50878
50879        Creates and returns a deep copy of this SBMLReactionConverter
50880        object.
50881
50882        @return a (deep) copy of this converter.
50883
50884        """
50885        return _libsbml.SBMLReactionConverter_clone(self)
50886    __swig_destroy__ = _libsbml.delete_SBMLReactionConverter
50887
50888    def matchesProperties(self, props):
50889        r"""
50890        matchesProperties(SBMLReactionConverter self, ConversionProperties props) -> bool
50891
50892        Returns @c True if this converter object's properties match the given
50893        properties.
50894
50895        A typical use of this method involves creating a ConversionProperties
50896        object, setting the options desired, and then calling this method on
50897        an SBMLReactionConverter object to find out if the object's
50898        property values match the given ones.  This method is also used by
50899        SBMLConverterRegistry.getConverterFor()
50900        to search across all registered converters for one matching particular
50901        properties.
50902
50903        @param props the properties to match.
50904
50905        @return @c True if this converter's properties match, @c False
50906        otherwise.
50907
50908        """
50909        return _libsbml.SBMLReactionConverter_matchesProperties(self, props)
50910
50911    def convert(self):
50912        r"""
50913        convert(SBMLReactionConverter self) -> int
50914
50915        Perform the conversion.
50916
50917        This method causes the converter to do the actual conversion work,
50918        that is, to convert the SBMLDocument object set by
50919        SBMLConverter.setDocument() and
50920        with the configuration options set by
50921        SBMLConverter.setProperties().
50922
50923        @return integer value indicating success/failure of the
50924        function.  @if clike The value is drawn from the
50925        enumeration #OperationReturnValues_t. @endif@~ The possible values
50926        returned by this function are:
50927        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
50928        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
50929        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
50930        @li @link libsbml#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink
50931
50932        """
50933        return _libsbml.SBMLReactionConverter_convert(self)
50934
50935    def getDefaultProperties(self):
50936        r"""
50937        getDefaultProperties(SBMLReactionConverter self) -> ConversionProperties
50938
50939        Returns the default properties of this converter.
50940
50941        A given converter exposes one or more properties that can be adjusted
50942        in order to influence the behavior of the converter.  This method
50943        returns the @em default property settings for this converter.  It is
50944        meant to be called in order to discover all the settings for the
50945        converter object.
50946
50947        @return the ConversionProperties object describing the default properties
50948        for this converter.
50949
50950        """
50951        return _libsbml.SBMLReactionConverter_getDefaultProperties(self)
50952
50953    def setDocument(self, doc):
50954        r"""
50955        setDocument(SBMLReactionConverter self, SBMLDocument doc) -> int
50956
50957        This method has multiple variants; they differ in the arguments
50958         they accept.  Each variant is described separately below.
50959
50960        @par
50961        <hr>
50962        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50963         <pre class='signature'>setDocument(SBMLDocument doc)</pre>
50964
50965        Sets the current SBML document to the given SBMLDocument object.
50966
50967        @param doc the document to use for this conversion.
50968
50969        @warning Even though the @p doc is '', it is immediately cast
50970        to a non- version, which is then usually changed by the
50971        converter upon a successful conversion.  This function is here
50972        solely to preserve backwards compatibility.
50973
50974        @return integer value indicating success/failure of the
50975        function.  @if clike The value is drawn from the
50976        enumeration #OperationReturnValues_t. @endif@~ The possible values
50977        returned by this function are:
50978        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
50979
50980
50981        @par
50982        <hr>
50983        <span class='variant-sig-heading'>Method variant with the following signature</span>:
50984         <pre class='signature'>setDocument(SBMLDocument doc)</pre>
50985
50986        Sets the current SBML document to the given SBMLDocument object.
50987
50988        @param doc the document to use for this conversion.
50989
50990        @return integer value indicating success/failure of the
50991        function.  @if clike The value is drawn from the
50992        enumeration #OperationReturnValues_t. @endif@~ The possible values
50993        returned by this function are:
50994        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
50995
50996        """
50997        return _libsbml.SBMLReactionConverter_setDocument(self, doc)
50998
50999# Register SBMLReactionConverter in _libsbml:
51000_libsbml.SBMLReactionConverter_swigregister(SBMLReactionConverter)
51001
51002def SBMLReactionConverter_init():
51003    r"""
51004    SBMLReactionConverter_init()
51005
51006    @internal
51007
51008    @internal
51009
51010    """
51011    return _libsbml.SBMLReactionConverter_init()
51012
51013class SBMLRuleConverter(SBMLConverter):
51014    r"""
51015
51016    @sbmlpackage{core}
51017
51018    @htmlinclude pkg-marker-core.html Converter that sorts SBML rules and assignments.
51019
51020    @htmlinclude libsbml-facility-only-warning.html
51021
51022    This converter reorders assignments in a model.  Specifically, it sorts
51023    the list of assignment rules (i.e., the AssignmentRule objects contained
51024    in the ListOfAssignmentRules within the Model object) and the initial
51025    assignments (i.e., the InitialAssignment objects contained in the
51026    ListOfInitialAssignments) such that, within each set, assignments that
51027    depend on @em prior values are placed @em after the values are set.  For
51028    example, if there is an assignment rule stating <i>a = b + 1</i>, and
51029    another rule stating <i>b = 3</i>, the list of rules is sorted and the
51030    rules are arranged so that the rule for <i>b = 3</i> appears @em before
51031    the rule for <i>a = b + 1</i>.  Similarly, if dependencies of this
51032    sort exist in the list of initial assignments in the model, the initial
51033    assignments are sorted as well.
51034
51035    Beginning with SBML Level 2, assignment rules have no ordering
51036    required---the order in which the rules appear in an SBML file has
51037    no significance.  Software tools, however, may need to reorder
51038    assignments for purposes of evaluating them.  For example, for
51039    simulators that use time integration methods, it would be a good idea to
51040    reorder assignment rules such as the following,
51041
51042    <i>b = a + 10 seconds</i><br>
51043    <i>a = time</i>
51044
51045    so that the evaluation of the rules is independent of integrator
51046    step sizes. (This is due to the fact that, in this case, the order in
51047    which the rules are evaluated changes the result.)  SBMLRuleConverter
51048    can be used to reorder the SBML objects regardless of whether the
51049    input file contained them in the desired order.
51050
51051    Note that the two sets of SBML assignments (list of assignment rules on
51052    the one hand, and list of initial assignments on the other hand) are
51053    handled @em independently.  In an SBML model, these entities are treated
51054    differently and no amount of sorting can deal with inter-dependencies
51055    between assignments of the two kinds.
51056    @section SBMLRuleConverter-usage Configuration and use of SBMLRuleConverter
51057
51058    SBMLRuleConverter is enabled by creating a ConversionProperties object
51059    with the option @c 'sortRules', and passing this properties object to
51060    SBMLDocument.convert().  This
51061    converter offers no other options.
51062
51063    @section using-converters General information about the use of SBML converters
51064
51065    The use of all the converters follows a similar approach.  First, one
51066    creates a ConversionProperties object and calls
51067    ConversionProperties.addOption()
51068    on this object with one argument: a text string that identifies the desired
51069    converter.  (The text string is specific to each converter; consult the
51070    documentation for a given converter to find out how it should be enabled.)
51071
51072    Next, for some converters, the caller can optionally set some
51073    converter-specific properties using additional calls to
51074    ConversionProperties.addOption().
51075    Many converters provide the ability to
51076    configure their behavior to some extent; this is realized through the use
51077    of properties that offer different options.  The default property values
51078    for each converter can be interrogated using the method
51079    SBMLConverter.getDefaultProperties() on the converter class in question .
51080
51081    Finally, the caller should invoke the method
51082    SBMLDocument.convert()
51083    with the ConversionProperties object as an argument.
51084
51085    @subsection converter-example Example of invoking an SBML converter
51086
51087    The following code fragment illustrates an example using
51088    SBMLReactionConverter, which is invoked using the option string
51089    @c 'replaceReactions':
51090
51091    @if cpp
51092    @code{.cpp}
51093    ConversionProperties props;
51094    props.addOption('replaceReactions');
51095    @endcode
51096    @endif
51097    @if python
51098    @code{.py}
51099    config = ConversionProperties()
51100    if config != None:
51101      config.addOption('replaceReactions')
51102    @endcode
51103    @endif
51104    @if java
51105    @code{.java}
51106    ConversionProperties props = new ConversionProperties();
51107    if (props != null) {
51108      props.addOption('replaceReactions');
51109    } else {
51110      // Deal with error.
51111    }
51112    @endcode
51113    @endif
51114
51115    In the case of SBMLReactionConverter, there are no options to affect
51116    its behavior, so the next step is simply to invoke the converter on
51117    an SBMLDocument object.  Continuing the example code:
51118
51119    @if cpp
51120    @code{.cpp}
51121    // Assume that the variable 'document' has been set to an SBMLDocument object.
51122    int status = document->convert(props);
51123    if (status != LIBSBML_OPERATION_SUCCESS)
51124    {
51125      cerr << 'Unable to perform conversion due to the following:' << endl;
51126      document->printErrors(cerr);
51127    }
51128    @endcode
51129    @endif
51130    @if python
51131    @code{.py}
51132      # Assume that the variable 'document' has been set to an SBMLDocument object.
51133      status = document.convert(config)
51134      if status != LIBSBML_OPERATION_SUCCESS:
51135        # Handle error somehow.
51136        print('Error: conversion failed due to the following:')
51137        document.printErrors()
51138    @endcode
51139    @endif
51140    @if java
51141    @code{.java}
51142      // Assume that the variable 'document' has been set to an SBMLDocument object.
51143      status = document.convert(config);
51144      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
51145      {
51146        // Handle error somehow.
51147        System.out.println('Error: conversion failed due to the following:');
51148        document.printErrors();
51149      }
51150    @endcode
51151    @endif
51152
51153    Here is an example of using a converter that offers an option. The
51154    following code invokes SBMLStripPackageConverter to remove the
51155    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
51156    of the package to be removed by adding a value for the option named
51157    @c 'package' defined by that converter:
51158
51159    @if cpp
51160    @code{.cpp}
51161    ConversionProperties props;
51162    props.addOption('stripPackage');
51163    props.addOption('package', 'layout');
51164
51165    int status = document->convert(props);
51166    if (status != LIBSBML_OPERATION_SUCCESS)
51167    {
51168        cerr << 'Unable to strip the Layout package from the model';
51169        cerr << 'Error returned: ' << status;
51170    }
51171    @endcode
51172    @endif
51173    @if python
51174    @code{.py}
51175    def strip_layout_example(document):
51176      config = ConversionProperties()
51177      if config != None:
51178        config.addOption('stripPackage')
51179        config.addOption('package', 'layout')
51180        status = document.convert(config)
51181        if status != LIBSBML_OPERATION_SUCCESS:
51182          # Handle error somehow.
51183          print('Error: unable to strip the Layout package.')
51184          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
51185      else:
51186        # Handle error somehow.
51187        print('Error: unable to create ConversionProperties object')
51188    @endcode
51189    @endif
51190    @if java
51191    @code{.java}
51192    ConversionProperties config = new ConversionProperties();
51193    if (config != None) {
51194      config.addOption('stripPackage');
51195      config.addOption('package', 'layout');
51196      status = document.convert(config);
51197      if (status != LIBSBML_OPERATION_SUCCESS) {
51198        // Handle error somehow.
51199        System.out.println('Error: unable to strip the Layout package');
51200        document.printErrors();
51201      }
51202    } else {
51203      // Handle error somehow.
51204      System.out.println('Error: unable to create ConversionProperties object');
51205    }
51206    @endcode
51207    @endif
51208
51209    @subsection available-converters Available SBML converters in libSBML
51210
51211    LibSBML provides a number of built-in converters; by convention, their
51212    names end in @em Converter. The following are the built-in converters
51213    provided by libSBML @htmlinclude libsbml-version.html:
51214
51215    @copydetails doc_list_of_libsbml_converters
51216
51217    """
51218
51219    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
51220    __repr__ = _swig_repr
51221
51222    @staticmethod
51223    def init():
51224        r"""
51225        init()
51226
51227        @internal
51228
51229        @internal
51230
51231        """
51232        return _libsbml.SBMLRuleConverter_init()
51233
51234    def __init__(self, *args):
51235        r"""
51236        __init__(SBMLRuleConverter self) -> SBMLRuleConverter
51237        __init__(SBMLRuleConverter self, SBMLRuleConverter obj) -> SBMLRuleConverter
51238
51239        This method has multiple variants; they differ in the arguments
51240         they accept.  Each variant is described separately below.
51241
51242        @par
51243        <hr>
51244        <span class='variant-sig-heading'>Method variant with the following signature</span>:
51245         <pre class='signature'>SBMLRuleConverter(SBMLRuleConverter obj)</pre>
51246
51247        Copy constructor; creates a copy of an SBMLLevelVersionConverter
51248        object.
51249
51250        @param obj the SBMLLevelVersionConverter object to copy.
51251
51252
51253        @par
51254        <hr>
51255        <span class='variant-sig-heading'>Method variant with the following signature</span>:
51256         <pre class='signature'>SBMLRuleConverter()</pre>
51257
51258        Creates a new SBMLLevelVersionConverter object.
51259
51260        """
51261        _libsbml.SBMLRuleConverter_swiginit(self, _libsbml.new_SBMLRuleConverter(*args))
51262
51263    def clone(self):
51264        r"""
51265        clone(SBMLRuleConverter self) -> SBMLRuleConverter
51266
51267        Creates and returns a deep copy of this SBMLLevelVersionConverter
51268        object.
51269
51270        @return a (deep) copy of this converter.
51271
51272        """
51273        return _libsbml.SBMLRuleConverter_clone(self)
51274    __swig_destroy__ = _libsbml.delete_SBMLRuleConverter
51275
51276    def matchesProperties(self, props):
51277        r"""
51278        matchesProperties(SBMLRuleConverter self, ConversionProperties props) -> bool
51279
51280        Returns @c True if this converter object's properties match the given
51281        properties.
51282
51283        A typical use of this method involves creating a ConversionProperties
51284        object, setting the options desired, and then calling this method on
51285        an SBMLLevelVersionConverter object to find out if the object's
51286        property values match the given ones.  This method is also used by
51287        SBMLConverterRegistry.getConverterFor()
51288        to search across all registered converters for one matching particular
51289        properties.
51290
51291        @param props the properties to match.
51292
51293        @return @c True if this converter's properties match, @c False
51294        otherwise.
51295
51296        """
51297        return _libsbml.SBMLRuleConverter_matchesProperties(self, props)
51298
51299    def convert(self):
51300        r"""
51301        convert(SBMLRuleConverter self) -> int
51302
51303        Perform the conversion.
51304
51305        This method causes the converter to do the actual conversion work,
51306        that is, to convert the SBMLDocument object set by
51307        SBMLConverter.setDocument() and
51308        with the configuration options set by
51309        SBMLConverter.setProperties().
51310
51311        @return integer value indicating success/failure of the
51312        function.  @if clike The value is drawn from the
51313        enumeration #OperationReturnValues_t. @endif@~ The possible values
51314        returned by this function are:
51315        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
51316        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
51317        @li @link libsbml#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink
51318
51319        """
51320        return _libsbml.SBMLRuleConverter_convert(self)
51321
51322    def getDefaultProperties(self):
51323        r"""
51324        getDefaultProperties(SBMLRuleConverter self) -> ConversionProperties
51325
51326        Returns the default properties of this converter.
51327
51328        A given converter exposes one or more properties that can be adjusted
51329        in order to influence the behavior of the converter.  This method
51330        returns the @em default property settings for this converter.  It is
51331        meant to be called in order to discover all the settings for the
51332        converter object.
51333
51334        @return the ConversionProperties object describing the default properties
51335        for this converter.
51336
51337        """
51338        return _libsbml.SBMLRuleConverter_getDefaultProperties(self)
51339
51340# Register SBMLRuleConverter in _libsbml:
51341_libsbml.SBMLRuleConverter_swigregister(SBMLRuleConverter)
51342
51343def SBMLRuleConverter_init():
51344    r"""
51345    SBMLRuleConverter_init()
51346
51347    @internal
51348
51349    @internal
51350
51351    """
51352    return _libsbml.SBMLRuleConverter_init()
51353
51354class SBMLStripPackageConverter(SBMLConverter):
51355    r"""
51356
51357    @sbmlpackage{core}
51358
51359    @htmlinclude pkg-marker-core.html Converter that removes SBML Level 3 packages.
51360
51361    @htmlinclude libsbml-facility-only-warning.html
51362
51363    This SBML converter takes an SBML document and removes (strips) an SBML
51364    Level&nbsp;3 package from it.  No conversion is performed; the package
51365    constructs are simply removed from the SBML document.  The package to be
51366    stripped is determined by the value of the option @c 'package' on the
51367    conversion properties.
51368
51369    @section SBMLStripPackageConverter-usage Configuration and use of SBMLStripPackageConverter
51370
51371    SBMLStripPackageConverter is enabled by creating a ConversionProperties
51372    object with the option @c 'stripPackage', and passing this properties
51373    object to SBMLDocument.convert().
51374    This converter takes one required option:
51375
51376    @li @c 'package': the value of this option should be a text string, the
51377    nickname of the SBML Level&nbsp;3 package to be stripped from the model.
51378
51379    In addition, the converter understands an additional optional:
51380
51381    @li @c 'stripAllUnrecognized': if set to @c True, the converter will
51382    remove all SBML Level&nbsp;3 package constructs for Level&nbsp;3 packages
51383    that this copy of libSBML does not recognize.  Note that what a given copy
51384    of libSBML recognizes is determined by which plug-ins it has been
51385    configured to include.  If this option is enabled, it may remove SBML
51386    Level&nbsp;3 package constructs that are legitimate in the sense that they
51387    are officially defined SBML constructs, but not recognized because the
51388    running copy of libSBML has not had support enabled for them.
51389
51390    @section using-converters General information about the use of SBML converters
51391
51392    The use of all the converters follows a similar approach.  First, one
51393    creates a ConversionProperties object and calls
51394    ConversionProperties.addOption()
51395    on this object with one argument: a text string that identifies the desired
51396    converter.  (The text string is specific to each converter; consult the
51397    documentation for a given converter to find out how it should be enabled.)
51398
51399    Next, for some converters, the caller can optionally set some
51400    converter-specific properties using additional calls to
51401    ConversionProperties.addOption().
51402    Many converters provide the ability to
51403    configure their behavior to some extent; this is realized through the use
51404    of properties that offer different options.  The default property values
51405    for each converter can be interrogated using the method
51406    SBMLConverter.getDefaultProperties() on the converter class in question .
51407
51408    Finally, the caller should invoke the method
51409    SBMLDocument.convert()
51410    with the ConversionProperties object as an argument.
51411
51412    @subsection converter-example Example of invoking an SBML converter
51413
51414    The following code fragment illustrates an example using
51415    SBMLReactionConverter, which is invoked using the option string
51416    @c 'replaceReactions':
51417
51418    @if cpp
51419    @code{.cpp}
51420    ConversionProperties props;
51421    props.addOption('replaceReactions');
51422    @endcode
51423    @endif
51424    @if python
51425    @code{.py}
51426    config = ConversionProperties()
51427    if config != None:
51428      config.addOption('replaceReactions')
51429    @endcode
51430    @endif
51431    @if java
51432    @code{.java}
51433    ConversionProperties props = new ConversionProperties();
51434    if (props != null) {
51435      props.addOption('replaceReactions');
51436    } else {
51437      // Deal with error.
51438    }
51439    @endcode
51440    @endif
51441
51442    In the case of SBMLReactionConverter, there are no options to affect
51443    its behavior, so the next step is simply to invoke the converter on
51444    an SBMLDocument object.  Continuing the example code:
51445
51446    @if cpp
51447    @code{.cpp}
51448    // Assume that the variable 'document' has been set to an SBMLDocument object.
51449    int status = document->convert(props);
51450    if (status != LIBSBML_OPERATION_SUCCESS)
51451    {
51452      cerr << 'Unable to perform conversion due to the following:' << endl;
51453      document->printErrors(cerr);
51454    }
51455    @endcode
51456    @endif
51457    @if python
51458    @code{.py}
51459      # Assume that the variable 'document' has been set to an SBMLDocument object.
51460      status = document.convert(config)
51461      if status != LIBSBML_OPERATION_SUCCESS:
51462        # Handle error somehow.
51463        print('Error: conversion failed due to the following:')
51464        document.printErrors()
51465    @endcode
51466    @endif
51467    @if java
51468    @code{.java}
51469      // Assume that the variable 'document' has been set to an SBMLDocument object.
51470      status = document.convert(config);
51471      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
51472      {
51473        // Handle error somehow.
51474        System.out.println('Error: conversion failed due to the following:');
51475        document.printErrors();
51476      }
51477    @endcode
51478    @endif
51479
51480    Here is an example of using a converter that offers an option. The
51481    following code invokes SBMLStripPackageConverter to remove the
51482    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
51483    of the package to be removed by adding a value for the option named
51484    @c 'package' defined by that converter:
51485
51486    @if cpp
51487    @code{.cpp}
51488    ConversionProperties props;
51489    props.addOption('stripPackage');
51490    props.addOption('package', 'layout');
51491
51492    int status = document->convert(props);
51493    if (status != LIBSBML_OPERATION_SUCCESS)
51494    {
51495        cerr << 'Unable to strip the Layout package from the model';
51496        cerr << 'Error returned: ' << status;
51497    }
51498    @endcode
51499    @endif
51500    @if python
51501    @code{.py}
51502    def strip_layout_example(document):
51503      config = ConversionProperties()
51504      if config != None:
51505        config.addOption('stripPackage')
51506        config.addOption('package', 'layout')
51507        status = document.convert(config)
51508        if status != LIBSBML_OPERATION_SUCCESS:
51509          # Handle error somehow.
51510          print('Error: unable to strip the Layout package.')
51511          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
51512      else:
51513        # Handle error somehow.
51514        print('Error: unable to create ConversionProperties object')
51515    @endcode
51516    @endif
51517    @if java
51518    @code{.java}
51519    ConversionProperties config = new ConversionProperties();
51520    if (config != None) {
51521      config.addOption('stripPackage');
51522      config.addOption('package', 'layout');
51523      status = document.convert(config);
51524      if (status != LIBSBML_OPERATION_SUCCESS) {
51525        // Handle error somehow.
51526        System.out.println('Error: unable to strip the Layout package');
51527        document.printErrors();
51528      }
51529    } else {
51530      // Handle error somehow.
51531      System.out.println('Error: unable to create ConversionProperties object');
51532    }
51533    @endcode
51534    @endif
51535
51536    @subsection available-converters Available SBML converters in libSBML
51537
51538    LibSBML provides a number of built-in converters; by convention, their
51539    names end in @em Converter. The following are the built-in converters
51540    provided by libSBML @htmlinclude libsbml-version.html:
51541
51542    @copydetails doc_list_of_libsbml_converters
51543
51544    """
51545
51546    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
51547    __repr__ = _swig_repr
51548
51549    @staticmethod
51550    def init():
51551        r"""
51552        init()
51553
51554        @internal
51555
51556        @internal
51557
51558        """
51559        return _libsbml.SBMLStripPackageConverter_init()
51560
51561    def __init__(self, *args):
51562        r"""
51563        __init__(SBMLStripPackageConverter self) -> SBMLStripPackageConverter
51564        __init__(SBMLStripPackageConverter self, SBMLStripPackageConverter obj) -> SBMLStripPackageConverter
51565
51566        This method has multiple variants; they differ in the arguments
51567         they accept.  Each variant is described separately below.
51568
51569        @par
51570        <hr>
51571        <span class='variant-sig-heading'>Method variant with the following signature</span>:
51572         <pre class='signature'>SBMLStripPackageConverter()</pre>
51573
51574        Creates a new SBMLStripPackageConverter object.
51575
51576
51577        @par
51578        <hr>
51579        <span class='variant-sig-heading'>Method variant with the following signature</span>:
51580         <pre class='signature'>SBMLStripPackageConverter(SBMLStripPackageConverter obj)</pre>
51581
51582        Copy constructor; creates a copy of an SBMLStripPackageConverter
51583        object.
51584
51585        @param obj the SBMLStripPackageConverter object to copy.
51586
51587        """
51588        _libsbml.SBMLStripPackageConverter_swiginit(self, _libsbml.new_SBMLStripPackageConverter(*args))
51589    __swig_destroy__ = _libsbml.delete_SBMLStripPackageConverter
51590
51591    def clone(self):
51592        r"""
51593        clone(SBMLStripPackageConverter self) -> SBMLStripPackageConverter
51594
51595        Creates and returns a deep copy of this SBMLStripPackageConverter
51596        object.
51597
51598        @return the (deep) copy of this converter object.
51599
51600        """
51601        return _libsbml.SBMLStripPackageConverter_clone(self)
51602
51603    def matchesProperties(self, props):
51604        r"""
51605        matchesProperties(SBMLStripPackageConverter self, ConversionProperties props) -> bool
51606
51607        Returns @c True if this converter object's properties match the given
51608        properties.
51609
51610        A typical use of this method involves creating a ConversionProperties
51611        object, setting the options desired, and then calling this method on
51612        an SBMLStripPackageConverter object to find out if the object's
51613        property values match the given ones.  This method is also used by
51614        SBMLConverterRegistry.getConverterFor()
51615        to search across all registered converters for one matching particular
51616        properties.
51617
51618        @param props the properties to match.
51619
51620        @return @c True if this converter's properties match, @c False
51621        otherwise.
51622
51623        """
51624        return _libsbml.SBMLStripPackageConverter_matchesProperties(self, props)
51625
51626    def convert(self):
51627        r"""
51628        convert(SBMLStripPackageConverter self) -> int
51629
51630        Perform the conversion.
51631
51632        This method causes the converter to do the actual conversion work,
51633        that is, to convert the SBMLDocument object set by
51634        SBMLConverter.setDocument() and
51635        with the configuration options set by
51636        SBMLConverter.setProperties().
51637
51638        @return integer value indicating success/failure of the
51639        function.  @if clike The value is drawn from the
51640        enumeration #OperationReturnValues_t. @endif@~ The possible values
51641        returned by this function are:
51642        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
51643        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
51644        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
51645        @li @link libsbml#LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN@endlink
51646
51647        """
51648        return _libsbml.SBMLStripPackageConverter_convert(self)
51649
51650    def getDefaultProperties(self):
51651        r"""
51652        getDefaultProperties(SBMLStripPackageConverter self) -> ConversionProperties
51653
51654        Returns the default properties of this converter.
51655
51656        A given converter exposes one or more properties that can be adjusted
51657        in order to influence the behavior of the converter.  This method
51658        returns the @em default property settings for this converter.  It is
51659        meant to be called in order to discover all the settings for the
51660        converter object.
51661
51662        @return the ConversionProperties object describing the default properties
51663        for this converter.
51664
51665        """
51666        return _libsbml.SBMLStripPackageConverter_getDefaultProperties(self)
51667
51668    def getPackageToStrip(self):
51669        r"""
51670        getPackageToStrip(SBMLStripPackageConverter self) -> string
51671
51672        @return the package to be stripped.
51673
51674        """
51675        return _libsbml.SBMLStripPackageConverter_getPackageToStrip(self)
51676
51677    def isStripAllUnrecognizedPackages(self):
51678        r"""
51679        isStripAllUnrecognizedPackages(SBMLStripPackageConverter self) -> bool
51680
51681        @return a boolean indicating whether all unrecognized packages should be removed.
51682
51683        """
51684        return _libsbml.SBMLStripPackageConverter_isStripAllUnrecognizedPackages(self)
51685
51686# Register SBMLStripPackageConverter in _libsbml:
51687_libsbml.SBMLStripPackageConverter_swigregister(SBMLStripPackageConverter)
51688
51689def SBMLStripPackageConverter_init():
51690    r"""
51691    SBMLStripPackageConverter_init()
51692
51693    @internal
51694
51695    @internal
51696
51697    """
51698    return _libsbml.SBMLStripPackageConverter_init()
51699
51700class SBMLUnitsConverter(SBMLConverter):
51701    r"""
51702
51703    @sbmlpackage{core}
51704
51705    @htmlinclude pkg-marker-core.html Converts a model's existing units to SI units.
51706
51707    @htmlinclude libsbml-facility-only-warning.html
51708
51709    This SBML converter converts the units in a model to base SI units, that
51710    is, using only the units metre, kilogram, second, ampere, kelvin, mole and
51711    candela.
51712
51713    Unit conversion will only be performed on models that are fully unit
51714    consistent, meaning that all objects have units associated with them and
51715    there are no literal numbers with unspecified units.  In the case of an
51716    SBML Level&nbsp;3 model involving math expressions, this means that the
51717    @c timeUnits attribute on the Model object must be set, and if there are any
51718    reactions in the model, the @c extentUnits attribute on the Model object
51719    must also be set.
51720
51721    @section SBMLUnitsConverter-usage Configuration and use of SBMLUnitsConverter
51722
51723    SBMLUnitsConverter is enabled by creating a ConversionProperties object
51724    with the option @c 'units', and passing this properties object to
51725    SBMLDocument.convert().  This
51726    converter takes one optional option:
51727
51728    @li @c 'removeUnusedUnits': the value of this property should be a
51729    Boolean.  If it is @c True, it tells the unit convert to remove any unused
51730    UnitDefinition objects after conversion is complete.  ('Unused' units are
51731    units that are not referenced by any object in the model.)  If the value
51732    is @c False, unused UnitDefinition objects are not removed from the model.
51733    The default is @c True.
51734
51735    @section using-converters General information about the use of SBML converters
51736
51737    The use of all the converters follows a similar approach.  First, one
51738    creates a ConversionProperties object and calls
51739    ConversionProperties.addOption()
51740    on this object with one argument: a text string that identifies the desired
51741    converter.  (The text string is specific to each converter; consult the
51742    documentation for a given converter to find out how it should be enabled.)
51743
51744    Next, for some converters, the caller can optionally set some
51745    converter-specific properties using additional calls to
51746    ConversionProperties.addOption().
51747    Many converters provide the ability to
51748    configure their behavior to some extent; this is realized through the use
51749    of properties that offer different options.  The default property values
51750    for each converter can be interrogated using the method
51751    SBMLConverter.getDefaultProperties() on the converter class in question .
51752
51753    Finally, the caller should invoke the method
51754    SBMLDocument.convert()
51755    with the ConversionProperties object as an argument.
51756
51757    @subsection converter-example Example of invoking an SBML converter
51758
51759    The following code fragment illustrates an example using
51760    SBMLReactionConverter, which is invoked using the option string
51761    @c 'replaceReactions':
51762
51763    @if cpp
51764    @code{.cpp}
51765    ConversionProperties props;
51766    props.addOption('replaceReactions');
51767    @endcode
51768    @endif
51769    @if python
51770    @code{.py}
51771    config = ConversionProperties()
51772    if config != None:
51773      config.addOption('replaceReactions')
51774    @endcode
51775    @endif
51776    @if java
51777    @code{.java}
51778    ConversionProperties props = new ConversionProperties();
51779    if (props != null) {
51780      props.addOption('replaceReactions');
51781    } else {
51782      // Deal with error.
51783    }
51784    @endcode
51785    @endif
51786
51787    In the case of SBMLReactionConverter, there are no options to affect
51788    its behavior, so the next step is simply to invoke the converter on
51789    an SBMLDocument object.  Continuing the example code:
51790
51791    @if cpp
51792    @code{.cpp}
51793    // Assume that the variable 'document' has been set to an SBMLDocument object.
51794    int status = document->convert(props);
51795    if (status != LIBSBML_OPERATION_SUCCESS)
51796    {
51797      cerr << 'Unable to perform conversion due to the following:' << endl;
51798      document->printErrors(cerr);
51799    }
51800    @endcode
51801    @endif
51802    @if python
51803    @code{.py}
51804      # Assume that the variable 'document' has been set to an SBMLDocument object.
51805      status = document.convert(config)
51806      if status != LIBSBML_OPERATION_SUCCESS:
51807        # Handle error somehow.
51808        print('Error: conversion failed due to the following:')
51809        document.printErrors()
51810    @endcode
51811    @endif
51812    @if java
51813    @code{.java}
51814      // Assume that the variable 'document' has been set to an SBMLDocument object.
51815      status = document.convert(config);
51816      if (status != libsbml.LIBSBML_OPERATION_SUCCESS)
51817      {
51818        // Handle error somehow.
51819        System.out.println('Error: conversion failed due to the following:');
51820        document.printErrors();
51821      }
51822    @endcode
51823    @endif
51824
51825    Here is an example of using a converter that offers an option. The
51826    following code invokes SBMLStripPackageConverter to remove the
51827    SBML Level&nbsp;3 @em %Layout package from a model.  It sets the name
51828    of the package to be removed by adding a value for the option named
51829    @c 'package' defined by that converter:
51830
51831    @if cpp
51832    @code{.cpp}
51833    ConversionProperties props;
51834    props.addOption('stripPackage');
51835    props.addOption('package', 'layout');
51836
51837    int status = document->convert(props);
51838    if (status != LIBSBML_OPERATION_SUCCESS)
51839    {
51840        cerr << 'Unable to strip the Layout package from the model';
51841        cerr << 'Error returned: ' << status;
51842    }
51843    @endcode
51844    @endif
51845    @if python
51846    @code{.py}
51847    def strip_layout_example(document):
51848      config = ConversionProperties()
51849      if config != None:
51850        config.addOption('stripPackage')
51851        config.addOption('package', 'layout')
51852        status = document.convert(config)
51853        if status != LIBSBML_OPERATION_SUCCESS:
51854          # Handle error somehow.
51855          print('Error: unable to strip the Layout package.')
51856          print('LibSBML returned error: ' + OperationReturnValue_toString(status).strip())
51857      else:
51858        # Handle error somehow.
51859        print('Error: unable to create ConversionProperties object')
51860    @endcode
51861    @endif
51862    @if java
51863    @code{.java}
51864    ConversionProperties config = new ConversionProperties();
51865    if (config != None) {
51866      config.addOption('stripPackage');
51867      config.addOption('package', 'layout');
51868      status = document.convert(config);
51869      if (status != LIBSBML_OPERATION_SUCCESS) {
51870        // Handle error somehow.
51871        System.out.println('Error: unable to strip the Layout package');
51872        document.printErrors();
51873      }
51874    } else {
51875      // Handle error somehow.
51876      System.out.println('Error: unable to create ConversionProperties object');
51877    }
51878    @endcode
51879    @endif
51880
51881    @subsection available-converters Available SBML converters in libSBML
51882
51883    LibSBML provides a number of built-in converters; by convention, their
51884    names end in @em Converter. The following are the built-in converters
51885    provided by libSBML @htmlinclude libsbml-version.html:
51886
51887    @copydetails doc_list_of_libsbml_converters
51888
51889    """
51890
51891    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
51892    __repr__ = _swig_repr
51893
51894    @staticmethod
51895    def init():
51896        r"""
51897        init()
51898
51899        @internal
51900
51901        @internal
51902
51903        """
51904        return _libsbml.SBMLUnitsConverter_init()
51905
51906    def __init__(self, *args):
51907        r"""
51908        __init__(SBMLUnitsConverter self) -> SBMLUnitsConverter
51909        __init__(SBMLUnitsConverter self, SBMLUnitsConverter obj) -> SBMLUnitsConverter
51910
51911        This method has multiple variants; they differ in the arguments
51912         they accept.  Each variant is described separately below.
51913
51914        @par
51915        <hr>
51916        <span class='variant-sig-heading'>Method variant with the following signature</span>:
51917         <pre class='signature'>SBMLUnitsConverter()</pre>
51918
51919        Creates a new SBMLUnitsConverter object.
51920
51921
51922        @par
51923        <hr>
51924        <span class='variant-sig-heading'>Method variant with the following signature</span>:
51925         <pre class='signature'>SBMLUnitsConverter(SBMLUnitsConverter obj)</pre>
51926
51927        Copy constructor; creates a copy of an SBMLUnitsConverter
51928        object.
51929
51930        @param obj the SBMLUnitsConverter object to copy.
51931
51932        """
51933        _libsbml.SBMLUnitsConverter_swiginit(self, _libsbml.new_SBMLUnitsConverter(*args))
51934    __swig_destroy__ = _libsbml.delete_SBMLUnitsConverter
51935
51936    def clone(self):
51937        r"""
51938        clone(SBMLUnitsConverter self) -> SBMLUnitsConverter
51939
51940        Creates and returns a deep copy of this SBMLUnitsConverter
51941        object.
51942
51943        @return a (deep) copy of this converter.
51944
51945        """
51946        return _libsbml.SBMLUnitsConverter_clone(self)
51947
51948    def matchesProperties(self, props):
51949        r"""
51950        matchesProperties(SBMLUnitsConverter self, ConversionProperties props) -> bool
51951
51952        Returns @c True if this converter object's properties match the given
51953        properties.
51954
51955        A typical use of this method involves creating a ConversionProperties
51956        object, setting the options desired, and then calling this method on
51957        an SBMLUnitsConverter object to find out if the object's
51958        property values match the given ones.  This method is also used by
51959        SBMLConverterRegistry.getConverterFor()
51960        to search across all registered converters for one matching particular
51961        properties.
51962
51963        @param props the properties to match.
51964
51965        @return @c True if this converter's properties match, @c False
51966        otherwise.
51967
51968        """
51969        return _libsbml.SBMLUnitsConverter_matchesProperties(self, props)
51970
51971    def convert(self):
51972        r"""
51973        convert(SBMLUnitsConverter self) -> int
51974
51975        Perform the conversion.
51976
51977        This method causes the converter to do the actual conversion work,
51978        that is, to convert the SBMLDocument object set by
51979        SBMLConverter.setDocument() and
51980        with the configuration options set by
51981        SBMLConverter.setProperties().
51982
51983        @return integer value indicating success/failure of the
51984        function.  @if clike The value is drawn from the
51985        enumeration #OperationReturnValues_t. @endif@~ The possible values
51986        returned by this function are:
51987        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
51988        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
51989        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
51990        @li @link libsbml#LIBSBML_CONV_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_CONVERSION_NOT_AVAILABLE@endlink
51991        @li @link libsbml#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink
51992
51993        """
51994        return _libsbml.SBMLUnitsConverter_convert(self)
51995
51996    def getDefaultProperties(self):
51997        r"""
51998        getDefaultProperties(SBMLUnitsConverter self) -> ConversionProperties
51999
52000        Returns the default properties of this converter.
52001
52002        A given converter exposes one or more properties that can be adjusted
52003        in order to influence the behavior of the converter.  This method
52004        returns the @em default property settings for this converter.  It is
52005        meant to be called in order to discover all the settings for the
52006        converter object.
52007
52008        @return the ConversionProperties object describing the default properties
52009        for this converter.
52010
52011        """
52012        return _libsbml.SBMLUnitsConverter_getDefaultProperties(self)
52013
52014# Register SBMLUnitsConverter in _libsbml:
52015_libsbml.SBMLUnitsConverter_swigregister(SBMLUnitsConverter)
52016
52017def SBMLUnitsConverter_init():
52018    r"""
52019    SBMLUnitsConverter_init()
52020
52021    @internal
52022
52023    @internal
52024
52025    """
52026    return _libsbml.SBMLUnitsConverter_init()
52027
52028class SBMLValidator(object):
52029    r"""
52030
52031    @sbmlpackage{core}
52032
52033    @htmlinclude pkg-marker-core.html Base class for SBML validators.
52034
52035    @htmlinclude not-sbml-warning.html
52036
52037    LibSBML implements facilities for verifying that a given SBML document
52038    is valid according to the SBML specifications; it also exposes the
52039    validation interface so that user programs and SBML Level&nbsp;3 package
52040    authors may use the facilities to implement new validators.  There are
52041    two main interfaces to libSBML's validation facilities, based on the
52042    classes Validator and SBMLValidator.
52043
52044    The Validator class is the basis of the system for validating an SBML
52045    document against the validation rules defined in the SBML
52046    specifications.  The scheme used by Validator relies is compact and uses
52047    the @em visitor programming pattern, but it relies on C/C++ features and
52048    is not directly accessible from language bindings.  SBMLValidator offers
52049    a framework for straightforward class-based extensibility, so that user
52050    code can subclass SBMLValidator to implement new validation systems,
52051    different validators can be introduced or turned off at run-time, and
52052    interfaces can be provided in the libSBML language bindings.
52053    SBMLValidator can call Validator functionality internally (as is the
52054    case in the current implementation of SBMLInternalValidator) or use
52055    entirely different implementation approaches, as necessary.
52056
52057    Users of libSBML may already be familiar with the facilities encompassed
52058    by the validation system, in the form of the consistency-checking methods
52059    defined on SBMLDocument.  The methods SBMLDocument.setConsistencyChecks(),
52060    SBMLDocument.checkConsistency(), SBMLDocument.checkInternalConsistency()
52061    and other method of that sort are in fact implemented via SBMLValidator,
52062    specifically as methods on the class SBMLInternalValidator.
52063
52064    Authors may use SBMLValidator as the base class for their own validator
52065    extensions to libSBML.  The class SBMLInternalValidator may serve as a
52066    code example for how to implement such things.
52067
52068    """
52069
52070    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
52071    __repr__ = _swig_repr
52072
52073    def __init__(self, *args):
52074        r"""
52075        __init__(SBMLValidator self) -> SBMLValidator
52076        __init__(SBMLValidator self, SBMLValidator orig) -> SBMLValidator
52077
52078        This method has multiple variants; they differ in the arguments
52079         they accept.  Each variant is described separately below.
52080
52081        @par
52082        <hr>
52083        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52084         <pre class='signature'>SBMLValidator()</pre>
52085
52086        Creates a new SBMLValidator.
52087
52088
52089        @par
52090        <hr>
52091        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52092         <pre class='signature'>SBMLValidator(SBMLValidator orig)</pre>
52093
52094        Copy constructor; creates a copy of an SBMLValidator object.
52095
52096        @param orig the object to copy.
52097
52098        """
52099        if self.__class__ == SBMLValidator:
52100            _self = None
52101        else:
52102            _self = self
52103        _libsbml.SBMLValidator_swiginit(self, _libsbml.new_SBMLValidator(_self, *args))
52104    __swig_destroy__ = _libsbml.delete_SBMLValidator
52105
52106    def clone(self):
52107        r"""
52108        clone(SBMLValidator self) -> SBMLValidator
52109
52110        Creates and returns a deep copy of this SBMLValidator object.
52111
52112        @return the (deep) copy of this SBMLValidator object.
52113
52114        """
52115        return _libsbml.SBMLValidator_clone(self)
52116
52117    def getDocument(self, *args):
52118        r"""
52119        getDocument(SBMLValidator self) -> SBMLDocument
52120        getDocument(SBMLValidator self) -> SBMLDocument
52121
52122        Returns the current SBML document in use by this validator.
52123
52124        @return the current SBML document.
52125
52126        @see setDocument()
52127
52128        """
52129        return _libsbml.SBMLValidator_getDocument(self, *args)
52130
52131    def setDocument(self, doc):
52132        r"""
52133        setDocument(SBMLValidator self, SBMLDocument doc) -> int
52134
52135        Sets the current SBML document to the given SBMLDocument object.
52136
52137        @param doc the document to use for this validation.
52138
52139        @return integer value indicating success/failure of the
52140        function.  @if clike The value is drawn from the
52141        enumeration #OperationReturnValues_t. @endif@~ This particular
52142        function only does one thing irrespective of user input or
52143        object state, and thus will only return a single value:
52144        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
52145
52146        @see getDocument()
52147
52148        """
52149        return _libsbml.SBMLValidator_setDocument(self, doc)
52150
52151    def clearFailures(self):
52152        r"""
52153        clearFailures(SBMLValidator self)
52154
52155        Clears this validator's list of failures.
52156
52157        If you are validating multiple SBML documents with the same validator,
52158        call this method after you have processed the list of failures from
52159        the last validation run and before validating the next document.
52160
52161        @if clike @see getFailures() @endif@~
52162
52163        """
52164        return _libsbml.SBMLValidator_clearFailures(self)
52165
52166    def logFailure(self, err):
52167        r"""
52168        logFailure(SBMLValidator self, SBMLError err)
52169
52170        Adds the given failure to this list of Validators failures.
52171
52172        @param err an SBMLError object representing an error or warning.
52173
52174        @if clike @see getFailures() @endif@~
52175
52176        """
52177        return _libsbml.SBMLValidator_logFailure(self, err)
52178
52179    def validate(self, *args):
52180        r"""
52181        validate(SBMLValidator self) -> unsigned int
52182        validate(SBMLValidator self, SBMLDocument d) -> unsigned int
52183        validate(SBMLValidator self, string filename) -> unsigned int
52184
52185        This method has multiple variants; they differ in the arguments
52186         they accept.  Each variant is described separately below.
52187
52188        @par
52189        <hr>
52190        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52191         <pre class='signature'>validate(string filename)</pre>
52192
52193        Validates the SBML document located at the given @p filename.
52194
52195        This is a convenience method that saves callers the trouble of
52196        using SBMLReader to read the document first.
52197
52198        @param filename the path to the file to be read and validated.
52199
52200        @return the number of validation failures that occurred.  The objects
52201        describing the actual failures can be retrieved using getFailures().
52202
52203
52204        @par
52205        <hr>
52206        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52207         <pre class='signature'>validate()</pre>
52208
52209        Runs this validator on the current SBML document.
52210
52211        @return an integer value indicating the success/failure of the
52212        validation.  @if clike The value is drawn from the enumeration
52213        #OperationReturnValues_t. @endif@~ The possible values returned by this
52214        function are determined by the specific subclasses of this class.
52215
52216
52217        @par
52218        <hr>
52219        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52220         <pre class='signature'>validate(SBMLDocument d)</pre>
52221
52222        Validates the given SBMLDocument object.
52223
52224        This is identical to calling setDocument(@if java SBMLDocument @endif)
52225        followed by validate().
52226
52227        @param d the SBML document to validate.
52228
52229        @return the number of validation failures that occurred.  The objects
52230        describing the actual failures can be retrieved using getFailures().
52231
52232        """
52233        return _libsbml.SBMLValidator_validate(self, *args)
52234
52235    def getErrorLog(self):
52236        r"""
52237        getErrorLog(SBMLValidator self) -> SBMLErrorLog
52238
52239        Returns the list of errors or warnings logged during parsing,
52240        consistency checking, or attempted translation of this model.
52241
52242        Note that this refers to the SBMLDocument object's error log (i.e.,
52243        the list returned by SBMLDocument.getErrorLog()).  @em That list of
52244        errors and warnings is @em separate from the validation failures
52245        tracked by this validator (i.e., the list returned by getFailures()).
52246
52247        @return the SBMLErrorLog used for the SBMLDocument.
52248
52249        @if clike @see getFailures() @endif@~
52250
52251        """
52252        return _libsbml.SBMLValidator_getErrorLog(self)
52253
52254    def getModel(self, *args):
52255        r"""
52256        getModel(SBMLValidator self) -> Model
52257        getModel(SBMLValidator self) -> Model
52258
52259        Returns the Model object stored in the SBMLDocument.
52260
52261        It is important to note that this method <em>does not create</em> a
52262        Model instance.  The model in the SBMLDocument must have been created
52263        at some prior time, for example using SBMLDocument.createModel()
52264        or SBMLDocument.setModel().
52265        This method returns @c None if a model does not yet exist.
52266
52267        @return the Model contained in this validator's SBMLDocument object.
52268
52269        @see SBMLDocument.setModel()
52270        @see SBMLDocument.createModel()
52271
52272        """
52273        return _libsbml.SBMLValidator_getModel(self, *args)
52274
52275    def getNumFailures(self):
52276        r"""
52277        getNumFailures(SBMLValidator self) -> unsigned int
52278
52279        Returns the number of failures encountered in the last validation run.
52280
52281        This method returns the number of failures logged by this validator.
52282        This number only reflects @em this validator's actions; the number may
52283        not be the same as the number of errors and warnings logged on the
52284        SBMLDocument object's error log (i.e., the object returned by
52285        SBMLDocument.getErrorLog()), because other parts of libSBML may log
52286        errors and warnings beyond those found by this validator.
52287
52288        @return the number of errors logged by this validator.
52289
52290        """
52291        return _libsbml.SBMLValidator_getNumFailures(self)
52292
52293    def getFailure(self, n):
52294        r"""
52295        getFailure(SBMLValidator self, unsigned int n) -> SBMLError
52296
52297        Returns the failure object at index n in this validator's list of
52298        failures logged during the last run.
52299
52300        Callers should use getNumFailures() first, to find out the number
52301        of entries in this validator's list of failures.
52302
52303        @param n an integer indicating the index of the object to return from
52304        the failures list; index values start at 0.
52305
52306        @return the failure at the given index number.
52307
52308        @see getNumFailures()
52309
52310        """
52311        return _libsbml.SBMLValidator_getFailure(self, n)
52312    def __disown__(self):
52313        self.this.disown()
52314        _libsbml.disown_SBMLValidator(self)
52315        return weakref.proxy(self)
52316
52317# Register SBMLValidator in _libsbml:
52318_libsbml.SBMLValidator_swigregister(SBMLValidator)
52319
52320class SBMLExternalValidator(SBMLValidator):
52321    r"""
52322
52323    @sbmlpackage{core}
52324
52325    @htmlinclude pkg-marker-core.html
52326    @internal
52327
52328    """
52329
52330    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
52331    __repr__ = _swig_repr
52332
52333    def __init__(self, *args):
52334        r"""
52335        __init__(SBMLExternalValidator self) -> SBMLExternalValidator
52336        __init__(SBMLExternalValidator self, SBMLExternalValidator orig) -> SBMLExternalValidator
52337
52338        @sbmlpackage{core}
52339
52340        @htmlinclude pkg-marker-core.html
52341        @internal
52342
52343        """
52344        _libsbml.SBMLExternalValidator_swiginit(self, _libsbml.new_SBMLExternalValidator(*args))
52345
52346    def clone(self):
52347        r"""
52348        clone(SBMLExternalValidator self) -> SBMLValidator
52349
52350        @internal
52351
52352        @internal
52353
52354        """
52355        return _libsbml.SBMLExternalValidator_clone(self)
52356    __swig_destroy__ = _libsbml.delete_SBMLExternalValidator
52357
52358    def validate(self):
52359        r"""
52360        validate(SBMLExternalValidator self) -> unsigned int
52361
52362        @internal
52363
52364        @internal
52365
52366        """
52367        return _libsbml.SBMLExternalValidator_validate(self)
52368
52369    def getProgram(self):
52370        r"""
52371        getProgram(SBMLExternalValidator self) -> string
52372
52373        @internal
52374
52375        @internal
52376
52377        """
52378        return _libsbml.SBMLExternalValidator_getProgram(self)
52379
52380    def setProgram(self, program):
52381        r"""
52382        setProgram(SBMLExternalValidator self, string program)
52383
52384        @internal
52385
52386        @internal
52387
52388        """
52389        return _libsbml.SBMLExternalValidator_setProgram(self, program)
52390
52391    def getOutputFileName(self):
52392        r"""
52393        getOutputFileName(SBMLExternalValidator self) -> string
52394
52395        @internal
52396
52397        @internal
52398
52399        """
52400        return _libsbml.SBMLExternalValidator_getOutputFileName(self)
52401
52402    def setOutputFileName(self, outputFileName):
52403        r"""
52404        setOutputFileName(SBMLExternalValidator self, string outputFileName)
52405
52406        @internal
52407
52408        @internal
52409
52410        """
52411        return _libsbml.SBMLExternalValidator_setOutputFileName(self, outputFileName)
52412
52413    def getSBMLFileName(self):
52414        r"""
52415        getSBMLFileName(SBMLExternalValidator self) -> string
52416
52417        @internal
52418
52419        @internal
52420
52421        """
52422        return _libsbml.SBMLExternalValidator_getSBMLFileName(self)
52423
52424    def setSBMLFileName(self, sbmlFileName):
52425        r"""
52426        setSBMLFileName(SBMLExternalValidator self, string sbmlFileName)
52427
52428        @internal
52429
52430        @internal
52431
52432        """
52433        return _libsbml.SBMLExternalValidator_setSBMLFileName(self, sbmlFileName)
52434
52435    def clearArguments(self):
52436        r"""
52437        clearArguments(SBMLExternalValidator self)
52438
52439        @internal
52440
52441        @internal
52442
52443        """
52444        return _libsbml.SBMLExternalValidator_clearArguments(self)
52445
52446    def addArgument(self, arg):
52447        r"""
52448        addArgument(SBMLExternalValidator self, string arg)
52449
52450        @internal
52451
52452        @internal
52453
52454        """
52455        return _libsbml.SBMLExternalValidator_addArgument(self, arg)
52456
52457    def getNumArguments(self):
52458        r"""
52459        getNumArguments(SBMLExternalValidator self) -> unsigned int
52460
52461        @internal
52462
52463        @internal
52464
52465        """
52466        return _libsbml.SBMLExternalValidator_getNumArguments(self)
52467
52468    def getArgument(self, n):
52469        r"""
52470        getArgument(SBMLExternalValidator self, unsigned int n) -> string
52471
52472        @internal
52473
52474        @internal
52475
52476        """
52477        return _libsbml.SBMLExternalValidator_getArgument(self, n)
52478
52479# Register SBMLExternalValidator in _libsbml:
52480_libsbml.SBMLExternalValidator_swigregister(SBMLExternalValidator)
52481
52482class XMLAttributes(object):
52483    r"""
52484
52485    @sbmlpackage{core}
52486
52487    @htmlinclude pkg-marker-core.html A list of attributes on an XML element.
52488
52489    @htmlinclude not-sbml-warning.html
52490
52491    In libSBML's XML interface layer, attributes on an element are stored as a
52492    list of values kept in an XMLAttributes object.  XMLAttributes has methods
52493    for adding and removing individual attributes as well as performing other
52494    actions on the list of attributes.  Classes in libSBML that represent nodes
52495    in an XML document (i.e., XMLNode and its parent class, XMLToken) use
52496    XMLAttributes objects to manage attributes on XML elements.
52497
52498    Attributes on an XML element can be written in one of two forms:
52499    @li <code>name='value'</code>
52500    @li <code>prefix:name='value'</code>
52501
52502    An attribute in XML must always have a value, and the value must always be
52503    a quoted string; i.e., it is always <code>name='value'</code> and not
52504    <code>name=value</code>.  An empty value is represented simply as an
52505    empty string; i.e., <code>name=''</code>.
52506
52507    In cases when a <code>prefix</code> is provided with an attribute name,
52508    general XML validity rules require that the prefix is an XML namespace
52509    prefix that has been declared somewhere else (possibly as an another
52510    attribute on the same element).  However, the XMLAttributes class does
52511    @em not test for the proper existence or declaration of XML
52512    namespaces&mdash;callers must arrange to do this themselves in some other
52513    way.  This class only provides facilities for tracking and manipulating
52514    attributes and their prefix/URI/name/value components.
52515
52516    @note Note that although XMLAttributes provides operations that can
52517    manipulate attributes based on a numerical index, XML attributes are in
52518    fact unordered when they appear in files and data streams.  The
52519    XMLAttributes class provides some list-like facilities, but it is only for
52520    the convenience of callers.  (For example, it permits callers to loop
52521    across all attributes more easily.)  Users should keep in mind that the
52522    order in which attributes are stored in XMLAttributes objects has no real
52523    impact on the order in which the attributes are read or written from an
52524    XML file or data stream.
52525
52526    @see XMLTriple
52527    @see XMLNode
52528    @see XMLToken
52529
52530    """
52531
52532    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
52533    __repr__ = _swig_repr
52534    __swig_destroy__ = _libsbml.delete_XMLAttributes
52535
52536    def __init__(self, *args):
52537        r"""
52538        __init__(XMLAttributes self) -> XMLAttributes
52539        __init__(XMLAttributes self, XMLAttributes orig) -> XMLAttributes
52540
52541        This method has multiple variants; they differ in the arguments
52542         they accept.  Each variant is described separately below.
52543
52544        @par
52545        <hr>
52546        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52547         <pre class='signature'>XMLAttributes()</pre>
52548
52549        Creates a new, empty XMLAttributes object.
52550
52551
52552        @par
52553        <hr>
52554        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52555         <pre class='signature'>XMLAttributes(XMLAttributes orig)</pre>
52556
52557        Copy constructor; creates a copy of this XMLAttributes object.
52558
52559        @p orig the XMLAttributes object to copy.
52560
52561        """
52562        _libsbml.XMLAttributes_swiginit(self, _libsbml.new_XMLAttributes(*args))
52563
52564    def clone(self):
52565        r"""
52566        clone(XMLAttributes self) -> XMLAttributes
52567
52568        Creates and returns a deep copy of this XMLAttributes object.
52569
52570        @return the (deep) copy of this XMLAttributes object.
52571
52572        """
52573        return _libsbml.XMLAttributes_clone(self)
52574
52575    def add(self, *args):
52576        r"""
52577        add(XMLAttributes self, string name, string value, string namespaceURI="", string prefix="") -> int
52578        add(XMLAttributes self, XMLTriple triple, string value) -> int
52579
52580        This method has multiple variants; they differ in the arguments
52581         they accept.  Each variant is described separately below.
52582
52583        @par
52584        <hr>
52585        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52586         <pre class='signature'>add(  string name , string value , string namespaceURI = '' , string prefix = '')</pre>
52587
52588        Adds an attribute to this list of attributes.
52589
52590        @par
52591        Some explanations are in order about the behavior of XMLAttributes with
52592        respect to namespace prefixes and namespace URIs.  XMLAttributes does @em
52593        not verify the consistency of different uses of an XML namespace and the
52594        prefix used to refer to it in a given context.  It cannot, because the
52595        prefix used for a given XML namespace in an XML document may intentionally
52596        be different on different elements in the document.  Consequently, callers
52597        need to manage their own prefix-to-namespace mappings, and need to ensure
52598        that the desired prefix is used in any given context.
52599
52600        When called with attribute names, prefixes and namespace URIs,
52601        XMLAttributes pays attention to the namespace URIs and not the prefixes: a
52602        match is established by a combination of attribute name and namespace URI,
52603        and if on different occasions a different prefix is used for the same
52604        name/namespace combination, the prefix associated with the namespace on
52605        that attribute is overwritten.
52606
52607        Some examples will hopefully clarify this.  Here are the results of a
52608        sequence of calls to the XMLAttributes <code>add</code> methods with
52609        different argument combinations.  First, we create the object and add
52610        one attribute:
52611
52612        @code{.cpp}
52613        XMLAttributes  att = new XMLAttributes();
52614        att->add('myattribute', '1', 'myuri');
52615        @endcode
52616        The above adds an attribute named <code>myattribute</code> in the namespace
52617        <code>myuri</code>, and with the attribute value <code>1</code>.  No
52618        namespace prefix is associated with the attribute (but the attribute is
52619        recorded to exist in the namespace <code>myuri</code>).  If
52620        this attribute object were written out in XML, it would look like the
52621        following (and note that, since no namespace prefix was assigned, none
52622        is written out):
52623        <center><pre>
52624        myattribute='1'
52625        </pre></center>
52626
52627        Continuing with this series of examples, suppose we invoke the
52628        <code>add</code> method again as follows:
52629
52630        @code{.cpp}
52631        att->add('myattribute', '2');
52632        @endcode
52633        The above adds a @em new attribute @em also named <code>myattribute</code>,
52634        but in a different XML namespace: it is placed in the namespace with no
52635        URI, which is to say, the default XML namespace.  Both attributes coexist
52636        on this XMLAttributes object; both can be independently retrieved.
52637
52638        @code{.cpp}
52639        att->add('myattribute', '3');
52640        @endcode
52641        The code above now replaces the value of the attribute
52642        <code>myattribute</code> that resides in the default namespace.  The
52643        attribute in the namespace <code>myuri</code> remains untouched.
52644
52645        @code{.cpp}
52646        att->add('myattribute', '4', 'myuri');
52647        @endcode
52648        The code above replaces the value of the attribute
52649        <code>myattribute</code> that resides in the <code>myuri</code> namespace.
52650        The attribute in the default namespace remains untouched.
52651
52652        @code{.cpp}
52653        att->add('myattribute', '5', 'myuri', 'foo');
52654        @endcode
52655        The code above replaces the value of the attribute
52656        <code>myattribute</code> that resides in the <code>myuri</code> namespace.
52657        It also now assigns a namespace prefix, <code>foo</code>, to the attribute.
52658        The attribute <code>myattribute</code> in the default namespace remains
52659        untouched. If this XMLAttributes object were written out in XML, it would
52660        look like the following:
52661        <center><pre>
52662        myattribute='3'
52663        foo:myattribute='5'
52664        </pre></center>
52665        Pressing on, now suppose we call the <code>add</code> method as follows:
52666
52667        @code{.cpp}
52668        att->add('myattribute', '6', 'myuri', 'bar');
52669        @endcode
52670        The code above replaces the value of the attribute
52671        <code>myattribute</code> that resides in the <code>myuri</code> namespace.
52672        It also assigns a different prefix to the attribute.  The namespace of
52673        the attribute remains <code>myuri</code>.
52674
52675        @code{.cpp}
52676        att->add('myattribute', '7', '', 'foo');
52677        @endcode
52678        The code above replaces the value of the attribute
52679        <code>myattribute</code> that resides in the default namespace.  It also
52680        now assigns a namespace prefix, <code>foo</code>, to that attribute.  If
52681        this XMLAttributes object were written out in XML, it would look like the
52682        following:
52683        <center><pre>
52684        bar:myattribute='6'
52685        foo:myattribute='7'
52686        </pre></center>
52687
52688        @param name a string, the unprefixed name of the attribute.
52689        @param value a string, the value of the attribute.
52690        @param namespaceURI a string, the namespace URI of the attribute.
52691        @param prefix a string, a prefix for the XML namespace.
52692
52693        @return integer value indicating success/failure of the
52694        function.  @if clike The value is drawn from the
52695        enumeration #OperationReturnValues_t. @endif@~ The possible values
52696        returned by this function are:
52697        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
52698        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
52699        &ndash; this value is returned if any of the arguments are @c None.  To
52700        set an empty @p prefix and/or @p name value, use an empty string rather
52701        than @c None.
52702
52703        @note If an attribute with the same name and XML namespace URI already
52704        exists in the list of attributes held by this XMLAttributes object, then
52705        the previous value of that attribute will be replaced with the new value
52706        provided to this method.
52707
52708        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
52709
52710        @see add()
52711        @see getIndex()
52712        @see getIndex()
52713        @see hasAttribute()
52714        @see hasAttribute()
52715
52716
52717
52718        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
52719
52720
52721        @par
52722        <hr>
52723        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52724         <pre class='signature'>add( XMLTriple triple, string value)</pre>
52725
52726        Adds an attribute to this list of attributes.
52727
52728        @par
52729        Some explanations are in order about the behavior of XMLAttributes with
52730        respect to namespace prefixes and namespace URIs.  XMLAttributes does @em
52731        not verify the consistency of different uses of an XML namespace and the
52732        prefix used to refer to it in a given context.  It cannot, because the
52733        prefix used for a given XML namespace in an XML document may intentionally
52734        be different on different elements in the document.  Consequently, callers
52735        need to manage their own prefix-to-namespace mappings, and need to ensure
52736        that the desired prefix is used in any given context.
52737
52738        When called with attribute names, prefixes and namespace URIs,
52739        XMLAttributes pays attention to the namespace URIs and not the prefixes: a
52740        match is established by a combination of attribute name and namespace URI,
52741        and if on different occasions a different prefix is used for the same
52742        name/namespace combination, the prefix associated with the namespace on
52743        that attribute is overwritten.
52744
52745        Some examples will hopefully clarify this.  Here are the results of a
52746        sequence of calls to the XMLAttributes <code>add</code> methods with
52747        different argument combinations.  First, we create the object and add
52748        one attribute:
52749
52750        @code{.cpp}
52751        XMLAttributes  att = new XMLAttributes();
52752        att->add('myattribute', '1', 'myuri');
52753        @endcode
52754        The above adds an attribute named <code>myattribute</code> in the namespace
52755        <code>myuri</code>, and with the attribute value <code>1</code>.  No
52756        namespace prefix is associated with the attribute (but the attribute is
52757        recorded to exist in the namespace <code>myuri</code>).  If
52758        this attribute object were written out in XML, it would look like the
52759        following (and note that, since no namespace prefix was assigned, none
52760        is written out):
52761        <center><pre>
52762        myattribute='1'
52763        </pre></center>
52764
52765        Continuing with this series of examples, suppose we invoke the
52766        <code>add</code> method again as follows:
52767
52768        @code{.cpp}
52769        att->add('myattribute', '2');
52770        @endcode
52771        The above adds a @em new attribute @em also named <code>myattribute</code>,
52772        but in a different XML namespace: it is placed in the namespace with no
52773        URI, which is to say, the default XML namespace.  Both attributes coexist
52774        on this XMLAttributes object; both can be independently retrieved.
52775
52776        @code{.cpp}
52777        att->add('myattribute', '3');
52778        @endcode
52779        The code above now replaces the value of the attribute
52780        <code>myattribute</code> that resides in the default namespace.  The
52781        attribute in the namespace <code>myuri</code> remains untouched.
52782
52783        @code{.cpp}
52784        att->add('myattribute', '4', 'myuri');
52785        @endcode
52786        The code above replaces the value of the attribute
52787        <code>myattribute</code> that resides in the <code>myuri</code> namespace.
52788        The attribute in the default namespace remains untouched.
52789
52790        @code{.cpp}
52791        att->add('myattribute', '5', 'myuri', 'foo');
52792        @endcode
52793        The code above replaces the value of the attribute
52794        <code>myattribute</code> that resides in the <code>myuri</code> namespace.
52795        It also now assigns a namespace prefix, <code>foo</code>, to the attribute.
52796        The attribute <code>myattribute</code> in the default namespace remains
52797        untouched. If this XMLAttributes object were written out in XML, it would
52798        look like the following:
52799        <center><pre>
52800        myattribute='3'
52801        foo:myattribute='5'
52802        </pre></center>
52803        Pressing on, now suppose we call the <code>add</code> method as follows:
52804
52805        @code{.cpp}
52806        att->add('myattribute', '6', 'myuri', 'bar');
52807        @endcode
52808        The code above replaces the value of the attribute
52809        <code>myattribute</code> that resides in the <code>myuri</code> namespace.
52810        It also assigns a different prefix to the attribute.  The namespace of
52811        the attribute remains <code>myuri</code>.
52812
52813        @code{.cpp}
52814        att->add('myattribute', '7', '', 'foo');
52815        @endcode
52816        The code above replaces the value of the attribute
52817        <code>myattribute</code> that resides in the default namespace.  It also
52818        now assigns a namespace prefix, <code>foo</code>, to that attribute.  If
52819        this XMLAttributes object were written out in XML, it would look like the
52820        following:
52821        <center><pre>
52822        bar:myattribute='6'
52823        foo:myattribute='7'
52824        </pre></center>
52825
52826        @param triple an XMLTriple object describing the attribute to be added.
52827        @param value a string, the value of the attribute.
52828
52829        @return integer value indicating success/failure of the
52830        function.  @if clike The value is drawn from the
52831        enumeration #OperationReturnValues_t. @endif@~ The possible values
52832        returned by this function are:
52833        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
52834        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
52835        &ndash; this value is returned if any of the arguments are @c None.  To
52836        set an empty value for the attribute, use an empty string rather than
52837        @c None.
52838
52839        @note If an attribute with the same name and XML namespace URI already
52840        exists in the list of attributes held by this XMLAttributes object, then
52841        the previous value of that attribute will be replaced with the new value
52842        provided to this method.
52843
52844        @see add()
52845        @see getIndex()
52846        @see getIndex()
52847        @see hasAttribute()
52848        @see hasAttribute()
52849
52850        """
52851        return _libsbml.XMLAttributes_add(self, *args)
52852
52853    def removeResource(self, n):
52854        r"""
52855        removeResource(XMLAttributes self, int n) -> int
52856
52857        @internal
52858
52859        @internal
52860
52861        """
52862        return _libsbml.XMLAttributes_removeResource(self, n)
52863
52864    def remove(self, *args):
52865        r"""
52866        remove(XMLAttributes self, int n) -> int
52867        remove(XMLAttributes self, string name, string uri="") -> int
52868        remove(XMLAttributes self, XMLTriple triple) -> int
52869
52870        This method has multiple variants; they differ in the arguments
52871         they accept.  Each variant is described separately below.
52872
52873        @par
52874        <hr>
52875        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52876         <pre class='signature'>remove(string name, string uri = '')</pre>
52877
52878        Removes a named attribute from this list of attributes.
52879
52880        @param name a string, the unprefixed name of the attribute to be
52881        removed.
52882
52883        @param uri a string, the namespace URI of the attribute to be removed.
52884
52885        @return integer value indicating success/failure of the
52886        function.  @if clike The value is drawn from the
52887        enumeration #OperationReturnValues_t. @endif@~ The possible values
52888        returned by this function are:
52889        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
52890        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
52891
52892        The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute with the
52893        given @p name (and @p uri if specified).
52894
52895        @see remove()
52896        @see remove()
52897
52898
52899
52900        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
52901
52902
52903        @par
52904        <hr>
52905        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52906         <pre class='signature'>remove(int n)</pre>
52907
52908        Removes the <em>n</em>th attribute from this list of attributes.
52909
52910        @param n an integer the index of the resource to be deleted.
52911
52912        @return integer value indicating success/failure of the
52913        function.  @if clike The value is drawn from the
52914        enumeration #OperationReturnValues_t. @endif@~ The possible values
52915        returned by this function are:
52916        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
52917        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
52918
52919        The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute at the
52920        given index @p n.
52921
52922        @note Note that although XMLAttributes provides operations that can
52923        manipulate attributes based on a numerical index, XML attributes are in
52924        fact unordered when they appear in files and data streams.  The
52925        XMLAttributes class provides some list-like facilities, but it is only for
52926        the convenience of callers.  (For example, it permits callers to loop
52927        across all attributes more easily.)  Users should keep in mind that the
52928        order in which attributes are stored in XMLAttributes objects has no real
52929        impact on the order in which the attributes are read or written from an
52930        XML file or data stream.
52931
52932        @see getLength()
52933        @see remove()
52934        @see remove()
52935
52936
52937        @par
52938        <hr>
52939        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52940         <pre class='signature'>remove(XMLTriple triple)</pre>
52941
52942        Removes a specific attribute from this list of attributes.
52943
52944        @param triple an XMLTriple describing the attribute to be removed.
52945
52946        @return integer value indicating success/failure of the
52947        function.  @if clike The value is drawn from the
52948        enumeration #OperationReturnValues_t. @endif@~ The possible values
52949        returned by this function are:
52950        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
52951        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
52952
52953        The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute matching
52954        the properties of the given @p triple.
52955
52956        @see remove()
52957        @see remove()
52958
52959        """
52960        return _libsbml.XMLAttributes_remove(self, *args)
52961
52962    def clear(self):
52963        r"""
52964        clear(XMLAttributes self) -> int
52965
52966        Removes all attributes in this XMLAttributes object.
52967
52968        @return integer value indicating success/failure of the
52969        function.  @if clike The value is drawn from the
52970        enumeration #OperationReturnValues_t. @endif@~ This particular
52971        function only does one thing irrespective of user input or
52972        object state, and thus will only return a single value:
52973        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
52974
52975        @see remove()
52976        @see remove()
52977        @see remove()
52978
52979        """
52980        return _libsbml.XMLAttributes_clear(self)
52981
52982    def getIndex(self, *args):
52983        r"""
52984        getIndex(XMLAttributes self, string name) -> int
52985        getIndex(XMLAttributes self, string name, string uri) -> int
52986        getIndex(XMLAttributes self, XMLTriple triple) -> int
52987
52988        This method has multiple variants; they differ in the arguments
52989         they accept.  Each variant is described separately below.
52990
52991        @par
52992        <hr>
52993        <span class='variant-sig-heading'>Method variant with the following signature</span>:
52994         <pre class='signature'>getIndex(XMLTriple triple)</pre>
52995
52996        Returns the index of the attribute defined by the given XMLTriple object.
52997
52998        @param triple an XMLTriple describing the attribute being sought.
52999
53000        @return the index of an attribute described by the given XMLTriple
53001        object, or <code>-1</code> if no such attribute is present.
53002
53003        @see hasAttribute()
53004        @see hasAttribute()
53005
53006
53007        @par
53008        <hr>
53009        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53010         <pre class='signature'>getIndex(string name, string uri)</pre>
53011
53012        Returns the index of the attribute having a given name and XML namespace
53013        URI.
53014
53015        @param name a string, the name of the attribute being sought.
53016        @param uri  a string, the namespace URI of the attribute being sought.
53017
53018        @return the index of an attribute with the given local name and
53019        namespace URI, or <code>-1</code> if no such attribute is present.
53020
53021        @see hasAttribute()
53022        @see hasAttribute()
53023
53024
53025        @par
53026        <hr>
53027        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53028         <pre class='signature'>getIndex(string name)</pre>
53029
53030        Returns the index of an attribute having a given name.
53031
53032        @note This method does not check XML namespaces.  Thus, if there are
53033        multiple attributes with the same local @p name but different
53034        namespaces, this method will return the first one found.  Callers should
53035        use the more specific methods
53036        XMLAttributes.getIndex()
53037        or XMLAttributes.getIndex()
53038        to find attributes in particular namespaces.
53039
53040        @param name a string, the name of the attribute whose index is begin
53041        sought.
53042
53043        @return the index of an attribute with the given local name, or
53044        <code>-1</code> if no such attribute is present.
53045
53046        @see hasAttribute()
53047        @see hasAttribute()
53048
53049        """
53050        return _libsbml.XMLAttributes_getIndex(self, *args)
53051
53052    def getLength(self):
53053        r"""
53054        getLength(XMLAttributes self) -> int
53055
53056        Returns the number of attributes in this list of attributes.
53057
53058        @return the number of attributes contained in this XMLAttributes object.
53059
53060        """
53061        return _libsbml.XMLAttributes_getLength(self)
53062
53063    def getNumAttributes(self):
53064        r"""
53065        getNumAttributes(XMLAttributes self) -> int
53066
53067        Returns the number of attributes in this list of attributes.
53068
53069        This function is merely an alias of XMLAttributes.getLength()
53070        introduced for consistency with other libXML classes.
53071
53072        @return the number of attributes contained in this XMLAttributes object.
53073
53074        """
53075        return _libsbml.XMLAttributes_getNumAttributes(self)
53076
53077    def getName(self, index):
53078        r"""
53079        getName(XMLAttributes self, int index) -> string
53080
53081        Returns the name of the <em>n</em>th attribute in this list of
53082        attributes.
53083
53084        @param index an integer, the position of the attribute whose name
53085        is being sought.
53086
53087        @return the local name of the <em>n</em>th attribute.
53088
53089        @note If @p index is out of range, this method will return an empty
53090        string.  Callers should use XMLAttributes.getLength() to check the number
53091        of attributes contained in this object or XMLAttributes.hasAttribute()  to test for the existence of an attribute at a given
53092        position.
53093
53094        @note Note that although XMLAttributes provides operations that can
53095        manipulate attributes based on a numerical index, XML attributes are in
53096        fact unordered when they appear in files and data streams.  The
53097        XMLAttributes class provides some list-like facilities, but it is only for
53098        the convenience of callers.  (For example, it permits callers to loop
53099        across all attributes more easily.)  Users should keep in mind that the
53100        order in which attributes are stored in XMLAttributes objects has no real
53101        impact on the order in which the attributes are read or written from an
53102        XML file or data stream.
53103
53104        @see getLength()
53105        @see hasAttribute()
53106
53107        """
53108        return _libsbml.XMLAttributes_getName(self, index)
53109
53110    def getPrefix(self, index):
53111        r"""
53112        getPrefix(XMLAttributes self, int index) -> string
53113
53114        Returns the namespace prefix of the <em>n</em>th attribute in this
53115        attribute set.
53116
53117        @param index an integer, the position of the attribute whose namespace
53118        prefix is being sought.
53119
53120        @return the XML namespace prefix of the <em>n</em>th attribute.
53121
53122        @note If @p index is out of range, this method will return an empty
53123        string.  Callers should use XMLAttributes.getLength() to check the number
53124        of attributes contained in this object or XMLAttributes.hasAttribute()  to test for the existence of an attribute at a given
53125        position.
53126
53127        @note Note that although XMLAttributes provides operations that can
53128        manipulate attributes based on a numerical index, XML attributes are in
53129        fact unordered when they appear in files and data streams.  The
53130        XMLAttributes class provides some list-like facilities, but it is only for
53131        the convenience of callers.  (For example, it permits callers to loop
53132        across all attributes more easily.)  Users should keep in mind that the
53133        order in which attributes are stored in XMLAttributes objects has no real
53134        impact on the order in which the attributes are read or written from an
53135        XML file or data stream.
53136
53137        @see getLength()
53138        @see hasAttribute()
53139
53140        """
53141        return _libsbml.XMLAttributes_getPrefix(self, index)
53142
53143    def getPrefixedName(self, index):
53144        r"""
53145        getPrefixedName(XMLAttributes self, int index) -> string
53146
53147        Returns the prefix name of the <em>n</em>th attribute in this attribute
53148        set.
53149
53150        @param index an integer, the position of the attribute whose prefixed
53151        name is being sought.
53152
53153        @return the prefixed name of the <em>n</em>th attribute.
53154
53155        @note If @p index is out of range, this method will return an empty
53156        string.  Callers should use XMLAttributes.getLength() to check the number
53157        of attributes contained in this object or XMLAttributes.hasAttribute()  to test for the existence of an attribute at a given
53158        position.
53159
53160        @note Note that although XMLAttributes provides operations that can
53161        manipulate attributes based on a numerical index, XML attributes are in
53162        fact unordered when they appear in files and data streams.  The
53163        XMLAttributes class provides some list-like facilities, but it is only for
53164        the convenience of callers.  (For example, it permits callers to loop
53165        across all attributes more easily.)  Users should keep in mind that the
53166        order in which attributes are stored in XMLAttributes objects has no real
53167        impact on the order in which the attributes are read or written from an
53168        XML file or data stream.
53169
53170        @see getLength()
53171        @see hasAttribute()
53172
53173        """
53174        return _libsbml.XMLAttributes_getPrefixedName(self, index)
53175
53176    def getURI(self, index):
53177        r"""
53178        getURI(XMLAttributes self, int index) -> string
53179
53180        Returns the XML namespace URI of the <em>n</em>th attribute in this
53181        attribute set.
53182
53183        @param index an integer, the position of the attribute whose namespace
53184        URI is being sought.
53185
53186        @return the XML namespace URI of the <em>n</em>th attribute.
53187
53188        @note If @p index is out of range, this method will return an empty
53189        string.  Callers should use XMLAttributes.getLength() to check the number
53190        of attributes contained in this object or XMLAttributes.hasAttribute()  to test for the existence of an attribute at a given
53191        position.
53192
53193        @note Note that although XMLAttributes provides operations that can
53194        manipulate attributes based on a numerical index, XML attributes are in
53195        fact unordered when they appear in files and data streams.  The
53196        XMLAttributes class provides some list-like facilities, but it is only for
53197        the convenience of callers.  (For example, it permits callers to loop
53198        across all attributes more easily.)  Users should keep in mind that the
53199        order in which attributes are stored in XMLAttributes objects has no real
53200        impact on the order in which the attributes are read or written from an
53201        XML file or data stream.
53202
53203        @see getLength()
53204        @see hasAttribute()
53205
53206        """
53207        return _libsbml.XMLAttributes_getURI(self, index)
53208
53209    def getValue(self, *args):
53210        r"""
53211        getValue(XMLAttributes self, int index) -> string
53212        getValue(XMLAttributes self, string name) -> string
53213        getValue(XMLAttributes self, string name, string uri) -> string
53214        getValue(XMLAttributes self, XMLTriple triple) -> string
53215
53216        This method has multiple variants; they differ in the arguments
53217         they accept.  Each variant is described separately below.
53218
53219        @par
53220        <hr>
53221        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53222         <pre class='signature'>getValue(XMLTriple triple)</pre>
53223
53224        Return the value of an attribute described by a given XMLTriple object.
53225
53226        @param triple an XMLTriple describing the attribute whose value is being
53227        sought.
53228
53229        @return The attribute value as a string.
53230
53231        @note If an attribute with the properties given by @p triple does not
53232        exist in this XMLAttributes object, this method will return an empty
53233        string.  Callers can use
53234        XMLAttributes.hasAttribute()
53235        to test for an attribute's existence.
53236
53237        @see hasAttribute()
53238        @see hasAttribute()
53239
53240
53241        @par
53242        <hr>
53243        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53244         <pre class='signature'>getValue(int index)</pre>
53245
53246        Returns the value of the <em>n</em>th attribute in this list of attributes.
53247
53248        @param index an integer, the position of the attribute whose value is
53249        being sought.
53250
53251        @return the XML value of the <em>n</em>th attribute.
53252
53253        @note If @p index is out of range, this method will return an empty
53254        string.  Callers should use XMLAttributes.getLength() to check the number
53255        of attributes contained in this object or XMLAttributes.hasAttribute()  to test for the existence of an attribute at a given
53256        position.
53257
53258        @note Note that although XMLAttributes provides operations that can
53259        manipulate attributes based on a numerical index, XML attributes are in
53260        fact unordered when they appear in files and data streams.  The
53261        XMLAttributes class provides some list-like facilities, but it is only for
53262        the convenience of callers.  (For example, it permits callers to loop
53263        across all attributes more easily.)  Users should keep in mind that the
53264        order in which attributes are stored in XMLAttributes objects has no real
53265        impact on the order in which the attributes are read or written from an
53266        XML file or data stream.
53267
53268        @see getLength()
53269        @see hasAttribute()
53270
53271
53272        @par
53273        <hr>
53274        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53275         <pre class='signature'>getValue(string name)</pre>
53276
53277        Returns a named attribute's value.
53278
53279        @param name a string, the unprefixed name of the attribute whose value
53280        is being sought.
53281
53282        @return The attribute value as a string.
53283
53284        @note If an attribute with the given local @p name does not exist in
53285        this XMLAttributes object, this method will return an empty string.
53286        Callers can use
53287        XMLAttributes.hasAttribute()
53288        to test for an attribute's existence.  This method also does not check
53289        the XML namespace of the named attribute.  Thus, if there are multiple
53290        attributes with the same local @p name but different namespaces, this
53291        method will return the value of the first such attribute found.  Callers
53292        should use the more specific methods
53293        XMLAttributes.getIndex()
53294        or XMLAttributes.getIndex()  to find
53295        attributes in particular namespaces.
53296
53297        @see hasAttribute()
53298        @see hasAttribute()
53299
53300
53301        @par
53302        <hr>
53303        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53304         <pre class='signature'>getValue(string name, string uri)</pre>
53305
53306        Returns a named attribute's value.
53307
53308        @param name a string, the name of the attribute whose value is being sought.
53309        @param uri  a string, the XML namespace URI of the attribute.
53310
53311        @return The attribute value as a string.
53312
53313        @note If an attribute with the given @p name and namespace @p uri does
53314        not exist in this XMLAttributes object, this method will return an empty
53315        string.  Callers can use
53316        XMLAttributes.hasAttribute()
53317        to test for an attribute's existence.
53318
53319        @see hasAttribute()
53320        @see hasAttribute()
53321
53322        """
53323        return _libsbml.XMLAttributes_getValue(self, *args)
53324
53325    def hasAttribute(self, *args):
53326        r"""
53327        hasAttribute(XMLAttributes self, int index) -> bool
53328        hasAttribute(XMLAttributes self, string name, string uri="") -> bool
53329        hasAttribute(XMLAttributes self, XMLTriple triple) -> bool
53330
53331        This method has multiple variants; they differ in the arguments
53332         they accept.  Each variant is described separately below.
53333
53334        @par
53335        <hr>
53336        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53337         <pre class='signature'>hasAttribute(string name, string uri='')</pre>
53338
53339        Returns @c True if an attribute with a given name and namespace URI
53340        exists.
53341
53342        @param name a string, the unprefixed name of the attribute.
53343        @param uri  a string, the XML namespace URI of the attribute.
53344
53345        @return @c True if an attribute with the given local name and XML
53346        namespace URI exists in this XMLAttributes object, @c False otherwise.
53347
53348        @see add()
53349        @see add()
53350
53351
53352        @par
53353        <hr>
53354        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53355         <pre class='signature'>hasAttribute(XMLTriple triple)</pre>
53356
53357        Returns @c True if an attribute with the given properties exists.
53358
53359        @param triple an XMLTriple describing the attribute to be tested.
53360
53361        @return @c True if an attribute with the given XML triple exists in this
53362        XMLAttributes object, @c False otherwise.
53363
53364        @see add()
53365        @see add()
53366
53367
53368        @par
53369        <hr>
53370        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53371         <pre class='signature'>hasAttribute(int index)</pre>
53372
53373        Returns @c True if an attribute exists at a given index.
53374
53375        @param index an integer, the position of the attribute to be tested.
53376
53377        @return @c True if an attribute with the given index exists in this
53378        XMLAttributes object, @c False otherwise.
53379
53380        @note Note that although XMLAttributes provides operations that can
53381        manipulate attributes based on a numerical index, XML attributes are in
53382        fact unordered when they appear in files and data streams.  The
53383        XMLAttributes class provides some list-like facilities, but it is only for
53384        the convenience of callers.  (For example, it permits callers to loop
53385        across all attributes more easily.)  Users should keep in mind that the
53386        order in which attributes are stored in XMLAttributes objects has no real
53387        impact on the order in which the attributes are read or written from an
53388        XML file or data stream.
53389
53390        """
53391        return _libsbml.XMLAttributes_hasAttribute(self, *args)
53392
53393    def isEmpty(self):
53394        r"""
53395        isEmpty(XMLAttributes self) -> bool
53396
53397        Returns @c True if this list of attributes is empty.
53398
53399        @return @c True if this XMLAttributes object is empty, @c False
53400        otherwise.
53401
53402        """
53403        return _libsbml.XMLAttributes_isEmpty(self)
53404
53405    def __eq__(self, rhs):
53406      if ((self is None) and (rhs is None)): return True
53407      if ((self is None) or  (rhs is None)): return False
53408      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
53409        if (self.this == rhs.this): return True
53410      return False
53411
53412    def __ne__(self, rhs):
53413      if ((self is None) and (rhs is None)): return False
53414      if ((self is None) or  (rhs is None)): return True
53415      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
53416        if (self.this == rhs.this): return False
53417      return True
53418
53419
53420# Register XMLAttributes in _libsbml:
53421_libsbml.XMLAttributes_swigregister(XMLAttributes)
53422
53423class XMLNamespaces(object):
53424    r"""
53425
53426    @sbmlpackage{core}
53427
53428    @htmlinclude pkg-marker-core.html An XML Namespace.
53429
53430    @htmlinclude not-sbml-warning.html
53431
53432    This class serves to organize functionality for tracking XML namespaces
53433    in a document or data stream.  The namespace declarations are stored as
53434    a list of pairs of XML namespace URIs and prefix strings.  These
53435    correspond to the parts of a namespace declaration on an XML element.
53436    For example, in the following XML fragment,
53437    @verbatim
53438    <annotation>
53439        <mysim:nodecolors xmlns:mysim='urn:lsid:mysim.org'
53440             mysim:bgcolor='green' mysim:fgcolor='white'/>
53441    </annotation>
53442    @endverbatim
53443    there is one namespace declaration.  Its URI is
53444    <code>urn:lsid:mysim.org</code> and its prefix is <code>mysim</code>.
53445    This pair could be stored as one item in an XMLNamespaces list.
53446
53447    XMLNamespaces provides various methods for manipulating the list of
53448    prefix-URI pairs.  Individual namespaces stored in a given XMLNamespace
53449    object instance can be retrieved based on their index using
53450    XMLNamespaces.getPrefix(), or by their characteristics such as
53451    their URI or position in the list.
53452
53453    """
53454
53455    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
53456    __repr__ = _swig_repr
53457    __swig_destroy__ = _libsbml.delete_XMLNamespaces
53458
53459    def __init__(self, *args):
53460        r"""
53461        __init__(XMLNamespaces self) -> XMLNamespaces
53462        __init__(XMLNamespaces self, XMLNamespaces orig) -> XMLNamespaces
53463
53464        This method has multiple variants; they differ in the arguments
53465         they accept.  Each variant is described separately below.
53466
53467        @par
53468        <hr>
53469        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53470         <pre class='signature'>XMLNamespaces()</pre>
53471
53472        Creates a new empty list of XML namespace declarations.
53473
53474
53475        @par
53476        <hr>
53477        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53478         <pre class='signature'>XMLNamespaces(XMLNamespaces orig)</pre>
53479
53480        Copy constructor; creates a copy of this XMLNamespaces list.
53481
53482        @param orig the XMLNamespaces object to copy.
53483
53484        """
53485        _libsbml.XMLNamespaces_swiginit(self, _libsbml.new_XMLNamespaces(*args))
53486
53487    def clone(self):
53488        r"""
53489        clone(XMLNamespaces self) -> XMLNamespaces
53490
53491        Creates and returns a deep copy of this XMLNamespaces object.
53492
53493        @return the (deep) copy of this XMLNamespaces object.
53494
53495        """
53496        return _libsbml.XMLNamespaces_clone(self)
53497
53498    def add(self, *args):
53499        r"""
53500        add(XMLNamespaces self, string uri, string prefix="") -> int
53501
53502        Appends an XML namespace prefix and URI pair to this list of namespace
53503        declarations.
53504
53505        An XMLNamespaces object stores a list of pairs of namespaces and their
53506        prefixes.  If there is an XML namespace with the given @p uri prefix
53507        in this list, then its corresponding URI will be overwritten by the
53508        new @p uri unless the uri represents the core sbml namespace.
53509        Calling programs could use one of the other XMLNamespaces
53510        methods, such as
53511        XMLNamespaces.hasPrefix() and
53512        XMLNamespaces.hasURI() to
53513        inquire whether a given prefix and/or URI
53514        is already present in this XMLNamespaces object.
53515        If the @p uri represents the sbml namespaces then it will not be
53516        overwritten, as this has potentially serious consequences. If it
53517        is necessary to replace the sbml namespace the namespace should be removed
53518        prior to adding the new namespace.
53519
53520        @param uri a string, the uri for the namespace.
53521        @param prefix a string, the prefix for the namespace.
53522
53523        @return integer value indicating success/failure of the
53524        function.  @if clike The value is drawn from the
53525        enumeration #OperationReturnValues_t. @endif@~ The possible values
53526        returned by this function are:
53527        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
53528        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
53529        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
53530
53531        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
53532
53533
53534
53535        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
53536
53537        """
53538        return _libsbml.XMLNamespaces_add(self, *args)
53539
53540    def remove(self, *args):
53541        r"""
53542        remove(XMLNamespaces self, int index) -> int
53543        remove(XMLNamespaces self, string prefix) -> int
53544
53545        This method has multiple variants; they differ in the arguments
53546         they accept.  Each variant is described separately below.
53547
53548        @par
53549        <hr>
53550        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53551         <pre class='signature'>remove(int index)</pre>
53552
53553        Removes an XML Namespace stored in the given position of this list.
53554
53555        @param index an integer, position of the namespace to remove.
53556
53557        @return integer value indicating success/failure of the
53558        function.  @if clike The value is drawn from the
53559        enumeration #OperationReturnValues_t. @endif@~ The possible values
53560        returned by this function are:
53561        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
53562        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
53563
53564
53565        @par
53566        <hr>
53567        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53568         <pre class='signature'>remove(string prefix)</pre>
53569
53570        Removes an XML Namespace with the given prefix.
53571
53572        @param prefix a string, prefix of the required namespace.
53573
53574        @return integer value indicating success/failure of the
53575        function.  @if clike The value is drawn from the
53576        enumeration #OperationReturnValues_t. @endif@~ The possible values
53577        returned by this function are:
53578        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
53579        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
53580
53581        @see remove()
53582
53583        """
53584        return _libsbml.XMLNamespaces_remove(self, *args)
53585
53586    def clear(self):
53587        r"""
53588        clear(XMLNamespaces self) -> int
53589
53590        Clears (deletes) all XML namespace declarations in this XMLNamespaces
53591        object.
53592
53593        @return integer value indicating success/failure of the
53594        function.  @if clike The value is drawn from the
53595        enumeration #OperationReturnValues_t. @endif@~ The possible values
53596        returned by this function are:
53597        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
53598        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
53599
53600        @see remove()
53601
53602        """
53603        return _libsbml.XMLNamespaces_clear(self)
53604
53605    def getIndex(self, uri):
53606        r"""
53607        getIndex(XMLNamespaces self, string uri) -> int
53608
53609        Look up the index of an XML namespace declaration by URI.
53610
53611        An XMLNamespaces object stores a list of pairs of namespaces and their
53612        prefixes.  If this XMLNamespaces object contains a pair with the given
53613        URI @p uri, this method returns its index in the list.
53614
53615        @param uri a string, the URI of the sought-after namespace.
53616
53617        @return the index of the given declaration, or <code>-1</code> if not
53618        present.
53619
53620        """
53621        return _libsbml.XMLNamespaces_getIndex(self, uri)
53622
53623    def containsUri(self, uri):
53624        r"""
53625        containsUri(XMLNamespaces self, string uri) -> bool
53626
53627        Tests whether the given uri is contained in this set of namespaces.
53628
53629        """
53630        return _libsbml.XMLNamespaces_containsUri(self, uri)
53631
53632    def getIndexByPrefix(self, prefix):
53633        r"""
53634        getIndexByPrefix(XMLNamespaces self, string prefix) -> int
53635
53636        Look up the index of an XML namespace declaration by @p prefix.
53637
53638        An XMLNamespaces object stores a list of pairs of namespaces and their
53639        prefixes.  If this XMLNamespaces object contains a pair with the given
53640        prefix @p prefix, this method returns its index in the list.
53641
53642        @param prefix a string, the prefix string of the sought-after
53643        namespace.
53644
53645        @return the index of the given declaration, or <code>-1</code> if not
53646        present.
53647
53648        """
53649        return _libsbml.XMLNamespaces_getIndexByPrefix(self, prefix)
53650
53651    def getLength(self):
53652        r"""
53653        getLength(XMLNamespaces self) -> int
53654
53655        Returns the total number of URI-and-prefix pairs stored in this
53656        particular XMLNamespaces instance.
53657
53658        @return the number of namespaces in this list.
53659
53660        """
53661        return _libsbml.XMLNamespaces_getLength(self)
53662
53663    def getNumNamespaces(self):
53664        r"""
53665        getNumNamespaces(XMLNamespaces self) -> int
53666
53667        Returns the total number of URI-and-prefix pairs stored in this
53668        particular XMLNamespaces instance.
53669
53670        @return the number of namespaces in this list.
53671
53672        This function is an alias for getLength introduced for consistency
53673        with other XML classes.
53674
53675        """
53676        return _libsbml.XMLNamespaces_getNumNamespaces(self)
53677
53678    def getPrefix(self, *args):
53679        r"""
53680        getPrefix(XMLNamespaces self, int index) -> string
53681        getPrefix(XMLNamespaces self, string uri) -> string
53682
53683        This method has multiple variants; they differ in the arguments
53684         they accept.  Each variant is described separately below.
53685
53686        @par
53687        <hr>
53688        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53689         <pre class='signature'>getPrefix(int index)</pre>
53690
53691        Look up the prefix of an XML namespace declaration by its position.
53692
53693        An XMLNamespaces object stores a list of pairs of namespaces and their
53694        prefixes.  This method returns the prefix of the <code>n</code>th
53695        element in that list (if it exists).  Callers should use
53696        XMLAttributes.getLength() first to find out how many namespaces are
53697        stored in the list.
53698
53699        @param index an integer, position of the sought-after prefix.
53700
53701        @return the prefix of an XML namespace declaration in this list (by
53702        position), or an empty string if the @p index is out of range.
53703
53704        @see getLength()
53705
53706
53707        @par
53708        <hr>
53709        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53710         <pre class='signature'>getPrefix(string uri)</pre>
53711
53712        Look up the prefix of an XML namespace declaration by its URI.
53713
53714        An XMLNamespaces object stores a list of pairs of namespaces and their
53715        prefixes.  This method returns the prefix for a pair that has the
53716        given @p uri.
53717
53718        @param uri a string, the URI of the prefix being sought.
53719
53720        @return the prefix of an XML namespace declaration given its URI, or
53721        an empty string if no such @p uri exists in this XMLNamespaces object.
53722
53723        """
53724        return _libsbml.XMLNamespaces_getPrefix(self, *args)
53725
53726    def getURI(self, *args):
53727        r"""
53728        getURI(XMLNamespaces self, int index) -> string
53729        getURI(XMLNamespaces self, string prefix="") -> string
53730
53731        This method has multiple variants; they differ in the arguments
53732         they accept.  Each variant is described separately below.
53733
53734        @par
53735        <hr>
53736        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53737         <pre class='signature'>getURI(string prefix = '')</pre>
53738
53739        Look up the URI of an XML namespace declaration by its prefix.
53740
53741        An XMLNamespaces object stores a list of pairs of namespaces and their
53742        prefixes.  This method returns the namespace URI for a pair that has
53743        the given @p prefix.
53744
53745        @param prefix a string, the prefix of the required URI.
53746
53747        @return the URI of an XML namespace declaration having the given @p
53748        prefix, or an empty string if no such prefix-and-URI pair exists
53749        in this XMLNamespaces object.
53750
53751        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
53752
53753        @see getURI()
53754
53755
53756
53757        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
53758
53759
53760        @par
53761        <hr>
53762        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53763         <pre class='signature'>getURI(int index)</pre>
53764
53765        Look up the URI of an XML namespace declaration by its position.
53766
53767        An XMLNamespaces object stores a list of pairs of namespaces and their
53768        prefixes.  This method returns the URI of the <code>n</code>th element
53769        in that list (if it exists).  Callers should use
53770        XMLAttributes.getLength() first to find out how many namespaces are
53771        stored in the list.
53772
53773        @param index an integer, position of the required URI.
53774
53775        @return the URI of an XML namespace declaration in this list (by
53776        position), or an empty string if the @p index is out of range.
53777
53778        @see getLength()
53779
53780        """
53781        return _libsbml.XMLNamespaces_getURI(self, *args)
53782
53783    def isEmpty(self):
53784        r"""
53785        isEmpty(XMLNamespaces self) -> bool
53786
53787        Predicate returning @c True or @c False depending on whether this
53788        XMLNamespaces list is empty.
53789
53790        @return @c True if this XMLNamespaces list is empty, @c False otherwise.
53791
53792        """
53793        return _libsbml.XMLNamespaces_isEmpty(self)
53794
53795    def hasURI(self, uri):
53796        r"""
53797        hasURI(XMLNamespaces self, string uri) -> bool
53798
53799        Predicate returning @c True or @c False depending on whether an XML
53800        Namespace with the given URI is contained in this XMLNamespaces list.
53801
53802        @param uri a string, the uri for the namespace.
53803
53804        @return @c True if an XML Namespace with the given URI is contained in
53805        this XMLNamespaces list, @c False otherwise.
53806
53807        """
53808        return _libsbml.XMLNamespaces_hasURI(self, uri)
53809
53810    def hasPrefix(self, prefix):
53811        r"""
53812        hasPrefix(XMLNamespaces self, string prefix) -> bool
53813
53814        Predicate returning @c True or @c False depending on whether an XML
53815        Namespace with the given prefix is contained in this XMLNamespaces
53816        list.
53817
53818        @param prefix a string, the prefix for the namespace.
53819
53820        @return @c True if an XML Namespace with the given URI is contained in
53821        this XMLNamespaces list, @c False otherwise.
53822
53823        """
53824        return _libsbml.XMLNamespaces_hasPrefix(self, prefix)
53825
53826    def hasNS(self, uri, prefix):
53827        r"""
53828        hasNS(XMLNamespaces self, string uri, string prefix) -> bool
53829
53830        Predicate returning @c True or @c False depending on whether an XML
53831        Namespace with the given URI and prefix pair is contained in this
53832        XMLNamespaces list.
53833
53834        @param uri a string, the URI for the namespace.
53835        @param prefix a string, the prefix for the namespace.
53836
53837        @return @c True if an XML Namespace with the given uri/prefix pair is
53838        contained in this XMLNamespaces list, @c False otherwise.
53839
53840        """
53841        return _libsbml.XMLNamespaces_hasNS(self, uri, prefix)
53842
53843    def __eq__(self, rhs):
53844      if ((self is None) and (rhs is None)): return True
53845      if ((self is None) or  (rhs is None)): return False
53846      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
53847        if (self.this == rhs.this): return True
53848      return False
53849
53850    def __ne__(self, rhs):
53851      if ((self is None) and (rhs is None)): return False
53852      if ((self is None) or  (rhs is None)): return True
53853      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
53854        if (self.this == rhs.this): return False
53855      return True
53856
53857
53858# Register XMLNamespaces in _libsbml:
53859_libsbml.XMLNamespaces_swigregister(XMLNamespaces)
53860
53861class XMLToken(object):
53862    r"""
53863
53864    @sbmlpackage{core}
53865
53866    @htmlinclude pkg-marker-core.html A token in an XML stream.
53867
53868    @htmlinclude not-sbml-warning.html
53869
53870    The libSBML XML parser interface can read an XML file or data stream and
53871    convert the contents into tokens.  The tokens represent items in the XML
53872    stream, either XML elements (start or end tags) or text that appears as
53873    content inside an element.  The XMLToken class is libSBML's low-level
53874    representation of these entities.
53875
53876    Each XMLToken has the following information associated with it:
53877    <ol>
53878    <li> <em>Qualified name</em>: every XML element or XML attribute has a
53879    name (e.g., for the element <code>&lt;mytag&gt;</code>, the name is
53880    <code>'mytag'</code>), but this name may be qualified with a namespace
53881    (e.g., it may appear as <code>&lt;someNamespace:mytag&gt;</code> in the
53882    input).  An XMLToken stores the name of a token, along with any namespace
53883    qualification present, through the use of an XMLTriple object.  This
53884    object stores the bare name of the element, its XML namespace prefix (if
53885    any), and the XML namespace with which that prefix is associated.
53886    <li> @em Namespaces: An XML token can have one or more XML namespaces
53887    associated with it.  These namespaces may be specified explicitly on the
53888    element or inherited from parent elements.  In libSBML, a list of
53889    namespaces is stored in an XMLNamespaces object.  An XMLToken possesses a
53890    field for storing an XMLNamespaces object.
53891    <li> @em Attributes: XML elements can have attributes associated with
53892    them, and these attributes can have values assigned to them.  The set of
53893    attribute-value pairs is stored in an XMLAttributes object stored in an
53894    XMLToken object.  (Note: only elements can have attributes&mdash;text
53895    blocks cannot have them in XML.)
53896    <li> @em Line number: the line number in the input where the token appears.
53897    <li> @em Column number: the column number in the input where the token appears.
53898    </ol>
53899
53900    The XMLToken class serves as base class for XMLNode.  XML lends itself to
53901    a tree-structured representation, and in libSBML, the nodes in an XML
53902    document tree are XMLNode objects.  Most higher-level libSBML classes and
53903    methods that offer XML-level functionality (such as the methods on SBase
53904    for interacting with annotations) work with XMLNode objects rather than
53905    XMLToken objects directly.
53906
53907    @see XMLNode
53908    @see XMLTriple
53909    @see XMLAttributes
53910    @see XMLNamespaces
53911
53912    """
53913
53914    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
53915    __repr__ = _swig_repr
53916    __swig_destroy__ = _libsbml.delete_XMLToken
53917
53918    def __init__(self, *args):
53919        r"""
53920        __init__(XMLToken self) -> XMLToken
53921        __init__(XMLToken self, XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, unsigned int const line=0, unsigned int const column=0) -> XMLToken
53922        __init__(XMLToken self, XMLTriple triple, XMLAttributes attributes, unsigned int const line=0, unsigned int const column=0) -> XMLToken
53923        __init__(XMLToken self, XMLTriple triple, unsigned int const line=0, unsigned int const column=0) -> XMLToken
53924        __init__(XMLToken self, string chars, unsigned int const line=0, unsigned int const column=0) -> XMLToken
53925        __init__(XMLToken self, XMLToken orig) -> XMLToken
53926
53927        This method has multiple variants; they differ in the arguments
53928         they accept.  Each variant is described separately below.
53929
53930        @par
53931        <hr>
53932        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53933         <pre class='signature'>XMLToken()</pre>
53934
53935        Creates a new empty XMLToken object.
53936
53937
53938        @par
53939        <hr>
53940        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53941         <pre class='signature'>XMLToken(XMLToken orig)</pre>
53942
53943        Copy constructor; creates a copy of this XMLToken object.
53944
53945        @param orig the XMLToken object to copy.
53946
53947
53948        @par
53949        <hr>
53950        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53951         <pre class='signature'>XMLToken(  XMLTriple      triple , XMLAttributes  attributes ,  long    line   = 0 ,  long    column = 0 )</pre>
53952
53953        Creates an XML start element with attributes.
53954
53955        @param triple an XMLTriple object describing the start tag.
53956
53957        @param attributes XMLAttributes, the attributes to set on the element to
53958        be created.
53959
53960        @param line a long integer, the line number to associate with the
53961        token (default = 0).
53962
53963        @param column a long integer, the column number to associate with the
53964        token (default = 0).
53965
53966        The XML namespace component of this XMLToken object will be left empty.
53967        See the other variants of the XMLToken constructors for versions that
53968        take namespace arguments.
53969
53970        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
53971
53972
53973
53974        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
53975
53976
53977        @par
53978        <hr>
53979        <span class='variant-sig-heading'>Method variant with the following signature</span>:
53980         <pre class='signature'>XMLToken(  XMLTriple    triple ,  long  line   = 0 ,  long  column = 0 )</pre>
53981
53982        Creates an XML end element.
53983
53984        @param triple an XMLTriple object describing the end tag.
53985
53986        @param line a long integer, the line number to associate with the
53987        token (default = 0).
53988
53989        @param column a long integer, the column number to associate with the
53990        token (default = 0).
53991
53992        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
53993
53994
53995
53996        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
53997
53998
53999        @par
54000        <hr>
54001        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54002         <pre class='signature'>XMLToken(  XMLTriple      triple , XMLAttributes  attributes , XMLNamespaces  namespaces ,  long    line   = 0 ,  long    column = 0 )</pre>
54003
54004        Creates an XML start element with attributes and namespace declarations.
54005
54006        @param triple an XMLTriple object describing the start tag.
54007
54008        @param attributes XMLAttributes, the attributes to set on the element to
54009        be created.
54010
54011        @param namespaces XMLNamespaces, the namespaces to set on the element to
54012        be created.
54013
54014        @param line a long integer, the line number to associate with the
54015        token (default = 0).
54016
54017        @param column a long integer, the column number to associate with the
54018        token (default = 0).
54019
54020        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54021
54022
54023
54024        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
54025
54026
54027        @par
54028        <hr>
54029        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54030         <pre class='signature'>XMLToken(  string  chars ,  long  line   = 0 ,  long  column = 0 )</pre>
54031
54032        Creates a text object.
54033
54034        @param chars a string, the text to be added to the XMLToken object.
54035
54036        @param line a long integer, the line number to associate with the
54037        token (default = 0).
54038
54039        @param column a long integer, the column number to associate with the
54040        token (default = 0).
54041
54042        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54043
54044
54045
54046        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
54047
54048        """
54049        _libsbml.XMLToken_swiginit(self, _libsbml.new_XMLToken(*args))
54050
54051    def clone(self):
54052        r"""
54053        clone(XMLToken self) -> XMLToken
54054
54055        Creates and returns a deep copy of this XMLToken object.
54056
54057        @return the (deep) copy of this XMLToken object.
54058
54059        """
54060        return _libsbml.XMLToken_clone(self)
54061
54062    def getAttributes(self):
54063        r"""
54064        getAttributes(XMLToken self) -> XMLAttributes
54065
54066        Returns the attributes of the XML element represented by this token.
54067
54068        @return the attributes of this XML element, stored in an XMLAttributes
54069        object.
54070
54071        """
54072        return _libsbml.XMLToken_getAttributes(self)
54073
54074    def setAttributes(self, attributes):
54075        r"""
54076        setAttributes(XMLToken self, XMLAttributes attributes) -> int
54077
54078        Sets the attributes on the XML element represented by this token.
54079
54080        @par
54081        This operation only makes sense for XML start elements.  This
54082        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54083        element.
54084
54085        @param attributes an XMLAttributes object to be assigned to this
54086        XMLToken object, thereby setting the XML attributes associated with this
54087        token.
54088
54089        @return integer value indicating success/failure of the
54090        function.  @if clike The value is drawn from the
54091        enumeration #OperationReturnValues_t. @endif@~ The possible values
54092        returned by this function are:
54093        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54094        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
54095        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54096        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
54097
54098        @note This function replaces any existing XMLAttributes object
54099        on this XMLToken object with the one given by @p attributes.
54100
54101        """
54102        return _libsbml.XMLToken_setAttributes(self, attributes)
54103
54104    def addAttr(self, *args):
54105        r"""
54106        addAttr(XMLToken self, string name, string value, string namespaceURI="", string prefix="") -> int
54107        addAttr(XMLToken self, XMLTriple triple, string value) -> int
54108
54109        This method has multiple variants; they differ in the arguments
54110         they accept.  Each variant is described separately below.
54111
54112        @par
54113        <hr>
54114        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54115         <pre class='signature'>addAttr(  string name , string value , string namespaceURI = '' , string prefix = '')</pre>
54116
54117        Adds an attribute to the XML element represented by this token.
54118
54119        @par
54120        This operation only makes sense for XML start elements.  This
54121        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54122        element.
54123
54124        @param name a string, the so-called 'local part' of the attribute name;
54125        that is, the attribute name without any namespace qualifier or prefix.
54126
54127        @param value a string, the value assigned to the attribute.
54128
54129        @param namespaceURI a string, the XML namespace URI of the attribute.
54130
54131        @param prefix a string, the prefix for the XML namespace.
54132
54133        Recall that in XML, the complete form of an attribute on an XML element
54134        is the following:
54135        <center>
54136        <code>prefix:name='value'</code>
54137        </center>
54138        The <code>name</code> part is the name of the attribute, the
54139        <code>'value'</code> part is the value assigned to the attribute (and
54140        it is always a quoted string), and the <code>prefix</code> part is
54141        an optional XML namespace prefix.  Internally in libSBML, this data
54142        is stored in an XMLAttributes object associated with this XMLToken.
54143
54144        @return integer value indicating success/failure of the
54145        function.  @if clike The value is drawn from the
54146        enumeration #OperationReturnValues_t. @endif@~ The possible values
54147        returned by this function are:
54148        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54149        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
54150        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54151
54152        @note If an attribute with the same name and XML namespace URI already
54153        exists on this XMLToken object, then the previous value will be replaced
54154        with the new value provided to this method.
54155
54156        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54157
54158
54159
54160        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
54161
54162
54163        @par
54164        <hr>
54165        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54166         <pre class='signature'>addAttr( XMLTriple triple, string value)</pre>
54167
54168        Adds an attribute to the XML element represented by this token.
54169
54170        @par
54171        This operation only makes sense for XML start elements.  This
54172        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54173        element.
54174
54175        @param triple an XMLTriple object defining the attribute, its value,
54176        and optionally its XML namespace (if any is provided).
54177
54178        @param value a string, the value assigned to the attribute.
54179
54180        @return integer value indicating success/failure of the
54181        function.  @if clike The value is drawn from the
54182        enumeration #OperationReturnValues_t. @endif@~ The possible values
54183        returned by this function are:
54184        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54185        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
54186        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54187
54188        @note If an attribute with the same name and XML namespace URI already
54189        exists on this XMLToken object, then the previous value will be replaced
54190        with the new value provided to this method.
54191
54192        """
54193        return _libsbml.XMLToken_addAttr(self, *args)
54194
54195    def removeAttr(self, *args):
54196        r"""
54197        removeAttr(XMLToken self, int n) -> int
54198        removeAttr(XMLToken self, string name, string uri="") -> int
54199        removeAttr(XMLToken self, XMLTriple triple) -> int
54200
54201        This method has multiple variants; they differ in the arguments
54202         they accept.  Each variant is described separately below.
54203
54204        @par
54205        <hr>
54206        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54207         <pre class='signature'>removeAttr(string name, string uri = '')</pre>
54208
54209        Removes an attribute from the XML element represented by this token.
54210
54211        @par
54212        This operation only makes sense for XML start elements.  This
54213        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54214        element.
54215
54216        @param name   a string, the name of the attribute to be removed.
54217        @param uri    a string, the XML namespace URI of the attribute to be removed.
54218
54219        @return integer value indicating success/failure of the
54220        function.  @if clike The value is drawn from the
54221        enumeration #OperationReturnValues_t. @endif@~ The possible values
54222        returned by this function are:
54223        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54224        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54225        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
54226
54227        The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this
54228        element with the given @p name (and @p uri if specified).
54229
54230        @see hasAttr()
54231
54232
54233
54234        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
54235
54236
54237        @par
54238        <hr>
54239        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54240         <pre class='signature'>removeAttr(int n)</pre>
54241
54242        Removes the <em>n</em>th attribute from the XML element represented by
54243        this token.
54244
54245        @par
54246        This operation only makes sense for XML start elements.  This
54247        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54248        element.
54249
54250        @param n an integer the index of the resource to be deleted.
54251
54252        @return integer value indicating success/failure of the
54253        function.  @if clike The value is drawn from the
54254        enumeration #OperationReturnValues_t. @endif@~ The possible values
54255        returned by this function are:
54256        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54257        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54258        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
54259
54260        The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this
54261        element at the given index @p n.
54262
54263        @see getAttrIndex()
54264        @see getAttrIndex()
54265        @see getAttributesLength()
54266
54267
54268        @par
54269        <hr>
54270        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54271         <pre class='signature'>removeAttr(XMLTriple triple)</pre>
54272
54273        Removes an attribute from the XML element represented by this token.
54274
54275        @par
54276        This operation only makes sense for XML start elements.  This
54277        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54278        element.
54279
54280        @param triple an XMLTriple describing the attribute to be removed.
54281
54282        @return integer value indicating success/failure of the
54283        function.  @if clike The value is drawn from the
54284        enumeration #OperationReturnValues_t. @endif@~ The possible values
54285        returned by this function are:
54286        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54287        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54288        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
54289
54290        The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this
54291        element matching the properties of the given @p triple.
54292
54293        @see hasAttr()
54294
54295        """
54296        return _libsbml.XMLToken_removeAttr(self, *args)
54297
54298    def clearAttributes(self):
54299        r"""
54300        clearAttributes(XMLToken self) -> int
54301
54302        Removes all attributes of this XMLToken object.
54303
54304        @par
54305        This operation only makes sense for XML start elements.  This
54306        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54307        element.
54308
54309        @return integer value indicating success/failure of the
54310        function.  @if clike The value is drawn from the
54311        enumeration #OperationReturnValues_t. @endif@~ The possible values
54312        returned by this function are:
54313        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54314        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54315
54316        """
54317        return _libsbml.XMLToken_clearAttributes(self)
54318
54319    def getAttrIndex(self, *args):
54320        r"""
54321        getAttrIndex(XMLToken self, string name, string uri="") -> int
54322        getAttrIndex(XMLToken self, XMLTriple triple) -> int
54323
54324        This method has multiple variants; they differ in the arguments
54325         they accept.  Each variant is described separately below.
54326
54327        @par
54328        <hr>
54329        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54330         <pre class='signature'>getAttrIndex(string name, string uri='')</pre>
54331
54332        Returns the index of the attribute with the given name and namespace
54333        URI.
54334
54335        @param name a string, the name of the attribute.
54336        @param uri  a string, the namespace URI of the attribute.
54337
54338        @return the index of an attribute with the given local name and
54339        namespace URI, or <code>-1</code> if it is not present on this token.
54340
54341        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54342
54343
54344        @par
54345        <hr>
54346        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54347         <pre class='signature'>getAttrIndex(XMLTriple triple)</pre>
54348
54349        Returns the index of the attribute defined by the given XMLTriple
54350        object.
54351
54352        @param triple the XMLTriple object that defines the attribute whose
54353        index is being sought.
54354
54355        @return the index of an attribute with the given XMLTriple object, or
54356        <code>-1</code> if no such attribute is present on this token.
54357
54358        """
54359        return _libsbml.XMLToken_getAttrIndex(self, *args)
54360
54361    def getAttributesLength(self):
54362        r"""
54363        getAttributesLength(XMLToken self) -> int
54364
54365        Returns the number of attributes on this XMLToken object.
54366
54367        @return the number of attributes possessed by this token.
54368
54369        @see hasAttr()
54370
54371        """
54372        return _libsbml.XMLToken_getAttributesLength(self)
54373
54374    def getAttrName(self, index):
54375        r"""
54376        getAttrName(XMLToken self, int index) -> string
54377
54378        Returns the name of the <em>n</em>th attribute in this token's list of
54379        attributes.
54380
54381        @param index an integer, the position of the attribute whose name
54382        is being sought.
54383
54384        @return the name of the attribute located at position @p n in the list
54385        of attributes possessed by this XMLToken object.
54386
54387        @note If @p index is out of range, this method will return an empty
54388        string.  XMLToken.hasAttr() can be used to test for an
54389        attribute's existence explicitly, and XMLToken.getAttributesLength() can
54390        be used to find out the number of attributes possessed by this token.
54391
54392        @see hasAttr()
54393        @see getAttributesLength()
54394
54395        """
54396        return _libsbml.XMLToken_getAttrName(self, index)
54397
54398    def getAttrPrefix(self, index):
54399        r"""
54400        getAttrPrefix(XMLToken self, int index) -> string
54401
54402        Returns the prefix of the <em>n</em>th attribute in this token's list of
54403        attributes.
54404
54405        @param index an integer, the position of the attribute whose prefix is
54406        being sought.
54407
54408        @return the XML namespace prefix of the attribute located at position @p
54409        n in the list of attributes possessed by this XMLToken object.
54410
54411        @note If @p index is out of range, this method will return an empty
54412        string.  XMLToken.hasAttr() can be used to test for an
54413        attribute's existence explicitly, and XMLToken.getAttributesLength() can
54414        be used to find out the number of attributes possessed by this token.
54415
54416        @see hasAttr()
54417        @see getAttributesLength()
54418
54419        """
54420        return _libsbml.XMLToken_getAttrPrefix(self, index)
54421
54422    def getAttrPrefixedName(self, index):
54423        r"""
54424        getAttrPrefixedName(XMLToken self, int index) -> string
54425
54426        Returns the prefixed name of the <em>n</em>th attribute in this token's
54427        list of attributes.
54428
54429        In this context, <em>prefixed name</em> means the name of the attribute
54430        prefixed with the XML namespace prefix assigned to the attribute.  This
54431        will be a string of the form <code>prefix:name</code>.
54432
54433        @param index an integer, the position of the attribute whose prefixed
54434        name is being sought.
54435
54436        @return the prefixed name of the attribute located at position @p
54437        n in the list of attributes possessed by this XMLToken object.
54438
54439        @note If @p index is out of range, this method will return an empty
54440        string.  XMLToken.hasAttr() can be used to test for an
54441        attribute's existence explicitly, and XMLToken.getAttributesLength() can
54442        be used to find out the number of attributes possessed by this token.
54443
54444        """
54445        return _libsbml.XMLToken_getAttrPrefixedName(self, index)
54446
54447    def getAttrURI(self, index):
54448        r"""
54449        getAttrURI(XMLToken self, int index) -> string
54450
54451        Returns the XML namespace URI of the <em>n</em>th attribute in this
54452        token's list of attributes.
54453
54454        @param index an integer, the position of the attribute whose namespace
54455        URI is being sought.
54456
54457        @return the XML namespace URI of the attribute located at position @p n
54458        in the list of attributes possessed by this XMLToken object.
54459
54460        @note If @p index is out of range, this method will return an empty
54461        string.  XMLToken.hasAttr() can be used to test for an
54462        attribute's existence explicitly, and XMLToken.getAttributesLength() can
54463        be used to find out the number of attributes possessed by this token.
54464
54465        """
54466        return _libsbml.XMLToken_getAttrURI(self, index)
54467
54468    def getAttrValue(self, *args):
54469        r"""
54470        getAttrValue(XMLToken self, int index) -> string
54471        getAttrValue(XMLToken self, string name, string uri="") -> string
54472        getAttrValue(XMLToken self, XMLTriple triple) -> string
54473
54474        This method has multiple variants; they differ in the arguments
54475         they accept.  Each variant is described separately below.
54476
54477        @par
54478        <hr>
54479        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54480         <pre class='signature'>getAttrValue(string name, string uri='')</pre>
54481
54482        Returns the value of the attribute with a given name and XML namespace URI.
54483
54484        @param name a string, the name of the attribute whose value is being
54485        sought.
54486
54487        @param uri a string, the XML namespace URI of the attribute.
54488
54489        @return The value of the attribute, as a string.
54490
54491        @note If an attribute with the given @p name and @p uri does not exist
54492        on this token object, this method will return an empty string.
54493        XMLToken.hasAttr() can be used to test
54494        explicitly for the presence of an attribute with a given name and
54495        namespace.
54496
54497        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54498
54499
54500        @par
54501        <hr>
54502        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54503         <pre class='signature'>getAttrValue(XMLTriple triple)</pre>
54504
54505        Returns the value of the attribute specified by a given XMLTriple object.
54506
54507        @param triple an XMLTriple describing the attribute whose value is being
54508        sought.
54509
54510        @return The value of the attribute, as a string.
54511
54512        @note If an attribute defined by the given @p triple does not exist on
54513        this token object, this method will return an empty string.
54514        XMLToken.hasAttr() can be used to test
54515        explicitly for the existence of an attribute with the properties of
54516        a given triple.
54517
54518
54519        @par
54520        <hr>
54521        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54522         <pre class='signature'>getAttrValue(int index)</pre>
54523
54524        Returns the value of the <em>n</em>th attribute in this token's list of
54525        attributes.
54526
54527        @param index an integer, the position of the attribute whose value is
54528        required.
54529
54530        @return the value of the attribute located at position @p n in the list
54531        of attributes possessed by this XMLToken object.
54532
54533        @note If @p index is out of range, this method will return an empty
54534        string.  XMLToken.hasAttr() can be used to test for an
54535        attribute's existence explicitly, and XMLToken.getAttributesLength() can
54536        be used to find out the number of attributes possessed by this token.
54537
54538        """
54539        return _libsbml.XMLToken_getAttrValue(self, *args)
54540
54541    def hasAttr(self, *args):
54542        r"""
54543        hasAttr(XMLToken self, int index) -> bool
54544        hasAttr(XMLToken self, string name, string uri="") -> bool
54545        hasAttr(XMLToken self, XMLTriple triple) -> bool
54546
54547        This method has multiple variants; they differ in the arguments
54548         they accept.  Each variant is described separately below.
54549
54550        @par
54551        <hr>
54552        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54553         <pre class='signature'>hasAttr(string name, string uri='')</pre>
54554
54555        Returns @c True if an attribute with a given name and namespace URI
54556        exists.
54557
54558        @param name a string, the name of the attribute being sought.
54559
54560        @param uri a string, the XML namespace URI of the attribute being
54561        sought.
54562
54563        @return @c True if an attribute with the given local name and namespace
54564        URI exists in the list of attributes on this token object, @c False
54565        otherwise.
54566
54567        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54568
54569
54570        @par
54571        <hr>
54572        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54573         <pre class='signature'>hasAttr(XMLTriple triple)</pre>
54574
54575        Returns @c True if an attribute defined by a given XMLTriple object
54576        exists.
54577
54578        @param triple an XMLTriple object describing the attribute being sought.
54579
54580        @return @c True if an attribute matching the properties of the given
54581        XMLTriple object exists in the list of attributes on this token,
54582        @c False otherwise.
54583
54584
54585        @par
54586        <hr>
54587        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54588         <pre class='signature'>hasAttr(int index)</pre>
54589
54590        Returns @c True if an attribute with the given index exists.
54591
54592        @param index an integer, the position of the attribute.
54593
54594        @return @c True if this token object possesses an attribute with the
54595        given index, @c False otherwise.
54596
54597        """
54598        return _libsbml.XMLToken_hasAttr(self, *args)
54599
54600    def isAttributesEmpty(self):
54601        r"""
54602        isAttributesEmpty(XMLToken self) -> bool
54603
54604        Returns @c True if this token has no attributes.
54605
54606        @return @c True if the list of attributes on XMLToken object is empty,
54607        @c False otherwise.
54608
54609        """
54610        return _libsbml.XMLToken_isAttributesEmpty(self)
54611
54612    def getNamespaces(self):
54613        r"""
54614        getNamespaces(XMLToken self) -> XMLNamespaces
54615
54616        Returns the XML namespaces declared for this token.
54617
54618        @return the XML namespace declarations for this XML element.
54619
54620        """
54621        return _libsbml.XMLToken_getNamespaces(self)
54622
54623    def setNamespaces(self, namespaces):
54624        r"""
54625        setNamespaces(XMLToken self, XMLNamespaces namespaces) -> int
54626
54627        Sets the XML namespaces on this XML element.
54628
54629        @par
54630        This operation only makes sense for XML start elements.  This
54631        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54632        element.
54633
54634        @param namespaces the XMLNamespaces object to be assigned to this XMLToken object.
54635
54636        @return integer value indicating success/failure of the
54637        function.  @if clike The value is drawn from the
54638        enumeration #OperationReturnValues_t. @endif@~ The possible values
54639        returned by this function are:
54640        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54641        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
54642        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54643        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
54644
54645        @note This function replaces any existing XMLNamespaces object on this
54646        XMLToken object with the new one given by @p namespaces.
54647
54648        """
54649        return _libsbml.XMLToken_setNamespaces(self, namespaces)
54650
54651    def addNamespace(self, *args):
54652        r"""
54653        addNamespace(XMLToken self, string uri, string prefix="") -> int
54654
54655        Appends an XML namespace declaration to this token.
54656
54657        The namespace added will be defined by the given XML namespace URI and
54658        an optional prefix.  If this XMLToken object already possesses an XML
54659        namespace declaration with the given @p prefix, then the existing XML
54660        namespace URI will be overwritten by the new one given by @p uri.
54661
54662        @par
54663        This operation only makes sense for XML start elements.  This
54664        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54665        element.
54666
54667        @param uri a string, the XML namespace URI for the namespace.
54668
54669        @param prefix a string, the namespace prefix to use.
54670
54671        @return integer value indicating success/failure of the
54672        function.  @if clike The value is drawn from the
54673        enumeration #OperationReturnValues_t. @endif@~ The possible values
54674        returned by this function are:
54675        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54676        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54677
54678        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54679
54680
54681
54682        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
54683
54684        """
54685        return _libsbml.XMLToken_addNamespace(self, *args)
54686
54687    def removeNamespace(self, *args):
54688        r"""
54689        removeNamespace(XMLToken self, int index) -> int
54690        removeNamespace(XMLToken self, string prefix) -> int
54691
54692        This method has multiple variants; they differ in the arguments
54693         they accept.  Each variant is described separately below.
54694
54695        @par
54696        <hr>
54697        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54698         <pre class='signature'>removeNamespace(int index)</pre>
54699
54700        Removes the <em>n</em>th XML namespace declaration.
54701
54702        @par
54703        This operation only makes sense for XML start elements.  This
54704        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54705        element.
54706
54707        @param index an integer, the position of the namespace to be removed.
54708        The position in this context refers to the position of the namespace in
54709        the XMLNamespaces object stored in this XMLToken object.  Callers can
54710        use one of the <code>getNamespace___()</code> methods to find the index
54711        number of a given namespace.
54712
54713        @return integer value indicating success/failure of the
54714        function.  @if clike The value is drawn from the
54715        enumeration #OperationReturnValues_t. @endif@~ The possible values
54716        returned by this function are:
54717        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54718        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54719        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
54720
54721        @see getNamespaceIndex()
54722        @see getNamespaceIndexByPrefix()
54723        @see getNamespacesLength()
54724
54725
54726        @par
54727        <hr>
54728        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54729         <pre class='signature'>removeNamespace(string prefix)</pre>
54730
54731        Removes an XML namespace declaration having a given prefix.
54732
54733        @par
54734        This operation only makes sense for XML start elements.  This
54735        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54736        element.
54737
54738        @param prefix a string, the prefix of the namespace to be removed.
54739
54740        @return integer value indicating success/failure of the
54741        function.  @if clike The value is drawn from the
54742        enumeration #OperationReturnValues_t. @endif@~ The possible values
54743        returned by this function are:
54744        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54745        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54746        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
54747
54748        The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
54749        is returned if there is no namespace with the given @p prefix on this
54750        element.
54751
54752        @see getNamespaceIndexByPrefix()
54753
54754        """
54755        return _libsbml.XMLToken_removeNamespace(self, *args)
54756
54757    def clearNamespaces(self):
54758        r"""
54759        clearNamespaces(XMLToken self) -> int
54760
54761        Removes all XML namespace declarations from this token.
54762
54763        @par
54764        This operation only makes sense for XML start elements.  This
54765        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54766        element.
54767
54768        @return integer value indicating success/failure of the
54769        function.  @if clike The value is drawn from the
54770        enumeration #OperationReturnValues_t. @endif@~ The possible values
54771        returned by this function are:
54772        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54773        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54774        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
54775
54776        """
54777        return _libsbml.XMLToken_clearNamespaces(self)
54778
54779    def getNamespaceIndex(self, uri):
54780        r"""
54781        getNamespaceIndex(XMLToken self, string uri) -> int
54782
54783        Returns the index of an XML namespace declaration based on its URI.
54784
54785        @param uri a string, the XML namespace URI of the sought-after namespace.
54786
54787        @return the index of the given declaration, or <code>-1</code> if
54788        no such namespace URI is present on this XMLToken object.
54789
54790        """
54791        return _libsbml.XMLToken_getNamespaceIndex(self, uri)
54792
54793    def getNamespaceIndexByPrefix(self, prefix):
54794        r"""
54795        getNamespaceIndexByPrefix(XMLToken self, string prefix) -> int
54796
54797        Returns the index of an XML namespace declaration based on its prefix.
54798
54799        @param prefix a string, the prefix of the sought-after XML namespace.
54800
54801        @return the index of the given declaration, or <code>-1</code> if
54802        no such namespace URI is present on this XMLToken object.
54803
54804        """
54805        return _libsbml.XMLToken_getNamespaceIndexByPrefix(self, prefix)
54806
54807    def getNamespacesLength(self):
54808        r"""
54809        getNamespacesLength(XMLToken self) -> int
54810
54811        Returns the number of XML namespaces declared on this token.
54812
54813        @return the number of XML namespaces stored in the XMLNamespaces
54814        object of this XMLToken object.
54815
54816        """
54817        return _libsbml.XMLToken_getNamespacesLength(self)
54818
54819    def getNamespacePrefix(self, *args):
54820        r"""
54821        getNamespacePrefix(XMLToken self, int index) -> string
54822        getNamespacePrefix(XMLToken self, string uri) -> string
54823
54824        This method has multiple variants; they differ in the arguments
54825         they accept.  Each variant is described separately below.
54826
54827        @par
54828        <hr>
54829        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54830         <pre class='signature'>getNamespacePrefix(int index)</pre>
54831
54832        Returns the prefix of the <em>n</em>th XML namespace declaration.
54833
54834        @param index an integer, position of the required prefix.
54835
54836        @return the prefix of an XML namespace declaration in the XMLNamespaces
54837        (by position).
54838
54839        @note If @p index is out of range, this method will return an empty
54840        string.  XMLToken.getNamespacesLength() can be used to find out how
54841        many namespaces are defined on this XMLToken object.
54842
54843        @see getNamespacesLength()
54844
54845
54846        @par
54847        <hr>
54848        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54849         <pre class='signature'>getNamespacePrefix(string uri)</pre>
54850
54851        Returns the prefix associated with a given XML namespace URI on this
54852        token.
54853
54854        @param uri a string, the URI of the namespace whose prefix is being
54855        sought.
54856
54857        @return the prefix of an XML namespace declaration on this XMLToken object.
54858
54859        @note If there is no XML namespace with the given @p uri declared on
54860        this XMLToken object, this method will return an empty string.
54861
54862        """
54863        return _libsbml.XMLToken_getNamespacePrefix(self, *args)
54864
54865    def getNamespaceURI(self, *args):
54866        r"""
54867        getNamespaceURI(XMLToken self, int index) -> string
54868        getNamespaceURI(XMLToken self, string prefix="") -> string
54869
54870        This method has multiple variants; they differ in the arguments
54871         they accept.  Each variant is described separately below.
54872
54873        @par
54874        <hr>
54875        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54876         <pre class='signature'>getNamespaceURI(string prefix = '')</pre>
54877
54878        Returns the URI of an XML namespace with a given prefix.
54879
54880        @param prefix a string, the prefix of the sought-after XML namespace URI.
54881
54882        @return the URI of an XML namespace declaration given its prefix.
54883
54884        @note If there is no XML namespace with the given @p prefix stored in
54885        the XMLNamespaces object of this XMLToken object, this method will
54886        return an empty string.
54887
54888        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
54889
54890
54891
54892        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
54893
54894
54895        @par
54896        <hr>
54897        <span class='variant-sig-heading'>Method variant with the following signature</span>:
54898         <pre class='signature'>getNamespaceURI(int index)</pre>
54899
54900        Returns the URI of the <em>n</em>th XML namespace declared on this token.
54901
54902        @param index an integer, the position of the sought-after XML namespace URI.
54903
54904        @return the URI of the <em>n</em>th XML namespace stored in the
54905        XMLNamespaces object in this XMLToken object.
54906
54907        @note If @p index is out of range, this method will return an empty string.
54908
54909        @see getNamespacesLength()
54910
54911        """
54912        return _libsbml.XMLToken_getNamespaceURI(self, *args)
54913
54914    def isNamespacesEmpty(self):
54915        r"""
54916        isNamespacesEmpty(XMLToken self) -> bool
54917
54918        Returns @c True if there are no namespaces declared on this token.
54919
54920        @return @c True if the XMLNamespaces object stored in this XMLToken
54921        token is empty, @c False otherwise.
54922
54923        """
54924        return _libsbml.XMLToken_isNamespacesEmpty(self)
54925
54926    def hasNamespaceURI(self, uri):
54927        r"""
54928        hasNamespaceURI(XMLToken self, string uri) -> bool
54929
54930        Returns @c True if this token has an XML namespace with a given URI.
54931
54932        @param uri a string, the URI of the XML namespace.
54933
54934        @return @c True if an XML namespace with the given URI is contained in
54935        the XMLNamespaces object of this XMLToken object, @c False otherwise.
54936
54937        """
54938        return _libsbml.XMLToken_hasNamespaceURI(self, uri)
54939
54940    def hasNamespacePrefix(self, prefix):
54941        r"""
54942        hasNamespacePrefix(XMLToken self, string prefix) -> bool
54943
54944        Returns @c True if this token has an XML namespace with a given prefix.
54945
54946        @param prefix a string, the prefix for the XML namespace.
54947
54948        @return @c True if an XML Namespace with the given URI is contained in the
54949        XMLNamespaces of this XMLToken, @c False otherwise.
54950
54951        """
54952        return _libsbml.XMLToken_hasNamespacePrefix(self, prefix)
54953
54954    def hasNamespaceNS(self, uri, prefix):
54955        r"""
54956        hasNamespaceNS(XMLToken self, string uri, string prefix) -> bool
54957
54958        Returns @c True if this token has an XML namespace with a given prefix
54959        and URI combination.
54960
54961        @param uri a string, the URI for the namespace.
54962        @param prefix a string, the prefix for the namespace.
54963
54964        @return @c True if an XML namespace with the given URI/prefix pair is
54965        contained in the XMLNamespaces object of this XMLToken object, @c False
54966        otherwise.
54967
54968        """
54969        return _libsbml.XMLToken_hasNamespaceNS(self, uri, prefix)
54970
54971    def setTriple(self, triple):
54972        r"""
54973        setTriple(XMLToken self, XMLTriple triple) -> int
54974
54975        Sets the name, namespace prefix and namespace URI of this token.
54976
54977        @par
54978        This operation only makes sense for XML start elements.  This
54979        method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
54980        element.
54981
54982        @param triple the new XMLTriple to use for this XMLToken object.  If
54983        this XMLToken already had an XMLTriple object stored within it, that
54984        object will be replaced.
54985
54986        @return integer value indicating success/failure of the
54987        function.  @if clike The value is drawn from the
54988        enumeration #OperationReturnValues_t. @endif@~ The possible values
54989        returned by this function are:
54990        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
54991        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
54992        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
54993        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
54994
54995        """
54996        return _libsbml.XMLToken_setTriple(self, triple)
54997
54998    def getName(self):
54999        r"""
55000        getName(XMLToken self) -> string
55001
55002        Returns the (unqualified) name of token.
55003
55004        @return the (unqualified) name of token.
55005
55006        """
55007        return _libsbml.XMLToken_getName(self)
55008
55009    def getPrefix(self):
55010        r"""
55011        getPrefix(XMLToken self) -> string
55012
55013        Returns the XML namespace prefix of token.
55014
55015        @return the XML namespace prefix of token.
55016
55017        @note If no XML namespace prefix has been assigned to this token, this
55018        method will return an empty string.
55019
55020        """
55021        return _libsbml.XMLToken_getPrefix(self)
55022
55023    def getURI(self):
55024        r"""
55025        getURI(XMLToken self) -> string
55026
55027        Returns the XML namespace URI of token.
55028
55029        @return the XML namespace URI of token.
55030
55031        """
55032        return _libsbml.XMLToken_getURI(self)
55033
55034    def getCharacters(self):
55035        r"""
55036        getCharacters(XMLToken self) -> string
55037
55038        Returns the character text of token.
55039
55040        @return the characters of this XML token.  If this token is not a
55041        text token (i.e., it's an XML element and not character content),
55042        then this will return an empty string.
55043
55044        @see isText()
55045        @see isElement()
55046
55047        """
55048        return _libsbml.XMLToken_getCharacters(self)
55049
55050    def setCharacters(self, chars):
55051        r"""
55052        setCharacters(XMLToken self, string chars) -> int
55053
55054        Sets the characters for this XMLToken
55055
55056        This method only makes sense for XMLToken objects that contains text.
55057        If this method is called on a token that represents an XML start or end
55058        tag, it will return the code @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink.
55059
55060        @param chars string, characters to append to the text of this token.
55061
55062        @return integer value indicating success/failure of the
55063        function.  @if clike The value is drawn from the
55064        enumeration #OperationReturnValues_t. @endif@~ The possible values
55065        returned by this function are:
55066        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
55067        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
55068
55069        @see isText()
55070        @see isElement()
55071
55072        """
55073        return _libsbml.XMLToken_setCharacters(self, chars)
55074
55075    def append(self, chars):
55076        r"""
55077        append(XMLToken self, string chars) -> int
55078
55079        Appends characters to the text content of token.
55080
55081        This method only makes sense for XMLToken objects that contains text.
55082        If this method is called on a token that represents an XML start or end
55083        tag, it will return the code @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink.
55084
55085        @param chars string, characters to append to the text of this token.
55086
55087        @return integer value indicating success/failure of the
55088        function.  @if clike The value is drawn from the
55089        enumeration #OperationReturnValues_t. @endif@~ The possible values
55090        returned by this function are:
55091        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
55092        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
55093
55094        @see isText()
55095        @see isElement()
55096
55097        """
55098        return _libsbml.XMLToken_append(self, chars)
55099
55100    def getColumn(self):
55101        r"""
55102        getColumn(XMLToken self) -> unsigned int
55103
55104        Returns the column number at which this token occurs in the input.
55105
55106        @return the column at which this XMLToken occurred.
55107
55108        """
55109        return _libsbml.XMLToken_getColumn(self)
55110
55111    def getLine(self):
55112        r"""
55113        getLine(XMLToken self) -> unsigned int
55114
55115        Returns the line number at which this token occurs in the input.
55116
55117        @return the line at which this XMLToken occurred.
55118
55119        """
55120        return _libsbml.XMLToken_getLine(self)
55121
55122    def isElement(self):
55123        r"""
55124        isElement(XMLToken self) -> bool
55125
55126        Returns @c True if this token represents an XML element.
55127
55128        This generic predicate returns @c True if the element is either a start
55129        or end tag, and @c False if it's a text object.  The related methods
55130        XMLToken:isStart(), XMLToken.isEnd() and XMLToken.isText() are more
55131        specific predicates.
55132
55133        @return @c True if this XMLToken object represents an XML element,
55134        @c False otherwise.
55135
55136        @see isStart()
55137        @see isEnd()
55138        @see isText()
55139
55140        """
55141        return _libsbml.XMLToken_isElement(self)
55142
55143    def isEnd(self):
55144        r"""
55145        isEnd(XMLToken self) -> bool
55146
55147        Returns @c True if this token represents an XML end element.
55148
55149        @return @c True if this XMLToken object represents an XML end element,
55150        @c False otherwise.
55151
55152        @see isStart()
55153        @see isElement()
55154        @see isText()
55155
55156        """
55157        return _libsbml.XMLToken_isEnd(self)
55158
55159    def isEndFor(self, element):
55160        r"""
55161        isEndFor(XMLToken self, XMLToken element) -> bool
55162
55163        Returns @c True if this token represents an XML end element for a
55164        particular start element.
55165
55166        @param element XMLToken, the element with which the current object
55167        should be compared to determined whether the current object is a
55168        start element for the given one.
55169
55170        @return @c True if this XMLToken object represents an XML end tag for
55171        the start tag given by @p element, @c False otherwise.
55172
55173        @see isElement()
55174        @see isStart()
55175        @see isEnd()
55176        @see isText()
55177
55178        """
55179        return _libsbml.XMLToken_isEndFor(self, element)
55180
55181    def isEOF(self):
55182        r"""
55183        isEOF(XMLToken self) -> bool
55184
55185        Returns @c True if this token is an end of file marker.
55186
55187        @return @c True if this XMLToken object represents the end of the input,
55188        @c False otherwise.
55189
55190        @see setEOF()
55191
55192        """
55193        return _libsbml.XMLToken_isEOF(self)
55194
55195    def isStart(self):
55196        r"""
55197        isStart(XMLToken self) -> bool
55198
55199        Returns @c True if this token represents an XML start element.
55200
55201        @return @c True if this XMLToken is an XML start element, @c False otherwise.
55202
55203        @see isElement()
55204        @see isEnd()
55205        @see isText()
55206
55207        """
55208        return _libsbml.XMLToken_isStart(self)
55209
55210    def isText(self):
55211        r"""
55212        isText(XMLToken self) -> bool
55213
55214        Returns @c True if this token represents an XML text element.
55215
55216        @return @c True if this XMLToken is an XML text element, @c False otherwise.
55217
55218        @see isElement()
55219        @see isStart()
55220        @see isEnd()
55221
55222        """
55223        return _libsbml.XMLToken_isText(self)
55224
55225    def setEnd(self):
55226        r"""
55227        setEnd(XMLToken self) -> int
55228
55229        Declares that this token represents an XML element end tag.
55230
55231        @return integer value indicating success/failure of the
55232        function.  @if clike The value is drawn from the
55233        enumeration #OperationReturnValues_t. @endif@~ The possible values
55234        returned by this function are:
55235        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
55236        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
55237
55238        @see isStart()
55239        @see isEnd()
55240
55241        """
55242        return _libsbml.XMLToken_setEnd(self)
55243
55244    def setEOF(self):
55245        r"""
55246        setEOF(XMLToken self) -> int
55247
55248        Declares that this token is an end-of-file/input marker.
55249
55250        @return integer value indicating success/failure of the
55251        function.  @if clike The value is drawn from the
55252        enumeration #OperationReturnValues_t. @endif@~ The possible values
55253        returned by this function are:
55254        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
55255        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
55256
55257        @see isEOF()
55258
55259        """
55260        return _libsbml.XMLToken_setEOF(self)
55261
55262    def unsetEnd(self):
55263        r"""
55264        unsetEnd(XMLToken self) -> int
55265
55266        Declares that this token no longer represents an XML start/end element.
55267
55268        @return integer value indicating success/failure of the
55269        function.  @if clike The value is drawn from the
55270        enumeration #OperationReturnValues_t. @endif@~ The possible values
55271        returned by this function are:
55272        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
55273        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
55274
55275        """
55276        return _libsbml.XMLToken_unsetEnd(self)
55277
55278    def toString(self):
55279        r"""
55280        toString(XMLToken self) -> string
55281
55282        Prints a string representation of the underlying token stream.
55283
55284        This method is intended for debugging purposes.
55285
55286        @return a text string representing this XMLToken object.
55287
55288        """
55289        return _libsbml.XMLToken_toString(self)
55290
55291    def __eq__(self, rhs):
55292      if ((self is None) and (rhs is None)): return True
55293      if ((self is None) or  (rhs is None)): return False
55294      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
55295        if (self.this == rhs.this): return True
55296      return False
55297
55298    def __ne__(self, rhs):
55299      if ((self is None) and (rhs is None)): return False
55300      if ((self is None) or  (rhs is None)): return True
55301      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
55302        if (self.this == rhs.this): return False
55303      return True
55304
55305
55306# Register XMLToken in _libsbml:
55307_libsbml.XMLToken_swigregister(XMLToken)
55308
55309class XMLNode(XMLToken):
55310    r"""
55311
55312    @sbmlpackage{core}
55313
55314    @htmlinclude pkg-marker-core.html A node in libSBML's XML document tree.
55315
55316    LibSBML implements an XML abstraction layer.  This layer presents a
55317    uniform XML interface to calling programs regardless of which underlying
55318    XML parser libSBML has actually been configured to use.  The basic data
55319    object in the XML abstraction is a @em node, represented by XMLNode.
55320
55321    An XMLNode can contain any number of children.  Each child is another
55322    XMLNode, thereby forming a tree.  The methods XMLNode.getNumChildren()
55323    and XMLNode.getChild() can be used to access the tree
55324    structure starting from a given node.
55325
55326    Each XMLNode is subclassed from XMLToken, and thus has the same methods
55327    available as XMLToken.  These methods include XMLToken.getNamespaces(),
55328    XMLToken.getPrefix(), XMLToken.getName(), XMLToken.getURI(), and
55329    XMLToken.getAttributes().
55330
55331    @section xmlnode-str2xmlnode Conversion between an XML string and an XMLNode
55332
55333    LibSBML provides the following utility functions for converting an XML
55334    string (e.g., <code>&lt;annotation&gt;...&lt;/annotation&gt;</code>)
55335    to/from an XMLNode object.
55336
55337    @li XMLNode.toXMLString() returns a string representation of the XMLNode
55338    object.
55339
55340    @li XMLNode.convertXMLNodeToString() (static
55341    function) returns a string representation of the given XMLNode object.
55342
55343    @li XMLNode.convertStringToXMLNode() (static
55344    function) returns an XMLNode object converted from the given XML string.
55345
55346    The returned XMLNode object by XMLNode.convertStringToXMLNode() is a dummy root (container) XMLNode if the given XML string
55347    has two or more top-level elements (e.g.,
55348    &quot;<code>&lt;p&gt;...&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;</code>&quot;). In
55349    the dummy root node, each top-level element in the given XML string is
55350    contained as a child XMLNode. XMLToken.isEOF() can be used to identify
55351    if the returned XMLNode object is a dummy node or not.  Here is an
55352    example:
55353    @if cpp
55354    @code{.cpp}
55355    // Checks if the XMLNode object returned by XMLNode.convertStringToXMLNode()
55356    // is a dummy root node:
55357
55358    string str = '...';
55359    XMLNode xn = XMLNode.convertStringToXMLNode();
55360    if ( xn == None )
55361    {
55362      // returned value is null (error)
55363      ...
55364    }
55365    else if ( xn->isEOF() )
55366    {
55367      // Root node is a dummy node.
55368      for ( int i = 0; i < xn->getNumChildren(); i++ )
55369      {
55370        // access to each child node of the dummy node.
55371        XMLNode xnChild = xn->getChild(i);
55372        ...
55373      }
55374    }
55375    else
55376    {
55377      // Root node is NOT a dummy node.
55378      ...
55379    }
55380    @endcode
55381    @endif
55382    @if java
55383    @code{.java}
55384    // Checks if the returned XMLNode object is a dummy root node:
55385
55386    String str = '...';
55387    XMLNode xn = XMLNode.convertStringToXMLNode(str);
55388    if ( xn == null )
55389    {
55390      // returned value is null (error)
55391      ...
55392    }
55393    else if ( xn.isEOF() )
55394    {
55395      // Root node is a dummy node.
55396      for ( int i = 0; i < xn.getNumChildren(); i++ )
55397      {
55398        // access to each child node of the dummy node.
55399        XMLNode xnChild = xn.getChild(i);
55400        ...
55401      }
55402    }
55403    else
55404    {
55405      // Root node is NOT a dummy node.
55406      ...
55407    }
55408    @endcode
55409    @endif
55410    @if python
55411    @code{.py}
55412    xn = XMLNode.convertStringToXMLNode('<p></p>')
55413    if xn == None:
55414      # Do something to handle exceptional situation.
55415
55416    elif xn.isEOF():
55417      # Node is a dummy node.
55418
55419    else:
55420      # None is not a dummy node.
55421    @endcode
55422    @endif
55423
55424    """
55425
55426    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
55427    __repr__ = _swig_repr
55428    __swig_destroy__ = _libsbml.delete_XMLNode
55429
55430    def __init__(self, *args):
55431        r"""
55432        __init__(XMLNode self) -> XMLNode
55433        __init__(XMLNode self, XMLToken token) -> XMLNode
55434        __init__(XMLNode self, XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, unsigned int const line=0, unsigned int const column=0) -> XMLNode
55435        __init__(XMLNode self, XMLTriple triple, XMLAttributes attributes, unsigned int const line=0, unsigned int const column=0) -> XMLNode
55436        __init__(XMLNode self, XMLTriple triple, unsigned int const line=0, unsigned int const column=0) -> XMLNode
55437        __init__(XMLNode self, string chars, unsigned int const line=0, unsigned int const column=0) -> XMLNode
55438        __init__(XMLNode self, XMLInputStream stream) -> XMLNode
55439        __init__(XMLNode self, XMLNode orig) -> XMLNode
55440
55441        This method has multiple variants; they differ in the arguments
55442         they accept.  Each variant is described separately below.
55443
55444        @par
55445        <hr>
55446        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55447         <pre class='signature'>XMLNode(XMLToken token)</pre>
55448
55449        Creates a new XMLNode by copying an XMLToken object.
55450
55451        @param token XMLToken to be copied to XMLNode.
55452
55453
55454        @par
55455        <hr>
55456        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55457         <pre class='signature'>XMLNode(  XMLTriple     triple , XMLAttributes attributes , XMLNamespaces namespaces ,  long   line   = 0 ,  long   column = 0 )</pre>
55458
55459        Creates a new start element XMLNode with the given set of attributes and
55460        namespace declarations.
55461
55462        @param triple XMLTriple.
55463        @param attributes XMLAttributes, the attributes to set.
55464        @param namespaces XMLNamespaces, the namespaces to set.
55465        @param line a long integer, the line number (default = 0).
55466        @param column a long integer, the column number (default = 0).
55467
55468        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
55469
55470
55471
55472        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
55473
55474
55475        @par
55476        <hr>
55477        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55478         <pre class='signature'>XMLNode(XMLNode orig)</pre>
55479
55480        Copy constructor; creates a copy of this XMLNode.
55481
55482        @param orig the XMLNode instance to copy.
55483
55484
55485        @par
55486        <hr>
55487        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55488         <pre class='signature'>XMLNode()</pre>
55489
55490        Creates a new empty XMLNode with no children.
55491
55492
55493        @par
55494        <hr>
55495        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55496         <pre class='signature'>XMLNode(  XMLTriple      triple , XMLAttributes  attributes ,  long    line   = 0 ,  long    column = 0 )</pre>
55497
55498        Creates a start element XMLNode with the given set of attributes.
55499
55500        @param triple XMLTriple.
55501        @param attributes XMLAttributes, the attributes to set.
55502        @param line a long integer, the line number (default = 0).
55503        @param column a long integer, the column number (default = 0).
55504
55505        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
55506
55507
55508
55509        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
55510
55511
55512        @par
55513        <hr>
55514        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55515         <pre class='signature'>XMLNode(  XMLTriple    triple ,  long  line   = 0 ,  long  column = 0 )</pre>
55516
55517        Creates an end element XMLNode.
55518
55519        @param triple XMLTriple.
55520        @param line a long integer, the line number (default = 0).
55521        @param column a long integer, the column number (default = 0).
55522
55523        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
55524
55525
55526
55527        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
55528
55529
55530        @par
55531        <hr>
55532        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55533         <pre class='signature'>XMLNode(  string  chars ,  long  line   = 0 ,  long  column = 0 )</pre>
55534
55535        Creates a text XMLNode.
55536
55537        @param chars a string, the text to be added to the XMLToken.
55538        @param line a long integer, the line number (default = 0).
55539        @param column a long integer, the column number (default = 0).
55540
55541        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
55542
55543
55544
55545        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
55546
55547        """
55548        _libsbml.XMLNode_swiginit(self, _libsbml.new_XMLNode(*args))
55549
55550    def clone(self):
55551        r"""
55552        clone(XMLNode self) -> XMLNode
55553
55554        Creates and returns a deep copy of this XMLNode object.
55555
55556        @return the (deep) copy of this XMLNode object.
55557
55558        """
55559        return _libsbml.XMLNode_clone(self)
55560
55561    def addChild(self, node):
55562        r"""
55563        addChild(XMLNode self, XMLNode node) -> int
55564
55565        Adds a copy of @p node as a child of this XMLNode.
55566
55567        The given @p node is added at the end of the list of children.
55568
55569        @param node the XMLNode to be added as child.
55570
55571        @return integer value indicating success/failure of the
55572        function.  @if clike The value is drawn from the
55573        enumeration #OperationReturnValues_t. @endif@~ The possible values
55574        returned by this function are:
55575        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
55576        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
55577        @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
55578
55579        @note The given node is added at the end of the children list.
55580
55581        """
55582        return _libsbml.XMLNode_addChild(self, node)
55583
55584    def insertChild(self, n, node):
55585        r"""
55586        insertChild(XMLNode self, unsigned int n, XMLNode node) -> XMLNode
55587
55588        Inserts a copy of the given node as the <code>n</code>th child of this
55589        XMLNode.
55590
55591        If the given index @p n is out of range for this XMLNode instance,
55592        the @p node is added at the end of the list of children.  Even in
55593        that situation, this method does not throw an error.
55594
55595        @param n an integer, the index at which the given node is inserted.
55596        @param node an XMLNode to be inserted as <code>n</code>th child.
55597
55598        @return a reference to the newly-inserted child @p node.
55599
55600        """
55601        return _libsbml.XMLNode_insertChild(self, n, node)
55602
55603    def removeChild(self, n):
55604        r"""
55605        removeChild(XMLNode self, unsigned int n) -> XMLNode
55606
55607        Removes the <code>n</code>th child of this XMLNode and returns the
55608        removed node.
55609
55610        It is important to keep in mind that a given XMLNode may have more
55611        than one child.  Calling this method erases all existing references to
55612        child nodes @em after the given position @p n.  If the index @p n is
55613        greater than the number of child nodes in this XMLNode, this method
55614        takes no action (and returns @c None).
55615
55616        @param n an integer, the index of the node to be removed.
55617
55618        @return the removed child, or @c None if @p n is greater than the number
55619        of children in this node.
55620
55621        @note The caller owns the returned node and is responsible for deleting it.
55622
55623        """
55624        return _libsbml.XMLNode_removeChild(self, n)
55625
55626    def removeChildren(self):
55627        r"""
55628        removeChildren(XMLNode self) -> int
55629
55630        Removes all children from this node.
55631        @return integer value indicating success/failure of the
55632        function.  @if clike The value is drawn from the
55633        enumeration #OperationReturnValues_t. @endif@~ The possible values
55634        returned by this function are:
55635        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
55636
55637        """
55638        return _libsbml.XMLNode_removeChildren(self)
55639
55640    def getChild(self, *args):
55641        r"""
55642        getChild(XMLNode self, unsigned int n) -> XMLNode
55643        getChild(XMLNode self, unsigned int n) -> XMLNode
55644        getChild(XMLNode self, string name) -> XMLNode
55645        getChild(XMLNode self, string name) -> XMLNode
55646
55647        This method has multiple variants; they differ in the arguments
55648         they accept.  Each variant is described separately below.
55649
55650        @par
55651        <hr>
55652        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55653         <pre class='signature'>getChild(long n)</pre>
55654
55655        Returns the  <code>n</code>th child of this XMLNode.
55656
55657        If the index @p n is greater than the number of child nodes,
55658        this method returns an empty node.
55659
55660        @param n a long integereger, the index of the node to return.
55661
55662        @return the <code>n</code>th child of this XMLNode.
55663
55664
55665        @par
55666        <hr>
55667        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55668         <pre class='signature'>getChild(string  name)</pre>
55669
55670        Returns the first child of this XMLNode with the corresponding name.
55671
55672        If no child with corrsponding name can be found,
55673        this method returns an empty node.
55674
55675        @param name the name of the node to return.
55676
55677        @return the first child of this XMLNode with given name.
55678
55679        """
55680        return _libsbml.XMLNode_getChild(self, *args)
55681
55682    def getIndex(self, name):
55683        r"""
55684        getIndex(XMLNode self, string name) -> int
55685
55686        Return the index of the first child of this XMLNode with the given name.
55687
55688        @param name a string, the name of the child for which the
55689        index is required.
55690
55691        @return the index of the first child of this XMLNode with the given
55692        name, or @c -1 if not present.
55693
55694        """
55695        return _libsbml.XMLNode_getIndex(self, name)
55696
55697    def hasChild(self, name):
55698        r"""
55699        hasChild(XMLNode self, string name) -> bool
55700
55701        Return a boolean indicating whether this XMLNode has a child with the
55702        given name.
55703
55704        @param name a string, the name of the child to be checked.
55705
55706        @return boolean indicating whether this XMLNode has a child with the
55707        given name.
55708
55709        """
55710        return _libsbml.XMLNode_hasChild(self, name)
55711
55712    def equals(self, other, ignoreURI=False, ignoreAttributeValues=False):
55713        r"""
55714        equals(XMLNode self, XMLNode other, bool ignoreURI=False, bool ignoreAttributeValues=False) -> bool
55715
55716        Compare this XMLNode against another XMLNode returning true if both
55717        nodes represent the same XML tree, or false otherwise.
55718
55719        @param other another XMLNode to compare against.
55720
55721        @param ignoreURI whether to ignore the namespace URI when doing the
55722        comparison.
55723
55724        @param ignoreAttributeValues whetehr to ignore attribute values when
55725        doing the comparison.
55726
55727        @return boolean indicating whether this XMLNode represents the same XML
55728        tree as another.
55729
55730        """
55731        return _libsbml.XMLNode_equals(self, other, ignoreURI, ignoreAttributeValues)
55732
55733    def getNumChildren(self):
55734        r"""
55735        getNumChildren(XMLNode self) -> unsigned int
55736
55737        Returns the number of children for this XMLNode.
55738
55739        @return the number of children for this XMLNode.
55740
55741        """
55742        return _libsbml.XMLNode_getNumChildren(self)
55743
55744    def writeToStream(self, stream):
55745        r"""
55746        writeToStream(XMLNode self, XMLOutputStream stream)
55747
55748        @internal
55749
55750        @internal
55751
55752        """
55753        return _libsbml.XMLNode_writeToStream(self, stream)
55754
55755    def toXMLString(self):
55756        r"""
55757        toXMLString(XMLNode self) -> string
55758
55759        Returns a string representation of this XMLNode.
55760
55761        @return a string derived from this XMLNode.
55762
55763        """
55764        return _libsbml.XMLNode_toXMLString(self)
55765
55766    @staticmethod
55767    def convertXMLNodeToString(node):
55768        r"""
55769        convertXMLNodeToString(XMLNode node) -> string
55770
55771        Returns a string representation of a given XMLNode.
55772
55773        @param node the XMLNode to be represented as a string.
55774
55775        @return a string-form representation of @p node.
55776
55777        """
55778        return _libsbml.XMLNode_convertXMLNodeToString(node)
55779
55780    @staticmethod
55781    def convertStringToXMLNode(xmlstr, xmlns=None):
55782        r"""
55783        convertStringToXMLNode(string xmlstr, XMLNamespaces xmlns=None) -> XMLNode
55784
55785        Returns an XMLNode which is derived from a string containing XML
55786        content.
55787
55788        The XML namespace must be defined using argument @p xmlns if the
55789        corresponding XML namespace attribute is not part of the string of the
55790        first argument.
55791
55792        @param xmlstr string to be converted to a XML node.
55793        @param xmlns XMLNamespaces the namespaces to set (default value is @c None).
55794
55795        @note The caller owns the returned XMLNode and is reponsible for
55796        deleting it.  The returned XMLNode object is a dummy root (container)
55797        XMLNode if the top-level element in the given XML string is NOT
55798        <code>&lt;html&gt;</code>, <code>&lt;body&gt;</code>,
55799        <code>&lt;annotation&gt;</code>, or <code>&lt;notes&gt;</code>.  In
55800        the dummy root node, each top-level element in the given XML string is
55801        contained as a child XMLNode. XMLToken.isEOF() can be used to
55802        identify if the returned XMLNode object is a dummy node.
55803
55804        @return a XMLNode which is converted from string @p xmlstr.  If the
55805        conversion failed, this method returns @c None.
55806
55807        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
55808
55809
55810
55811        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
55812
55813        """
55814        return _libsbml.XMLNode_convertStringToXMLNode(xmlstr, xmlns)
55815
55816# Register XMLNode in _libsbml:
55817_libsbml.XMLNode_swigregister(XMLNode)
55818
55819def XMLNode_convertXMLNodeToString(node):
55820    r"""
55821    XMLNode_convertXMLNodeToString(XMLNode node) -> string
55822
55823    Returns a string representation of a given XMLNode.
55824
55825    @param node the XMLNode to be represented as a string.
55826
55827    @return a string-form representation of @p node.
55828
55829    """
55830    return _libsbml.XMLNode_convertXMLNodeToString(node)
55831
55832def XMLNode_convertStringToXMLNode(xmlstr, xmlns=None):
55833    r"""
55834    XMLNode_convertStringToXMLNode(string xmlstr, XMLNamespaces xmlns=None) -> XMLNode
55835
55836    Returns an XMLNode which is derived from a string containing XML
55837    content.
55838
55839    The XML namespace must be defined using argument @p xmlns if the
55840    corresponding XML namespace attribute is not part of the string of the
55841    first argument.
55842
55843    @param xmlstr string to be converted to a XML node.
55844    @param xmlns XMLNamespaces the namespaces to set (default value is @c None).
55845
55846    @note The caller owns the returned XMLNode and is reponsible for
55847    deleting it.  The returned XMLNode object is a dummy root (container)
55848    XMLNode if the top-level element in the given XML string is NOT
55849    <code>&lt;html&gt;</code>, <code>&lt;body&gt;</code>,
55850    <code>&lt;annotation&gt;</code>, or <code>&lt;notes&gt;</code>.  In
55851    the dummy root node, each top-level element in the given XML string is
55852    contained as a child XMLNode. XMLToken.isEOF() can be used to
55853    identify if the returned XMLNode object is a dummy node.
55854
55855    @return a XMLNode which is converted from string @p xmlstr.  If the
55856    conversion failed, this method returns @c None.
55857
55858    @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
55859
55860
55861
55862    @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
55863
55864    """
55865    return _libsbml.XMLNode_convertStringToXMLNode(xmlstr, xmlns)
55866
55867class XMLTriple(object):
55868    r"""
55869
55870    @sbmlpackage{core}
55871
55872    @htmlinclude pkg-marker-core.html A qualified XML name.
55873
55874    @htmlinclude not-sbml-warning.html
55875
55876    A 'triple' in the libSBML XML layer encapsulates the notion of qualified
55877    name, meaning an element name or an attribute name with an optional
55878    namespace qualifier.  Triples by themselves are not entities in an XML
55879    stream&mdash;they are not, for example, elements or attributes; rather,
55880    XMLTriple is used in libSBML to construct these other kinds of objects.
55881
55882    An XMLTriple instance carries up to three data items:
55883    <ol>
55884    <li> The name of the attribute or element; that is, the attribute name
55885    as it appears in an XML document or data stream;
55886    <li> The XML namespace prefix (if any) of the attribute.  For example,
55887    in the following fragment of XML, the namespace prefix is the string
55888    <code>mysim</code> and it appears on both the element
55889    <code>someelement</code> and the attribute <code>attribA</code>.  When
55890    both the element and the attribute are stored as XMLTriple objects,
55891    their <i>prefix</i> is <code>mysim</code>.
55892    @verbatim
55893    <mysim:someelement mysim:attribA='value' />
55894    @endverbatim
55895    <li> The XML namespace URI with which the prefix is associated.  In
55896    XML, every namespace used must be declared and mapped to a URI.
55897    </ol>
55898
55899    XMLTriple objects are the lowest-level data item in the XML layer
55900    of libSBML.  Other objects such as XMLToken make use of XMLTriple
55901    objects.
55902
55903    @see XMLToken
55904    @see XMLNode
55905    @see XMLAttributes
55906    @see XMLNamespaces
55907
55908    """
55909
55910    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
55911    __repr__ = _swig_repr
55912
55913    def __init__(self, *args):
55914        r"""
55915        __init__(XMLTriple self) -> XMLTriple
55916        __init__(XMLTriple self, string name, string uri, string prefix) -> XMLTriple
55917        __init__(XMLTriple self, string triplet, char const sepchar=' ') -> XMLTriple
55918        __init__(XMLTriple self, XMLTriple orig) -> XMLTriple
55919
55920        This method has multiple variants; they differ in the arguments
55921         they accept.  Each variant is described separately below.
55922
55923        @par
55924        <hr>
55925        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55926         <pre class='signature'>XMLTriple(  string  name , string  uri , string  prefix )</pre>
55927
55928        Creates a new XMLTriple object with a given @p name, @p uri and and @p
55929        prefix.
55930
55931        @param name a string, the name for the entity represented by this object.
55932        @param uri a string, the XML namespace URI associated with the prefix.
55933        @param prefix a string, the XML namespace prefix for this triple.
55934
55935
55936        @par
55937        <hr>
55938        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55939         <pre class='signature'>XMLTriple(string triplet,  char sepchar = ' ')</pre>
55940
55941        Creates an XMLTriple object by splitting a given string at a given
55942        separator character.
55943
55944        The 'triplet' in this case is a string that may be in one of the
55945        following three possible formats:
55946        <ol>
55947        <li> <span style='background-color: lightblue; padding-left: 2px; padding-right: 2px'>name</span> </li>
55948        <li> <span style='background-color: #ccc; padding-left: 2px; padding-right: 2px'>URI</span><span style='background-color: purple; color: white; padding-left: 2px; padding-right: 2px'>x</span><span style='background-color: lightblue; padding-left: 2px; padding-right: 2px'>name</span></li>
55949        <li> <span style='background-color: #ccc; padding-left: 2px; padding-right: 2px'>URI</span><span style='background-color: purple; color: white; padding-left: 2px; padding-right: 2px'>x</span><span style='background-color: lightblue; padding-left: 2px; padding-right: 2px'>name</span><span style='background-color: purple; color: white; padding-left: 2px; padding-right: 2px'>x</span><span style='background-color: #d0d0fd; padding-left: 2px; padding-right: 2px'>prefix</span></li>
55950        </ol>
55951
55952        where <span style='background-color: purple; color: white; padding-left: 2px; padding-right: 2px'>x</span>
55953        represents the separator character, @p sepchar.
55954
55955        @param triplet a string representing the triplet as shown above.
55956        @param sepchar a character, the sepchar used in the triplet.
55957
55958        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
55959
55960
55961
55962        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
55963
55964
55965        @par
55966        <hr>
55967        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55968         <pre class='signature'>XMLTriple()</pre>
55969
55970        Creates a new, empty XMLTriple object.
55971
55972
55973        @par
55974        <hr>
55975        <span class='variant-sig-heading'>Method variant with the following signature</span>:
55976         <pre class='signature'>XMLTriple(XMLTriple orig)</pre>
55977
55978        Copy constructor; creates a copy of this XMLTriple object.
55979
55980        @param orig the XMLTriple object to copy.
55981
55982        """
55983        _libsbml.XMLTriple_swiginit(self, _libsbml.new_XMLTriple(*args))
55984    __swig_destroy__ = _libsbml.delete_XMLTriple
55985
55986    def clone(self):
55987        r"""
55988        clone(XMLTriple self) -> XMLTriple
55989
55990        Creates and returns a deep copy of this XMLTriple object.
55991
55992        @return the (deep) copy of this XMLTriple object.
55993
55994        """
55995        return _libsbml.XMLTriple_clone(self)
55996
55997    def getName(self):
55998        r"""
55999        getName(XMLTriple self) -> string
56000
56001        Returns the @em name portion of this XMLTriple object.
56002
56003        @return a string, the name portion of this XMLTriple object.
56004
56005        """
56006        return _libsbml.XMLTriple_getName(self)
56007
56008    def getPrefix(self):
56009        r"""
56010        getPrefix(XMLTriple self) -> string
56011
56012        Returns the @em prefix portion of this XMLTriple object.
56013
56014        @return a string, the prefix portion of this XMLTriple object.
56015
56016        """
56017        return _libsbml.XMLTriple_getPrefix(self)
56018
56019    def getURI(self):
56020        r"""
56021        getURI(XMLTriple self) -> string
56022
56023        Returns the @em URI portion of this XMLTriple object.
56024
56025        @return URI a string, the URI portion of this XMLTriple object.
56026
56027        """
56028        return _libsbml.XMLTriple_getURI(self)
56029
56030    def getPrefixedName(self):
56031        r"""
56032        getPrefixedName(XMLTriple self) -> string
56033
56034        Returns the prefixed name from this XMLTriple.
56035
56036        @return a string, the prefixed name from this XMLTriple.  This is
56037        constructed by concatenating the @em prefix stored in this XMLTriple
56038        object, followed by a colon character <code>':'</code>, followed by the
56039        @em name stored in this XMLTriple object.
56040
56041        """
56042        return _libsbml.XMLTriple_getPrefixedName(self)
56043
56044    def isEmpty(self):
56045        r"""
56046        isEmpty(XMLTriple self) -> bool
56047
56048        Returns @c True if this XMLTriple object is empty.
56049
56050        @return @c True if this XMLTriple is empty, @c False otherwise.
56051
56052        """
56053        return _libsbml.XMLTriple_isEmpty(self)
56054
56055    def __eq__(self, rhs):
56056      if ((self is None) and (rhs is None)): return True
56057      if ((self is None) or  (rhs is None)): return False
56058      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
56059        if (self.this == rhs.this): return True
56060      return False
56061
56062    def __ne__(self, rhs):
56063      if ((self is None) and (rhs is None)): return False
56064      if ((self is None) or  (rhs is None)): return True
56065      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
56066        if (self.this == rhs.this): return False
56067      return True
56068
56069
56070# Register XMLTriple in _libsbml:
56071_libsbml.XMLTriple_swigregister(XMLTriple)
56072
56073class XMLOutputStream(object):
56074    r"""
56075
56076    @sbmlpackage{core}
56077
56078    @htmlinclude pkg-marker-core.html Interface to an XML output stream.
56079
56080    @htmlinclude not-sbml-warning.html
56081
56082    SBML content is serialized using XML; the resulting data can be stored and
56083    read to/from a file or data stream.  Low-level XML parsers such as Xerces
56084    provide facilities to read XML data.  To permit the use of different XML
56085    parsers (Xerces, Expat or libxml2), libSBML implements an abstraction
56086    layer.  XMLInputStream and XMLOutputStream are two parts of that
56087    abstraction layer.
56088
56089    XMLOutputStream provides a wrapper above output streams to facilitate
56090    writing XML.  XMLOutputStream keeps track of start and end elements,
56091    indentation, XML namespace prefixes, and more.  The interface provides
56092    features for converting non-text data types into appropriate textual form;
56093    this takes the form of overloaded <code>writeAttribute(...)</code> methods
56094    that allow users to simply use the same method with any data type.  For
56095    example, suppose an element @c testElement has two attributes, @c size and
56096    @c id, and the attributes are variables in your code as follows:
56097    @if cpp
56098    @code{.cpp}
56099    double size = 3.2;
56100    string id = 'id';
56101    @endcode
56102    @endif
56103    @if java
56104    @code
56105    double size = 3.2;
56106    String id = 'id';
56107    @endcode
56108    @endif
56109    @if python
56110    @code
56111    size = 3.2;
56112    id = 'id';
56113    @endcode
56114    @endif
56115    Then, the element and the attributes can be written to the
56116    standard output stream @ifnot cpp (provided as @c cout in the libSBML
56117    language bindings)@endif@~ as follows:
56118    @if cpp
56119    @code{.cpp}
56120    double size = 3.2;
56121    string id = 'id';
56122
56123    // Create an XMLOutputStream object that will write to the
56124    // standard output stream:
56125
56126    XMLOutputStream xos = new XMLOutputStream(cout);
56127
56128    // Create the start element, write the attributes, and close
56129    // the element.  The output will be written immediately as
56130    // each method is called.
56131
56132    xos.startElement('testElement')
56133    xos.writeAttribute('size', size)
56134    xos.writeAttribute('id', id)
56135    xos.endElement('testElement')
56136    @endcode
56137    @endif
56138    @if java
56139    @code{.java}
56140    import org.sbml.libsbml.XMLOutputStream;
56141    import org.sbml.libsbml.libsbml;
56142
56143    public class test
56144    {
56145        public static void main (String[] args)
56146        {
56147            double size = 3.2;
56148            String id = 'id';
56149
56150            // Create an XMLOutputStream object that will write to the
56151            // standard output stream, which is provide in libSBML's
56152            // Java language interface as the object 'libsbml.cout'.
56153
56154            XMLOutputStream xos = new XMLOutputStream(libsbml.cout);
56155
56156            // Create the start element, write the attributes, and close
56157            // the element.  The output will be written immediately as
56158            // each method is called.
56159
56160            xos.startElement('testElement');
56161            xos.writeAttribute('size', size);
56162            xos.writeAttribute('id', id);
56163            xos.endElement('testElement');
56164        }
56165
56166        static
56167        {
56168            System.loadLibrary('sbmlj');
56169        }
56170    }
56171    @endcode
56172    @endif
56173    @if python
56174    @code{.py}
56175    from libsbml import *
56176
56177    size = 3.2;
56178    id = 'id';
56179
56180    # Create an XMLOutputStream object that will write to the standard
56181    # output stream, which is provide in libSBML's Python language
56182    # interface as the object 'libsbml.cout'.  Since we imported * from
56183    # the libsbml module, we can simply refer to it as 'cout' here:
56184
56185    output_stream = XMLOutputStream(cout)
56186
56187    # Create the start element, write the attributes, and close the
56188    # element.  The output is written immediately by each method.
56189
56190    output_stream.startElement('testElement')
56191    output_stream.writeAttribute('size', size)
56192    output_stream.writeAttribute('id', id)
56193    output_stream.endElement('testElement')
56194    @endcode
56195    @endif
56196
56197    Other classes in SBML take XMLOutputStream objects as arguments, and use
56198    that to write elements and attributes seamlessly to the XML output stream.
56199
56200    It is also worth noting that unlike XMLInputStream, XMLOutputStream is
56201    actually independent of the underlying XML parsers.  It does not use the
56202    XML parser libraries at all.
56203
56204    @note The convenience of the XMLInputStream and XMLOutputStream
56205    abstraction may be useful for developers interested in creating parsers
56206    for other XML formats besides SBML.  It can provide developers with a
56207    layer above more basic XML parsers, as well as some useful programmatic
56208    elements such as XMLToken, XMLError, etc.
56209
56210    @see XMLInputStream
56211
56212    """
56213
56214    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
56215    __repr__ = _swig_repr
56216
56217    def __init__(self, *args):
56218        r"""
56219        __init__(XMLOutputStream self, ostream stream, string encoding="UTF-8", bool writeXMLDecl=True, string programName="", string programVersion="") -> XMLOutputStream
56220
56221        Creates a new XMLOutputStream that wraps the given @p stream.
56222
56223        The functionality associated with the @p programName and @p
56224        programVersion arguments concerns an optional comment that libSBML can
56225        write at the beginning of the output stream.  The comment is intended
56226        for human readers of the XML file, and has the following form:
56227        @verbatim
56228        <!-- Created by <program name> version <program version>
56229        on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
56230        @endverbatim
56231
56232        This program information comment is a separate item from the XML
56233        declaration that this method can also write to this output stream.  The
56234        comment is also not mandated by any SBML specification.  This libSBML
56235        functionality is provided for the convenience of calling programs, and to
56236        help humans trace the origin of SBML files.
56237
56238        LibSBML tries to produce human-readable XML output by automatically
56239        indenting the bodies of elements.  Callers can manually control
56240        indentation further by using the XMLOutputStream::upIndent()
56241        and XMLOutputStream::downIndent() methods to increase and
56242        decrease, respectively, the current level of indentation in the
56243        XML output.
56244
56245        @param stream the input stream to wrap.
56246
56247        @param encoding the XML encoding to declare in the output. This value should
56248        be <code>&quot;UTF-8&quot;</code> for SBML documents.  The default value is
56249        <code>&quot;UTF-8&quot;</code> if no value is supplied for this parameter.
56250
56251        @param writeXMLDecl whether to write a standard XML declaration at
56252        the beginning of the content written on @p stream.  The default is
56253        @c true.
56254
56255        @param programName an optional program name to write as a comment
56256        in the output stream.
56257
56258        @param programVersion an optional version identification string to write
56259        as a comment in the output stream.
56260
56261        @htmlinclude warn-default-args-in-docs.html
56262
56263        """
56264        _libsbml.XMLOutputStream_swiginit(self, _libsbml.new_XMLOutputStream(*args))
56265    __swig_destroy__ = _libsbml.delete_XMLOutputStream
56266
56267    def endElement(self, *args):
56268        r"""
56269        endElement(XMLOutputStream self, string name, string prefix="")
56270        endElement(XMLOutputStream self, XMLTriple triple, bool text=False)
56271
56272        This method has multiple variants; they differ in the arguments
56273         they accept.  Each variant is described separately below.
56274
56275        @par
56276        <hr>
56277        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56278         <pre class='signature'>endElement(string name, string prefix = '')</pre>
56279
56280        Writes the given XML end element name to this XMLOutputStream.
56281
56282        @param name the name of the element.
56283
56284        @param prefix an optional XML namespace prefix to write in front of the
56285        @p element name.  (The result has the form
56286        <code><em>prefix</em>:<em>name</em></code>.)
56287
56288        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
56289
56290
56291
56292        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
56293
56294
56295        @par
56296        <hr>
56297        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56298         <pre class='signature'>endElement(XMLTriple triple, bool text = false)</pre>
56299
56300        Writes the given element to the stream.
56301
56302        @param triple the XML element to write.
56303        @param text the text to put
56304
56305
56306
56307        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
56308
56309        """
56310        return _libsbml.XMLOutputStream_endElement(self, *args)
56311
56312    def setAutoIndent(self, indent):
56313        r"""
56314        setAutoIndent(XMLOutputStream self, bool indent)
56315
56316        Turns automatic indentation on or off for this XMLOutputStream.
56317
56318        @param indent if @c True, automatic indentation is turned on.
56319
56320        """
56321        return _libsbml.XMLOutputStream_setAutoIndent(self, indent)
56322
56323    def startElement(self, *args):
56324        r"""
56325        startElement(XMLOutputStream self, string name, string prefix="")
56326        startElement(XMLOutputStream self, XMLTriple triple)
56327
56328        This method has multiple variants; they differ in the arguments
56329         they accept.  Each variant is described separately below.
56330
56331        @par
56332        <hr>
56333        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56334         <pre class='signature'>startElement(XMLTriple triple)</pre>
56335
56336        Writes the given XML start element
56337        <code><em>prefix</em>:<em>name</em></code> on this output stream.
56338
56339        @param triple the start element to write.
56340
56341
56342        @par
56343        <hr>
56344        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56345         <pre class='signature'>startElement(string name, string prefix = '')</pre>
56346
56347        Writes the given XML start element name to this XMLOutputStream.
56348
56349        @param name the name of the element.
56350
56351        @param prefix an optional XML namespace prefix to write in front of the
56352        @p element name.  (The result has the form
56353        <code><em>prefix</em>:<em>name</em></code>.)
56354
56355        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
56356
56357
56358
56359        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
56360
56361        """
56362        return _libsbml.XMLOutputStream_startElement(self, *args)
56363
56364    def startEndElement(self, *args):
56365        r"""
56366        startEndElement(XMLOutputStream self, string name, string prefix="")
56367        startEndElement(XMLOutputStream self, XMLTriple triple)
56368
56369        This method has multiple variants; they differ in the arguments
56370         they accept.  Each variant is described separately below.
56371
56372        @par
56373        <hr>
56374        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56375         <pre class='signature'>startEndElement(XMLTriple triple)</pre>
56376
56377        Writes the given start element to this output stream.
56378
56379        @param triple the XML element to write.
56380
56381
56382        @par
56383        <hr>
56384        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56385         <pre class='signature'>startEndElement(string name, string prefix = '')</pre>
56386
56387        Writes the given XML start and end element name to this XMLOutputStream.
56388
56389        @param name the name of the element.
56390
56391        @param prefix an optional XML namespace prefix to write in front of the
56392        @p element name.  (The result has the form
56393        <code><em>prefix</em>:<em>name</em></code>.)
56394
56395        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
56396
56397
56398
56399        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
56400
56401        """
56402        return _libsbml.XMLOutputStream_startEndElement(self, *args)
56403
56404    def writeAttribute(self, *args):
56405        r"""
56406        writeAttribute(XMLOutputStream self, string name, string value)
56407        writeAttribute(XMLOutputStream self, string name, string prefix, string value)
56408        writeAttribute(XMLOutputStream self, XMLTriple triple, string value)
56409        writeAttribute(XMLOutputStream self, string name, char const * value)
56410        writeAttribute(XMLOutputStream self, string name, string prefix, char const * value)
56411        writeAttribute(XMLOutputStream self, XMLTriple triple, char const * value)
56412        writeAttribute(XMLOutputStream self, string name, bool const & value)
56413        writeAttribute(XMLOutputStream self, string name, string prefix, bool const & value)
56414        writeAttribute(XMLOutputStream self, XMLTriple triple, bool const & value)
56415        writeAttribute(XMLOutputStream self, string name, double const & value)
56416        writeAttribute(XMLOutputStream self, string name, string prefix, double const & value)
56417        writeAttribute(XMLOutputStream self, XMLTriple triple, double const & value)
56418        writeAttribute(XMLOutputStream self, string name, long const & value)
56419        writeAttribute(XMLOutputStream self, string name, string prefix, long const & value)
56420        writeAttribute(XMLOutputStream self, XMLTriple triple, long const & value)
56421        writeAttribute(XMLOutputStream self, string name, int const & value)
56422        writeAttribute(XMLOutputStream self, string name, string prefix, int const & value)
56423        writeAttribute(XMLOutputStream self, XMLTriple triple, int const & value)
56424        writeAttribute(XMLOutputStream self, string name, string prefix, unsigned int const & value)
56425
56426        This method has multiple variants; they differ in the arguments
56427         they accept.  Each variant is described separately below.
56428
56429        @par
56430        <hr>
56431        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56432         <pre class='signature'>writeAttribute(XMLTriple triple, string value)</pre>
56433
56434        Writes the given attribute and value to this output stream.
56435
56436        @param triple the attribute, in the form of an XMLTriple.
56437
56438        @param value the value of the attribute.
56439
56440
56441        @par
56442        <hr>
56443        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56444         <pre class='signature'>writeAttribute(string name, string prefix, long value)</pre>
56445
56446        Writes the given namespace-prefixed attribute value to this output stream.
56447
56448        @param name the name of the attribute.
56449
56450        @param prefix an XML namespace prefix to write in front of the
56451        @p element name.  (The result has the form
56452        <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
56453        this method for a variant that does not require a prefix.
56454
56455        @param value the value of the attribute.
56456
56457
56458        @par
56459        <hr>
56460        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56461         <pre class='signature'>writeAttribute(string name, string prefix, string value)</pre>
56462
56463        Writes the given namespace-prefixed attribute value to this output stream.
56464
56465        @param name the name of the attribute.
56466
56467        @param prefix an XML namespace prefix to write in front of the
56468        @p element name.  (The result has the form
56469        <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
56470        this method for a variant that does not require a prefix.
56471
56472        @param value the value of the attribute.
56473
56474
56475        @par
56476        <hr>
56477        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56478         <pre class='signature'>writeAttribute(XMLTriple triple,  bool value)</pre>
56479
56480        Writes the given attribute and value to this output stream.
56481
56482        @param triple the attribute, in the form of an XMLTriple.
56483
56484        @param value the value of the attribute.
56485
56486
56487        @par
56488        <hr>
56489        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56490         <pre class='signature'>writeAttribute(string name, long value)</pre>
56491
56492        Writes the given attribute and value to this output stream.
56493
56494        @param name the name of the attribute.
56495
56496        @param value the value of the attribute.
56497
56498
56499        @par
56500        <hr>
56501        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56502         <pre class='signature'>writeAttribute(XMLTriple triple, long value)</pre>
56503
56504        Writes the given attribute and value to this output stream.
56505
56506        @param triple the attribute, in the form of an XMLTriple.
56507
56508        @param value the value of the attribute.
56509
56510
56511        @par
56512        <hr>
56513        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56514         <pre class='signature'>writeAttribute(XMLTriple triple, long value)</pre>
56515
56516        Writes the given attribute and value to this output stream.
56517
56518        @param triple the attribute, in the form of an XMLTriple.
56519
56520        @param value the value of the attribute.
56521
56522
56523        @par
56524        <hr>
56525        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56526         <pre class='signature'>writeAttribute(string name,  long value)</pre>
56527
56528        Writes the given attribute and value to this output stream.
56529
56530        @param name the name of the attribute.
56531
56532        @param value the value of the attribute.
56533
56534
56535        @par
56536        <hr>
56537        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56538         <pre class='signature'>writeAttribute(string name, string value)</pre>
56539
56540        Writes the given attribute and value to this output stream.
56541
56542        @param name the name of the attribute.
56543
56544        @param value the value of the attribute.
56545
56546
56547        @par
56548        <hr>
56549        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56550         <pre class='signature'>writeAttribute(string name, string value)</pre>
56551
56552        Writes the given attribute and value to this output stream.
56553
56554        @param name the name of the attribute.
56555
56556        @param value the value of the attribute.
56557
56558
56559        @par
56560        <hr>
56561        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56562         <pre class='signature'>writeAttribute(string name, string prefix,  long value)</pre>
56563
56564        Writes the given namespace-prefixed attribute value to this output stream.
56565
56566        @param name the name of the attribute.
56567
56568        @param prefix an XML namespace prefix to write in front of the
56569        @p element name.  (The result has the form
56570        <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
56571        this method for a variant that does not require a prefix.
56572
56573        @param value the value of the attribute.
56574
56575
56576        @par
56577        <hr>
56578        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56579         <pre class='signature'>writeAttribute(string name, string prefix, long value)</pre>
56580
56581        Writes the given namespace-prefixed attribute value to this output stream.
56582
56583        @param name the name of the attribute.
56584
56585        @param prefix an XML namespace prefix to write in front of the
56586        @p element name.  (The result has the form
56587        <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
56588        this method for a variant that does not require a prefix.
56589
56590        @param value the value of the attribute.
56591
56592
56593        @par
56594        <hr>
56595        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56596         <pre class='signature'>writeAttribute(string name, string prefix,  int value)</pre>
56597
56598        Writes the given namespace-prefixed attribute value to this output stream.
56599
56600        @param name the name of the attribute.
56601
56602        @param prefix an XML namespace prefix to write in front of the
56603        @p element name.  (The result has the form
56604        <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
56605        this method for a variant that does not require a prefix.
56606
56607        @param value the value of the attribute.
56608
56609
56610        @par
56611        <hr>
56612        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56613         <pre class='signature'>writeAttribute(XMLTriple triple,  long value)</pre>
56614
56615        Writes the given attribute and value to this output stream.
56616
56617        @param triple the attribute, in the form of an XMLTriple.
56618
56619        @param value the value of the attribute.
56620
56621
56622        @par
56623        <hr>
56624        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56625         <pre class='signature'>writeAttribute(string name,  int value)</pre>
56626
56627        Writes the given attribute and value to this output stream.
56628
56629        @param name the name of the attribute.
56630
56631        @param value the value of the attribute.
56632
56633
56634        @par
56635        <hr>
56636        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56637         <pre class='signature'>writeAttribute(XMLTriple triple,  int value)</pre>
56638
56639        Writes the given attribute and value to this output stream.
56640
56641        @param triple the attribute, in the form of an XMLTriple.
56642
56643        @param value the value of the attribute.
56644
56645
56646        @par
56647        <hr>
56648        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56649         <pre class='signature'>writeAttribute(string name,  bool value)</pre>
56650
56651        Writes the given attribute and value to this output stream.
56652
56653        @param name the name of the attribute.
56654
56655        @param value the value of the attribute.
56656
56657
56658        @par
56659        <hr>
56660        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56661         <pre class='signature'>writeAttribute(XMLTriple triple, string value)</pre>
56662
56663        Writes the given attribute and value to this output stream.
56664
56665        @param triple the attribute, in the form of an XMLTriple.
56666
56667        @param value the value of the attribute.
56668
56669
56670        @par
56671        <hr>
56672        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56673         <pre class='signature'>writeAttribute(string name, long value)</pre>
56674
56675        Writes the given attribute and value to this output stream.
56676
56677        @param name the name of the attribute.
56678
56679        @param value the value of the attribute.
56680
56681
56682        @par
56683        <hr>
56684        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56685         <pre class='signature'>writeAttribute(string name, string prefix, string value)</pre>
56686
56687        Writes the given namespace-prefixed attribute value to this output stream.
56688
56689        @param name the name of the attribute.
56690
56691        @param prefix an XML namespace prefix to write in front of the
56692        @p element name.  (The result has the form
56693        <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
56694        this method for a variant that does not require a prefix.
56695
56696        @param value the value of the attribute.
56697
56698
56699        @par
56700        <hr>
56701        <span class='variant-sig-heading'>Method variant with the following signature</span>:
56702         <pre class='signature'>writeAttribute(string name, string &prefix,  bool value)</pre>
56703
56704        Writes the given namespace-prefixed attribute value to this output stream.
56705
56706        @param name the name of the attribute.
56707
56708        @param prefix an XML namespace prefix to write in front of the
56709        @p element name.  (The result has the form
56710        <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
56711        this method for a variant that does not require a prefix.
56712
56713        @param value the value of the attribute.
56714
56715        """
56716
56717        if type(args[1]) == type(True): return _libsbml.XMLOutputStream_writeAttributeBool(self, *args)
56718
56719
56720        return _libsbml.XMLOutputStream_writeAttribute(self, *args)
56721
56722
56723    def writeXMLDecl(self):
56724        r"""
56725        writeXMLDecl(XMLOutputStream self)
56726
56727        Writes a standard XML declaration to this output stream.
56728
56729        @par
56730        The XML declaration has the form
56731        @verbatim
56732        <?xml version='1.0' encoding='UTF-8'?>
56733        @endverbatim
56734        Note that the SBML specifications require the use of UTF-8 encoding and
56735        version 1.0, so for SBML documents, the above is the standard XML
56736        declaration.
56737
56738        """
56739        return _libsbml.XMLOutputStream_writeXMLDecl(self)
56740
56741    def writeComment(self, programName, programVersion, writeTimestamp=True):
56742        r"""
56743        writeComment(XMLOutputStream self, string programName, string programVersion, bool writeTimestamp=True)
56744
56745        Writes an XML comment with the name and version of this program.
56746
56747        The XML comment has the following form:
56748        @verbatim
56749        <!-- Created by <program name> version <program version>
56750        on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
56751        @endverbatim
56752
56753        See the class constructor for more information about this program
56754        comment.
56755
56756        @param programName an optional program name to write as a comment
56757        in the output stream.
56758
56759        @param programVersion an optional version identification string to write
56760        as a comment in the output stream.
56761
56762        @param writeTimestamp an optional flag indicating that a timestamp should
56763        be written.
56764
56765
56766
56767        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
56768
56769        """
56770        return _libsbml.XMLOutputStream_writeComment(self, programName, programVersion, writeTimestamp)
56771
56772    def downIndent(self):
56773        r"""
56774        downIndent(XMLOutputStream self)
56775
56776        Decreases the indentation level for this XMLOutputStream.
56777
56778        LibSBML tries to produce human-readable XML output by automatically
56779        indenting the bodies of elements.  Callers can manually control
56780        indentation further by using the XMLOutputStream.upIndent()
56781        and XMLOutputStream.downIndent() methods to increase and
56782        decrease, respectively, the current level of indentation in the
56783        XML output.
56784
56785        @see upIndent()
56786
56787        """
56788        return _libsbml.XMLOutputStream_downIndent(self)
56789
56790    def upIndent(self):
56791        r"""
56792        upIndent(XMLOutputStream self)
56793
56794        Increases the indentation level for this XMLOutputStream.
56795
56796        LibSBML tries to produce human-readable XML output by automatically
56797        indenting the bodies of elements.  Callers can manually control
56798        indentation further by using the XMLOutputStream.upIndent()
56799        and XMLOutputStream.downIndent() methods to increase and
56800        decrease, respectively, the current level of indentation in the
56801        XML output.
56802
56803        @see downIndent()
56804
56805        """
56806        return _libsbml.XMLOutputStream_upIndent(self)
56807
56808    def getSBMLNamespaces(self):
56809        r"""
56810        getSBMLNamespaces(XMLOutputStream self) -> SBMLNamespaces
56811
56812        Returns the SBMLNamespaces object attached to this output stream.
56813
56814        @return the SBMLNamespaces object, or @c None if none has been set.
56815
56816        """
56817        return _libsbml.XMLOutputStream_getSBMLNamespaces(self)
56818
56819    def setSBMLNamespaces(self, sbmlns):
56820        r"""
56821        setSBMLNamespaces(XMLOutputStream self, SBMLNamespaces sbmlns)
56822
56823        Sets the SBMLNamespaces object associated with this output stream.
56824
56825        @param sbmlns the namespace object.
56826
56827        """
56828        return _libsbml.XMLOutputStream_setSBMLNamespaces(self, sbmlns)
56829
56830    @staticmethod
56831    def getWriteComment():
56832        r"""
56833        getWriteComment() -> bool
56834
56835        @return a boolean, whether the output stream will write an XML
56836        comment at the top of the file. (Enabled by default.)
56837
56838        """
56839        return _libsbml.XMLOutputStream_getWriteComment()
56840
56841    @staticmethod
56842    def setWriteComment(writeComment):
56843        r"""
56844        setWriteComment(bool writeComment)
56845
56846        sets a flag, whether the output stream will write an XML
56847        comment at the top of the file. (Enabled by default.)
56848
56849        @param writeComment the flag.
56850
56851        """
56852        return _libsbml.XMLOutputStream_setWriteComment(writeComment)
56853
56854    @staticmethod
56855    def getWriteTimestamp():
56856        r"""
56857        getWriteTimestamp() -> bool
56858
56859        @return a boolean, whether the output stream will write an XML
56860        comment with a timestamp at the top of the file. (Enabled by default.)
56861
56862        """
56863        return _libsbml.XMLOutputStream_getWriteTimestamp()
56864
56865    @staticmethod
56866    def setWriteTimestamp(writeTimestamp):
56867        r"""
56868        setWriteTimestamp(bool writeTimestamp)
56869
56870        sets a flag, whether the output stream will write an XML
56871        comment with a timestamp at the top of the file. (Enabled by default.)
56872
56873        @param writeTimestamp the flag.
56874
56875        """
56876        return _libsbml.XMLOutputStream_setWriteTimestamp(writeTimestamp)
56877
56878    @staticmethod
56879    def getLibraryName():
56880        r"""
56881        getLibraryName() -> string
56882
56883        @return the name of the library to be used in comments ('libSBML' by default).
56884
56885        """
56886        return _libsbml.XMLOutputStream_getLibraryName()
56887
56888    @staticmethod
56889    def setLibraryName(libraryName):
56890        r"""
56891        setLibraryName(string libraryName)
56892
56893        sets the name of the library writing the XML
56894        @param libraryName the name of the library to be used in comments.
56895
56896        """
56897        return _libsbml.XMLOutputStream_setLibraryName(libraryName)
56898
56899    @staticmethod
56900    def getLibraryVersion():
56901        r"""
56902        getLibraryVersion() -> string
56903
56904        @return a string representing the version of the library writing the output.
56905        This is the value of getLibSBMLDottedVersion() by default.
56906
56907        """
56908        return _libsbml.XMLOutputStream_getLibraryVersion()
56909
56910    @staticmethod
56911    def setLibraryVersion(libraryVersion):
56912        r"""
56913        setLibraryVersion(string libraryVersion)
56914
56915        sets the name of the library writing the output
56916
56917        @param libraryVersion the version information as string.
56918
56919        """
56920        return _libsbml.XMLOutputStream_setLibraryVersion(libraryVersion)
56921
56922    def getIndent(self):
56923        r"""
56924        getIndent(XMLOutputStream self) -> unsigned int
56925
56926        @internal
56927
56928        @internal
56929
56930        """
56931        return _libsbml.XMLOutputStream_getIndent(self)
56932
56933    def setIndent(self, indent):
56934        r"""
56935        setIndent(XMLOutputStream self, unsigned int indent)
56936
56937        @internal
56938
56939        @internal
56940
56941        """
56942        return _libsbml.XMLOutputStream_setIndent(self, indent)
56943
56944    def writeAttributeBool(self, *args):
56945        r"""
56946        writeAttributeBool(XMLOutputStream self, string name, bool const & value)
56947        writeAttributeBool(XMLOutputStream self, XMLTriple name, bool const & value)
56948        @internal
56949        """
56950        return _libsbml.XMLOutputStream_writeAttributeBool(self, *args)
56951
56952    def __eq__(self, rhs):
56953      if ((self is None) and (rhs is None)): return True
56954      if ((self is None) or  (rhs is None)): return False
56955      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
56956        if (self.this == rhs.this): return True
56957      return False
56958
56959    def __ne__(self, rhs):
56960      if ((self is None) and (rhs is None)): return False
56961      if ((self is None) or  (rhs is None)): return True
56962      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
56963        if (self.this == rhs.this): return False
56964      return True
56965
56966
56967# Register XMLOutputStream in _libsbml:
56968_libsbml.XMLOutputStream_swigregister(XMLOutputStream)
56969
56970def XMLOutputStream_getWriteComment():
56971    r"""
56972    XMLOutputStream_getWriteComment() -> bool
56973
56974    @return a boolean, whether the output stream will write an XML
56975    comment at the top of the file. (Enabled by default.)
56976
56977    """
56978    return _libsbml.XMLOutputStream_getWriteComment()
56979
56980def XMLOutputStream_setWriteComment(writeComment):
56981    r"""
56982    XMLOutputStream_setWriteComment(bool writeComment)
56983
56984    sets a flag, whether the output stream will write an XML
56985    comment at the top of the file. (Enabled by default.)
56986
56987    @param writeComment the flag.
56988
56989    """
56990    return _libsbml.XMLOutputStream_setWriteComment(writeComment)
56991
56992def XMLOutputStream_getWriteTimestamp():
56993    r"""
56994    XMLOutputStream_getWriteTimestamp() -> bool
56995
56996    @return a boolean, whether the output stream will write an XML
56997    comment with a timestamp at the top of the file. (Enabled by default.)
56998
56999    """
57000    return _libsbml.XMLOutputStream_getWriteTimestamp()
57001
57002def XMLOutputStream_setWriteTimestamp(writeTimestamp):
57003    r"""
57004    XMLOutputStream_setWriteTimestamp(bool writeTimestamp)
57005
57006    sets a flag, whether the output stream will write an XML
57007    comment with a timestamp at the top of the file. (Enabled by default.)
57008
57009    @param writeTimestamp the flag.
57010
57011    """
57012    return _libsbml.XMLOutputStream_setWriteTimestamp(writeTimestamp)
57013
57014def XMLOutputStream_getLibraryName():
57015    r"""
57016    XMLOutputStream_getLibraryName() -> string
57017
57018    @return the name of the library to be used in comments ('libSBML' by default).
57019
57020    """
57021    return _libsbml.XMLOutputStream_getLibraryName()
57022
57023def XMLOutputStream_setLibraryName(libraryName):
57024    r"""
57025    XMLOutputStream_setLibraryName(string libraryName)
57026
57027    sets the name of the library writing the XML
57028    @param libraryName the name of the library to be used in comments.
57029
57030    """
57031    return _libsbml.XMLOutputStream_setLibraryName(libraryName)
57032
57033def XMLOutputStream_getLibraryVersion():
57034    r"""
57035    XMLOutputStream_getLibraryVersion() -> string
57036
57037    @return a string representing the version of the library writing the output.
57038    This is the value of getLibSBMLDottedVersion() by default.
57039
57040    """
57041    return _libsbml.XMLOutputStream_getLibraryVersion()
57042
57043def XMLOutputStream_setLibraryVersion(libraryVersion):
57044    r"""
57045    XMLOutputStream_setLibraryVersion(string libraryVersion)
57046
57047    sets the name of the library writing the output
57048
57049    @param libraryVersion the version information as string.
57050
57051    """
57052    return _libsbml.XMLOutputStream_setLibraryVersion(libraryVersion)
57053
57054class XMLOwningOutputStringStream(object):
57055    r"""Proxy of C++ XMLOwningOutputStringStream class."""
57056
57057    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
57058    __repr__ = _swig_repr
57059
57060    def __init__(self, *args):
57061        r"""
57062        __init__(XMLOwningOutputStringStream self, string encoding="UTF-8", bool writeXMLDecl=True, string programName="", string programVersion="") -> XMLOwningOutputStringStream
57063
57064        @internal
57065
57066
57067        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
57068
57069        @internal
57070
57071        """
57072        _libsbml.XMLOwningOutputStringStream_swiginit(self, _libsbml.new_XMLOwningOutputStringStream(*args))
57073    __swig_destroy__ = _libsbml.delete_XMLOwningOutputStringStream
57074
57075# Register XMLOwningOutputStringStream in _libsbml:
57076_libsbml.XMLOwningOutputStringStream_swigregister(XMLOwningOutputStringStream)
57077
57078class XMLOwningOutputFileStream(object):
57079    r"""Proxy of C++ XMLOwningOutputFileStream class."""
57080
57081    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
57082    __repr__ = _swig_repr
57083
57084    def __init__(self, *args):
57085        r"""
57086        __init__(XMLOwningOutputFileStream self, string filename, string encoding="UTF-8", bool writeXMLDecl=True, string programName="", string programVersion="") -> XMLOwningOutputFileStream
57087
57088        @internal
57089
57090
57091        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
57092
57093        @internal
57094
57095        """
57096        _libsbml.XMLOwningOutputFileStream_swiginit(self, _libsbml.new_XMLOwningOutputFileStream(*args))
57097    __swig_destroy__ = _libsbml.delete_XMLOwningOutputFileStream
57098
57099# Register XMLOwningOutputFileStream in _libsbml:
57100_libsbml.XMLOwningOutputFileStream_swigregister(XMLOwningOutputFileStream)
57101
57102class XMLInputStream(object):
57103    r"""
57104
57105    @sbmlpackage{core}
57106
57107    @htmlinclude pkg-marker-core.html An interface to an XML input stream.
57108
57109    @htmlinclude not-sbml-warning.html
57110
57111    SBML content is serialized using XML; the resulting data can be stored and
57112    read to/from a file or data stream.  Low-level XML parsers such as Xerces
57113    provide facilities to read XML data.  To permit the use of different XML
57114    parsers (Xerces, Expat or libxml2), libSBML implements an abstraction
57115    layer.  XMLInputStream and XMLOutputStream are two parts of that
57116    abstraction layer.
57117
57118    XMLInputStream is an interface to a file or text string containing XML.
57119    It wraps the content to be read, as well as the low-level XML parser to be
57120    used and an XMLErrorLog to record errors and other issues (if any arise).
57121    Internally, the content will be in the form of either a pointer to a file
57122    name or a character string; XMLInputStream knows the form of the content
57123    and acts appropriately.  Other libSBML object classes use XMLInputStream
57124    as their interface for all read operations on the XML data.
57125    XMLInputStream provides the functionality to extract data in the form of
57126    XMLToken objects.  It logs any errors encountered while reading.  It also
57127    keeps track of whether a read operation has failed irrecoverably or
57128    determines whether it is safe to continue reading.
57129
57130    SBMLNamespaces objects can be associated with an XMLInputStream; this
57131    facilitates logging errors related to reading XML attributes and elements
57132    that may only be relevant to particular Level and Version combinations of
57133    SBML.
57134
57135    @note The convenience of the XMLInputStream and XMLOutputStream
57136    abstraction may be useful for developers interested in creating parsers
57137    for other XML formats besides SBML.  It can provide developers with a
57138    layer above more basic XML parsers, as well as some useful programmatic
57139    elements such as XMLToken, XMLError, etc.
57140
57141    @see XMLOutputStream
57142
57143    """
57144
57145    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
57146    __repr__ = _swig_repr
57147
57148    def __init__(self, *args):
57149        r"""
57150        __init__(XMLInputStream self, char const * content, bool isFile=True, string library="", XMLErrorLog errorLog=None) -> XMLInputStream
57151
57152        Creates a new XMLInputStream.
57153
57154        @param content the source of the stream.
57155
57156        @param isFile a boolean flag to indicate whether @p content is a file
57157        name.  If @c true, @p content is assumed to be the file from which the
57158        XML content is to be read.  If @c false, @p content is taken to be a
57159        string that @em is the content to be read.
57160
57161        @param library the name of the parser library to use.
57162
57163        @param errorLog the XMLErrorLog object to use.
57164
57165        @htmlinclude warn-default-args-in-docs.html
57166
57167        """
57168        _libsbml.XMLInputStream_swiginit(self, _libsbml.new_XMLInputStream(*args))
57169    __swig_destroy__ = _libsbml.delete_XMLInputStream
57170
57171    def getEncoding(self):
57172        r"""
57173        getEncoding(XMLInputStream self) -> string
57174
57175        Returns the encoding of the XML stream.
57176
57177        @par The @em encoding is indicated by the <code>xml</code> declaration at the
57178        beginning of an XML document or data stream.  The form of this declaration
57179        is
57180        @verbatim
57181        <?xml version='1.0' encoding='UTF-8'?>
57182        @endverbatim
57183        Note that the SBML specifications require the use of UTF-8 encoding, so
57184        for SBML documents, the value returned by this method will always be
57185        the string <code>'UTF-8'</code>.
57186
57187        @return the encoding of the XML stream.
57188
57189        @see getVersion()
57190
57191        """
57192        return _libsbml.XMLInputStream_getEncoding(self)
57193
57194    def getVersion(self):
57195        r"""
57196        getVersion(XMLInputStream self) -> string
57197
57198        Returns the version of the XML stream.
57199
57200        @par The @em version is indicated by the <code>xml</code> declaration at the
57201        beginning of an XML document or data stream.  The form of this declaration
57202        is
57203        @verbatim
57204         <?xml version='1.0' encoding='UTF-8'?>
57205        @endverbatim
57206        Note that the SBML specifications require the use of version 1.0, so
57207        for SBML documents, the value returned by this method will always be
57208        the string <code>'1.0'</code>.
57209
57210        @return the version of the XML stream.
57211
57212        @see getEncoding()
57213
57214        """
57215        return _libsbml.XMLInputStream_getVersion(self)
57216
57217    def getErrorLog(self):
57218        r"""
57219        getErrorLog(XMLInputStream self) -> XMLErrorLog
57220
57221        Returns the XMLErrorLog used to log parsing problems.
57222
57223        @return the XMLErrorLog used to log XML parse errors and other
57224        validation errors (and messages).
57225
57226        """
57227        return _libsbml.XMLInputStream_getErrorLog(self)
57228
57229    def isEOF(self):
57230        r"""
57231        isEOF(XMLInputStream self) -> bool
57232
57233        Returns @c True if end of file (stream) has been reached.
57234
57235        @return @c True if end of file (stream) has been reached, @c False
57236        otherwise.
57237
57238        """
57239        return _libsbml.XMLInputStream_isEOF(self)
57240
57241    def isError(self):
57242        r"""
57243        isError(XMLInputStream self) -> bool
57244
57245        Returns @c True if a fatal error occurred while reading from this
57246        stream.
57247
57248        @return @c True if a fatal error occurred while reading from this
57249        stream.
57250
57251        """
57252        return _libsbml.XMLInputStream_isError(self)
57253
57254    def isGood(self):
57255        r"""
57256        isGood(XMLInputStream self) -> bool
57257
57258        Returns @c True if the stream is in a good state.
57259
57260        The definition of 'good state' is that isEOF() and isError() both return
57261        @c False.
57262
57263        @return @c True if the stream is in a good state, @c False otherwise.
57264
57265        """
57266        return _libsbml.XMLInputStream_isGood(self)
57267
57268    def next(self):
57269        r"""
57270        next(XMLInputStream self) -> XMLToken
57271
57272        Returns the next token on this XML input stream.
57273
57274        The token is consumed in the process.
57275
57276        @return the next XMLToken, or an EOF token (i.e.,
57277        <code>XMLToken.isEOF() == true</code>).
57278
57279        @see peek()
57280
57281        """
57282        return _libsbml.XMLInputStream_next(self)
57283
57284    def peek(self):
57285        r"""
57286        peek(XMLInputStream self) -> XMLToken
57287
57288        Returns the next token @em without consuming it.
57289
57290        A subsequent call to either peek() or next() will return the same token.
57291
57292        @return the next XMLToken or EOF (XMLToken.isEOF() == true).
57293
57294        @see next()
57295
57296        """
57297        return _libsbml.XMLInputStream_peek(self)
57298
57299    def skipPastEnd(self, element):
57300        r"""
57301        skipPastEnd(XMLInputStream self, XMLToken element)
57302
57303        Consume zero or more tokens up to and including the corresponding end
57304        element or EOF.
57305
57306        @param element the element whose end will be sought in the input stream.
57307
57308        """
57309        return _libsbml.XMLInputStream_skipPastEnd(self, element)
57310
57311    def skipText(self):
57312        r"""
57313        skipText(XMLInputStream self)
57314
57315        Consume zero or more tokens up to but not including the next XML element
57316        or EOF.
57317
57318        """
57319        return _libsbml.XMLInputStream_skipText(self)
57320
57321    def setErrorLog(self, log):
57322        r"""
57323        setErrorLog(XMLInputStream self, XMLErrorLog log) -> int
57324
57325        Sets the XMLErrorLog this stream will use to log errors.
57326
57327        @return integer value indicating success/failure of the
57328        function.  @if clike The value is drawn from the
57329        enumeration #OperationReturnValues_t. @endif@~ The possible values
57330        returned by this function are:
57331        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
57332        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
57333
57334        """
57335        return _libsbml.XMLInputStream_setErrorLog(self, log)
57336
57337    def toString(self):
57338        r"""
57339        toString(XMLInputStream self) -> string
57340
57341        Prints a string representation of the underlying token stream.
57342
57343        @return a string representing the underlying XML token stream.
57344
57345        @note This method is intended for debugging purposes.
57346
57347        """
57348        return _libsbml.XMLInputStream_toString(self)
57349
57350    def getSBMLNamespaces(self):
57351        r"""
57352        getSBMLNamespaces(XMLInputStream self) -> SBMLNamespaces
57353
57354        Returns the SBMLNamespaces object attached to this XMLInputStream.
57355
57356        @return the SBMLNamespaces object or @c None if none has been set.
57357
57358        """
57359        return _libsbml.XMLInputStream_getSBMLNamespaces(self)
57360
57361    def setSBMLNamespaces(self, sbmlns):
57362        r"""
57363        setSBMLNamespaces(XMLInputStream self, SBMLNamespaces sbmlns)
57364
57365        Sets the SBML namespaces associated with this XML input stream.
57366
57367        This allows this stream to reference the available SBML namespaces being
57368        read.
57369
57370        @param sbmlns the list of namespaces to use.
57371
57372        """
57373        return _libsbml.XMLInputStream_setSBMLNamespaces(self, sbmlns)
57374
57375    def determineNumberChildren(self, *args):
57376        r"""
57377        determineNumberChildren(XMLInputStream self, string elementName="") -> unsigned int
57378
57379        Returns the number of child tokens of the given element in this stream.
57380
57381        This method allows information from the input stream to be determined
57382        without the need to actually read and consume the tokens in the stream.
57383        It returns the number of child elements of the element represented by
57384        the @p elementName, i.e., the number of child elements encountered
57385        before the closing tag for the @p elementName supplied.
57386
57387        If no @p elementName is supplied or it is an empty string, then as a
57388        special case, this method assumes the element is a MathML
57389        <code>apply</code> element followed by a function name.
57390
57391        @param elementName a string representing the name of the element for
57392        which the number of children are to be determined.
57393
57394        @return a long integer giving the number of children of the @p
57395        elementName specified.
57396
57397        @note This method assumes the stream has been read up to and including
57398        the element @p elementName.
57399
57400        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
57401
57402
57403
57404        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
57405
57406        """
57407        return _libsbml.XMLInputStream_determineNumberChildren(self, *args)
57408
57409    def determineNumSpecificChildren(self, childName, container):
57410        r"""
57411        determineNumSpecificChildren(XMLInputStream self, string childName, string container) -> unsigned int
57412
57413        Returns the number of child tokens of the specified type within a
57414        given container element.
57415
57416        This method allows information from the input stream to be determined
57417        without the need to actually read and consume the tokens in the stream.
57418        It returns the number of child elements of the @p childName element
57419        within the element specified by @p container.  In other words, it counts
57420        the number of @p childName elements encountered before the closing tag
57421        for the @p container supplied.
57422
57423        @param childName a string representing the name of the child
57424        element whose number is to be determined.
57425
57426        @param container a string representing the name of the element
57427        for which the number of children are to be determined.
57428
57429        @return a long integer giving the number of children of type @p
57430        childName within the @p container element.
57431
57432        @note This method assumes the stream has been read up to and including
57433        the element @p container.
57434
57435        """
57436        return _libsbml.XMLInputStream_determineNumSpecificChildren(self, childName, container)
57437
57438    def containsChild(self, childName, container):
57439        r"""
57440        containsChild(XMLInputStream self, string childName, string container) -> bool
57441
57442        Predicate returning @c True if a child token of the specified type occurs
57443        within a given container element.
57444
57445        This method allows information from the input stream to be determined
57446        without the need to actually read and consume the tokens in the stream.
57447        It returns @c True if the @p childName element occurs at any point
57448        within the element specified by @p container.
57449
57450        @param childName a string representing the name of the child
57451        element whose presence is to be determined.
57452
57453        @param container a string representing the name of the element
57454        for which the presence of the child element is to be determined.
57455
57456        @return boolean @c True if a child of type @p childName occurs within
57457        the @p container element, @c False otherwise.
57458
57459        @note This method assumes the stream has been read up to and including
57460        the element @p container.
57461
57462        """
57463        return _libsbml.XMLInputStream_containsChild(self, childName, container)
57464
57465# Register XMLInputStream in _libsbml:
57466_libsbml.XMLInputStream_swigregister(XMLInputStream)
57467
57468XMLUnknownError = _libsbml.XMLUnknownError
57469
57470XMLOutOfMemory = _libsbml.XMLOutOfMemory
57471
57472XMLFileUnreadable = _libsbml.XMLFileUnreadable
57473
57474XMLFileUnwritable = _libsbml.XMLFileUnwritable
57475
57476XMLFileOperationError = _libsbml.XMLFileOperationError
57477
57478XMLNetworkAccessError = _libsbml.XMLNetworkAccessError
57479
57480InternalXMLParserError = _libsbml.InternalXMLParserError
57481
57482UnrecognizedXMLParserCode = _libsbml.UnrecognizedXMLParserCode
57483
57484XMLTranscoderError = _libsbml.XMLTranscoderError
57485
57486MissingXMLDecl = _libsbml.MissingXMLDecl
57487
57488MissingXMLEncoding = _libsbml.MissingXMLEncoding
57489
57490BadXMLDecl = _libsbml.BadXMLDecl
57491
57492BadXMLDOCTYPE = _libsbml.BadXMLDOCTYPE
57493
57494InvalidCharInXML = _libsbml.InvalidCharInXML
57495
57496BadlyFormedXML = _libsbml.BadlyFormedXML
57497
57498UnclosedXMLToken = _libsbml.UnclosedXMLToken
57499
57500InvalidXMLConstruct = _libsbml.InvalidXMLConstruct
57501
57502XMLTagMismatch = _libsbml.XMLTagMismatch
57503
57504DuplicateXMLAttribute = _libsbml.DuplicateXMLAttribute
57505
57506UndefinedXMLEntity = _libsbml.UndefinedXMLEntity
57507
57508BadProcessingInstruction = _libsbml.BadProcessingInstruction
57509
57510BadXMLPrefix = _libsbml.BadXMLPrefix
57511
57512BadXMLPrefixValue = _libsbml.BadXMLPrefixValue
57513
57514MissingXMLRequiredAttribute = _libsbml.MissingXMLRequiredAttribute
57515
57516XMLAttributeTypeMismatch = _libsbml.XMLAttributeTypeMismatch
57517
57518XMLBadUTF8Content = _libsbml.XMLBadUTF8Content
57519
57520MissingXMLAttributeValue = _libsbml.MissingXMLAttributeValue
57521
57522BadXMLAttributeValue = _libsbml.BadXMLAttributeValue
57523
57524BadXMLAttribute = _libsbml.BadXMLAttribute
57525
57526UnrecognizedXMLElement = _libsbml.UnrecognizedXMLElement
57527
57528BadXMLComment = _libsbml.BadXMLComment
57529
57530BadXMLDeclLocation = _libsbml.BadXMLDeclLocation
57531
57532XMLUnexpectedEOF = _libsbml.XMLUnexpectedEOF
57533
57534BadXMLIDValue = _libsbml.BadXMLIDValue
57535
57536BadXMLIDRef = _libsbml.BadXMLIDRef
57537
57538UninterpretableXMLContent = _libsbml.UninterpretableXMLContent
57539
57540BadXMLDocumentStructure = _libsbml.BadXMLDocumentStructure
57541
57542InvalidAfterXMLContent = _libsbml.InvalidAfterXMLContent
57543
57544XMLExpectedQuotedString = _libsbml.XMLExpectedQuotedString
57545
57546XMLEmptyValueNotPermitted = _libsbml.XMLEmptyValueNotPermitted
57547
57548XMLBadNumber = _libsbml.XMLBadNumber
57549
57550XMLBadColon = _libsbml.XMLBadColon
57551
57552MissingXMLElements = _libsbml.MissingXMLElements
57553
57554XMLContentEmpty = _libsbml.XMLContentEmpty
57555
57556XMLErrorCodesUpperBound = _libsbml.XMLErrorCodesUpperBound
57557
57558LIBSBML_CAT_INTERNAL = _libsbml.LIBSBML_CAT_INTERNAL
57559
57560LIBSBML_CAT_SYSTEM = _libsbml.LIBSBML_CAT_SYSTEM
57561
57562LIBSBML_CAT_XML = _libsbml.LIBSBML_CAT_XML
57563
57564LIBSBML_SEV_INFO = _libsbml.LIBSBML_SEV_INFO
57565
57566LIBSBML_SEV_WARNING = _libsbml.LIBSBML_SEV_WARNING
57567
57568LIBSBML_SEV_ERROR = _libsbml.LIBSBML_SEV_ERROR
57569
57570LIBSBML_SEV_FATAL = _libsbml.LIBSBML_SEV_FATAL
57571
57572LIBSBML_OVERRIDE_DISABLED = _libsbml.LIBSBML_OVERRIDE_DISABLED
57573
57574LIBSBML_OVERRIDE_DONT_LOG = _libsbml.LIBSBML_OVERRIDE_DONT_LOG
57575
57576LIBSBML_OVERRIDE_WARNING = _libsbml.LIBSBML_OVERRIDE_WARNING
57577
57578LIBSBML_OVERRIDE_ERROR = _libsbml.LIBSBML_OVERRIDE_ERROR
57579
57580class XMLError(object):
57581    r"""
57582
57583    @sbmlpackage{core}
57584
57585    @htmlinclude pkg-marker-core.html XML-level errors, warnings and other diagnostics.
57586
57587    @htmlinclude not-sbml-warning.html
57588
57589    LibSBML can be configured to use any of a number of XML parsers; at the
57590    time of this writing, libSBML supports Xerces versions 2.4 through 3.1,
57591    Expat version 1.95.x and higher, and libxml2 version 2.6.16 and higher.
57592    These parsers each report different status codes for the various
57593    exceptions that can occur during XML processing.  The XMLError object
57594    class abstracts away from the particular diagnostics reported by the
57595    different parsers and presents a single uniform interface and set of
57596    status codes, along with operations for manipulating the error objects.
57597
57598    When the libSBML XML parser layer encounters an error in the XML content
57599    being processed, or when there is something else wrong (such as an
57600    out-of-memory condition), the problems are reported as XMLError objects.
57601    Each XMLError object instance has an identification number that
57602    identifies the nature of the problem.
57603    @if clike This error identifier will be up to five digits
57604    long and drawn from the enumeration <a class='el'
57605    href='#error-codes'>XMLErrorCode_t</a>.  Applications can use the
57606    error identifiers as a means of recognizing the error encountered and
57607    changing their behavior if desired. @else This
57608    error identifier is one of the constants listed in the next section below.
57609    Applications can use the error identifiers as a means of recognizing the
57610    error encountered and changing their behavior if desired.  @endif@~
57611
57612    Integer error codes are useful for software, but not so much for telling
57613    humans what happened.  For this reason, XMLError also provides two text
57614    messages describing the nature of the error.  These messages are
57615    accessible by means of the methods XMLError.getShortMessage() and
57616    XMLError.getMessage().  The method XMLError.getShortMessage() returns
57617    a very brief synopsis of the warning or error condition, whereas
57618    XMLError.getMessage() returns a longer explanation.  These text strings
57619    are suitable for displaying to human users.
57620
57621    Each XMLError object also contains a category code; its value may be
57622    retrieved using the method XMLError.getCategory().  Category values
57623    are drawn from @if clike the enumeration <a class='el' href='#XMLErrorCategory_t'>XMLErrorCategory_t</a> described below.@else a
57624    set of constants whose names begin with the characters @c LIBSBML_CAT_, described below.@endif@~&nbsp;Categories
57625    are used by libSBML to provide more information to calling programs about
57626    the nature of a given error.
57627
57628    In addition to category codes, each XMLError object also has a severity
57629    code; its value may be retrieved using the method
57630    XMLError.getSeverity().  Severity code values are drawn from
57631    @if clike the enumeration <a class='el' href='#XMLErrorSeverity_t'>XMLErrorSeverity_t</a>@else a
57632    set of constants whose names begin with the characters @c LIBSBML_SEV_@endif,
57633    described below. Severity levels range from informational
57634    (@link libsbml#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) to
57635    fatal errors (@link libsbml#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink).
57636
57637    Finally, XMLError objects record the line and column near where the
57638    problem occurred in the XML content.  The values can be retrieved using
57639    the methods XMLError.getLine() and XMLError.getColumn().  We say 'near
57640    where the problem occurred', because many factors affect how accurate
57641    the line/column information ultimately is.  For example, sometimes, the
57642    underlying XML parsers can only report such information for the parent
57643    XML element where an error occurs, and not for the specific point where
57644    the problem occurs.  In other situations, some parsers report invalid
57645    line and/or column numbers altogether.  If this occurs, libSBML sets the
57646    line and/or column number in the XMLError object to either
57647    <code>0</code> or the value of the maximum unsigned long integer
57648    representable on the platform where libSBML is running.  The probability
57649    that a true line or column number in an SBML model would equal this
57650    value is vanishingly small; thus, if an application encounters these
57651    values in an XMLError object, it can assume no valid line/column number
57652    could be provided by libSBML in that situation.
57653
57654    @if clike
57655    <h3><a class='anchor' name='error-codes'>XMLErrorCode_t</a></h3>
57656
57657    This is an enumeration of all the error and warning codes returned by
57658    the XML layer in libSBML.  Each code is an integer with a 4-digit value
57659    less than 10000.  The following table lists each possible value and a
57660    brief description of its meaning.
57661    @endif@if java <h3><a class='anchor'
57662    name='error-codes'>Error codes associated with XMLError objects</a></h3>
57663
57664    The error and warning codes returned by the XML layer in libSBML are
57665    listed in the table below.  In the libSBML Java language interface,
57666    these error identifiers are currently implemented as static integer
57667    constants defined in the interface class <code><a
57668    href='libsbmlConstants.html'>libsbmlConstants</a></code>.  This is
57669    admittedly not an ideal approach from the standpoint of modern Java
57670    programming, but it was necessary to work around the lack of
57671    enumerations in Java prior to JDK 1.5.  Future versions of libSBML may
57672    use a proper Java enumeration type to define the error
57673    identifiers. @endif@if csharp <h3><a class='anchor'
57674    name='error-codes'>Error codes associated with XMLError objects</a></h3>
57675
57676    The error and warning codes returned by the XML layer in libSBML are
57677    listed in the table below.  In the libSBML C# language interface,
57678    these error identifiers are currently implemented as static integer
57679    constants defined in the interface class @link libsbmlcs.libsbml@endlink.@endif@~
57680
57681    <center>
57682    <table cellspacing='1' cellpadding='1' border='0' width='95%'
57683              class='text-table normal-font alt-row-colors'>
57684    <caption>Possible XMLError error codes.  Depending on the programming
57685    language in use, the <em>Enumerator</em> values will be defined either
57686    as a value from an enumeration type @if clike (XMLErrorCode_t)@endif@~
57687    or as integer constants.
57688    To make this table more compact, we have shortened the identifiers for
57689    the category and severity codes to their essential parts.  To get the
57690    actual names of the constants, prepend <code>LIBSBML_CAT_</code> to the
57691    category names and <code>LIBSBML_SEV_</code> to the severity names
57692    shown in the two right-hand columns.
57693    </caption>
57694    <tr style='background: lightgray' class='normal-font'>
57695    <th style='text-align: left'>Enumerator</th>
57696    <th>Meaning</th>
57697    <th width='90' style='text-align: left'>Category</th>
57698    <th width='90' style='text-align: left'>Severity</th>
57699    </tr>
57700    <tr><td>@link libsbml#XMLUnknownError XMLUnknownError@endlink</td><td>Unrecognized error encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr>
57701    <tr><td>@link libsbml#XMLOutOfMemory XMLOutOfMemory@endlink</td> <td>Out of memory</td><td>SYSTEM</td><td>FATAL</td></tr>
57702    <tr><td>@link libsbml#XMLFileUnreadable XMLFileUnreadable@endlink</td> <td>File unreadable</td><td>SYSTEM</td><td>ERROR</td></tr>
57703    <tr><td>@link libsbml#XMLFileUnwritable XMLFileUnwritable@endlink</td> <td>File unwritable</td><td>SYSTEM</td><td>ERROR</td></tr>
57704    <tr><td>@link libsbml#XMLFileOperationError XMLFileOperationError@endlink</td><td>Error encountered while attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr>
57705    <tr><td>@link libsbml#XMLNetworkAccessError XMLNetworkAccessError@endlink</td><td>Network access error</td><td>SYSTEM</td><td>ERROR</td></tr>
57706    <tr><td>@link libsbml#InternalXMLParserError InternalXMLParserError@endlink</td><td>Internal XML parser state error</td><td>INTERNAL</td><td>FATAL</td></tr>
57707    <tr><td>@link libsbml#UnrecognizedXMLParserCode UnrecognizedXMLParserCode@endlink</td><td>XML parser returned an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr>
57708    <tr><td>@link libsbml#XMLTranscoderError XMLTranscoderError@endlink</td><td>Character transcoder error</td><td>INTERNAL</td><td>FATAL</td></tr>
57709    <tr><td>@link libsbml#MissingXMLDecl MissingXMLDecl@endlink</td><td>Missing XML declaration at beginning of XML input</td><td>XML</td><td>ERROR</td></tr>
57710    <tr><td>@link libsbml#MissingXMLEncoding MissingXMLEncoding@endlink</td><td>Missing encoding attribute in XML declaration</td><td>XML</td><td>ERROR</td></tr>
57711    <tr><td>@link libsbml#BadXMLDecl BadXMLDecl@endlink</td><td>Invalid or unrecognized XML declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr>
57712    <tr><td>@link libsbml#BadXMLDOCTYPE BadXMLDOCTYPE@endlink</td><td>Invalid, malformed or unrecognized XML DOCTYPE declaration</td><td>XML</td><td>ERROR</td></tr>
57713    <tr><td>@link libsbml#InvalidCharInXML InvalidCharInXML@endlink</td><td>Invalid character in XML content</td><td>XML</td><td>ERROR</td></tr>
57714    <tr><td>@link libsbml#BadlyFormedXML BadlyFormedXML@endlink</td><td>XML content is not well-formed</td><td>XML</td><td>ERROR</td></tr>
57715    <tr><td>@link libsbml#UnclosedXMLToken UnclosedXMLToken@endlink</td><td>Unclosed XML token</td><td>XML</td><td>ERROR</td></tr>
57716    <tr><td>@link libsbml#InvalidXMLConstruct InvalidXMLConstruct@endlink</td><td>XML construct is invalid or not permitted</td><td>XML</td><td>ERROR</td></tr>
57717    <tr><td>@link libsbml#XMLTagMismatch XMLTagMismatch@endlink</td><td>Element tag mismatch or missing tag</td><td>XML</td><td>ERROR</td></tr>
57718    <tr><td>@link libsbml#DuplicateXMLAttribute DuplicateXMLAttribute@endlink</td><td>Duplicate XML attribute</td><td>XML</td><td>ERROR</td></tr>
57719    <tr><td>@link libsbml#UndefinedXMLEntity UndefinedXMLEntity@endlink</td><td>Undefined XML entity</td><td>XML</td><td>ERROR</td></tr>
57720    <tr><td>@link libsbml#BadProcessingInstruction BadProcessingInstruction@endlink</td><td>Invalid, malformed or unrecognized XML processing instruction</td><td>XML</td><td>ERROR</td></tr>
57721    <tr><td>@link libsbml#BadXMLPrefix BadXMLPrefix@endlink</td><td>Invalid or undefined XML namespace prefix</td><td>XML</td><td>ERROR</td></tr>
57722    <tr><td>@link libsbml#BadXMLPrefixValue BadXMLPrefixValue@endlink</td><td>Invalid XML namespace prefix value</td><td>XML</td><td>ERROR</td></tr>
57723    <tr><td>@link libsbml#MissingXMLRequiredAttribute MissingXMLRequiredAttribute@endlink</td><td>Missing a required XML attribute</td><td>XML</td><td>ERROR</td></tr>
57724    <tr><td>@link libsbml#XMLAttributeTypeMismatch XMLAttributeTypeMismatch@endlink</td><td>Data type mismatch for the value of an attribute</td><td>XML</td><td>ERROR</td></tr>
57725    <tr><td>@link libsbml#XMLBadUTF8Content XMLBadUTF8Content@endlink</td><td>Invalid UTF8 content</td><td>XML</td><td>ERROR</td></tr>
57726    <tr><td>@link libsbml#MissingXMLAttributeValue MissingXMLAttributeValue@endlink</td><td>Missing or improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr>
57727    <tr><td>@link libsbml#BadXMLAttributeValue BadXMLAttributeValue@endlink</td><td>Invalid or unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr>
57728    <tr><td>@link libsbml#BadXMLAttribute BadXMLAttribute@endlink</td><td>Invalid, unrecognized or malformed attribute</td><td>XML</td><td>ERROR</td></tr>
57729    <tr><td>@link libsbml#UnrecognizedXMLElement UnrecognizedXMLElement@endlink</td><td>Element either not recognized or not permitted</td><td>XML</td><td>ERROR</td></tr>
57730    <tr><td>@link libsbml#BadXMLComment BadXMLComment@endlink</td><td>Badly formed XML comment</td><td>XML</td><td>ERROR</td></tr>
57731    <tr><td>@link libsbml#BadXMLDeclLocation BadXMLDeclLocation@endlink</td><td>XML declaration not permitted in this location</td><td>XML</td><td>ERROR</td></tr>
57732    <tr><td>@link libsbml#XMLUnexpectedEOF XMLUnexpectedEOF@endlink</td><td>Reached end of input unexpectedly</td><td>XML</td><td>ERROR</td></tr>
57733    <tr><td>@link libsbml#BadXMLIDValue BadXMLIDValue@endlink</td><td>Value is invalid for XML ID, or has already been used</td><td>XML</td><td>ERROR</td></tr>
57734    <tr><td>@link libsbml#BadXMLIDRef BadXMLIDRef@endlink</td><td>XML ID value was never declared</td><td>XML</td><td>ERROR</td></tr>
57735    <tr><td>@link libsbml#UninterpretableXMLContent UninterpretableXMLContent@endlink</td><td>Unable to interpret content</td><td>XML</td><td>ERROR</td></tr>
57736    <tr><td>@link libsbml#BadXMLDocumentStructure BadXMLDocumentStructure@endlink</td><td>Bad XML document structure</td><td>XML</td><td>ERROR</td></tr>
57737    <tr><td>@link libsbml#InvalidAfterXMLContent InvalidAfterXMLContent@endlink</td><td>Encountered invalid content after expected content</td><td>XML</td><td>ERROR</td></tr>
57738    <tr><td>@link libsbml#XMLExpectedQuotedString XMLExpectedQuotedString@endlink</td><td>Expected to find a quoted string</td><td>XML</td><td>ERROR</td></tr>
57739    <tr><td>@link libsbml#XMLEmptyValueNotPermitted XMLEmptyValueNotPermitted@endlink</td><td>An empty value is not permitted in this context</td><td>XML</td><td>ERROR</td></tr>
57740    <tr><td>@link libsbml#XMLBadNumber XMLBadNumber@endlink</td><td>Invalid or unrecognized number</td><td>XML</td><td>ERROR</td></tr>
57741    <tr><td>@link libsbml#XMLBadColon XMLBadColon@endlink</td><td>Colon characters are invalid in this context</td><td>XML</td><td>ERROR</td></tr>
57742    <tr><td>@link libsbml#MissingXMLElements MissingXMLElements@endlink</td><td>One or more expected elements are missing</td><td>XML</td><td>ERROR</td></tr>
57743    <tr><td>@link libsbml#XMLContentEmpty XMLContentEmpty@endlink</td><td>Main XML content is empty</td><td>XML</td><td>ERROR</td></tr>
57744    </table>
57745    </center>
57746
57747
57748    @if clike
57749    <h3><a class='anchor' name='error-categories'>XMLErrorCategory_t</a></h3>
57750
57751    As discussed above, each XMLError object contains a value for a category
57752    identifier, describing the type of issue that the XMLError object
57753    represents.  The category can be retrieved from an XMLError object using
57754    the method XMLError.getCategory().  The value is chosen from the
57755    enumeration of category codes <a class='el' href='#XMLErrorCategory_t'>
57756    XMLErrorCategory_t</a>.  The following table
57757    lists each possible value and a brief description of its meaning.
57758    @endif@if java <h3><a class='anchor'
57759    name='error-categories'>Category codes associated with XMLError objects</a></h3>
57760
57761    As discussed above, each XMLError object contains a value for a category
57762    identifier, describing the type of issue that the XMLError object represents.
57763    The category can be retrieved from an XMLError object using the method
57764    XMLError.getCategory(). The following table lists each possible value
57765    and a brief description of its meaning.
57766
57767    As is the case with the error codes, in the libSBML Java language
57768    interface, the category identifiers are currently implemented as static
57769    integer constants defined in the interface class
57770    <code>libsbmlConstants</code> in the file '<a
57771    href='libsbmlConstants.html'>libsbmlConstants.java</a>'.
57772    @endif@if csharp <h3><a class='anchor'
57773    name='error-categories'>Category codes associated with XMLError objects</a></h3>
57774
57775    As discussed above, each XMLError object contains a value for a category
57776    identifier, describing the type of issue that the XMLError object represents.
57777    The category can be retrieved from an XMLError object using the method
57778    XMLError.getCategory(). The following table lists each possible value
57779    and a brief description of its meaning.
57780
57781    As is the case with the error codes, in the libSBML C# language
57782    interface, the category identifiers are currently implemented as static
57783    integer constants defined in the interface
57784    class @link libsbmlcs.libsbml@endlink. @endif@~
57785
57786    <center>
57787    <table width='95%' cellspacing='1' cellpadding='1' border='0'
57788    class='text-table normal-font alt-row-colors'>
57789    <tr style='background: lightgray' class='normal-font'>
57790    <th style='text-align: left'>Enumerator</th>
57791    <th>Meaning</th>
57792    </tr>
57793    <tr><td>@link libsbml#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink</td>
57794    <td>A problem involving the libSBML
57795    software itself or the underlying XML parser.  This almost certainly
57796    indicates a software defect (i.e., bug) in libSBML.  Please report
57797    instances of this to the libSBML developers.</td></tr>
57798    <tr><td>@link libsbml#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink</td>
57799    <td>A problem reported by the operating
57800    system, such as an inability to read or write a file.  This indicates
57801    something that is not a program error but is outside of the control of
57802    libSBML.</td></tr>
57803    <tr><td>@link libsbml#LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink</td>
57804    <td>A problem in the XML content itself.  This
57805    usually arises from malformed XML or the use of
57806    constructs not permitted in SBML.</td></tr>
57807    </table>
57808    </center>
57809
57810
57811    @if clike
57812    <h3><a class='anchor' name='error-severities'>XMLErrorSeverity_t</a></h3>
57813
57814    As described above, each XMLError object contains a value for a severity
57815    code, describing how critical is the issue that the XMLError object
57816    represents.  The severity can be retrieved from an XMLError object using
57817    the method XMLError.getSeverity().  The value is chosen from the
57818    enumeration of category codes <a class='el' href='#XMLErrorSeverity_t'>
57819    XMLErrorSeverity_t</a>.  The following table
57820    lists each possible value and a brief description of its meaning.
57821    @endif@if java <h3><a class='anchor'
57822    name='error-severities'>Severity codes associated with XMLError objects</a></h3>
57823
57824    As described above, each XMLError object contains a value for a severity
57825    code, describing how severe is the issue that the XMLError object
57826    represents.  The severity be retrieved from an XMLError object using the
57827    method XMLError.getSeverity(). The following table lists each possible
57828    value and a brief description of its meaning.
57829
57830    As is the case with the category codes, in the libSBML Java language
57831    interface, these severity codes are currently
57832    implemented as static integer constants defined in the interface class
57833    <code>libsbmlConstants</code> in the file '<a
57834    href='libsbmlConstants.html'>libsbmlConstants.java</a>'.  This
57835    is admittedly not an ideal approach from the standpoint of modern Java
57836    programming, but it was necessary to work around the lack of
57837    enumerations in Java prior to JDK 1.5.  Future versions of libSBML may
57838    use a proper Java enumeration type to define the severity
57839    codes. @endif@if csharp <h3><a class='anchor'
57840    name='error-severities'>Severity codes associated with XMLError objects</a></h3>
57841
57842    As described above, each XMLError object contains a value for a severity
57843    code, describing how severe is the issue that the XMLError object
57844    represents.  The severity be retrieved from an XMLError object using the
57845    method XMLError.getSeverity(). The following table lists each possible
57846    value and a brief description of its meaning.
57847
57848    As is the case with the category codes, in the libSBML C# language
57849    interface, these severity codes are currently
57850    implemented as static integer constants defined in the interface class
57851    @link libsbmlcs.libsbml@endlink.@endif@~
57852
57853    <center>
57854    <table width='95%' cellspacing='1' cellpadding='1' border='0'
57855    class='text-table normal-font alt-row-colors'>
57856    <tr style='background: lightgray' class='normal-font'>
57857    <th style='text-align: left'>Enumerator</th>
57858    <th>Meaning</th>
57859    </tr>
57860    <tr><td>@link libsbml#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink</td>
57861    <td>The error is actually informational and
57862    not necessarily a serious problem.</td></tr>
57863    <tr><td>@link libsbml#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink</td>
57864    <td>The error object represents a problem
57865    that is not serious enough to necessarily stop the problem, but
57866    applications should take note of the problem and evaluate what its
57867    implications may be.</td></tr>
57868    <tr><td>@link libsbml#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink</td>
57869    <td>The error object represents a serious
57870    error.  The application may continue running but it is unlikely to be
57871    able to continue processing the same XML file or data stream.</td></tr>
57872    <tr><td>@link libsbml#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink</td>
57873    <td>A serious error occurred, such as an
57874    out-of-memory condition, and the software should terminate
57875    immediately.</td></tr>
57876    </table>
57877    </center>
57878
57879    """
57880
57881    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
57882    __repr__ = _swig_repr
57883
57884    def __init__(self, *args):
57885        r"""
57886        __init__(XMLError self, int const errorId=0, string details="", unsigned int const line=0, unsigned int const column=0, unsigned int const severity=LIBSBML_SEV_FATAL, unsigned int const category=LIBSBML_CAT_INTERNAL) -> XMLError
57887        __init__(XMLError self, XMLError orig) -> XMLError
57888
57889        This method has multiple variants; they differ in the arguments
57890         they accept.  Each variant is described separately below.
57891
57892        @par
57893        <hr>
57894        <span class='variant-sig-heading'>Method variant with the following signature</span>:
57895         <pre class='signature'>XMLError(XMLError orig)</pre>
57896
57897        Copy constructor; creates a copy of this XMLError.
57898
57899        @p orig the XMLError object to copy.
57900
57901
57902        @par
57903        <hr>
57904        <span class='variant-sig-heading'>Method variant with the following signature</span>:
57905         <pre class='signature'>XMLError(  int errorId           = 0 , string details  = '' ,  long line     = 0 ,  long column   = 0 ,  long severity = LIBSBML_SEV_FATAL ,  long category = LIBSBML_CAT_INTERNAL )</pre>
57906
57907        Creates a new XMLError to report that something occurred during XML
57908        processing.
57909
57910        XMLError objects have identification numbers to indicate the nature of
57911        the exception.  @if clike These numbers are drawn from
57912        the enumeration <a class='el'
57913        href='#error-codes'>XMLErrorCode_t</a>.
57914        @else These numbers are defined as longeger constants in the file
57915        'libsbmlConstants.java'.  See the <a class='el'
57916        href='#error-codes'>top of this documentation</a> for a table
57917        listing the possible values and their meanings. @endif@~ The argument @p
57918        errorId to this constructor @em can be (but does not have to be) a
57919        value from this @if clike enumeration. If it is a value
57920        from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
57921        XMLError class assumes the error is a low-level system or XML layer
57922        error and <em>prepends</em> a built-in, predefined error message to
57923        any string passed in the argument @p details to this constructor.  In
57924        addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
57925        errors have associated values for the @p severity and @p category
57926        codes, and these fields are filled-in as well from the enumerations <a
57927        class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
57928        class='el' href='#error-categories'>XMLErrorCategory_t</a>,
57929        respectively. @else set of constants.  If it is
57930        one of the predefined error identifiers, the XMLError class assumes
57931        the error is a low-level system or XML layer error and
57932        <em>prepends</em> a built-in, predefined error message to any string
57933        passed in the argument @p details to this constructor.  In addition,
57934        all the predefined error identifiers have associated values for the @p
57935        severity and @p category codes, and these fields are filled-in as
57936        well. @endif@~
57937
57938        If the error identifier @p errorId is a number greater than 9999, this
57939        constructor assumes that the error was generated from another part of
57940        the software, and does not do additional filling in of values beyond
57941        the defaults in the constructor itself.  This allows XMLError to serve
57942        as a base class for other errors (and is used in this way elsewhere in
57943        libSBML).  Callers should fill in all the parameters with suitable
57944        values if generating errors with codes greater than 9999 to make
57945        maximum use of the XMLError facilities.
57946
57947        @if clike As mentioned above, there are two other
57948        enumerations, <a class='el'
57949        href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
57950        href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
57951        the severity and category of error for the predefined XMLError codes.
57952        The values passed in @p severity and @p category override the defaults
57953        assigned based on the error code.  If the value of @p errorId is a
57954        value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
57955        callers do not need to fill in @p severity and @p category.
57956        Conversely, if @p errorId is not a value from <a class='el'
57957        href='#error-codes'>XMLErrorCode_t</a>, callers can use other
57958        values (not just those from <a class='el'
57959        href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
57960        href='#error-categories'>XMLErrorCategory_t</a>, but their own
57961        special values) for @p severity and @p
57962        category. @else As mentioned above,
57963        there are additional constants defined for <a class='el'
57964        href='#error-severities'>standard severity</a> and <a class='el'
57965        href='#error-categories'>standard category</a> codes, and every predefined
57966        error in libSBML has an associated value for severity and category taken
57967        from these predefined sets.  These constants have symbol names
57968        prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
57969        respectively.  If the value of @p errorId is one of the standard error
57970        codes, callers do not need to fill in @p severity and @p category in a
57971        call to this constructor.  Conversely, if @p errorId is not an existing
57972        XML-level error code, callers can use other values for @p severity and
57973        @p category. @endif@~
57974
57975        @param errorId a long integer, the identification number of the error.
57976
57977        @param details a string containing additional details about the error.
57978        If the error code in @p errorId is one that is recognized by XMLError,
57979        the given message is @em appended to a predefined message associated
57980        with the given code.  If the error code is not recognized, the message
57981        is stored as-is as the text of the error.
57982
57983        @param line a long integer, the line number at which the error occured.
57984
57985        @param column a long integer, the column number at which the error occured.
57986
57987        @param severity an integer indicating severity of the error.
57988
57989        @param category an integer indicating the category to which the error
57990        belongs.
57991
57992        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
57993
57994
57995
57996        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
57997
57998        """
57999        _libsbml.XMLError_swiginit(self, _libsbml.new_XMLError(*args))
58000    __swig_destroy__ = _libsbml.delete_XMLError
58001
58002    def getErrorId(self):
58003        r"""
58004        getErrorId(XMLError self) -> unsigned int
58005
58006        Returns the identifier of this error.
58007
58008        @return the error code for this error.
58009
58010        @see getMessage()
58011        @see getShortMessage()
58012        @see getCategory()
58013        @see getSeverity()
58014
58015        """
58016        return _libsbml.XMLError_getErrorId(self)
58017
58018    def getMessage(self):
58019        r"""
58020        getMessage(XMLError self) -> string
58021
58022        Returns the message text of this error.
58023
58024        The message associated with an error object describes the nature of
58025        the problem.  The message returned by this method is generally longer
58026        and clearer than the message returned by XMLError.getShortMessage(),
58027        but not in all cases.
58028
58029        Callers may use XMLError.getCategory() and XMLError.getSeverity() to
58030        obtain additional information about the nature and severity of the
58031        problem.
58032
58033        @return the message text.
58034
58035        @see getErrorId()
58036        @see getShortMessage()
58037        @see getCategory()
58038        @see getSeverity()
58039
58040        """
58041        return _libsbml.XMLError_getMessage(self)
58042
58043    def getShortMessage(self):
58044        r"""
58045        getShortMessage(XMLError self) -> string
58046
58047        Returns a brief message for this error.
58048
58049        This is an alternative error message that, in general, is as short as
58050        the authors could make it.  However, brevity is often inversely
58051        proportional to clarity, so this short message may not be sufficiently
58052        informative to understand the nature of the error.  Calling
58053        applications may wish to check XMLError.getMessage() in addition or
58054        instead.
58055
58056        @return the short error message text.
58057
58058        @see getErrorId()
58059        @see getMessage()
58060        @see getCategory()
58061        @see getSeverity()
58062
58063        """
58064        return _libsbml.XMLError_getShortMessage(self)
58065
58066    def getLine(self):
58067        r"""
58068        getLine(XMLError self) -> unsigned int
58069
58070        Returns the line number in the XML input near where the error, warning
58071        or other diagnostic occurred.
58072
58073        We say 'near where the problem occurred', because many factors affect
58074        how accurate the line/column information ultimately is.  For example,
58075        sometimes, the underlying XML parsers can only report such information
58076        for the parent XML element where an error occurs, and not for the
58077        specific point where the problem occurs.  In other situations, some
58078        parsers report invalid line and/or column numbers altogether.  If this
58079        occurs, libSBML sets the line and/or column number in the XMLError
58080        object to either <code>0</code> or the value of the maximum unsigned
58081        long integer representable on the platform where libSBML is running.
58082        The probability that a true line or column number in an SBML model
58083        would equal this value is vanishingly small; thus, if an application
58084        encounters these values in an XMLError object, it can assume no valid
58085        line/column number could be provided by libSBML in that situation.
58086
58087        @return the line number.
58088
58089        @see getColumn()
58090
58091        """
58092        return _libsbml.XMLError_getLine(self)
58093
58094    def getColumn(self):
58095        r"""
58096        getColumn(XMLError self) -> unsigned int
58097
58098        Returns the column number in the XML input near where the error,
58099        warning or other diagnostic occurred.
58100
58101        We say 'near where the problem occurred', because many factors affect
58102        how accurate the line/column information ultimately is.  For example,
58103        sometimes, the underlying XML parsers can only report such information
58104        for the parent XML element where an error occurs, and not for the
58105        specific point where the problem occurs.  In other situations, some
58106        parsers report invalid line and/or column numbers altogether.  If this
58107        occurs, libSBML sets the line and/or column number in the XMLError
58108        object to either <code>0</code> or the value of the maximum unsigned
58109        long integer representable on the platform where libSBML is running.
58110        The probability that a true line or column number in an SBML model
58111        would equal this value is vanishingly small; thus, if an application
58112        encounters these values in an XMLError object, it can assume no valid
58113        line/column number could be provided by libSBML in that situation.
58114
58115        @return the column number.
58116
58117        @see getLine()
58118
58119        """
58120        return _libsbml.XMLError_getColumn(self)
58121
58122    def getSeverity(self):
58123        r"""
58124        getSeverity(XMLError self) -> unsigned int
58125
58126        Returns the severity of this error.
58127
58128        XMLError defines an enumeration of severity codes for the XML layer.
58129        Applications that build on XMLError by subclassing it may add their
58130        own severity codes with numbers higher than those in the predefined
58131        set of severity codes.
58132
58133        @return the severity of this XMLError.
58134
58135        @see getSeverityAsString()
58136        @see getCategory()
58137
58138        """
58139        return _libsbml.XMLError_getSeverity(self)
58140
58141    def getSeverityAsString(self):
58142        r"""
58143        getSeverityAsString(XMLError self) -> string
58144
58145        Returns a string describing the severity level of this error.
58146
58147        XMLError defines an enumeration of severity codes for the XML layer.
58148        Applications that build on XMLError by subclassing it may add their
58149        own severity codes with numbers higher than those in the predefined
58150        set of severity codes.
58151
58152        @return string representing the severity of this XMLError.
58153
58154        @see getSeverity()
58155        @see getCategoryAsString()
58156
58157        """
58158        return _libsbml.XMLError_getSeverityAsString(self)
58159
58160    def getCategory(self):
58161        r"""
58162        getCategory(XMLError self) -> unsigned int
58163
58164        Returns the category of this error.
58165
58166        XMLError defines an enumeration of category codes for the XML layer.
58167        Applications that build on XMLError by subclassing it may add their
58168        own categories with numbers higher than those in the predefined
58169        set of category codes.
58170
58171        Categories can be used to partition errors into distinct groups.
58172        Among other things, this can be used to prevent id conflicts by
58173        uniquely identifying an XMLError by both id and category.
58174
58175        @return the category of this XMLError.
58176
58177        @see getSeverity()
58178        @see getCategoryAsString()
58179
58180        """
58181        return _libsbml.XMLError_getCategory(self)
58182
58183    def getCategoryAsString(self):
58184        r"""
58185        getCategoryAsString(XMLError self) -> string
58186
58187        Returns a string describing the category of this error.
58188
58189        XMLError defines an enumeration of category codes for the XML layer.
58190        Applications that build on XMLError by subclassing it may add their
58191        own categories with numbers higher than those in the predefined
58192        set of category codes.
58193
58194        Categories can be used to partition errors into distinct groups.
58195        Among other things, this can be used to prevent id conflicts by
58196        uniquely identifying an XMLError by both id and category.
58197
58198        @return string representing the category of this XMLError.
58199
58200        @see getCategory()
58201        @see getSeverityAsString()
58202
58203        """
58204        return _libsbml.XMLError_getCategoryAsString(self)
58205
58206    def isInfo(self):
58207        r"""
58208        isInfo(XMLError self) -> bool
58209
58210        Predicate returning @c True or @c False depending on whether this
58211        error object is for information purposes only.
58212
58213        This is equivalent to obtaining the severity code from an XMLError
58214        object (via XMLError.getSeverity()) and then comparing it to the
58215        value @link libsbml#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink from the
58216        @if clike enumeration #XMLErrorSeverity_t. @else set of predefined
58217        severity codes.@endif@~
58218
58219        @return @c True if this XMLError is for informational purposes only,
58220        @c False otherwise.
58221
58222        @see isWarning()
58223        @see isError()
58224        @see isFatal()
58225
58226        """
58227        return _libsbml.XMLError_isInfo(self)
58228
58229    def isWarning(self):
58230        r"""
58231        isWarning(XMLError self) -> bool
58232
58233        Predicate returning @c True or @c False depending on whether
58234        this error object is a warning.
58235
58236        This is equivalent to obtaining the severity code from an XMLError
58237        object (via XMLError.getSeverity()) and then comparing it to the
58238        value @link libsbml#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink from the
58239        @if clike enumeration #XMLErrorSeverity_t. @else set of predefined
58240        severity codes.@endif@~
58241
58242        @return @c True if this error is a warning, @c False otherwise.
58243
58244        @see isInfo()
58245        @see isError()
58246        @see isFatal()
58247
58248        """
58249        return _libsbml.XMLError_isWarning(self)
58250
58251    def isError(self):
58252        r"""
58253        isError(XMLError self) -> bool
58254
58255        Predicate returning @c True or @c False depending on whether this
58256        error is a significant error.
58257
58258        This is equivalent to obtaining the severity code from an XMLError
58259        object (via XMLError.getSeverity()) and then comparing it to the
58260        value @link libsbml#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink from the
58261        @if clike enumeration #XMLErrorSeverity_t. @else set of predefined
58262        severity codes.@endif@~
58263
58264        @return @c True if this error is an error, @c False otherwise.
58265
58266        @see isInfo()
58267        @see isWarning()
58268        @see isFatal()
58269
58270        """
58271        return _libsbml.XMLError_isError(self)
58272
58273    def isFatal(self):
58274        r"""
58275        isFatal(XMLError self) -> bool
58276
58277        Predicate returning @c True or @c False depending on whether this
58278        error is a fatal run-time error.
58279
58280        This is equivalent to obtaining the severity code from an XMLError
58281        object (via XMLError.getSeverity()) and then comparing it to the
58282        value @link libsbml#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink from the
58283        @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif@~
58284
58285        @return @c True if this error is a fatal error, @c False otherwise.
58286
58287        @see isInfo()
58288        @see isWarning()
58289        @see isError()
58290
58291        """
58292        return _libsbml.XMLError_isFatal(self)
58293
58294    def isInternal(self):
58295        r"""
58296        isInternal(XMLError self) -> bool
58297
58298        Predicate returning @c True or @c False depending on whether this
58299        error resulted from an internal program error.
58300
58301        This is equivalent to obtaining the category identifier from an
58302        XMLError object (via XMLError.getCategory()) and then comparing it to
58303        the value @link libsbml#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink from the
58304        @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~
58305
58306        @return a boolean indicating whether the error is an internal error.
58307
58308        @see isSystem()
58309        @see isXML()
58310
58311        """
58312        return _libsbml.XMLError_isInternal(self)
58313
58314    def isSystem(self):
58315        r"""
58316        isSystem(XMLError self) -> bool
58317
58318        Predicate returning @c True or @c False depending on whether this
58319        error was generated by the operating system.
58320
58321        This is equivalent to obtaining the category identifier from an
58322        XMLError object (via XMLError.getCategory()) and then comparing it to
58323        the value @link libsbml#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink from the
58324        @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~
58325
58326        @return boolean indicating whether the error is a system error.
58327
58328        @see isInternal()
58329        @see isXML()
58330
58331        """
58332        return _libsbml.XMLError_isSystem(self)
58333
58334    def isXML(self):
58335        r"""
58336        isXML(XMLError self) -> bool
58337
58338        Predicate returning @c True or @c False depending on whether this
58339        error resulted from a problem in the XML input (e.g., an XML syntax
58340        error).
58341
58342        This is equivalent to obtaining the category identifier from an
58343        XMLError object (via XMLError.getCategory()) and then comparing it to
58344        the value @link libsbml#LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink from the
58345        @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~
58346
58347        @return a boolean indicating whether the error is an XML catetory error.
58348
58349        @see isInternal()
58350        @see isSystem()
58351
58352        """
58353        return _libsbml.XMLError_isXML(self)
58354
58355    def isValid(self):
58356        r"""
58357        isValid(XMLError self) -> bool
58358
58359        Predicate returning @c True or @c False depending on whether this
58360        error resulted from a problem or whether it was logged as an unknown
58361        error.
58362
58363        This is equivalent to obtaining the error identifier from an
58364        XMLError object (via XMLError.getErrorId()) and then comparing it to
58365        the value XMLUnknownError or UnknownError from the
58366        @if clike enumeration #XMLErrorCode_t. @else set of predefined error codes.@endif@~
58367
58368        @return a boolean indicating whether the error is a valid error (@c True)
58369        or whether it is unknown (@c False).
58370
58371        """
58372        return _libsbml.XMLError_isValid(self)
58373
58374    def setLine(self, line):
58375        r"""
58376        setLine(XMLError self, unsigned int line) -> int
58377
58378        Sets the line number where this error occurred.
58379
58380        @param line a long integer, the line number to set.
58381
58382        @return integer value indicating success/failure of the
58383        function.  @if clike The value is drawn from the
58384        enumeration #OperationReturnValues_t. @endif@~ This particular
58385        function only does one thing irrespective of user input or
58386        object state, and thus will only return a single value:
58387        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
58388
58389        @see setColumn()
58390
58391        """
58392        return _libsbml.XMLError_setLine(self, line)
58393
58394    def setColumn(self, column):
58395        r"""
58396        setColumn(XMLError self, unsigned int column) -> int
58397
58398        Sets the column number where this error occurred.
58399
58400        @param column a long integer, the column number to set.
58401
58402        @return integer value indicating success/failure of the
58403        function.  @if clike The value is drawn from the
58404        enumeration #OperationReturnValues_t. @endif@~ This particular
58405        function only does one thing irrespective of user input or
58406        object state, and thus will only return a single value:
58407        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
58408
58409        @see setLine()
58410
58411        """
58412        return _libsbml.XMLError_setColumn(self, column)
58413
58414    @staticmethod
58415    def getStandardMessage(code):
58416        r"""
58417        getStandardMessage(int const code) -> string
58418
58419        Returns a copy of the message string associated with the given
58420        predefined XMLError code.
58421
58422        @param code the error code whose message is sought; it must be a
58423        predefined value from @if clike <a class='el' href='#error-codes'>
58424        XMLErrorCode_t</a>. @else <a class='el' href='#error-codes'>the set
58425        of predefined error identifiers</a>.@endif@~
58426
58427        """
58428        return _libsbml.XMLError_getStandardMessage(code)
58429
58430    def getPackage(self):
58431        r"""
58432        getPackage(XMLError self) -> string
58433
58434        Returns the SBML Level&nbsp;3 package extension (if any) that logged
58435        this error.
58436
58437        Each error logged by an libSBML extension for SBML Level&nbsp;3 packages
58438        includes a record of the package that logged it.  The field is a simple
58439        text string.  If the string is empty or has the value @c 'core', then
58440        the error came from libSBML core; otherwise, the string will be the
58441        short-form name of the package (e.g., @c 'comp' for the Hierarchical
58442        Model Composition package).
58443
58444        @return a string representing the name of the package that logged this
58445        error.  If the error did not come from a package extension, the value
58446        will be the empty string or @c 'core'.
58447
58448        """
58449        return _libsbml.XMLError_getPackage(self)
58450
58451    def getErrorIdOffset(self):
58452        r"""
58453        getErrorIdOffset(XMLError self) -> unsigned int
58454
58455        Returns libSBML's internal numerical offset for the error code
58456        associated with this error.
58457
58458        In the SBML Level&nbsp;3 package specifications, package validation
58459        rules are identified by 5-digit numbers prefixed with the nickname of
58460        the package itself---e.g., &ldquo;comp-10101&rdquo;,
58461        &ldquo;fbc-20301&rdquo;, etc.  Historically, libSBML reported error
58462        codes as pure integers, and some application software systems make
58463        decisions based on the numerical values of the error codes.  To permit
58464        these applications to continue to function in this fashion, libSBML
58465        internally continues to maintain error identifiers as pure integers.  To
58466        handle the possibility that errors may come from package extensions,
58467        libSBML uses numerical offsets added to the internal error codes.  These
58468        offsets add two leading digits to the regular 5-digit error codes; for
58469        example, &ldquo;comp&rdquo; error codes are stored as 1010101, 1020102,
58470        etc.  The offset in this case is 1000000.  Another package will have the
58471        offset 2000000, yet another will have 3000000, etc.
58472
58473        This method returns the integer offset in this error's error code.
58474        Calling applications can get the 5-digit package-specific number for a
58475        given error code by subtracting the offset from the value reported by
58476        getErrorId():
58477        @verbatim
58478         getErrorId() - getErrorIdOffset()
58479         @endverbatim
58480        When libSBML produces error messages, it combines the text string
58481        returned by getPackage() with the subtracted value of the error code,
58482        to produce a text string of the form &ldquo;comp-10101&rdquo;.
58483
58484        @see getErrorId()
58485        @see getPackage()
58486
58487        """
58488        return _libsbml.XMLError_getErrorIdOffset(self)
58489
58490    def __eq__(self, rhs):
58491      if ((self is None) and (rhs is None)): return True
58492      if ((self is None) or  (rhs is None)): return False
58493      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
58494        if (self.this == rhs.this): return True
58495      return False
58496
58497    def __ne__(self, rhs):
58498      if ((self is None) and (rhs is None)): return False
58499      if ((self is None) or  (rhs is None)): return True
58500      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
58501        if (self.this == rhs.this): return False
58502      return True
58503
58504
58505# Register XMLError in _libsbml:
58506_libsbml.XMLError_swigregister(XMLError)
58507
58508def XMLError_getStandardMessage(code):
58509    r"""
58510    XMLError_getStandardMessage(int const code) -> string
58511
58512    Returns a copy of the message string associated with the given
58513    predefined XMLError code.
58514
58515    @param code the error code whose message is sought; it must be a
58516    predefined value from @if clike <a class='el' href='#error-codes'>
58517    XMLErrorCode_t</a>. @else <a class='el' href='#error-codes'>the set
58518    of predefined error identifiers</a>.@endif@~
58519
58520    """
58521    return _libsbml.XMLError_getStandardMessage(code)
58522
58523class XMLErrorLog(object):
58524    r"""
58525
58526    @sbmlpackage{core}
58527
58528    @htmlinclude pkg-marker-core.html Log of diagnostics reported during XML processing.
58529
58530    @htmlinclude not-sbml-warning.html
58531
58532    The error log is a list.  The XML layer of libSBML maintains an error
58533    log associated with a given XML document or data stream.  When an
58534    operation results in an error, or when there is something wrong with the
58535    XML content, the problem is reported as an XMLError object stored in the
58536    XMLErrorLog list.  Potential problems range from low-level issues (such
58537    as the inability to open a file) to XML syntax errors (such as
58538    mismatched tags or other problems).
58539
58540    A typical approach for using this error log is to first use
58541    @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~
58542    to inquire how many XMLError object instances it contains, and then to
58543    iterate over the list of objects one at a time using
58544    getError(long n) .  Indexing in the list begins at 0.
58545
58546    In normal circumstances, programs using libSBML will actually obtain an
58547    SBMLErrorLog rather than an XMLErrorLog.  The former is subclassed from
58548    XMLErrorLog and simply wraps commands for working with SBMLError objects
58549    rather than the low-level XMLError objects.  Classes such as
58550    SBMLDocument use the higher-level SBMLErrorLog.
58551
58552    """
58553
58554    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
58555    __repr__ = _swig_repr
58556
58557    def getNumErrors(self):
58558        r"""
58559        getNumErrors(XMLErrorLog self) -> unsigned int
58560
58561        Returns the number of errors that have been logged.
58562
58563        To retrieve individual errors from the log, callers may use
58564        @if clike getError() @else XMLErrorLog.getError() @endif.
58565
58566        @return the number of errors that have been logged.
58567
58568        """
58569        return _libsbml.XMLErrorLog_getNumErrors(self)
58570
58571    def getError(self, n):
58572        r"""
58573        getError(XMLErrorLog self, unsigned int n) -> XMLError
58574
58575        Returns the <i>n</i>th XMLError object in this log.
58576
58577        Index @p n is counted from 0.  Callers should first inquire about the
58578        number of items in the log by using the method
58579        @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif.
58580        Attempts to use an error index number that exceeds the actual number
58581        of errors in the log will result in a @c None being returned.
58582
58583        @param n the index number of the error to retrieve (with 0 being the
58584        first error).
58585
58586        @return the <i>n</i>th XMLError in this log, or @c None if @p n is
58587        greater than or equal to
58588        @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif.
58589
58590        @see getNumErrors()
58591
58592        """
58593        return _libsbml.XMLErrorLog_getError(self, n)
58594
58595    def clearLog(self):
58596        r"""
58597        clearLog(XMLErrorLog self)
58598
58599        Deletes all errors from this log.
58600
58601        """
58602        return _libsbml.XMLErrorLog_clearLog(self)
58603
58604    def __init__(self, *args):
58605        r"""
58606        __init__(XMLErrorLog self) -> XMLErrorLog
58607        __init__(XMLErrorLog self, XMLErrorLog other) -> XMLErrorLog
58608
58609        @internal
58610
58611        """
58612        _libsbml.XMLErrorLog_swiginit(self, _libsbml.new_XMLErrorLog(*args))
58613    __swig_destroy__ = _libsbml.delete_XMLErrorLog
58614
58615    def add(self, *args):
58616        r"""
58617        add(XMLErrorLog self, XMLError error)
58618        add(XMLErrorLog self, std::vector< XMLError * > const & errors)
58619        """
58620        return _libsbml.XMLErrorLog_add(self, *args)
58621
58622    def toString(self):
58623        r"""
58624        toString(XMLErrorLog self) -> string
58625
58626        Writes all errors contained in this log to a string and returns it.
58627
58628        This method uses printErrors() to format the diagnostic messages.
58629        Please consult that method for information about the organization
58630        of the messages in the string returned by this method.
58631
58632        @return a string containing all logged errors and warnings.
58633
58634        @see printErrors()
58635
58636        """
58637        return _libsbml.XMLErrorLog_toString(self)
58638
58639    def printErrors(self, *args):
58640        r"""
58641        printErrors(XMLErrorLog self, ostream stream=cerr)
58642        printErrors(XMLErrorLog self, ostream stream, unsigned int severity)
58643
58644        This method has multiple variants; they differ in the arguments
58645         they accept.  Each variant is described separately below.
58646
58647        @par
58648        <hr>
58649        <span class='variant-sig-heading'>Method variant with the following signature</span>:
58650         <pre class='signature'>printErrors(std::ostream stream, long severity)</pre>
58651
58652        Prints the errors or warnings with given severity stored in this error log.
58653
58654        This method prints the text to the stream given by the optional
58655        parameter @p stream.  If no stream is given, the method prints the
58656        output to the standard error stream.
58657
58658        The format of the output is:
58659        @verbatim
58660           N error(s):
58661             line NNN: (id) message
58662        @endverbatim
58663        If no errors with that severity was found, then no output will be produced.
58664
58665        @param stream the ostream or ostringstream object indicating where
58666        the output should be printed.
58667        @param severity the severity of the errors sought.
58668
58669
58670
58671        @par
58672        <hr>
58673        <span class='variant-sig-heading'>Method variant with the following signature</span>:
58674         <pre class='signature'>printErrors(std::ostream stream = std::cerr)</pre>
58675
58676        Prints all the errors or warnings stored in this error log.
58677
58678        This method prints the text to the stream given by the optional
58679        parameter @p stream.  If no stream is given, the method prints the
58680        output to the standard error stream.
58681
58682        The format of the output is:
58683        @verbatim
58684           N error(s):
58685             line NNN: (id) message
58686         @endverbatim
58687        If no errors have occurred, i.e.,
58688        <code>getNumErrors() == 0</code>, then no output will be produced.
58689        @param stream the ostream or ostringstream object indicating where
58690        the output should be printed.
58691
58692        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
58693
58694
58695
58696        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
58697
58698        """
58699        return _libsbml.XMLErrorLog_printErrors(self, *args)
58700
58701    def isSeverityOverridden(self):
58702        r"""
58703        isSeverityOverridden(XMLErrorLog self) -> bool
58704
58705        Returns a boolean indicating whether or not the severity has been
58706        overridden.
58707
58708        @par
58709        The <em>severity override</em> mechanism in XMLErrorLog is intended to help
58710        applications handle error conditions in ways that may be more convenient
58711        for those applications.  It is possible to use the mechanism to override
58712        the severity code of errors logged by libSBML, and even to disable error
58713        logging completely.  An override stays in effect until the override is
58714        changed again by the calling application.
58715
58716        @return @c True if an error severity override has been set, @c False
58717        otherwise.
58718
58719        @see getSeverityOverride()
58720        @see setSeverityOverride()
58721        @see unsetSeverityOverride()
58722        @see changeErrorSeverity()
58723
58724        """
58725        return _libsbml.XMLErrorLog_isSeverityOverridden(self)
58726
58727    def unsetSeverityOverride(self):
58728        r"""
58729        unsetSeverityOverride(XMLErrorLog self)
58730
58731        Usets an existing override.
58732
58733        @par
58734        The <em>severity override</em> mechanism in XMLErrorLog is intended to help
58735        applications handle error conditions in ways that may be more convenient
58736        for those applications.  It is possible to use the mechanism to override
58737        the severity code of errors logged by libSBML, and even to disable error
58738        logging completely.  An override stays in effect until the override is
58739        changed again by the calling application.
58740
58741        @see getSeverityOverride()
58742        @see setSeverityOverride()
58743        @see isSeverityOverridden()
58744        @see changeErrorSeverity()
58745
58746        """
58747        return _libsbml.XMLErrorLog_unsetSeverityOverride(self)
58748
58749    def getSeverityOverride(self):
58750        r"""
58751        getSeverityOverride(XMLErrorLog self) -> XMLErrorSeverityOverride_t
58752
58753        Returns the current override.
58754
58755        @par
58756        The <em>severity override</em> mechanism in XMLErrorLog is intended to help
58757        applications handle error conditions in ways that may be more convenient
58758        for those applications.  It is possible to use the mechanism to override
58759        the severity code of errors logged by libSBML, and even to disable error
58760        logging completely.  An override stays in effect until the override is
58761        changed again by the calling application.
58762
58763        @return a severity override code.  The possible values are drawn
58764        from @if clike the enumeration #XMLErrorSeverityOverride_t@else the
58765        set of integer constants whose names begin with the prefix
58766        <code>LIBSBML_OVERRIDE_</code>@endif:
58767        @li @link libsbml#LIBSBML_OVERRIDE_DISABLED LIBSBML_OVERRIDE_DISABLED@endlink
58768        @li @link libsbml#LIBSBML_OVERRIDE_DONT_LOG LIBSBML_OVERRIDE_DONT_LOG@endlink
58769        @li @link libsbml#LIBSBML_OVERRIDE_WARNING LIBSBML_OVERRIDE_WARNING@endlink
58770
58771        @see isSeverityOverridden()
58772        @see setSeverityOverride()
58773        @see unsetSeverityOverride()
58774        @see changeErrorSeverity()
58775
58776        """
58777        return _libsbml.XMLErrorLog_getSeverityOverride(self)
58778
58779    def setSeverityOverride(self, severity):
58780        r"""
58781        setSeverityOverride(XMLErrorLog self, XMLErrorSeverityOverride_t severity)
58782
58783        Set the severity override.
58784
58785        @par
58786        The <em>severity override</em> mechanism in XMLErrorLog is intended to help
58787        applications handle error conditions in ways that may be more convenient
58788        for those applications.  It is possible to use the mechanism to override
58789        the severity code of errors logged by libSBML, and even to disable error
58790        logging completely.  An override stays in effect until the override is
58791        changed again by the calling application.
58792
58793        @param severity an override code indicating what to do.  If the value is
58794        @link libsbml#LIBSBML_OVERRIDE_DISABLED LIBSBML_OVERRIDE_DISABLED@endlink
58795        (the default setting) all errors logged will be given the severity
58796        specified in their usual definition.   If the value is
58797        @link libsbml#LIBSBML_OVERRIDE_WARNING LIBSBML_OVERRIDE_WARNING@endlink,
58798        then all errors will be logged as warnings.  If the value is
58799        @link libsbml#LIBSBML_OVERRIDE_DONT_LOG LIBSBML_OVERRIDE_DONT_LOG@endlink,
58800        no error will be logged, regardless of their severity.
58801
58802        @see isSeverityOverridden()
58803        @see getSeverityOverride()
58804        @see unsetSeverityOverride()
58805        @see changeErrorSeverity()
58806
58807        """
58808        return _libsbml.XMLErrorLog_setSeverityOverride(self, severity)
58809
58810    def changeErrorSeverity(self, *args):
58811        r"""
58812        changeErrorSeverity(XMLErrorLog self, XMLErrorSeverity_t originalSeverity, XMLErrorSeverity_t targetSeverity, string package="all")
58813
58814        Changes the severity override for errors in the log that have a given
58815        severity.
58816
58817        This method searches through the list of errors in the log, comparing
58818        each one's severity to the value of @p originalSeverity.  For each error
58819        encountered with that severity logged by the named @p package, the
58820        severity of the error is reset to @p targetSeverity.
58821
58822        @par
58823        The <em>severity override</em> mechanism in XMLErrorLog is intended to help
58824        applications handle error conditions in ways that may be more convenient
58825        for those applications.  It is possible to use the mechanism to override
58826        the severity code of errors logged by libSBML, and even to disable error
58827        logging completely.  An override stays in effect until the override is
58828        changed again by the calling application.
58829
58830        @param originalSeverity the severity code to match.
58831
58832        @param targetSeverity the severity code to use as the new severity.
58833
58834        @param package a string, the name of an SBML Level&nbsp;3 package
58835        extension to use to narrow the search for errors.  A value of @c 'all'
58836        signifies to match against errors logged from any package; a value of a
58837        package nickname such as @c 'comp' signifies to limit consideration to
58838        errors from just that package.  If no value is provided, @c 'all' is the
58839        default.
58840
58841        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
58842
58843        @see isSeverityOverridden()
58844        @see getSeverityOverride()
58845        @see setSeverityOverride()
58846        @see unsetSeverityOverride()
58847
58848
58849
58850        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
58851
58852        """
58853        return _libsbml.XMLErrorLog_changeErrorSeverity(self, *args)
58854
58855    def contains(self, errorId):
58856        r"""
58857        contains(XMLErrorLog self, unsigned int const errorId) -> bool
58858
58859        Returns @c True if XMLErrorLog contains an errorId
58860
58861        @param errorId the error identifier of the error to be found.
58862
58863        """
58864        return _libsbml.XMLErrorLog_contains(self, errorId)
58865
58866    def __eq__(self, rhs):
58867      if ((self is None) and (rhs is None)): return True
58868      if ((self is None) or  (rhs is None)): return False
58869      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
58870        if (self.this == rhs.this): return True
58871      return False
58872
58873    def __ne__(self, rhs):
58874      if ((self is None) and (rhs is None)): return False
58875      if ((self is None) or  (rhs is None)): return True
58876      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
58877        if (self.this == rhs.this): return False
58878      return True
58879
58880
58881# Register XMLErrorLog in _libsbml:
58882_libsbml.XMLErrorLog_swigregister(XMLErrorLog)
58883
58884class SBMLErrorLog(XMLErrorLog):
58885    r"""
58886
58887    @sbmlpackage{core}
58888
58889    @htmlinclude pkg-marker-core.html Log of diagnostics reported during processing.
58890
58891    @htmlinclude not-sbml-warning.html
58892
58893    The error log is a list.  Each SBMLDocument maintains its own
58894    SBMLErrorLog.  When a libSBML operation on SBML content results in an
58895    error, or when there is something worth noting about the SBML content,
58896    the issue is reported as an SBMLError object stored in the SBMLErrorLog
58897    list.
58898
58899    SBMLErrorLog is derived from XMLErrorLog, an object class that serves
58900    exactly the same purpose but for the XML parsing layer.  XMLErrorLog
58901    provides crucial methods such as
58902    @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~
58903    for determining how many SBMLError or XMLError objects are in the log.
58904    SBMLErrorLog inherits these methods.
58905
58906    The general approach to working with SBMLErrorLog in user programs
58907    involves first obtaining a pointer to a log from a libSBML object such
58908    as SBMLDocument.  Callers should then use
58909    @if java XMLErrorLog.getNumErrors()@else getNumErrors() @endif@~ to inquire how
58910    many objects there are in the list.  (The answer may be 0.)  If there is
58911    at least one SBMLError object in the SBMLErrorLog instance, callers can
58912    then iterate over the list using
58913    SBMLErrorLog.getError()@if clike @endif,
58914    using methods provided by the SBMLError class to find out the error code
58915    and associated information such as the error severity, the message, and
58916    the line number in the input.
58917
58918    If you wish to simply print the error strings for a human to read, an
58919    easier and more direct way might be to use SBMLDocument.printErrors().
58920
58921    @see SBMLError
58922    @see XMLErrorLog
58923    @see XMLError
58924
58925    """
58926
58927    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
58928    __repr__ = _swig_repr
58929
58930    def getError(self, n):
58931        r"""
58932        getError(SBMLErrorLog self, unsigned int n) -> SBMLError
58933
58934        Returns the <i>n</i>th SBMLError object in this log.
58935
58936        Index @p n is counted from 0.  Callers should first inquire about the
58937        number of items in the log by using the
58938        @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif@~ method.
58939        Attempts to use an error index number that exceeds the actual number
58940        of errors in the log will result in a @c None being returned.
58941
58942        @param n the index number of the error to retrieve (with 0 being the
58943        first error).
58944
58945        @return the <i>n</i>th SBMLError in this log, or @c None if @p n is
58946        greater than or equal to
58947        @if java XMLErrorLog.getNumErrors()@else getNumErrors()@endif.
58948
58949        @see getNumErrors()
58950
58951        """
58952        return _libsbml.SBMLErrorLog_getError(self, n)
58953
58954    def getErrorWithSeverity(self, n, severity):
58955        r"""
58956        getErrorWithSeverity(SBMLErrorLog self, unsigned int n, unsigned int severity) -> SBMLError
58957
58958        Returns the <i>n</i>th SBMLError object with given severity in this log.
58959
58960        Index @p n is counted from 0.  Callers should first inquire about the
58961        number of items in the log by using the
58962        @if java SBMLErrorLog.getNumFailsWithSeverity()@else getNumFailsWithSeverity()@endif@~ method.
58963        Attempts to use an error index number that exceeds the actual number
58964        of errors in the log will result in a @c None being returned.
58965
58966        @param n the index number of the error to retrieve (with 0 being the
58967        first error).
58968        @param severity the severity of the error to retrieve.
58969
58970        @return the <i>n</i>th SBMLError in this log, or @c None if @p n is
58971        greater than or equal to
58972        @if java SBMLErrorLog.getNumFailsWithSeverity()@else getNumFailsWithSeverity()@endif.
58973
58974        @see getNumFailsWithSeverity()
58975
58976        """
58977        return _libsbml.SBMLErrorLog_getErrorWithSeverity(self, n, severity)
58978
58979    def getNumFailsWithSeverity(self, *args):
58980        r"""
58981        getNumFailsWithSeverity(SBMLErrorLog self, unsigned int severity) -> unsigned int
58982        getNumFailsWithSeverity(SBMLErrorLog self, unsigned int severity) -> unsigned int
58983
58984        Returns the number of errors that have been logged with the given
58985        severity code.
58986
58987        @par
58988        LibSBML associates severity levels with every SBMLError object to
58989        provide an indication of how serious the problem is.  Severities range
58990        from informational diagnostics to fatal (irrecoverable) errors.  Given
58991        an SBMLError object instance, a caller can interrogate it for its
58992        severity level using methods such as SBMLError.getSeverity(),
58993        SBMLError.isFatal(), and so on.  The present method encapsulates
58994        iteration and interrogation of all objects in an SBMLErrorLog, making
58995        it easy to check for the presence of error objects with specific
58996        severity levels.
58997
58998        @if clike @param severity a value from
58999        #SBMLErrorSeverity_t @endif@if java @param severity a
59000        value from the set of <code>LIBSBML_SEV_</code> constants defined by
59001        the interface class <code><a
59002        href='libsbmlConstants.html'>libsbmlConstants</a></code> @endif@if python @param severity a
59003        value from the set of <code>LIBSBML_SEV_</code> constants defined by
59004        the interface class @link libsbml libsbml@endlink. @endif@~
59005
59006        @return a count of the number of errors with the given severity code.
59007
59008        @see getNumErrors()
59009
59010        """
59011        return _libsbml.SBMLErrorLog_getNumFailsWithSeverity(self, *args)
59012
59013    def __init__(self, *args):
59014        r"""
59015        __init__(SBMLErrorLog self) -> SBMLErrorLog
59016        __init__(SBMLErrorLog self, SBMLErrorLog orig) -> SBMLErrorLog
59017
59018        @internal
59019
59020        """
59021        _libsbml.SBMLErrorLog_swiginit(self, _libsbml.new_SBMLErrorLog(*args))
59022    __swig_destroy__ = _libsbml.delete_SBMLErrorLog
59023
59024    def logError(self, *args):
59025        r"""
59026        logError(SBMLErrorLog self, unsigned int const errorId=0, unsigned int const level=SBML_DEFAULT_LEVEL, unsigned int const version=SBML_DEFAULT_VERSION, string details="", unsigned int const line=0, unsigned int const column=0, unsigned int const severity=LIBSBML_SEV_UNKNOWN, unsigned int const category=LIBSBML_CAT_SBML)
59027
59028        @internal
59029
59030
59031        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
59032
59033        @internal
59034
59035        """
59036        return _libsbml.SBMLErrorLog_logError(self, *args)
59037
59038    def logPackageError(self, *args):
59039        r"""
59040        logPackageError(SBMLErrorLog self, string package="core", unsigned int const errorId=0, unsigned int const pkgVersion=1, unsigned int const level=SBML_DEFAULT_LEVEL, unsigned int const version=SBML_DEFAULT_VERSION, string details="", unsigned int const line=0, unsigned int const column=0, unsigned int const severity=LIBSBML_SEV_UNKNOWN, unsigned int const category=LIBSBML_CAT_SBML)
59041
59042        @internal
59043
59044
59045        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
59046
59047        @internal
59048
59049        """
59050        return _libsbml.SBMLErrorLog_logPackageError(self, *args)
59051
59052    def add(self, error):
59053        r"""add(SBMLErrorLog self, SBMLError error)"""
59054        return _libsbml.SBMLErrorLog_add(self, error)
59055
59056    def remove(self, errorId):
59057        r"""
59058        remove(SBMLErrorLog self, unsigned int const errorId)
59059
59060        Removes an error having errorId from the SBMLError list.
59061
59062        Only the first item will be removed if there are multiple errors
59063        with the given errorId.
59064
59065        @param errorId the error identifier of the error to be removed.
59066
59067        """
59068        return _libsbml.SBMLErrorLog_remove(self, errorId)
59069
59070    def removeAll(self, errorId):
59071        r"""
59072        removeAll(SBMLErrorLog self, unsigned int const errorId)
59073
59074        Removes all errors having errorId from the SBMLError list.
59075
59076        @param errorId the error identifier of the error to be removed.
59077
59078        """
59079        return _libsbml.SBMLErrorLog_removeAll(self, errorId)
59080
59081    def contains(self, errorId):
59082        r"""
59083        contains(SBMLErrorLog self, unsigned int const errorId) -> bool
59084
59085        Returns @c True if SBMLErrorLog contains an errorId
59086
59087        @param errorId the error identifier of the error to be found.
59088
59089        """
59090        return _libsbml.SBMLErrorLog_contains(self, errorId)
59091
59092# Register SBMLErrorLog in _libsbml:
59093_libsbml.SBMLErrorLog_swigregister(SBMLErrorLog)
59094
59095UnknownError = _libsbml.UnknownError
59096
59097NotUTF8 = _libsbml.NotUTF8
59098
59099UnrecognizedElement = _libsbml.UnrecognizedElement
59100
59101NotSchemaConformant = _libsbml.NotSchemaConformant
59102
59103L3NotSchemaConformant = _libsbml.L3NotSchemaConformant
59104
59105InvalidMathElement = _libsbml.InvalidMathElement
59106
59107DisallowedMathMLSymbol = _libsbml.DisallowedMathMLSymbol
59108
59109DisallowedMathMLEncodingUse = _libsbml.DisallowedMathMLEncodingUse
59110
59111DisallowedDefinitionURLUse = _libsbml.DisallowedDefinitionURLUse
59112
59113BadCsymbolDefinitionURLValue = _libsbml.BadCsymbolDefinitionURLValue
59114
59115DisallowedMathTypeAttributeUse = _libsbml.DisallowedMathTypeAttributeUse
59116
59117DisallowedMathTypeAttributeValue = _libsbml.DisallowedMathTypeAttributeValue
59118
59119LambdaOnlyAllowedInFunctionDef = _libsbml.LambdaOnlyAllowedInFunctionDef
59120
59121BooleanOpsNeedBooleanArgs = _libsbml.BooleanOpsNeedBooleanArgs
59122
59123NumericOpsNeedNumericArgs = _libsbml.NumericOpsNeedNumericArgs
59124
59125ArgsToEqNeedSameType = _libsbml.ArgsToEqNeedSameType
59126
59127PiecewiseNeedsConsistentTypes = _libsbml.PiecewiseNeedsConsistentTypes
59128
59129PieceNeedsBoolean = _libsbml.PieceNeedsBoolean
59130
59131ApplyCiMustBeUserFunction = _libsbml.ApplyCiMustBeUserFunction
59132
59133ApplyCiMustBeModelComponent = _libsbml.ApplyCiMustBeModelComponent
59134
59135KineticLawParametersAreLocalOnly = _libsbml.KineticLawParametersAreLocalOnly
59136
59137MathResultMustBeNumeric = _libsbml.MathResultMustBeNumeric
59138
59139OpsNeedCorrectNumberOfArgs = _libsbml.OpsNeedCorrectNumberOfArgs
59140
59141InvalidNoArgsPassedToFunctionDef = _libsbml.InvalidNoArgsPassedToFunctionDef
59142
59143DisallowedMathUnitsUse = _libsbml.DisallowedMathUnitsUse
59144
59145InvalidUnitsValue = _libsbml.InvalidUnitsValue
59146
59147CiCannotReference0DCompartment = _libsbml.CiCannotReference0DCompartment
59148
59149RateOfTargetMustBeCi = _libsbml.RateOfTargetMustBeCi
59150
59151RateOfTargetCannotBeAssigned = _libsbml.RateOfTargetCannotBeAssigned
59152
59153RateOfSpeciesTargetCompartmentNot = _libsbml.RateOfSpeciesTargetCompartmentNot
59154
59155DuplicateComponentId = _libsbml.DuplicateComponentId
59156
59157DuplicateUnitDefinitionId = _libsbml.DuplicateUnitDefinitionId
59158
59159DuplicateLocalParameterId = _libsbml.DuplicateLocalParameterId
59160
59161MultipleAssignmentOrRateRules = _libsbml.MultipleAssignmentOrRateRules
59162
59163MultipleEventAssignmentsForId = _libsbml.MultipleEventAssignmentsForId
59164
59165EventAndAssignmentRuleForId = _libsbml.EventAndAssignmentRuleForId
59166
59167DuplicateMetaId = _libsbml.DuplicateMetaId
59168
59169InvalidSBOTermSyntax = _libsbml.InvalidSBOTermSyntax
59170
59171InvalidMetaidSyntax = _libsbml.InvalidMetaidSyntax
59172
59173InvalidIdSyntax = _libsbml.InvalidIdSyntax
59174
59175InvalidUnitIdSyntax = _libsbml.InvalidUnitIdSyntax
59176
59177InvalidNameSyntax = _libsbml.InvalidNameSyntax
59178
59179DanglingUnitReference = _libsbml.DanglingUnitReference
59180
59181MissingAnnotationNamespace = _libsbml.MissingAnnotationNamespace
59182
59183DuplicateAnnotationNamespaces = _libsbml.DuplicateAnnotationNamespaces
59184
59185SBMLNamespaceInAnnotation = _libsbml.SBMLNamespaceInAnnotation
59186
59187MultipleAnnotations = _libsbml.MultipleAnnotations
59188
59189InconsistentArgUnits = _libsbml.InconsistentArgUnits
59190
59191InconsistentKineticLawUnitsL3 = _libsbml.InconsistentKineticLawUnitsL3
59192
59193AssignRuleCompartmentMismatch = _libsbml.AssignRuleCompartmentMismatch
59194
59195AssignRuleSpeciesMismatch = _libsbml.AssignRuleSpeciesMismatch
59196
59197AssignRuleParameterMismatch = _libsbml.AssignRuleParameterMismatch
59198
59199AssignRuleStoichiometryMismatch = _libsbml.AssignRuleStoichiometryMismatch
59200
59201InitAssignCompartmenMismatch = _libsbml.InitAssignCompartmenMismatch
59202
59203InitAssignSpeciesMismatch = _libsbml.InitAssignSpeciesMismatch
59204
59205InitAssignParameterMismatch = _libsbml.InitAssignParameterMismatch
59206
59207InitAssignStoichiometryMismatch = _libsbml.InitAssignStoichiometryMismatch
59208
59209RateRuleCompartmentMismatch = _libsbml.RateRuleCompartmentMismatch
59210
59211RateRuleSpeciesMismatch = _libsbml.RateRuleSpeciesMismatch
59212
59213RateRuleParameterMismatch = _libsbml.RateRuleParameterMismatch
59214
59215RateRuleStoichiometryMismatch = _libsbml.RateRuleStoichiometryMismatch
59216
59217KineticLawNotSubstancePerTime = _libsbml.KineticLawNotSubstancePerTime
59218
59219SpeciesInvalidExtentUnits = _libsbml.SpeciesInvalidExtentUnits
59220
59221DelayUnitsNotTime = _libsbml.DelayUnitsNotTime
59222
59223EventAssignCompartmentMismatch = _libsbml.EventAssignCompartmentMismatch
59224
59225EventAssignSpeciesMismatch = _libsbml.EventAssignSpeciesMismatch
59226
59227EventAssignParameterMismatch = _libsbml.EventAssignParameterMismatch
59228
59229EventAssignStoichiometryMismatch = _libsbml.EventAssignStoichiometryMismatch
59230
59231PriorityUnitsNotDimensionless = _libsbml.PriorityUnitsNotDimensionless
59232
59233UpperUnitBound = _libsbml.UpperUnitBound
59234
59235OverdeterminedSystem = _libsbml.OverdeterminedSystem
59236
59237InvalidModelSBOTerm = _libsbml.InvalidModelSBOTerm
59238
59239InvalidFunctionDefSBOTerm = _libsbml.InvalidFunctionDefSBOTerm
59240
59241InvalidParameterSBOTerm = _libsbml.InvalidParameterSBOTerm
59242
59243InvalidInitAssignSBOTerm = _libsbml.InvalidInitAssignSBOTerm
59244
59245InvalidRuleSBOTerm = _libsbml.InvalidRuleSBOTerm
59246
59247InvalidConstraintSBOTerm = _libsbml.InvalidConstraintSBOTerm
59248
59249InvalidReactionSBOTerm = _libsbml.InvalidReactionSBOTerm
59250
59251InvalidSpeciesReferenceSBOTerm = _libsbml.InvalidSpeciesReferenceSBOTerm
59252
59253InvalidKineticLawSBOTerm = _libsbml.InvalidKineticLawSBOTerm
59254
59255InvalidEventSBOTerm = _libsbml.InvalidEventSBOTerm
59256
59257InvalidEventAssignmentSBOTerm = _libsbml.InvalidEventAssignmentSBOTerm
59258
59259InvalidCompartmentSBOTerm = _libsbml.InvalidCompartmentSBOTerm
59260
59261InvalidSpeciesSBOTerm = _libsbml.InvalidSpeciesSBOTerm
59262
59263InvalidCompartmentTypeSBOTerm = _libsbml.InvalidCompartmentTypeSBOTerm
59264
59265InvalidSpeciesTypeSBOTerm = _libsbml.InvalidSpeciesTypeSBOTerm
59266
59267InvalidTriggerSBOTerm = _libsbml.InvalidTriggerSBOTerm
59268
59269InvalidDelaySBOTerm = _libsbml.InvalidDelaySBOTerm
59270
59271InvalidLocalParameterSBOTerm = _libsbml.InvalidLocalParameterSBOTerm
59272
59273InvalidSBMLElementSBOTerm = _libsbml.InvalidSBMLElementSBOTerm
59274
59275NotesNotInXHTMLNamespace = _libsbml.NotesNotInXHTMLNamespace
59276
59277NotesContainsXMLDecl = _libsbml.NotesContainsXMLDecl
59278
59279NotesContainsDOCTYPE = _libsbml.NotesContainsDOCTYPE
59280
59281InvalidNotesContent = _libsbml.InvalidNotesContent
59282
59283OnlyOneNotesElementAllowed = _libsbml.OnlyOneNotesElementAllowed
59284
59285InvalidNamespaceOnSBML = _libsbml.InvalidNamespaceOnSBML
59286
59287MissingOrInconsistentLevel = _libsbml.MissingOrInconsistentLevel
59288
59289MissingOrInconsistentVersion = _libsbml.MissingOrInconsistentVersion
59290
59291PackageNSMustMatch = _libsbml.PackageNSMustMatch
59292
59293LevelPositiveInteger = _libsbml.LevelPositiveInteger
59294
59295VersionPositiveInteger = _libsbml.VersionPositiveInteger
59296
59297AllowedAttributesOnSBML = _libsbml.AllowedAttributesOnSBML
59298
59299L3PackageOnLowerSBML = _libsbml.L3PackageOnLowerSBML
59300
59301MissingModel = _libsbml.MissingModel
59302
59303IncorrectOrderInModel = _libsbml.IncorrectOrderInModel
59304
59305EmptyListElement = _libsbml.EmptyListElement
59306
59307NeedCompartmentIfHaveSpecies = _libsbml.NeedCompartmentIfHaveSpecies
59308
59309OneOfEachListOf = _libsbml.OneOfEachListOf
59310
59311OnlyFuncDefsInListOfFuncDefs = _libsbml.OnlyFuncDefsInListOfFuncDefs
59312
59313OnlyUnitDefsInListOfUnitDefs = _libsbml.OnlyUnitDefsInListOfUnitDefs
59314
59315OnlyCompartmentsInListOfCompartments = _libsbml.OnlyCompartmentsInListOfCompartments
59316
59317OnlySpeciesInListOfSpecies = _libsbml.OnlySpeciesInListOfSpecies
59318
59319OnlyParametersInListOfParameters = _libsbml.OnlyParametersInListOfParameters
59320
59321OnlyInitAssignsInListOfInitAssigns = _libsbml.OnlyInitAssignsInListOfInitAssigns
59322
59323OnlyRulesInListOfRules = _libsbml.OnlyRulesInListOfRules
59324
59325OnlyConstraintsInListOfConstraints = _libsbml.OnlyConstraintsInListOfConstraints
59326
59327OnlyReactionsInListOfReactions = _libsbml.OnlyReactionsInListOfReactions
59328
59329OnlyEventsInListOfEvents = _libsbml.OnlyEventsInListOfEvents
59330
59331L3ConversionFactorOnModel = _libsbml.L3ConversionFactorOnModel
59332
59333L3TimeUnitsOnModel = _libsbml.L3TimeUnitsOnModel
59334
59335L3VolumeUnitsOnModel = _libsbml.L3VolumeUnitsOnModel
59336
59337L3AreaUnitsOnModel = _libsbml.L3AreaUnitsOnModel
59338
59339L3LengthUnitsOnModel = _libsbml.L3LengthUnitsOnModel
59340
59341L3ExtentUnitsOnModel = _libsbml.L3ExtentUnitsOnModel
59342
59343AllowedAttributesOnModel = _libsbml.AllowedAttributesOnModel
59344
59345AllowedAttributesOnListOfFuncs = _libsbml.AllowedAttributesOnListOfFuncs
59346
59347AllowedAttributesOnListOfUnitDefs = _libsbml.AllowedAttributesOnListOfUnitDefs
59348
59349AllowedAttributesOnListOfComps = _libsbml.AllowedAttributesOnListOfComps
59350
59351AllowedAttributesOnListOfSpecies = _libsbml.AllowedAttributesOnListOfSpecies
59352
59353AllowedAttributesOnListOfParams = _libsbml.AllowedAttributesOnListOfParams
59354
59355AllowedAttributesOnListOfInitAssign = _libsbml.AllowedAttributesOnListOfInitAssign
59356
59357AllowedAttributesOnListOfRules = _libsbml.AllowedAttributesOnListOfRules
59358
59359AllowedAttributesOnListOfConstraints = _libsbml.AllowedAttributesOnListOfConstraints
59360
59361AllowedAttributesOnListOfReactions = _libsbml.AllowedAttributesOnListOfReactions
59362
59363AllowedAttributesOnListOfEvents = _libsbml.AllowedAttributesOnListOfEvents
59364
59365L3V2SubstanceUnitsOnModel = _libsbml.L3V2SubstanceUnitsOnModel
59366
59367FunctionDefMathNotLambda = _libsbml.FunctionDefMathNotLambda
59368
59369InvalidApplyCiInLambda = _libsbml.InvalidApplyCiInLambda
59370
59371RecursiveFunctionDefinition = _libsbml.RecursiveFunctionDefinition
59372
59373InvalidCiInLambda = _libsbml.InvalidCiInLambda
59374
59375InvalidFunctionDefReturnType = _libsbml.InvalidFunctionDefReturnType
59376
59377OneMathElementPerFunc = _libsbml.OneMathElementPerFunc
59378
59379AllowedAttributesOnFunc = _libsbml.AllowedAttributesOnFunc
59380
59381OnlyCiInsideBVar = _libsbml.OnlyCiInsideBVar
59382
59383InvalidUnitDefId = _libsbml.InvalidUnitDefId
59384
59385InvalidSubstanceRedefinition = _libsbml.InvalidSubstanceRedefinition
59386
59387InvalidLengthRedefinition = _libsbml.InvalidLengthRedefinition
59388
59389InvalidAreaRedefinition = _libsbml.InvalidAreaRedefinition
59390
59391InvalidTimeRedefinition = _libsbml.InvalidTimeRedefinition
59392
59393InvalidVolumeRedefinition = _libsbml.InvalidVolumeRedefinition
59394
59395VolumeLitreDefExponentNotOne = _libsbml.VolumeLitreDefExponentNotOne
59396
59397VolumeMetreDefExponentNot3 = _libsbml.VolumeMetreDefExponentNot3
59398
59399EmptyListOfUnits = _libsbml.EmptyListOfUnits
59400
59401InvalidUnitKind = _libsbml.InvalidUnitKind
59402
59403OffsetNoLongerValid = _libsbml.OffsetNoLongerValid
59404
59405CelsiusNoLongerValid = _libsbml.CelsiusNoLongerValid
59406
59407EmptyUnitListElement = _libsbml.EmptyUnitListElement
59408
59409OneListOfUnitsPerUnitDef = _libsbml.OneListOfUnitsPerUnitDef
59410
59411OnlyUnitsInListOfUnits = _libsbml.OnlyUnitsInListOfUnits
59412
59413AllowedAttributesOnUnitDefinition = _libsbml.AllowedAttributesOnUnitDefinition
59414
59415AllowedAttributesOnListOfUnits = _libsbml.AllowedAttributesOnListOfUnits
59416
59417AllowedAttributesOnUnit = _libsbml.AllowedAttributesOnUnit
59418
59419ZeroDimensionalCompartmentSize = _libsbml.ZeroDimensionalCompartmentSize
59420
59421ZeroDimensionalCompartmentUnits = _libsbml.ZeroDimensionalCompartmentUnits
59422
59423ZeroDimensionalCompartmentConst = _libsbml.ZeroDimensionalCompartmentConst
59424
59425UndefinedOutsideCompartment = _libsbml.UndefinedOutsideCompartment
59426
59427RecursiveCompartmentContainment = _libsbml.RecursiveCompartmentContainment
59428
59429ZeroDCompartmentContainment = _libsbml.ZeroDCompartmentContainment
59430
59431Invalid1DCompartmentUnits = _libsbml.Invalid1DCompartmentUnits
59432
59433Invalid2DCompartmentUnits = _libsbml.Invalid2DCompartmentUnits
59434
59435Invalid3DCompartmentUnits = _libsbml.Invalid3DCompartmentUnits
59436
59437InvalidCompartmentTypeRef = _libsbml.InvalidCompartmentTypeRef
59438
59439OneDimensionalCompartmentUnits = _libsbml.OneDimensionalCompartmentUnits
59440
59441TwoDimensionalCompartmentUnits = _libsbml.TwoDimensionalCompartmentUnits
59442
59443ThreeDimensionalCompartmentUnits = _libsbml.ThreeDimensionalCompartmentUnits
59444
59445AllowedAttributesOnCompartment = _libsbml.AllowedAttributesOnCompartment
59446
59447NoUnitsOnCompartment = _libsbml.NoUnitsOnCompartment
59448
59449InvalidSpeciesCompartmentRef = _libsbml.InvalidSpeciesCompartmentRef
59450
59451HasOnlySubsNoSpatialUnits = _libsbml.HasOnlySubsNoSpatialUnits
59452
59453NoSpatialUnitsInZeroD = _libsbml.NoSpatialUnitsInZeroD
59454
59455NoConcentrationInZeroD = _libsbml.NoConcentrationInZeroD
59456
59457SpatialUnitsInOneD = _libsbml.SpatialUnitsInOneD
59458
59459SpatialUnitsInTwoD = _libsbml.SpatialUnitsInTwoD
59460
59461SpatialUnitsInThreeD = _libsbml.SpatialUnitsInThreeD
59462
59463InvalidSpeciesSusbstanceUnits = _libsbml.InvalidSpeciesSusbstanceUnits
59464
59465BothAmountAndConcentrationSet = _libsbml.BothAmountAndConcentrationSet
59466
59467NonBoundarySpeciesAssignedAndUsed = _libsbml.NonBoundarySpeciesAssignedAndUsed
59468
59469NonConstantSpeciesUsed = _libsbml.NonConstantSpeciesUsed
59470
59471InvalidSpeciesTypeRef = _libsbml.InvalidSpeciesTypeRef
59472
59473MultSpeciesSameTypeInCompartment = _libsbml.MultSpeciesSameTypeInCompartment
59474
59475MissingSpeciesCompartment = _libsbml.MissingSpeciesCompartment
59476
59477SpatialSizeUnitsRemoved = _libsbml.SpatialSizeUnitsRemoved
59478
59479SubstanceUnitsOnSpecies = _libsbml.SubstanceUnitsOnSpecies
59480
59481ConversionFactorOnSpecies = _libsbml.ConversionFactorOnSpecies
59482
59483AllowedAttributesOnSpecies = _libsbml.AllowedAttributesOnSpecies
59484
59485InvalidParameterUnits = _libsbml.InvalidParameterUnits
59486
59487ParameterUnits = _libsbml.ParameterUnits
59488
59489ConversionFactorMustConstant = _libsbml.ConversionFactorMustConstant
59490
59491AllowedAttributesOnParameter = _libsbml.AllowedAttributesOnParameter
59492
59493InvalidInitAssignSymbol = _libsbml.InvalidInitAssignSymbol
59494
59495MultipleInitAssignments = _libsbml.MultipleInitAssignments
59496
59497InitAssignmentAndRuleForSameId = _libsbml.InitAssignmentAndRuleForSameId
59498
59499OneMathElementPerInitialAssign = _libsbml.OneMathElementPerInitialAssign
59500
59501AllowedAttributesOnInitialAssign = _libsbml.AllowedAttributesOnInitialAssign
59502
59503InitAssignmentCannotRef0DComp = _libsbml.InitAssignmentCannotRef0DComp
59504
59505InvalidAssignRuleVariable = _libsbml.InvalidAssignRuleVariable
59506
59507InvalidRateRuleVariable = _libsbml.InvalidRateRuleVariable
59508
59509AssignmentToConstantEntity = _libsbml.AssignmentToConstantEntity
59510
59511RateRuleForConstantEntity = _libsbml.RateRuleForConstantEntity
59512
59513RepeatedRule10304 = _libsbml.RepeatedRule10304
59514
59515CircularRuleDependency = _libsbml.CircularRuleDependency
59516
59517OneMathElementPerRule = _libsbml.OneMathElementPerRule
59518
59519AllowedAttributesOnAssignRule = _libsbml.AllowedAttributesOnAssignRule
59520
59521AllowedAttributesOnRateRule = _libsbml.AllowedAttributesOnRateRule
59522
59523AllowedAttributesOnAlgRule = _libsbml.AllowedAttributesOnAlgRule
59524
59525RuleCannotRef0DComp = _libsbml.RuleCannotRef0DComp
59526
59527CircularDependencyRateOf = _libsbml.CircularDependencyRateOf
59528
59529ConstraintMathNotBoolean = _libsbml.ConstraintMathNotBoolean
59530
59531IncorrectOrderInConstraint = _libsbml.IncorrectOrderInConstraint
59532
59533ConstraintNotInXHTMLNamespace = _libsbml.ConstraintNotInXHTMLNamespace
59534
59535ConstraintContainsXMLDecl = _libsbml.ConstraintContainsXMLDecl
59536
59537ConstraintContainsDOCTYPE = _libsbml.ConstraintContainsDOCTYPE
59538
59539InvalidConstraintContent = _libsbml.InvalidConstraintContent
59540
59541OneMathElementPerConstraint = _libsbml.OneMathElementPerConstraint
59542
59543OneMessageElementPerConstraint = _libsbml.OneMessageElementPerConstraint
59544
59545AllowedAttributesOnConstraint = _libsbml.AllowedAttributesOnConstraint
59546
59547NoReactantsOrProducts = _libsbml.NoReactantsOrProducts
59548
59549IncorrectOrderInReaction = _libsbml.IncorrectOrderInReaction
59550
59551EmptyListInReaction = _libsbml.EmptyListInReaction
59552
59553InvalidReactantsProductsList = _libsbml.InvalidReactantsProductsList
59554
59555InvalidModifiersList = _libsbml.InvalidModifiersList
59556
59557OneSubElementPerReaction = _libsbml.OneSubElementPerReaction
59558
59559CompartmentOnReaction = _libsbml.CompartmentOnReaction
59560
59561AllowedAttributesOnReaction = _libsbml.AllowedAttributesOnReaction
59562
59563InvalidSpeciesReference = _libsbml.InvalidSpeciesReference
59564
59565RepeatedRule20611 = _libsbml.RepeatedRule20611
59566
59567BothStoichiometryAndMath = _libsbml.BothStoichiometryAndMath
59568
59569AllowedAttributesOnSpeciesReference = _libsbml.AllowedAttributesOnSpeciesReference
59570
59571AllowedAttributesOnModifier = _libsbml.AllowedAttributesOnModifier
59572
59573UndeclaredSpeciesRef = _libsbml.UndeclaredSpeciesRef
59574
59575IncorrectOrderInKineticLaw = _libsbml.IncorrectOrderInKineticLaw
59576
59577EmptyListInKineticLaw = _libsbml.EmptyListInKineticLaw
59578
59579NonConstantLocalParameter = _libsbml.NonConstantLocalParameter
59580
59581SubsUnitsNoLongerValid = _libsbml.SubsUnitsNoLongerValid
59582
59583TimeUnitsNoLongerValid = _libsbml.TimeUnitsNoLongerValid
59584
59585OneListOfPerKineticLaw = _libsbml.OneListOfPerKineticLaw
59586
59587OnlyLocalParamsInListOfLocalParams = _libsbml.OnlyLocalParamsInListOfLocalParams
59588
59589AllowedAttributesOnListOfLocalParam = _libsbml.AllowedAttributesOnListOfLocalParam
59590
59591OneMathPerKineticLaw = _libsbml.OneMathPerKineticLaw
59592
59593UndeclaredSpeciesInStoichMath = _libsbml.UndeclaredSpeciesInStoichMath
59594
59595AllowedAttributesOnKineticLaw = _libsbml.AllowedAttributesOnKineticLaw
59596
59597AllowedAttributesOnListOfSpeciesRef = _libsbml.AllowedAttributesOnListOfSpeciesRef
59598
59599AllowedAttributesOnListOfMods = _libsbml.AllowedAttributesOnListOfMods
59600
59601L3V2FastDeprecated = _libsbml.L3V2FastDeprecated
59602
59603AllowedAttributesOnLocalParameter = _libsbml.AllowedAttributesOnLocalParameter
59604
59605LocalParameterShadowsSpecies = _libsbml.LocalParameterShadowsSpecies
59606
59607MissingTriggerInEvent = _libsbml.MissingTriggerInEvent
59608
59609TriggerMathNotBoolean = _libsbml.TriggerMathNotBoolean
59610
59611MissingEventAssignment = _libsbml.MissingEventAssignment
59612
59613TimeUnitsEvent = _libsbml.TimeUnitsEvent
59614
59615IncorrectOrderInEvent = _libsbml.IncorrectOrderInEvent
59616
59617ValuesFromTriggerTimeNeedDelay = _libsbml.ValuesFromTriggerTimeNeedDelay
59618
59619DelayNeedsValuesFromTriggerTime = _libsbml.DelayNeedsValuesFromTriggerTime
59620
59621OneMathPerTrigger = _libsbml.OneMathPerTrigger
59622
59623OneMathPerDelay = _libsbml.OneMathPerDelay
59624
59625InvalidEventAssignmentVariable = _libsbml.InvalidEventAssignmentVariable
59626
59627EventAssignmentForConstantEntity = _libsbml.EventAssignmentForConstantEntity
59628
59629OneMathPerEventAssignment = _libsbml.OneMathPerEventAssignment
59630
59631AllowedAttributesOnEventAssignment = _libsbml.AllowedAttributesOnEventAssignment
59632
59633OnlyOneDelayPerEvent = _libsbml.OnlyOneDelayPerEvent
59634
59635OneListOfEventAssignmentsPerEvent = _libsbml.OneListOfEventAssignmentsPerEvent
59636
59637OnlyEventAssignInListOfEventAssign = _libsbml.OnlyEventAssignInListOfEventAssign
59638
59639AllowedAttributesOnListOfEventAssign = _libsbml.AllowedAttributesOnListOfEventAssign
59640
59641AllowedAttributesOnEvent = _libsbml.AllowedAttributesOnEvent
59642
59643AllowedAttributesOnTrigger = _libsbml.AllowedAttributesOnTrigger
59644
59645AllowedAttributesOnDelay = _libsbml.AllowedAttributesOnDelay
59646
59647PersistentNotBoolean = _libsbml.PersistentNotBoolean
59648
59649InitialValueNotBoolean = _libsbml.InitialValueNotBoolean
59650
59651OnlyOnePriorityPerEvent = _libsbml.OnlyOnePriorityPerEvent
59652
59653OneMathPerPriority = _libsbml.OneMathPerPriority
59654
59655AllowedAttributesOnPriority = _libsbml.AllowedAttributesOnPriority
59656
59657GeneralWarningNotSpecified = _libsbml.GeneralWarningNotSpecified
59658
59659CompartmentShouldHaveSize = _libsbml.CompartmentShouldHaveSize
59660
59661SpeciesShouldHaveValue = _libsbml.SpeciesShouldHaveValue
59662
59663ParameterShouldHaveUnits = _libsbml.ParameterShouldHaveUnits
59664
59665ParameterShouldHaveValue = _libsbml.ParameterShouldHaveValue
59666
59667LocalParameterShadowsId = _libsbml.LocalParameterShadowsId
59668
59669LibSBMLAdditionalCodesLowerBound = _libsbml.LibSBMLAdditionalCodesLowerBound
59670
59671CannotConvertToL1V1 = _libsbml.CannotConvertToL1V1
59672
59673NoEventsInL1 = _libsbml.NoEventsInL1
59674
59675NoFunctionDefinitionsInL1 = _libsbml.NoFunctionDefinitionsInL1
59676
59677NoConstraintsInL1 = _libsbml.NoConstraintsInL1
59678
59679NoInitialAssignmentsInL1 = _libsbml.NoInitialAssignmentsInL1
59680
59681NoSpeciesTypesInL1 = _libsbml.NoSpeciesTypesInL1
59682
59683NoCompartmentTypeInL1 = _libsbml.NoCompartmentTypeInL1
59684
59685NoNon3DCompartmentsInL1 = _libsbml.NoNon3DCompartmentsInL1
59686
59687NoFancyStoichiometryMathInL1 = _libsbml.NoFancyStoichiometryMathInL1
59688
59689NoNonIntegerStoichiometryInL1 = _libsbml.NoNonIntegerStoichiometryInL1
59690
59691NoUnitMultipliersOrOffsetsInL1 = _libsbml.NoUnitMultipliersOrOffsetsInL1
59692
59693SpeciesCompartmentRequiredInL1 = _libsbml.SpeciesCompartmentRequiredInL1
59694
59695NoSpeciesSpatialSizeUnitsInL1 = _libsbml.NoSpeciesSpatialSizeUnitsInL1
59696
59697NoSBOTermsInL1 = _libsbml.NoSBOTermsInL1
59698
59699StrictUnitsRequiredInL1 = _libsbml.StrictUnitsRequiredInL1
59700
59701ConversionFactorNotInL1 = _libsbml.ConversionFactorNotInL1
59702
59703CompartmentNotOnL1Reaction = _libsbml.CompartmentNotOnL1Reaction
59704
59705ExtentUnitsNotSubstance = _libsbml.ExtentUnitsNotSubstance
59706
59707GlobalUnitsNotDeclared = _libsbml.GlobalUnitsNotDeclared
59708
59709HasOnlySubstanceUnitsNotinL1 = _libsbml.HasOnlySubstanceUnitsNotinL1
59710
59711AvogadroNotSupported = _libsbml.AvogadroNotSupported
59712
59713NoConstraintsInL2v1 = _libsbml.NoConstraintsInL2v1
59714
59715NoInitialAssignmentsInL2v1 = _libsbml.NoInitialAssignmentsInL2v1
59716
59717NoSpeciesTypeInL2v1 = _libsbml.NoSpeciesTypeInL2v1
59718
59719NoCompartmentTypeInL2v1 = _libsbml.NoCompartmentTypeInL2v1
59720
59721NoSBOTermsInL2v1 = _libsbml.NoSBOTermsInL2v1
59722
59723NoIdOnSpeciesReferenceInL2v1 = _libsbml.NoIdOnSpeciesReferenceInL2v1
59724
59725NoDelayedEventAssignmentInL2v1 = _libsbml.NoDelayedEventAssignmentInL2v1
59726
59727StrictUnitsRequiredInL2v1 = _libsbml.StrictUnitsRequiredInL2v1
59728
59729IntegerSpatialDimensions = _libsbml.IntegerSpatialDimensions
59730
59731StoichiometryMathNotYetSupported = _libsbml.StoichiometryMathNotYetSupported
59732
59733PriorityLostFromL3 = _libsbml.PriorityLostFromL3
59734
59735NonPersistentNotSupported = _libsbml.NonPersistentNotSupported
59736
59737InitialValueFalseEventNotSupported = _libsbml.InitialValueFalseEventNotSupported
59738
59739SBOTermNotUniversalInL2v2 = _libsbml.SBOTermNotUniversalInL2v2
59740
59741NoUnitOffsetInL2v2 = _libsbml.NoUnitOffsetInL2v2
59742
59743NoKineticLawTimeUnitsInL2v2 = _libsbml.NoKineticLawTimeUnitsInL2v2
59744
59745NoKineticLawSubstanceUnitsInL2v2 = _libsbml.NoKineticLawSubstanceUnitsInL2v2
59746
59747NoDelayedEventAssignmentInL2v2 = _libsbml.NoDelayedEventAssignmentInL2v2
59748
59749ModelSBOBranchChangedBeyondL2v2 = _libsbml.ModelSBOBranchChangedBeyondL2v2
59750
59751StrictUnitsRequiredInL2v2 = _libsbml.StrictUnitsRequiredInL2v2
59752
59753StrictSBORequiredInL2v2 = _libsbml.StrictSBORequiredInL2v2
59754
59755DuplicateAnnotationInvalidInL2v2 = _libsbml.DuplicateAnnotationInvalidInL2v2
59756
59757NoUnitOffsetInL2v3 = _libsbml.NoUnitOffsetInL2v3
59758
59759NoKineticLawTimeUnitsInL2v3 = _libsbml.NoKineticLawTimeUnitsInL2v3
59760
59761NoKineticLawSubstanceUnitsInL2v3 = _libsbml.NoKineticLawSubstanceUnitsInL2v3
59762
59763NoSpeciesSpatialSizeUnitsInL2v3 = _libsbml.NoSpeciesSpatialSizeUnitsInL2v3
59764
59765NoEventTimeUnitsInL2v3 = _libsbml.NoEventTimeUnitsInL2v3
59766
59767NoDelayedEventAssignmentInL2v3 = _libsbml.NoDelayedEventAssignmentInL2v3
59768
59769ModelSBOBranchChangedBeyondL2v3 = _libsbml.ModelSBOBranchChangedBeyondL2v3
59770
59771StrictUnitsRequiredInL2v3 = _libsbml.StrictUnitsRequiredInL2v3
59772
59773StrictSBORequiredInL2v3 = _libsbml.StrictSBORequiredInL2v3
59774
59775DuplicateAnnotationInvalidInL2v3 = _libsbml.DuplicateAnnotationInvalidInL2v3
59776
59777NoUnitOffsetInL2v4 = _libsbml.NoUnitOffsetInL2v4
59778
59779NoKineticLawTimeUnitsInL2v4 = _libsbml.NoKineticLawTimeUnitsInL2v4
59780
59781NoKineticLawSubstanceUnitsInL2v4 = _libsbml.NoKineticLawSubstanceUnitsInL2v4
59782
59783NoSpeciesSpatialSizeUnitsInL2v4 = _libsbml.NoSpeciesSpatialSizeUnitsInL2v4
59784
59785NoEventTimeUnitsInL2v4 = _libsbml.NoEventTimeUnitsInL2v4
59786
59787ModelSBOBranchChangedInL2v4 = _libsbml.ModelSBOBranchChangedInL2v4
59788
59789DuplicateAnnotationInvalidInL2v4 = _libsbml.DuplicateAnnotationInvalidInL2v4
59790
59791NoSpeciesTypeInL3v1 = _libsbml.NoSpeciesTypeInL3v1
59792
59793NoCompartmentTypeInL3v1 = _libsbml.NoCompartmentTypeInL3v1
59794
59795NoUnitOffsetInL3v1 = _libsbml.NoUnitOffsetInL3v1
59796
59797NoKineticLawTimeUnitsInL3v1 = _libsbml.NoKineticLawTimeUnitsInL3v1
59798
59799NoKineticLawSubstanceUnitsInL3v1 = _libsbml.NoKineticLawSubstanceUnitsInL3v1
59800
59801NoSpeciesSpatialSizeUnitsInL3v1 = _libsbml.NoSpeciesSpatialSizeUnitsInL3v1
59802
59803NoEventTimeUnitsInL3v1 = _libsbml.NoEventTimeUnitsInL3v1
59804
59805ModelSBOBranchChangedInL3v1 = _libsbml.ModelSBOBranchChangedInL3v1
59806
59807DuplicateAnnotationInvalidInL3v1 = _libsbml.DuplicateAnnotationInvalidInL3v1
59808
59809NoCompartmentOutsideInL3v1 = _libsbml.NoCompartmentOutsideInL3v1
59810
59811NoStoichiometryMathInL3v1 = _libsbml.NoStoichiometryMathInL3v1
59812
59813DoubleExponentNotSupported = _libsbml.DoubleExponentNotSupported
59814
59815MathMLElementNotSupported = _libsbml.MathMLElementNotSupported
59816
59817EmptyListOfElementNotSupported = _libsbml.EmptyListOfElementNotSupported
59818
59819MissingMathElementNotSupported = _libsbml.MissingMathElementNotSupported
59820
59821MissingTriggerElementNotSupported = _libsbml.MissingTriggerElementNotSupported
59822
59823BooleanNumericDiscrepancy = _libsbml.BooleanNumericDiscrepancy
59824
59825IdNameSBaseInL3V2 = _libsbml.IdNameSBaseInL3V2
59826
59827MissingParticipantsNotSupported = _libsbml.MissingParticipantsNotSupported
59828
59829ConvertibleMathInitialAssignment = _libsbml.ConvertibleMathInitialAssignment
59830
59831FastReactionsNotSupported = _libsbml.FastReactionsNotSupported
59832
59833SpeciesRefIdInMathMLNotSupported = _libsbml.SpeciesRefIdInMathMLNotSupported
59834
59835InvalidSBMLLevelVersion = _libsbml.InvalidSBMLLevelVersion
59836
59837InvalidPackageLevelVersion = _libsbml.InvalidPackageLevelVersion
59838
59839AnnotationNotesNotAllowedLevel1 = _libsbml.AnnotationNotesNotAllowedLevel1
59840
59841InvalidRuleOrdering = _libsbml.InvalidRuleOrdering
59842
59843RequiredPackagePresent = _libsbml.RequiredPackagePresent
59844
59845UnrequiredPackagePresent = _libsbml.UnrequiredPackagePresent
59846
59847PackageRequiredShouldBeFalse = _libsbml.PackageRequiredShouldBeFalse
59848
59849SubsUnitsAllowedInKL = _libsbml.SubsUnitsAllowedInKL
59850
59851TimeUnitsAllowedInKL = _libsbml.TimeUnitsAllowedInKL
59852
59853FormulaInLevel1KL = _libsbml.FormulaInLevel1KL
59854
59855L3SubstanceUnitsOnModel = _libsbml.L3SubstanceUnitsOnModel
59856
59857StoichiometryMathMissingMath = _libsbml.StoichiometryMathMissingMath
59858
59859TimeUnitsRemoved = _libsbml.TimeUnitsRemoved
59860
59861BadMathML = _libsbml.BadMathML
59862
59863FailedMathMLReadOfDouble = _libsbml.FailedMathMLReadOfDouble
59864
59865FailedMathMLReadOfInteger = _libsbml.FailedMathMLReadOfInteger
59866
59867FailedMathMLReadOfExponential = _libsbml.FailedMathMLReadOfExponential
59868
59869FailedMathMLReadOfRational = _libsbml.FailedMathMLReadOfRational
59870
59871BadMathMLNodeType = _libsbml.BadMathMLNodeType
59872
59873InvalidMathMLAttribute = _libsbml.InvalidMathMLAttribute
59874
59875NoTimeSymbolInFunctionDef = _libsbml.NoTimeSymbolInFunctionDef
59876
59877NoBodyInFunctionDef = _libsbml.NoBodyInFunctionDef
59878
59879DanglingUnitSIdRef = _libsbml.DanglingUnitSIdRef
59880
59881RDFMissingAboutTag = _libsbml.RDFMissingAboutTag
59882
59883RDFEmptyAboutTag = _libsbml.RDFEmptyAboutTag
59884
59885RDFAboutTagNotMetaid = _libsbml.RDFAboutTagNotMetaid
59886
59887RDFNotCompleteModelHistory = _libsbml.RDFNotCompleteModelHistory
59888
59889RDFNotModelHistory = _libsbml.RDFNotModelHistory
59890
59891AnnotationNotElement = _libsbml.AnnotationNotElement
59892
59893NestedAnnotationNotAllowed = _libsbml.NestedAnnotationNotAllowed
59894
59895InconsistentArgUnitsWarnings = _libsbml.InconsistentArgUnitsWarnings
59896
59897InconsistentPowerUnitsWarnings = _libsbml.InconsistentPowerUnitsWarnings
59898
59899InconsistentExponUnitsWarnings = _libsbml.InconsistentExponUnitsWarnings
59900
59901UndeclaredUnits = _libsbml.UndeclaredUnits
59902
59903UndeclaredTimeUnitsL3 = _libsbml.UndeclaredTimeUnitsL3
59904
59905UndeclaredExtentUnitsL3 = _libsbml.UndeclaredExtentUnitsL3
59906
59907UndeclaredObjectUnitsL3 = _libsbml.UndeclaredObjectUnitsL3
59908
59909CannotVerifyUnitsObjectNoMath = _libsbml.CannotVerifyUnitsObjectNoMath
59910
59911UnrecognisedSBOTerm = _libsbml.UnrecognisedSBOTerm
59912
59913ObseleteSBOTerm = _libsbml.ObseleteSBOTerm
59914
59915IncorrectCompartmentSpatialDimensions = _libsbml.IncorrectCompartmentSpatialDimensions
59916
59917CompartmentTypeNotValidAttribute = _libsbml.CompartmentTypeNotValidAttribute
59918
59919ConstantNotValidAttribute = _libsbml.ConstantNotValidAttribute
59920
59921MetaIdNotValidAttribute = _libsbml.MetaIdNotValidAttribute
59922
59923SBOTermNotValidAttributeBeforeL2V3 = _libsbml.SBOTermNotValidAttributeBeforeL2V3
59924
59925InvalidL1CompartmentUnits = _libsbml.InvalidL1CompartmentUnits
59926
59927L1V1CompartmentVolumeReqd = _libsbml.L1V1CompartmentVolumeReqd
59928
59929CompartmentTypeNotValidComponent = _libsbml.CompartmentTypeNotValidComponent
59930
59931ConstraintNotValidComponent = _libsbml.ConstraintNotValidComponent
59932
59933EventNotValidComponent = _libsbml.EventNotValidComponent
59934
59935SBOTermNotValidAttributeBeforeL2V2 = _libsbml.SBOTermNotValidAttributeBeforeL2V2
59936
59937FuncDefNotValidComponent = _libsbml.FuncDefNotValidComponent
59938
59939InitialAssignNotValidComponent = _libsbml.InitialAssignNotValidComponent
59940
59941VariableNotValidAttribute = _libsbml.VariableNotValidAttribute
59942
59943UnitsNotValidAttribute = _libsbml.UnitsNotValidAttribute
59944
59945ConstantSpeciesNotValidAttribute = _libsbml.ConstantSpeciesNotValidAttribute
59946
59947SpatialSizeUnitsNotValidAttribute = _libsbml.SpatialSizeUnitsNotValidAttribute
59948
59949SpeciesTypeNotValidAttribute = _libsbml.SpeciesTypeNotValidAttribute
59950
59951HasOnlySubsUnitsNotValidAttribute = _libsbml.HasOnlySubsUnitsNotValidAttribute
59952
59953IdNotValidAttribute = _libsbml.IdNotValidAttribute
59954
59955NameNotValidAttribute = _libsbml.NameNotValidAttribute
59956
59957SpeciesTypeNotValidComponent = _libsbml.SpeciesTypeNotValidComponent
59958
59959StoichiometryMathNotValidComponent = _libsbml.StoichiometryMathNotValidComponent
59960
59961MultiplierNotValidAttribute = _libsbml.MultiplierNotValidAttribute
59962
59963OffsetNotValidAttribute = _libsbml.OffsetNotValidAttribute
59964
59965L3SpatialDimensionsUnset = _libsbml.L3SpatialDimensionsUnset
59966
59967OperationInterrupted = _libsbml.OperationInterrupted
59968
59969UnknownCoreAttribute = _libsbml.UnknownCoreAttribute
59970
59971UnknownPackageAttribute = _libsbml.UnknownPackageAttribute
59972
59973PackageConversionNotSupported = _libsbml.PackageConversionNotSupported
59974
59975InvalidTargetLevelVersion = _libsbml.InvalidTargetLevelVersion
59976
59977L3NotSupported = _libsbml.L3NotSupported
59978
59979SBMLCodesUpperBound = _libsbml.SBMLCodesUpperBound
59980
59981LIBSBML_CAT_SBML = _libsbml.LIBSBML_CAT_SBML
59982
59983LIBSBML_CAT_SBML_L1_COMPAT = _libsbml.LIBSBML_CAT_SBML_L1_COMPAT
59984
59985LIBSBML_CAT_SBML_L2V1_COMPAT = _libsbml.LIBSBML_CAT_SBML_L2V1_COMPAT
59986
59987LIBSBML_CAT_SBML_L2V2_COMPAT = _libsbml.LIBSBML_CAT_SBML_L2V2_COMPAT
59988
59989LIBSBML_CAT_GENERAL_CONSISTENCY = _libsbml.LIBSBML_CAT_GENERAL_CONSISTENCY
59990
59991LIBSBML_CAT_IDENTIFIER_CONSISTENCY = _libsbml.LIBSBML_CAT_IDENTIFIER_CONSISTENCY
59992
59993LIBSBML_CAT_UNITS_CONSISTENCY = _libsbml.LIBSBML_CAT_UNITS_CONSISTENCY
59994
59995LIBSBML_CAT_MATHML_CONSISTENCY = _libsbml.LIBSBML_CAT_MATHML_CONSISTENCY
59996
59997LIBSBML_CAT_SBO_CONSISTENCY = _libsbml.LIBSBML_CAT_SBO_CONSISTENCY
59998
59999LIBSBML_CAT_OVERDETERMINED_MODEL = _libsbml.LIBSBML_CAT_OVERDETERMINED_MODEL
60000
60001LIBSBML_CAT_SBML_L2V3_COMPAT = _libsbml.LIBSBML_CAT_SBML_L2V3_COMPAT
60002
60003LIBSBML_CAT_MODELING_PRACTICE = _libsbml.LIBSBML_CAT_MODELING_PRACTICE
60004
60005LIBSBML_CAT_INTERNAL_CONSISTENCY = _libsbml.LIBSBML_CAT_INTERNAL_CONSISTENCY
60006
60007LIBSBML_CAT_SBML_L2V4_COMPAT = _libsbml.LIBSBML_CAT_SBML_L2V4_COMPAT
60008
60009LIBSBML_CAT_SBML_L3V1_COMPAT = _libsbml.LIBSBML_CAT_SBML_L3V1_COMPAT
60010
60011LIBSBML_CAT_SBML_L3V2_COMPAT = _libsbml.LIBSBML_CAT_SBML_L3V2_COMPAT
60012
60013LIBSBML_CAT_SBML_COMPATIBILITY = _libsbml.LIBSBML_CAT_SBML_COMPATIBILITY
60014
60015LIBSBML_SEV_SCHEMA_ERROR = _libsbml.LIBSBML_SEV_SCHEMA_ERROR
60016
60017LIBSBML_SEV_GENERAL_WARNING = _libsbml.LIBSBML_SEV_GENERAL_WARNING
60018
60019LIBSBML_SEV_NOT_APPLICABLE = _libsbml.LIBSBML_SEV_NOT_APPLICABLE
60020
60021LIBSBML_SEV_UNKNOWN = _libsbml.LIBSBML_SEV_UNKNOWN
60022
60023class SBMLError(XMLError):
60024    r"""
60025
60026    @sbmlpackage{core}
60027
60028    @htmlinclude pkg-marker-core.html An error, warning or other diagnostic.
60029
60030    @htmlinclude not-sbml-warning.html
60031
60032    When a libSBML operation on SBML content results in an error, or when
60033    there is something wrong with the SBML content, the problems are
60034    reported as SBMLError objects.  These are generally stored in an
60035    SBMLErrorLog object; this log object, in turn, is kept in the
60036    SBMLDocument object containing the SBML content.  Applications can
60037    obtain the list of logged errors using SBMLDocument.getErrorLog() and
60038    then use the methods provided by SBMLErrorLog to access individual
60039    SBMLError objects.  (Note that despite the word 'error' in the name,
60040    SBMLError objects are used to represent not only 'true' errors, but also
60041    warnings and some informational diagnostics.  The name is a historical
60042    hold-over from early versions of libSBML, in which the object really was
60043    only used to report errors.)
60044
60045    @if clike
60046    Each SBMLError object instance has an identification number that
60047    identifies the nature of the problem.  This 'error id' number will be up
60048    to five digits long, and it will be listed in one of two enumerations:
60049    <a class='el' href='#SBMLErrorCode_t'> SBMLErrorCode_t</a> (described <a
60050    class='el' href='#SBMLErrorCode_t'> below</a>) or @link
60051    XMLError::XMLErrorCode_t XMLErrorCode_t@endlink (described in the
60052    documentation for the class XMLError).  The former enumeration contains
60053    all the SBML validation rule numbers listed in the appendices of the
60054    SBML specification documents, as well as some additional
60055    libSBML-specific error codes.
60056    @endif@if java
60057    Each SBMLError object instance has an identification number that
60058    identifies the nature of the problem.  This 'error id' number will be up
60059    to five digits long, and it will come from one of two sets of static
60060    integer constants defined in the interface class <code><a
60061    href='libsbmlConstants.html'> libsbmlConstants</a></code>: either the
60062    SBML error identifiers <a class='el' href='#SBMLErrorCode_t'> (described
60063    below)</a> or the XML error identifiers (described in the documentation
60064    for the class <code><a href='XMLError.html'> XMLError</a></code>).  The
60065    former set of constants includes all the SBML validation rule numbers
60066    listed in the appendices of the SBML specification documents, as well as
60067    some additional libSBML-specific error codes.
60068    @endif@if python
60069    Each SBMLError object instance has an identification number that
60070    identifies the nature of the problem.  This 'error id' number will be up
60071    to five digits long, and it will come from one
60072    of two sets of static integer constants defined in
60073    the interface class @link libsbml libsbml@endlink: either the SBML
60074    error identifiers <a
60075    class='el' href='#SBMLErrorCode_t'> (described below)</a> or the XML
60076    error identifiers (described in the documentation for the class XMLError).
60077    The former set of constants
60078    includes all the SBML validation rule numbers listed in the appendices
60079    of the SBML specification documents, as well as some additional
60080    libSBML-specific error codes.
60081    @endif@~
60082
60083    Error codes are useful mainly for software.  For human readers,
60084    SBMLError also includes text messages that describe the nature of a
60085    given problem.  The messages can be accessed using
60086    SBMLError.getShortMessage() and SBMLError.getMessage().  The former
60087    provides a brief one-line description of the issue, while
60088    SBMLError.getMessage() provides a more detailed text, including (if
60089    appropriate) references to sections of the SBML specifications where
60090    relevant topics are discussed.  These text strings are suitable for
60091    displaying to human users.
60092
60093    @if clike
60094    An SBMLError object also contains a category code; its value may be
60095    retrieved using the method SBMLError.getCategory().  Category values
60096    are drawn from the enumeration <a class='el'
60097    href='#SBMLErrorCategory_t'>SBMLErrorCategory_t</a> described below.
60098    Categories are used to partition errors into distinct conceptual groups.
60099    This is principally used by the libSBML validation system to group
60100    classes of validation checks.  For example,
60101    @link libsbml#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink
60102    is the category for tests that check identifier consistency;
60103    @link libsbml#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink
60104    is the category for MathML consistency checking; and
60105    so on.
60106    @endif@if java
60107    An SBMLError object also contains a category code; its value may be
60108    retrieved using the method SBMLError.getCategory().  Category values
60109    are drawn from a set of static integer constants
60110    defined in <code><a href='libsbmlConstants.html'>libsbmlConstants</a></code>,
60111    and having names beginning with the characters
60112    <code>LIBSBML_CAT_</code>.  The list of possible codes is described in a
60113    separate section below.  Categories are used to partition errors into
60114    distinct conceptual groups.  This is principally used by the libSBML
60115    validation system to group classes of validation checks.  For example,
60116    @link libsbml#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink
60117    is the category for tests that check identifier consistency;
60118    @link libsbml#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink
60119    is the category for MathML consistency checking; and
60120    so on.
60121    @endif@if python
60122    An SBMLError object also contains a category code; its value may be
60123    retrieved using the method SBMLError.getCategory().  Category values
60124    are drawn from a set of static integer constants
60125    defined in @link libsbml libsbml@endlink and having names beginning with the characters
60126    <code>LIBSBML_CAT_</code>.  The list of possible codes is described in a
60127    separate section below.  Categories are used to partition errors into
60128    distinct conceptual groups.  This is principally used by the libSBML
60129    validation system to group classes of validation checks.  For example,
60130    @link libsbml#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink
60131    is the category for tests that check identifier consistency;
60132    @link libsbml#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink
60133    is the category for MathML consistency checking; and
60134    so on.
60135    @endif@~
60136
60137    In addition, SBMLError also has a severity code.  Its value may be
60138    retrieved using the method SBMLError.getSeverity().  The possible
60139    severity values are the same as those reported by @if clike XMLError.@endif@if python XMLError.@endif@if java <code><a href='XMLError.html'>XMLError</a></code>.@endif@~
60140    Severity levels currently range from informational
60141    (@link libsbml#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink)
60142    to fatal errors
60143    (@link libsbml#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink).
60144    They can be
60145    used by an application to evaluate how serious a given problem
60146    is.
60147
60148    SBMLError also tracks the Level&nbsp;3 package extension, if any, was
60149    responsible for a given warning or error.  Each diagnostic code logged by
60150    an libSBML extension for SBML Level&nbsp;3 packages includes a record of
60151    the package that logged it.  It can be retrieved using
60152    SBMLError.getPackage().  The information is a simple text string; the
60153    string will be the nickname of the package, such as @c 'comp' for the
60154    Hierarchical %Model Composition package, @c 'fbc' for the Flux Balance
60155    Constraints package, and so on.  If the value returned by
60156    SBMLError.getPackage() is an empty string or has the value @c 'core',
60157    then the error came from libSBML core.
60158
60159    Finally, SBMLError records the line and column near where the problem
60160    occurred in the SBML content.  The values may be retrieved using the
60161    methods SBMLError.getLine() and SBMLError.getColumn().  We say 'near',
60162    because a lot of factors affect how accurate the line/column information
60163    ultimately is.  For example, different XML parsers have different
60164    conventions for which line and column number they report for a
60165    particular problem (which makes a difference when a problem involves an
60166    opening XML tag on one line and a closing tag on another line).  In some
60167    situations, some parsers report invalid line and/or column numbers
60168    altogether.  If this occurs, libSBML sets the line and/or column number
60169    in the SBMLError object to the the value of the maximum unsigned long
60170    integer representable on the platform where libSBML is running.  (This
60171    is equal to the constant named <code>ULONG_MAX</code> in C and C++.)
60172    The probability that a true line or column number in an SBML model would
60173    equal this value is vanishingly small; thus, if an application
60174    encounters these values in an XMLError object, it can assume no valid
60175    line/column number could be provided by libSBML in that situation.
60176
60177    @if clike
60178    <h3><a class='anchor' name='SBMLErrorCode_t'>SBMLErrorCode_t</a></h3>
60179
60180    #SBMLErrorCode_t is an enumeration of all SBML-level error, warning and
60181    informational diagnostic codes.  Every SBMLError object has an error
60182    code value that can be either a value from this enumeration, or a value
60183    from the #XMLErrorCode_t
60184    enumeration (see the documentation for XMLError).  The latter values
60185    apply when the error or warning signifies a basic XML issue rather than
60186    an SBML issue per se.  The values of #SBMLErrorCode_t are distinguished
60187    from those of #XMLErrorCode_t by
60188    being numbered 10000 and higher, while the XML layer's codes are 9999 and
60189    lower.  The method SBMLError.getErrorId() returns the error code of a
60190    given SBMLError object instance.
60191
60192    The following is a table of the symbolic names of #SBMLErrorCode_t values
60193    and the meaning of each code.  In this table, the right-hand columns
60194    titled 'L1V1', 'L1V2', etc. refer to Levels and Versions of the SBML
60195    specifications, and the entries in each column refer to whether the
60196    severity of the condition in that particular Level+Version of SBML.
60197    The codes stand for the following:
60198
60199    @endif@if java <h3><a class='anchor'
60200    name='SBMLErrorCode_t'>Error codes associated with SBMLError objects</a></h3>
60201
60202    The error and warning codes returned by libSBML are listed in the table
60203    below.  The method SBMLError.getErrorId() returns the error code of a
60204    given SBMLError object instance.  In the libSBML Java language
60205    interface, these error identifiers are currently
60206    implemented as static integer constants defined in the interface class
60207    <code><a href='libsbmlConstants.html'>libsbmlConstants</a></code>.  This
60208    is admittedly not an ideal approach from the standpoint of modern Java
60209    programming, but it was necessary to work around the lack of
60210    enumerations in Java prior to JDK 1.5.  Future versions of libSBML may
60211    use a proper Java enumeration type to define the error identifiers.
60212
60213    In this table, the right-hand columns titled 'L1V1', 'L1V2', etc. refer
60214    to Levels and Versions of the SBML specifications, and the entries in
60215    each column refer to whether the severity of the condition in that
60216    particular Level+Version of SBML.  The codes stand for the following:
60217
60218    @endif@if python <h3><a class='anchor'
60219    name='SBMLErrorCode_t'>Error codes associated with SBMLError objects</a></h3>
60220
60221    The error and warning codes returned by libSBML are listed in the table
60222    below.  The method SBMLError.getErrorId() returns the error code of a
60223    given SBMLError object instance.  In the libSBML Python language
60224    interface, these error identifiers are currently
60225    implemented as static integer constants defined in the interface class
60226    @link libsbml libsbml@endlink.
60227
60228    In this table, the right-hand columns titled 'L1V1', 'L1V2', etc. refer
60229    to Levels and Versions of the SBML specifications, and the entries in
60230    each column refer to whether the severity of the condition in that
60231    particular Level+Version of SBML.  The codes stand for the following:
60232
60233    @endif@~
60234
60235    <table cellspacing='1' cellpadding='2' border='0' class='normal-font'>
60236    <tr><td class='s-na'></td><td>= Not applicable</td></tr>
60237    <tr><td class='s-warning'></td><td>= Warning</td></tr>
60238    <tr><td class='s-error'></td><td>= Error</td></tr>
60239    <tr><td class='s-fatal'></td><td>= Fatal</td></tr>
60240    </table>
60241
60242    The text shown in the 'Meaning' is the text returned by the
60243    SBMLError.getShortMessage() method on a given SBMLError object.  A
60244    longer and (hopefully) clearer explanation of the issue is returned by
60245    SBMLError.getMessage().
60246
60247    The error codes come from different lists depending on whether they're
60248    from libSBML core or from an SBML Level&nbsp;3 package extension.
60249    @if clike The errors below come from #XMLErrorCode_t and #SBMLErrorCode_t
60250    (for core), and #CompSBMLErrorCode_t, #FbcSBMLErrorCode_t,
60251    #LayoutSBMLErrorCode_t, and #QualSBMLErrorCode_t (for packages).@endif
60252    @ifnot clike However, in the language interfaces other than C++, all
60253    libSBML error codes are ultimately represented as integer constants rather
60254    than separate enumerations lists, and they are all stored in a single
60255    interface class.  Codes from different libSBML extensions have names that
60256    begin with the package's nickname, such as <code>Qual</code> for
60257    the Qualitative Models package, <code>Layout</code> for the Layout
60258    package, and so on.  If the name of a code does not begin with one of
60259    the package nicknames (<code>%Layout</code>, <code>Fbc</code>,
60260    <code>Comp</code>, <code>Qual</code>, etc.), then it is a code
60261    from libSBML core.@endif
60262
60263    @par
60264    <table id='sbmlerror-table'
60265           class='text-table small-font alt-row-colors'
60266           width='95%' cellspacing='1' cellpadding='2' border='0'>
60267     <tr style='background: lightgray' class='normal-font'>
60268         <th valign='bottom'><strong>Enumerator</strong></th>
60269         <th valign='bottom'><strong>Meaning</strong></th>
60270         <th align='center' width='10'>L1 V1</th>
60271         <th align='center' width='10'>L1 V2</th>
60272         <th align='center' width='10'>L2 V1</th>
60273         <th align='center' width='10'>L2 V2</th>
60274         <th align='center' width='10'>L2 V3</th>
60275         <th align='center' width='10'>L2 V4</th>
60276         <th align='center' width='10'>L3 V1</th>
60277         <th align='center' width='10'>L3 V2</th>
60278     </tr>
60279    <tr><td class='code'>@link libsbml#XMLUnknownError XMLUnknownError@endlink</td>
60280    <td class='meaning'>Unknown error</td>
60281    <td class='s-fatal'></td>
60282    <td class='s-fatal'></td>
60283    <td class='s-fatal'></td>
60284    <td class='s-fatal'></td>
60285    <td class='s-fatal'></td>
60286    <td class='s-fatal'></td>
60287    <td class='s-fatal'></td>
60288    <td class='s-fatal'></td>
60289    </tr>
60290    <tr><td class='code'>@link libsbml#XMLOutOfMemory XMLOutOfMemory@endlink</td>
60291    <td class='meaning'>Out of memory</td>
60292    <td class='s-fatal'></td>
60293    <td class='s-fatal'></td>
60294    <td class='s-fatal'></td>
60295    <td class='s-fatal'></td>
60296    <td class='s-fatal'></td>
60297    <td class='s-fatal'></td>
60298    <td class='s-fatal'></td>
60299    <td class='s-fatal'></td>
60300    </tr>
60301    <tr><td class='code'>@link libsbml#XMLFileUnreadable XMLFileUnreadable@endlink</td>
60302    <td class='meaning'>File unreadable</td>
60303    <td class='s-error'></td>
60304    <td class='s-error'></td>
60305    <td class='s-error'></td>
60306    <td class='s-error'></td>
60307    <td class='s-error'></td>
60308    <td class='s-error'></td>
60309    <td class='s-error'></td>
60310    <td class='s-error'></td>
60311    </tr>
60312    <tr><td class='code'>@link libsbml#XMLFileUnwritable XMLFileUnwritable@endlink</td>
60313    <td class='meaning'>File unwritable</td>
60314    <td class='s-error'></td>
60315    <td class='s-error'></td>
60316    <td class='s-error'></td>
60317    <td class='s-error'></td>
60318    <td class='s-error'></td>
60319    <td class='s-error'></td>
60320    <td class='s-error'></td>
60321    <td class='s-error'></td>
60322    </tr>
60323    <tr><td class='code'>@link libsbml#XMLFileOperationError XMLFileOperationError@endlink</td>
60324    <td class='meaning'>File operation error</td>
60325    <td class='s-error'></td>
60326    <td class='s-error'></td>
60327    <td class='s-error'></td>
60328    <td class='s-error'></td>
60329    <td class='s-error'></td>
60330    <td class='s-error'></td>
60331    <td class='s-error'></td>
60332    <td class='s-error'></td>
60333    </tr>
60334    <tr><td class='code'>@link libsbml#XMLNetworkAccessError XMLNetworkAccessError@endlink</td>
60335    <td class='meaning'>Network access error</td>
60336    <td class='s-error'></td>
60337    <td class='s-error'></td>
60338    <td class='s-error'></td>
60339    <td class='s-error'></td>
60340    <td class='s-error'></td>
60341    <td class='s-error'></td>
60342    <td class='s-error'></td>
60343    <td class='s-error'></td>
60344    </tr>
60345    <tr><td class='code'>@link libsbml#InternalXMLParserError InternalXMLParserError@endlink</td>
60346    <td class='meaning'>Internal XML parser error</td>
60347    <td class='s-fatal'></td>
60348    <td class='s-fatal'></td>
60349    <td class='s-fatal'></td>
60350    <td class='s-fatal'></td>
60351    <td class='s-fatal'></td>
60352    <td class='s-fatal'></td>
60353    <td class='s-fatal'></td>
60354    <td class='s-fatal'></td>
60355    </tr>
60356    <tr><td class='code'>@link libsbml#UnrecognizedXMLParserCode UnrecognizedXMLParserCode@endlink</td>
60357    <td class='meaning'>Unrecognized XML parser code</td>
60358    <td class='s-fatal'></td>
60359    <td class='s-fatal'></td>
60360    <td class='s-fatal'></td>
60361    <td class='s-fatal'></td>
60362    <td class='s-fatal'></td>
60363    <td class='s-fatal'></td>
60364    <td class='s-fatal'></td>
60365    <td class='s-fatal'></td>
60366    </tr>
60367    <tr><td class='code'>@link libsbml#XMLTranscoderError XMLTranscoderError@endlink</td>
60368    <td class='meaning'>Transcoder error</td>
60369    <td class='s-fatal'></td>
60370    <td class='s-fatal'></td>
60371    <td class='s-fatal'></td>
60372    <td class='s-fatal'></td>
60373    <td class='s-fatal'></td>
60374    <td class='s-fatal'></td>
60375    <td class='s-fatal'></td>
60376    <td class='s-fatal'></td>
60377    </tr>
60378    <tr><td class='code'>@link libsbml#MissingXMLDecl MissingXMLDecl@endlink</td>
60379    <td class='meaning'>Missing XML declaration</td>
60380    <td class='s-error'></td>
60381    <td class='s-error'></td>
60382    <td class='s-error'></td>
60383    <td class='s-error'></td>
60384    <td class='s-error'></td>
60385    <td class='s-error'></td>
60386    <td class='s-error'></td>
60387    <td class='s-error'></td>
60388    </tr>
60389    <tr><td class='code'>@link libsbml#MissingXMLEncoding MissingXMLEncoding@endlink</td>
60390    <td class='meaning'>Missing XML encoding attribute</td>
60391    <td class='s-error'></td>
60392    <td class='s-error'></td>
60393    <td class='s-error'></td>
60394    <td class='s-error'></td>
60395    <td class='s-error'></td>
60396    <td class='s-error'></td>
60397    <td class='s-error'></td>
60398    <td class='s-error'></td>
60399    </tr>
60400    <tr><td class='code'>@link libsbml#BadXMLDecl BadXMLDecl@endlink</td>
60401    <td class='meaning'>Bad XML declaration</td>
60402    <td class='s-error'></td>
60403    <td class='s-error'></td>
60404    <td class='s-error'></td>
60405    <td class='s-error'></td>
60406    <td class='s-error'></td>
60407    <td class='s-error'></td>
60408    <td class='s-error'></td>
60409    <td class='s-error'></td>
60410    </tr>
60411    <tr><td class='code'>@link libsbml#BadXMLDOCTYPE BadXMLDOCTYPE@endlink</td>
60412    <td class='meaning'>Bad XML DOCTYPE</td>
60413    <td class='s-error'></td>
60414    <td class='s-error'></td>
60415    <td class='s-error'></td>
60416    <td class='s-error'></td>
60417    <td class='s-error'></td>
60418    <td class='s-error'></td>
60419    <td class='s-error'></td>
60420    <td class='s-error'></td>
60421    </tr>
60422    <tr><td class='code'>@link libsbml#InvalidCharInXML InvalidCharInXML@endlink</td>
60423    <td class='meaning'>Invalid character</td>
60424    <td class='s-error'></td>
60425    <td class='s-error'></td>
60426    <td class='s-error'></td>
60427    <td class='s-error'></td>
60428    <td class='s-error'></td>
60429    <td class='s-error'></td>
60430    <td class='s-error'></td>
60431    <td class='s-error'></td>
60432    </tr>
60433    <tr><td class='code'>@link libsbml#BadlyFormedXML BadlyFormedXML@endlink</td>
60434    <td class='meaning'>Badly formed XML</td>
60435    <td class='s-error'></td>
60436    <td class='s-error'></td>
60437    <td class='s-error'></td>
60438    <td class='s-error'></td>
60439    <td class='s-error'></td>
60440    <td class='s-error'></td>
60441    <td class='s-error'></td>
60442    <td class='s-error'></td>
60443    </tr>
60444    <tr><td class='code'>@link libsbml#UnclosedXMLToken UnclosedXMLToken@endlink</td>
60445    <td class='meaning'>Unclosed token</td>
60446    <td class='s-error'></td>
60447    <td class='s-error'></td>
60448    <td class='s-error'></td>
60449    <td class='s-error'></td>
60450    <td class='s-error'></td>
60451    <td class='s-error'></td>
60452    <td class='s-error'></td>
60453    <td class='s-error'></td>
60454    </tr>
60455    <tr><td class='code'>@link libsbml#InvalidXMLConstruct InvalidXMLConstruct@endlink</td>
60456    <td class='meaning'>Invalid XML construct</td>
60457    <td class='s-error'></td>
60458    <td class='s-error'></td>
60459    <td class='s-error'></td>
60460    <td class='s-error'></td>
60461    <td class='s-error'></td>
60462    <td class='s-error'></td>
60463    <td class='s-error'></td>
60464    <td class='s-error'></td>
60465    </tr>
60466    <tr><td class='code'>@link libsbml#XMLTagMismatch XMLTagMismatch@endlink</td>
60467    <td class='meaning'>XML tag mismatch</td>
60468    <td class='s-error'></td>
60469    <td class='s-error'></td>
60470    <td class='s-error'></td>
60471    <td class='s-error'></td>
60472    <td class='s-error'></td>
60473    <td class='s-error'></td>
60474    <td class='s-error'></td>
60475    <td class='s-error'></td>
60476    </tr>
60477    <tr><td class='code'>@link libsbml#DuplicateXMLAttribute DuplicateXMLAttribute@endlink</td>
60478    <td class='meaning'>Duplicate attribute</td>
60479    <td class='s-error'></td>
60480    <td class='s-error'></td>
60481    <td class='s-error'></td>
60482    <td class='s-error'></td>
60483    <td class='s-error'></td>
60484    <td class='s-error'></td>
60485    <td class='s-error'></td>
60486    <td class='s-error'></td>
60487    </tr>
60488    <tr><td class='code'>@link libsbml#UndefinedXMLEntity UndefinedXMLEntity@endlink</td>
60489    <td class='meaning'>Undefined XML entity</td>
60490    <td class='s-error'></td>
60491    <td class='s-error'></td>
60492    <td class='s-error'></td>
60493    <td class='s-error'></td>
60494    <td class='s-error'></td>
60495    <td class='s-error'></td>
60496    <td class='s-error'></td>
60497    <td class='s-error'></td>
60498    </tr>
60499    <tr><td class='code'>@link libsbml#BadProcessingInstruction BadProcessingInstruction@endlink</td>
60500    <td class='meaning'>Bad XML processing instruction</td>
60501    <td class='s-error'></td>
60502    <td class='s-error'></td>
60503    <td class='s-error'></td>
60504    <td class='s-error'></td>
60505    <td class='s-error'></td>
60506    <td class='s-error'></td>
60507    <td class='s-error'></td>
60508    <td class='s-error'></td>
60509    </tr>
60510    <tr><td class='code'>@link libsbml#BadXMLPrefix BadXMLPrefix@endlink</td>
60511    <td class='meaning'>Bad XML prefix</td>
60512    <td class='s-error'></td>
60513    <td class='s-error'></td>
60514    <td class='s-error'></td>
60515    <td class='s-error'></td>
60516    <td class='s-error'></td>
60517    <td class='s-error'></td>
60518    <td class='s-error'></td>
60519    <td class='s-error'></td>
60520    </tr>
60521    <tr><td class='code'>@link libsbml#BadXMLPrefixValue BadXMLPrefixValue@endlink</td>
60522    <td class='meaning'>Bad XML prefix value</td>
60523    <td class='s-error'></td>
60524    <td class='s-error'></td>
60525    <td class='s-error'></td>
60526    <td class='s-error'></td>
60527    <td class='s-error'></td>
60528    <td class='s-error'></td>
60529    <td class='s-error'></td>
60530    <td class='s-error'></td>
60531    </tr>
60532    <tr><td class='code'>@link libsbml#MissingXMLRequiredAttribute MissingXMLRequiredAttribute@endlink</td>
60533    <td class='meaning'>Missing required attribute</td>
60534    <td class='s-error'></td>
60535    <td class='s-error'></td>
60536    <td class='s-error'></td>
60537    <td class='s-error'></td>
60538    <td class='s-error'></td>
60539    <td class='s-error'></td>
60540    <td class='s-error'></td>
60541    <td class='s-error'></td>
60542    </tr>
60543    <tr><td class='code'>@link libsbml#XMLAttributeTypeMismatch XMLAttributeTypeMismatch@endlink</td>
60544    <td class='meaning'>Attribute type mismatch</td>
60545    <td class='s-error'></td>
60546    <td class='s-error'></td>
60547    <td class='s-error'></td>
60548    <td class='s-error'></td>
60549    <td class='s-error'></td>
60550    <td class='s-error'></td>
60551    <td class='s-error'></td>
60552    <td class='s-error'></td>
60553    </tr>
60554    <tr><td class='code'>@link libsbml#XMLBadUTF8Content XMLBadUTF8Content@endlink</td>
60555    <td class='meaning'>Bad UTF8 content</td>
60556    <td class='s-error'></td>
60557    <td class='s-error'></td>
60558    <td class='s-error'></td>
60559    <td class='s-error'></td>
60560    <td class='s-error'></td>
60561    <td class='s-error'></td>
60562    <td class='s-error'></td>
60563    <td class='s-error'></td>
60564    </tr>
60565    <tr><td class='code'>@link libsbml#MissingXMLAttributeValue MissingXMLAttributeValue@endlink</td>
60566    <td class='meaning'>Missing attribute value</td>
60567    <td class='s-error'></td>
60568    <td class='s-error'></td>
60569    <td class='s-error'></td>
60570    <td class='s-error'></td>
60571    <td class='s-error'></td>
60572    <td class='s-error'></td>
60573    <td class='s-error'></td>
60574    <td class='s-error'></td>
60575    </tr>
60576    <tr><td class='code'>@link libsbml#BadXMLAttributeValue BadXMLAttributeValue@endlink</td>
60577    <td class='meaning'>Bad attribute value</td>
60578    <td class='s-error'></td>
60579    <td class='s-error'></td>
60580    <td class='s-error'></td>
60581    <td class='s-error'></td>
60582    <td class='s-error'></td>
60583    <td class='s-error'></td>
60584    <td class='s-error'></td>
60585    <td class='s-error'></td>
60586    </tr>
60587    <tr><td class='code'>@link libsbml#BadXMLAttribute BadXMLAttribute@endlink</td>
60588    <td class='meaning'>Bad XML attribute</td>
60589    <td class='s-error'></td>
60590    <td class='s-error'></td>
60591    <td class='s-error'></td>
60592    <td class='s-error'></td>
60593    <td class='s-error'></td>
60594    <td class='s-error'></td>
60595    <td class='s-error'></td>
60596    <td class='s-error'></td>
60597    </tr>
60598    <tr><td class='code'>@link libsbml#UnrecognizedXMLElement UnrecognizedXMLElement@endlink</td>
60599    <td class='meaning'>Unrecognized XML element</td>
60600    <td class='s-error'></td>
60601    <td class='s-error'></td>
60602    <td class='s-error'></td>
60603    <td class='s-error'></td>
60604    <td class='s-error'></td>
60605    <td class='s-error'></td>
60606    <td class='s-error'></td>
60607    <td class='s-error'></td>
60608    </tr>
60609    <tr><td class='code'>@link libsbml#BadXMLComment BadXMLComment@endlink</td>
60610    <td class='meaning'>Bad XML comment</td>
60611    <td class='s-error'></td>
60612    <td class='s-error'></td>
60613    <td class='s-error'></td>
60614    <td class='s-error'></td>
60615    <td class='s-error'></td>
60616    <td class='s-error'></td>
60617    <td class='s-error'></td>
60618    <td class='s-error'></td>
60619    </tr>
60620    <tr><td class='code'>@link libsbml#BadXMLDeclLocation BadXMLDeclLocation@endlink</td>
60621    <td class='meaning'>Bad XML declaration location</td>
60622    <td class='s-error'></td>
60623    <td class='s-error'></td>
60624    <td class='s-error'></td>
60625    <td class='s-error'></td>
60626    <td class='s-error'></td>
60627    <td class='s-error'></td>
60628    <td class='s-error'></td>
60629    <td class='s-error'></td>
60630    </tr>
60631    <tr><td class='code'>@link libsbml#XMLUnexpectedEOF XMLUnexpectedEOF@endlink</td>
60632    <td class='meaning'>Unexpected EOF</td>
60633    <td class='s-error'></td>
60634    <td class='s-error'></td>
60635    <td class='s-error'></td>
60636    <td class='s-error'></td>
60637    <td class='s-error'></td>
60638    <td class='s-error'></td>
60639    <td class='s-error'></td>
60640    <td class='s-error'></td>
60641    </tr>
60642    <tr><td class='code'>@link libsbml#BadXMLIDValue BadXMLIDValue@endlink</td>
60643    <td class='meaning'>Bad XML ID value</td>
60644    <td class='s-error'></td>
60645    <td class='s-error'></td>
60646    <td class='s-error'></td>
60647    <td class='s-error'></td>
60648    <td class='s-error'></td>
60649    <td class='s-error'></td>
60650    <td class='s-error'></td>
60651    <td class='s-error'></td>
60652    </tr>
60653    <tr><td class='code'>@link libsbml#BadXMLIDRef BadXMLIDRef@endlink</td>
60654    <td class='meaning'>Bad XML IDREF</td>
60655    <td class='s-error'></td>
60656    <td class='s-error'></td>
60657    <td class='s-error'></td>
60658    <td class='s-error'></td>
60659    <td class='s-error'></td>
60660    <td class='s-error'></td>
60661    <td class='s-error'></td>
60662    <td class='s-error'></td>
60663    </tr>
60664    <tr><td class='code'>@link libsbml#UninterpretableXMLContent UninterpretableXMLContent@endlink</td>
60665    <td class='meaning'>Uninterpretable XML content</td>
60666    <td class='s-error'></td>
60667    <td class='s-error'></td>
60668    <td class='s-error'></td>
60669    <td class='s-error'></td>
60670    <td class='s-error'></td>
60671    <td class='s-error'></td>
60672    <td class='s-error'></td>
60673    <td class='s-error'></td>
60674    </tr>
60675    <tr><td class='code'>@link libsbml#BadXMLDocumentStructure BadXMLDocumentStructure@endlink</td>
60676    <td class='meaning'>Bad XML document structure</td>
60677    <td class='s-error'></td>
60678    <td class='s-error'></td>
60679    <td class='s-error'></td>
60680    <td class='s-error'></td>
60681    <td class='s-error'></td>
60682    <td class='s-error'></td>
60683    <td class='s-error'></td>
60684    <td class='s-error'></td>
60685    </tr>
60686    <tr><td class='code'>@link libsbml#InvalidAfterXMLContent InvalidAfterXMLContent@endlink</td>
60687    <td class='meaning'>Invalid content after XML content</td>
60688    <td class='s-error'></td>
60689    <td class='s-error'></td>
60690    <td class='s-error'></td>
60691    <td class='s-error'></td>
60692    <td class='s-error'></td>
60693    <td class='s-error'></td>
60694    <td class='s-error'></td>
60695    <td class='s-error'></td>
60696    </tr>
60697    <tr><td class='code'>@link libsbml#XMLExpectedQuotedString XMLExpectedQuotedString@endlink</td>
60698    <td class='meaning'>Expected quoted string</td>
60699    <td class='s-error'></td>
60700    <td class='s-error'></td>
60701    <td class='s-error'></td>
60702    <td class='s-error'></td>
60703    <td class='s-error'></td>
60704    <td class='s-error'></td>
60705    <td class='s-error'></td>
60706    <td class='s-error'></td>
60707    </tr>
60708    <tr><td class='code'>@link libsbml#XMLEmptyValueNotPermitted XMLEmptyValueNotPermitted@endlink</td>
60709    <td class='meaning'>Empty value not permitted</td>
60710    <td class='s-error'></td>
60711    <td class='s-error'></td>
60712    <td class='s-error'></td>
60713    <td class='s-error'></td>
60714    <td class='s-error'></td>
60715    <td class='s-error'></td>
60716    <td class='s-error'></td>
60717    <td class='s-error'></td>
60718    </tr>
60719    <tr><td class='code'>@link libsbml#XMLBadNumber XMLBadNumber@endlink</td>
60720    <td class='meaning'>Bad number</td>
60721    <td class='s-error'></td>
60722    <td class='s-error'></td>
60723    <td class='s-error'></td>
60724    <td class='s-error'></td>
60725    <td class='s-error'></td>
60726    <td class='s-error'></td>
60727    <td class='s-error'></td>
60728    <td class='s-error'></td>
60729    </tr>
60730    <tr><td class='code'>@link libsbml#XMLBadColon XMLBadColon@endlink</td>
60731    <td class='meaning'>Colon character not permitted</td>
60732    <td class='s-error'></td>
60733    <td class='s-error'></td>
60734    <td class='s-error'></td>
60735    <td class='s-error'></td>
60736    <td class='s-error'></td>
60737    <td class='s-error'></td>
60738    <td class='s-error'></td>
60739    <td class='s-error'></td>
60740    </tr>
60741    <tr><td class='code'>@link libsbml#MissingXMLElements MissingXMLElements@endlink</td>
60742    <td class='meaning'>Missing XML elements</td>
60743    <td class='s-error'></td>
60744    <td class='s-error'></td>
60745    <td class='s-error'></td>
60746    <td class='s-error'></td>
60747    <td class='s-error'></td>
60748    <td class='s-error'></td>
60749    <td class='s-error'></td>
60750    <td class='s-error'></td>
60751    </tr>
60752    <tr><td class='code'>@link libsbml#XMLContentEmpty XMLContentEmpty@endlink</td>
60753    <td class='meaning'>Empty XML content</td>
60754    <td class='s-error'></td>
60755    <td class='s-error'></td>
60756    <td class='s-error'></td>
60757    <td class='s-error'></td>
60758    <td class='s-error'></td>
60759    <td class='s-error'></td>
60760    <td class='s-error'></td>
60761    <td class='s-error'></td>
60762    </tr>
60763    <tr><td class='code'>@link libsbml#UnknownError UnknownError@endlink</td>
60764    <td class='meaning'>Encountered unknown internal libSBML error</td>
60765    <td class='s-fatal'></td>
60766    <td class='s-fatal'></td>
60767    <td class='s-fatal'></td>
60768    <td class='s-fatal'></td>
60769    <td class='s-fatal'></td>
60770    <td class='s-fatal'></td>
60771    <td class='s-fatal'></td>
60772    <td class='s-fatal'></td>
60773    </tr>
60774    <tr><td class='code'>@link libsbml#NotUTF8 NotUTF8@endlink</td>
60775    <td class='meaning'>File does not use UTF-8 encoding</td>
60776    <td class='s-error'></td>
60777    <td class='s-error'></td>
60778    <td class='s-error'></td>
60779    <td class='s-error'></td>
60780    <td class='s-error'></td>
60781    <td class='s-error'></td>
60782    <td class='s-error'></td>
60783    <td class='s-error'></td>
60784    </tr>
60785    <tr><td class='code'>@link libsbml#UnrecognizedElement UnrecognizedElement@endlink</td>
60786    <td class='meaning'>Encountered unrecognized element</td>
60787    <td class='s-error'></td>
60788    <td class='s-error'></td>
60789    <td class='s-error'></td>
60790    <td class='s-error'></td>
60791    <td class='s-error'></td>
60792    <td class='s-error'></td>
60793    <td class='s-error'></td>
60794    <td class='s-error'></td>
60795    </tr>
60796    <tr><td class='code'>@link libsbml#NotSchemaConformant NotSchemaConformant@endlink</td>
60797    <td class='meaning'>Document does not conform to the SBML XML schema</td>
60798    <td class='s-error'></td>
60799    <td class='s-error'></td>
60800    <td class='s-error'></td>
60801    <td class='s-error'></td>
60802    <td class='s-error'></td>
60803    <td class='s-error'></td>
60804    <td class='s-error'></td>
60805    <td class='s-error'></td>
60806    </tr>
60807    <tr><td class='code'>@link libsbml#L3NotSchemaConformant L3NotSchemaConformant@endlink</td>
60808    <td class='meaning'>Document is not well-formed XML</td>
60809    <td class='s-na'></td>
60810    <td class='s-na'></td>
60811    <td class='s-na'></td>
60812    <td class='s-na'></td>
60813    <td class='s-na'></td>
60814    <td class='s-na'></td>
60815    <td class='s-error'></td>
60816    <td class='s-error'></td>
60817    </tr>
60818    <tr><td class='code'>@link libsbml#InvalidMathElement InvalidMathElement@endlink</td>
60819    <td class='meaning'>Invalid MathML</td>
60820    <td class='s-na'></td>
60821    <td class='s-na'></td>
60822    <td class='s-error'></td>
60823    <td class='s-error'></td>
60824    <td class='s-error'></td>
60825    <td class='s-error'></td>
60826    <td class='s-error'></td>
60827    <td class='s-error'></td>
60828    </tr>
60829    <tr><td class='code'>@link libsbml#DisallowedMathMLSymbol DisallowedMathMLSymbol@endlink</td>
60830    <td class='meaning'>Disallowed MathML symbol found</td>
60831    <td class='s-na'></td>
60832    <td class='s-na'></td>
60833    <td class='s-error'></td>
60834    <td class='s-error'></td>
60835    <td class='s-error'></td>
60836    <td class='s-error'></td>
60837    <td class='s-error'></td>
60838    <td class='s-error'></td>
60839    </tr>
60840    <tr><td class='code'>@link libsbml#DisallowedMathMLEncodingUse DisallowedMathMLEncodingUse@endlink</td>
60841    <td class='meaning'>Use of the MathML 'encoding' attribute is not allowed on this element</td>
60842    <td class='s-na'></td>
60843    <td class='s-na'></td>
60844    <td class='s-error'></td>
60845    <td class='s-error'></td>
60846    <td class='s-error'></td>
60847    <td class='s-error'></td>
60848    <td class='s-error'></td>
60849    <td class='s-error'></td>
60850    </tr>
60851    <tr><td class='code'>@link libsbml#DisallowedDefinitionURLUse DisallowedDefinitionURLUse@endlink</td>
60852    <td class='meaning'>Use of the MathML 'definitionURL' attribute is not allowed on this element</td>
60853    <td class='s-na'></td>
60854    <td class='s-na'></td>
60855    <td class='s-error'></td>
60856    <td class='s-error'></td>
60857    <td class='s-error'></td>
60858    <td class='s-error'></td>
60859    <td class='s-error'></td>
60860    <td class='s-error'></td>
60861    </tr>
60862    <tr><td class='code'>@link libsbml#BadCsymbolDefinitionURLValue BadCsymbolDefinitionURLValue@endlink</td>
60863    <td class='meaning'>Invalid <code>&lt;csymbol&gt;</code> 'definitionURL' attribute value</td>
60864    <td class='s-na'></td>
60865    <td class='s-na'></td>
60866    <td class='s-error'></td>
60867    <td class='s-error'></td>
60868    <td class='s-error'></td>
60869    <td class='s-error'></td>
60870    <td class='s-error'></td>
60871    <td class='s-error'></td>
60872    </tr>
60873    <tr><td class='code'>@link libsbml#DisallowedMathTypeAttributeUse DisallowedMathTypeAttributeUse@endlink</td>
60874    <td class='meaning'>Use of the MathML 'type' attribute is not allowed on this element</td>
60875    <td class='s-na'></td>
60876    <td class='s-na'></td>
60877    <td class='s-error'></td>
60878    <td class='s-error'></td>
60879    <td class='s-error'></td>
60880    <td class='s-error'></td>
60881    <td class='s-error'></td>
60882    <td class='s-error'></td>
60883    </tr>
60884    <tr><td class='code'>@link libsbml#DisallowedMathTypeAttributeValue DisallowedMathTypeAttributeValue@endlink</td>
60885    <td class='meaning'>Disallowed MathML 'type' attribute value</td>
60886    <td class='s-na'></td>
60887    <td class='s-na'></td>
60888    <td class='s-error'></td>
60889    <td class='s-error'></td>
60890    <td class='s-error'></td>
60891    <td class='s-error'></td>
60892    <td class='s-error'></td>
60893    <td class='s-error'></td>
60894    </tr>
60895    <tr><td class='code'>@link libsbml#LambdaOnlyAllowedInFunctionDef LambdaOnlyAllowedInFunctionDef@endlink</td>
60896    <td class='meaning'>Use of <code>&lt;lambda&gt;</code> not permitted outside of FunctionDefinition objects</td>
60897    <td class='s-na'></td>
60898    <td class='s-na'></td>
60899    <td class='s-error'></td>
60900    <td class='s-error'></td>
60901    <td class='s-error'></td>
60902    <td class='s-error'></td>
60903    <td class='s-error'></td>
60904    <td class='s-error'></td>
60905    </tr>
60906    <tr><td class='code'>@link libsbml#BooleanOpsNeedBooleanArgs BooleanOpsNeedBooleanArgs@endlink</td>
60907    <td class='meaning'>Non-Boolean argument given to Boolean operator</td>
60908    <td class='s-na'></td>
60909    <td class='s-na'></td>
60910    <td class='s-warning'></td>
60911    <td class='s-error'></td>
60912    <td class='s-error'></td>
60913    <td class='s-error'></td>
60914    <td class='s-error'></td>
60915    <td class='s-na'></td>
60916    </tr>
60917    <tr><td class='code'>@link libsbml#NumericOpsNeedNumericArgs NumericOpsNeedNumericArgs@endlink</td>
60918    <td class='meaning'>Non-numerical argument given to numerical operator</td>
60919    <td class='s-na'></td>
60920    <td class='s-na'></td>
60921    <td class='s-warning'></td>
60922    <td class='s-error'></td>
60923    <td class='s-error'></td>
60924    <td class='s-error'></td>
60925    <td class='s-error'></td>
60926    <td class='s-na'></td>
60927    </tr>
60928    <tr><td class='code'>@link libsbml#ArgsToEqNeedSameType ArgsToEqNeedSameType@endlink</td>
60929    <td class='meaning'>Arguments to <code>&lt;eq&gt;</code> and <code>&lt;neq&gt;</code> must have the same data types</td>
60930    <td class='s-na'></td>
60931    <td class='s-na'></td>
60932    <td class='s-warning'></td>
60933    <td class='s-error'></td>
60934    <td class='s-error'></td>
60935    <td class='s-error'></td>
60936    <td class='s-error'></td>
60937    <td class='s-na'></td>
60938    </tr>
60939    <tr><td class='code'>@link libsbml#PiecewiseNeedsConsistentTypes PiecewiseNeedsConsistentTypes@endlink</td>
60940    <td class='meaning'>Terms in a <code>&lt;piecewise&gt;</code> expression must have consistent data types</td>
60941    <td class='s-na'></td>
60942    <td class='s-na'></td>
60943    <td class='s-warning'></td>
60944    <td class='s-error'></td>
60945    <td class='s-error'></td>
60946    <td class='s-error'></td>
60947    <td class='s-error'></td>
60948    <td class='s-na'></td>
60949    </tr>
60950    <tr><td class='code'>@link libsbml#PieceNeedsBoolean PieceNeedsBoolean@endlink</td>
60951    <td class='meaning'>The second argument of a <code>&lt;piece&gt;</code> expression must yield a Boolean value</td>
60952    <td class='s-na'></td>
60953    <td class='s-na'></td>
60954    <td class='s-warning'></td>
60955    <td class='s-error'></td>
60956    <td class='s-error'></td>
60957    <td class='s-error'></td>
60958    <td class='s-error'></td>
60959    <td class='s-na'></td>
60960    </tr>
60961    <tr><td class='code'>@link libsbml#ApplyCiMustBeUserFunction ApplyCiMustBeUserFunction@endlink</td>
60962    <td class='meaning'>A <code>&lt;ci&gt;</code> element in this context must refer to a function definition</td>
60963    <td class='s-na'></td>
60964    <td class='s-na'></td>
60965    <td class='s-warning'></td>
60966    <td class='s-error'></td>
60967    <td class='s-error'></td>
60968    <td class='s-error'></td>
60969    <td class='s-error'></td>
60970    <td class='s-error'></td>
60971    </tr>
60972    <tr><td class='code'>@link libsbml#ApplyCiMustBeModelComponent ApplyCiMustBeModelComponent@endlink</td>
60973    <td class='meaning'>A <code>&lt;ci&gt;</code> element in this context must refer to a model component</td>
60974    <td class='s-na'></td>
60975    <td class='s-na'></td>
60976    <td class='s-warning'></td>
60977    <td class='s-error'></td>
60978    <td class='s-error'></td>
60979    <td class='s-error'></td>
60980    <td class='s-error'></td>
60981    <td class='s-error'></td>
60982    </tr>
60983    <tr><td class='code'>@link libsbml#KineticLawParametersAreLocalOnly KineticLawParametersAreLocalOnly@endlink</td>
60984    <td class='meaning'>Cannot use a KineticLaw local parameter outside of its local scope</td>
60985    <td class='s-na'></td>
60986    <td class='s-na'></td>
60987    <td class='s-warning'></td>
60988    <td class='s-error'></td>
60989    <td class='s-error'></td>
60990    <td class='s-error'></td>
60991    <td class='s-error'></td>
60992    <td class='s-error'></td>
60993    </tr>
60994    <tr><td class='code'>@link libsbml#MathResultMustBeNumeric MathResultMustBeNumeric@endlink</td>
60995    <td class='meaning'>A formula's result in this context must be a numerical value</td>
60996    <td class='s-na'></td>
60997    <td class='s-na'></td>
60998    <td class='s-warning'></td>
60999    <td class='s-error'></td>
61000    <td class='s-error'></td>
61001    <td class='s-error'></td>
61002    <td class='s-error'></td>
61003    <td class='s-na'></td>
61004    </tr>
61005    <tr><td class='code'>@link libsbml#OpsNeedCorrectNumberOfArgs OpsNeedCorrectNumberOfArgs@endlink</td>
61006    <td class='meaning'>Incorrect number of arguments given to MathML operator</td>
61007    <td class='s-na'></td>
61008    <td class='s-na'></td>
61009    <td class='s-warning'></td>
61010    <td class='s-error'></td>
61011    <td class='s-error'></td>
61012    <td class='s-error'></td>
61013    <td class='s-error'></td>
61014    <td class='s-error'></td>
61015    </tr>
61016    <tr><td class='code'>@link libsbml#InvalidNoArgsPassedToFunctionDef InvalidNoArgsPassedToFunctionDef@endlink</td>
61017    <td class='meaning'>Incorrect number of arguments given to function invocation</td>
61018    <td class='s-na'></td>
61019    <td class='s-na'></td>
61020    <td class='s-na'></td>
61021    <td class='s-na'></td>
61022    <td class='s-na'></td>
61023    <td class='s-error'></td>
61024    <td class='s-error'></td>
61025    <td class='s-error'></td>
61026    </tr>
61027    <tr><td class='code'>@link libsbml#DisallowedMathUnitsUse DisallowedMathUnitsUse@endlink</td>
61028    <td class='meaning'>Attribute 'units' is only permitted on <code>&lt;cn&gt;</code> elements</td>
61029    <td class='s-na'></td>
61030    <td class='s-na'></td>
61031    <td class='s-na'></td>
61032    <td class='s-na'></td>
61033    <td class='s-na'></td>
61034    <td class='s-na'></td>
61035    <td class='s-error'></td>
61036    <td class='s-error'></td>
61037    </tr>
61038    <tr><td class='code'>@link libsbml#InvalidUnitsValue InvalidUnitsValue@endlink</td>
61039    <td class='meaning'>Invalid value given for the 'units' attribute</td>
61040    <td class='s-na'></td>
61041    <td class='s-na'></td>
61042    <td class='s-na'></td>
61043    <td class='s-na'></td>
61044    <td class='s-na'></td>
61045    <td class='s-na'></td>
61046    <td class='s-error'></td>
61047    <td class='s-error'></td>
61048    </tr>
61049    <tr><td class='code'>@link libsbml#CiCannotReference0DCompartment CiCannotReference0DCompartment@endlink</td>
61050    <td class='meaning'>A <code>&lt;ci&gt;</code> element cannot reference a 0D compartment</td>
61051    <td class='s-na'></td>
61052    <td class='s-na'></td>
61053    <td class='s-na'></td>
61054    <td class='s-na'></td>
61055    <td class='s-na'></td>
61056    <td class='s-na'></td>
61057    <td class='s-na'></td>
61058    <td class='s-na'></td>
61059    </tr>
61060    <tr><td class='code'>@link libsbml#RateOfTargetMustBeCi RateOfTargetMustBeCi@endlink</td>
61061    <td class='meaning'>A 'rateOf' <code>&lt;csymbol&gt;</code> must target only a single <code>&lt;ci&gt;</code> element</td>
61062    <td class='s-na'></td>
61063    <td class='s-na'></td>
61064    <td class='s-na'></td>
61065    <td class='s-na'></td>
61066    <td class='s-na'></td>
61067    <td class='s-na'></td>
61068    <td class='s-na'></td>
61069    <td class='s-error'></td>
61070    </tr>
61071    <tr><td class='code'>@link libsbml#RateOfTargetCannotBeAssigned RateOfTargetCannotBeAssigned@endlink</td>
61072    <td class='meaning'>The target of a 'rateOf' <code>&lt;csymbol&gt;</code> cannot be assigned</td>
61073    <td class='s-na'></td>
61074    <td class='s-na'></td>
61075    <td class='s-na'></td>
61076    <td class='s-na'></td>
61077    <td class='s-na'></td>
61078    <td class='s-na'></td>
61079    <td class='s-na'></td>
61080    <td class='s-error'></td>
61081    </tr>
61082    <tr><td class='code'>@link libsbml#RateOfSpeciesTargetCompartmentNot RateOfSpeciesTargetCompartmentNot@endlink</td>
61083    <td class='meaning'>Compartments of non-substance <code>&lt;species&gt;</code> referenced by 'rateOf' must not vary</td>
61084    <td class='s-na'></td>
61085    <td class='s-na'></td>
61086    <td class='s-na'></td>
61087    <td class='s-na'></td>
61088    <td class='s-na'></td>
61089    <td class='s-na'></td>
61090    <td class='s-na'></td>
61091    <td class='s-error'></td>
61092    </tr>
61093    <tr><td class='code'>@link libsbml#DuplicateComponentId DuplicateComponentId@endlink</td>
61094    <td class='meaning'>Duplicate 'id' attribute value</td>
61095    <td class='s-error'></td>
61096    <td class='s-error'></td>
61097    <td class='s-error'></td>
61098    <td class='s-error'></td>
61099    <td class='s-error'></td>
61100    <td class='s-error'></td>
61101    <td class='s-error'></td>
61102    <td class='s-error'></td>
61103    </tr>
61104    <tr><td class='code'>@link libsbml#DuplicateUnitDefinitionId DuplicateUnitDefinitionId@endlink</td>
61105    <td class='meaning'>Duplicate unit definition 'id' attribute value</td>
61106    <td class='s-error'></td>
61107    <td class='s-error'></td>
61108    <td class='s-error'></td>
61109    <td class='s-error'></td>
61110    <td class='s-error'></td>
61111    <td class='s-error'></td>
61112    <td class='s-error'></td>
61113    <td class='s-error'></td>
61114    </tr>
61115    <tr><td class='code'>@link libsbml#DuplicateLocalParameterId DuplicateLocalParameterId@endlink</td>
61116    <td class='meaning'>Duplicate local parameter 'id' attribute value</td>
61117    <td class='s-error'></td>
61118    <td class='s-error'></td>
61119    <td class='s-error'></td>
61120    <td class='s-error'></td>
61121    <td class='s-error'></td>
61122    <td class='s-error'></td>
61123    <td class='s-error'></td>
61124    <td class='s-error'></td>
61125    </tr>
61126    <tr><td class='code'>@link libsbml#MultipleAssignmentOrRateRules MultipleAssignmentOrRateRules@endlink</td>
61127    <td class='meaning'>Multiple rules for the same variable are not allowed</td>
61128    <td class='s-error'></td>
61129    <td class='s-error'></td>
61130    <td class='s-error'></td>
61131    <td class='s-error'></td>
61132    <td class='s-error'></td>
61133    <td class='s-error'></td>
61134    <td class='s-error'></td>
61135    <td class='s-error'></td>
61136    </tr>
61137    <tr><td class='code'>@link libsbml#MultipleEventAssignmentsForId MultipleEventAssignmentsForId@endlink</td>
61138    <td class='meaning'>Multiple event assignments for the same variable are not allowed</td>
61139    <td class='s-na'></td>
61140    <td class='s-na'></td>
61141    <td class='s-error'></td>
61142    <td class='s-error'></td>
61143    <td class='s-error'></td>
61144    <td class='s-error'></td>
61145    <td class='s-error'></td>
61146    <td class='s-error'></td>
61147    </tr>
61148    <tr><td class='code'>@link libsbml#EventAndAssignmentRuleForId EventAndAssignmentRuleForId@endlink</td>
61149    <td class='meaning'>An event assignment and an assignment rule must not have the same value for 'variable'</td>
61150    <td class='s-na'></td>
61151    <td class='s-na'></td>
61152    <td class='s-error'></td>
61153    <td class='s-error'></td>
61154    <td class='s-error'></td>
61155    <td class='s-error'></td>
61156    <td class='s-error'></td>
61157    <td class='s-error'></td>
61158    </tr>
61159    <tr><td class='code'>@link libsbml#DuplicateMetaId DuplicateMetaId@endlink</td>
61160    <td class='meaning'>Duplicate 'metaid' attribute value</td>
61161    <td class='s-na'></td>
61162    <td class='s-na'></td>
61163    <td class='s-error'></td>
61164    <td class='s-error'></td>
61165    <td class='s-error'></td>
61166    <td class='s-error'></td>
61167    <td class='s-error'></td>
61168    <td class='s-error'></td>
61169    </tr>
61170    <tr><td class='code'>@link libsbml#InvalidSBOTermSyntax InvalidSBOTermSyntax@endlink</td>
61171    <td class='meaning'>Invalid syntax for an 'sboTerm' attribute value</td>
61172    <td class='s-na'></td>
61173    <td class='s-na'></td>
61174    <td class='s-na'></td>
61175    <td class='s-error'></td>
61176    <td class='s-error'></td>
61177    <td class='s-error'></td>
61178    <td class='s-error'></td>
61179    <td class='s-error'></td>
61180    </tr>
61181    <tr><td class='code'>@link libsbml#InvalidMetaidSyntax InvalidMetaidSyntax@endlink</td>
61182    <td class='meaning'>Invalid syntax for a 'metaid' attribute value</td>
61183    <td class='s-na'></td>
61184    <td class='s-na'></td>
61185    <td class='s-error'></td>
61186    <td class='s-error'></td>
61187    <td class='s-error'></td>
61188    <td class='s-error'></td>
61189    <td class='s-error'></td>
61190    <td class='s-error'></td>
61191    </tr>
61192    <tr><td class='code'>@link libsbml#InvalidIdSyntax InvalidIdSyntax@endlink</td>
61193    <td class='meaning'>Invalid syntax for an 'id' attribute value</td>
61194    <td class='s-error'></td>
61195    <td class='s-error'></td>
61196    <td class='s-error'></td>
61197    <td class='s-error'></td>
61198    <td class='s-error'></td>
61199    <td class='s-error'></td>
61200    <td class='s-error'></td>
61201    <td class='s-error'></td>
61202    </tr>
61203    <tr><td class='code'>@link libsbml#InvalidUnitIdSyntax InvalidUnitIdSyntax@endlink</td>
61204    <td class='meaning'>Invalid syntax for the identifier of a unit</td>
61205    <td class='s-na'></td>
61206    <td class='s-na'></td>
61207    <td class='s-na'></td>
61208    <td class='s-error'></td>
61209    <td class='s-error'></td>
61210    <td class='s-error'></td>
61211    <td class='s-error'></td>
61212    <td class='s-error'></td>
61213    </tr>
61214    <tr><td class='code'>@link libsbml#InvalidNameSyntax InvalidNameSyntax@endlink</td>
61215    <td class='meaning'>Invalid syntax for a 'name' attribute value</td>
61216    <td class='s-na'></td>
61217    <td class='s-na'></td>
61218    <td class='s-na'></td>
61219    <td class='s-na'></td>
61220    <td class='s-na'></td>
61221    <td class='s-na'></td>
61222    <td class='s-error'></td>
61223    <td class='s-error'></td>
61224    </tr>
61225    <tr><td class='code'>@link libsbml#DanglingUnitReference DanglingUnitReference@endlink</td>
61226    <td class='meaning'>Dangling reference to a unit.</td>
61227    <td class='s-na'></td>
61228    <td class='s-na'></td>
61229    <td class='s-na'></td>
61230    <td class='s-na'></td>
61231    <td class='s-na'></td>
61232    <td class='s-na'></td>
61233    <td class='s-error'></td>
61234    <td class='s-error'></td>
61235    </tr>
61236    <tr><td class='code'>@link libsbml#MissingAnnotationNamespace MissingAnnotationNamespace@endlink</td>
61237    <td class='meaning'>Missing declaration of the XML namespace for the annotation</td>
61238    <td class='s-na'></td>
61239    <td class='s-na'></td>
61240    <td class='s-na'></td>
61241    <td class='s-error'></td>
61242    <td class='s-error'></td>
61243    <td class='s-error'></td>
61244    <td class='s-error'></td>
61245    <td class='s-error'></td>
61246    </tr>
61247    <tr><td class='code'>@link libsbml#DuplicateAnnotationNamespaces DuplicateAnnotationNamespaces@endlink</td>
61248    <td class='meaning'>Multiple annotations using the same XML namespace</td>
61249    <td class='s-na'></td>
61250    <td class='s-na'></td>
61251    <td class='s-na'></td>
61252    <td class='s-error'></td>
61253    <td class='s-error'></td>
61254    <td class='s-error'></td>
61255    <td class='s-error'></td>
61256    <td class='s-error'></td>
61257    </tr>
61258    <tr><td class='code'>@link libsbml#SBMLNamespaceInAnnotation SBMLNamespaceInAnnotation@endlink</td>
61259    <td class='meaning'>The SBML XML namespace cannot be used in an Annotation object</td>
61260    <td class='s-na'></td>
61261    <td class='s-na'></td>
61262    <td class='s-na'></td>
61263    <td class='s-error'></td>
61264    <td class='s-error'></td>
61265    <td class='s-error'></td>
61266    <td class='s-na'></td>
61267    <td class='s-na'></td>
61268    </tr>
61269    <tr><td class='code'>@link libsbml#MultipleAnnotations MultipleAnnotations@endlink</td>
61270    <td class='meaning'>Only one Annotation object is permitted under a given SBML object</td>
61271    <td class='s-na'></td>
61272    <td class='s-na'></td>
61273    <td class='s-na'></td>
61274    <td class='s-na'></td>
61275    <td class='s-na'></td>
61276    <td class='s-na'></td>
61277    <td class='s-error'></td>
61278    <td class='s-error'></td>
61279    </tr>
61280    <tr><td class='code'>@link libsbml#InconsistentArgUnits InconsistentArgUnits@endlink</td>
61281    <td class='meaning'>The units of the function call's arguments are not consistent with its definition</td>
61282    <td class='s-warning'></td>
61283    <td class='s-warning'></td>
61284    <td class='s-warning'></td>
61285    <td class='s-error'></td>
61286    <td class='s-error'></td>
61287    <td class='s-warning'></td>
61288    <td class='s-warning'></td>
61289    <td class='s-warning'></td>
61290    </tr>
61291    <tr><td class='code'>@link libsbml#InconsistentKineticLawUnitsL3 InconsistentKineticLawUnitsL3@endlink</td>
61292    <td class='meaning'>The kinetic law's units are inconsistent with those of other kinetic laws in the model</td>
61293    <td class='s-na'></td>
61294    <td class='s-na'></td>
61295    <td class='s-na'></td>
61296    <td class='s-na'></td>
61297    <td class='s-na'></td>
61298    <td class='s-na'></td>
61299    <td class='s-warning'></td>
61300    <td class='s-warning'></td>
61301    </tr>
61302    <tr><td class='code'>@link libsbml#AssignRuleCompartmentMismatch AssignRuleCompartmentMismatch@endlink</td>
61303    <td class='meaning'>Mismatched units in assignment rule for compartment</td>
61304    <td class='s-error'></td>
61305    <td class='s-error'></td>
61306    <td class='s-error'></td>
61307    <td class='s-error'></td>
61308    <td class='s-error'></td>
61309    <td class='s-warning'></td>
61310    <td class='s-warning'></td>
61311    <td class='s-warning'></td>
61312    </tr>
61313    <tr><td class='code'>@link libsbml#AssignRuleSpeciesMismatch AssignRuleSpeciesMismatch@endlink</td>
61314    <td class='meaning'>Mismatched units in assignment rule for species</td>
61315    <td class='s-error'></td>
61316    <td class='s-error'></td>
61317    <td class='s-error'></td>
61318    <td class='s-error'></td>
61319    <td class='s-error'></td>
61320    <td class='s-warning'></td>
61321    <td class='s-warning'></td>
61322    <td class='s-warning'></td>
61323    </tr>
61324    <tr><td class='code'>@link libsbml#AssignRuleParameterMismatch AssignRuleParameterMismatch@endlink</td>
61325    <td class='meaning'>Mismatched units in assignment rule for parameter</td>
61326    <td class='s-error'></td>
61327    <td class='s-error'></td>
61328    <td class='s-error'></td>
61329    <td class='s-error'></td>
61330    <td class='s-error'></td>
61331    <td class='s-warning'></td>
61332    <td class='s-warning'></td>
61333    <td class='s-warning'></td>
61334    </tr>
61335    <tr><td class='code'>@link libsbml#AssignRuleStoichiometryMismatch AssignRuleStoichiometryMismatch@endlink</td>
61336    <td class='meaning'>Mismatched units in assignment rule for stoichiometry</td>
61337    <td class='s-na'></td>
61338    <td class='s-na'></td>
61339    <td class='s-na'></td>
61340    <td class='s-na'></td>
61341    <td class='s-na'></td>
61342    <td class='s-na'></td>
61343    <td class='s-warning'></td>
61344    <td class='s-warning'></td>
61345    </tr>
61346    <tr><td class='code'>@link libsbml#InitAssignCompartmenMismatch InitAssignCompartmenMismatch@endlink</td>
61347    <td class='meaning'>Mismatched units in initial assignment to compartment</td>
61348    <td class='s-na'></td>
61349    <td class='s-na'></td>
61350    <td class='s-na'></td>
61351    <td class='s-error'></td>
61352    <td class='s-error'></td>
61353    <td class='s-warning'></td>
61354    <td class='s-warning'></td>
61355    <td class='s-warning'></td>
61356    </tr>
61357    <tr><td class='code'>@link libsbml#InitAssignSpeciesMismatch InitAssignSpeciesMismatch@endlink</td>
61358    <td class='meaning'>Mismatched units in initial assignment to species</td>
61359    <td class='s-na'></td>
61360    <td class='s-na'></td>
61361    <td class='s-na'></td>
61362    <td class='s-error'></td>
61363    <td class='s-error'></td>
61364    <td class='s-warning'></td>
61365    <td class='s-warning'></td>
61366    <td class='s-warning'></td>
61367    </tr>
61368    <tr><td class='code'>@link libsbml#InitAssignParameterMismatch InitAssignParameterMismatch@endlink</td>
61369    <td class='meaning'>Mismatched units in initial assignment to parameter</td>
61370    <td class='s-na'></td>
61371    <td class='s-na'></td>
61372    <td class='s-na'></td>
61373    <td class='s-error'></td>
61374    <td class='s-error'></td>
61375    <td class='s-warning'></td>
61376    <td class='s-warning'></td>
61377    <td class='s-warning'></td>
61378    </tr>
61379    <tr><td class='code'>@link libsbml#InitAssignStoichiometryMismatch InitAssignStoichiometryMismatch@endlink</td>
61380    <td class='meaning'>Mismatched units in initial assignment to stoichiometry</td>
61381    <td class='s-na'></td>
61382    <td class='s-na'></td>
61383    <td class='s-na'></td>
61384    <td class='s-na'></td>
61385    <td class='s-na'></td>
61386    <td class='s-na'></td>
61387    <td class='s-warning'></td>
61388    <td class='s-warning'></td>
61389    </tr>
61390    <tr><td class='code'>@link libsbml#RateRuleCompartmentMismatch RateRuleCompartmentMismatch@endlink</td>
61391    <td class='meaning'>Mismatched units in rate rule for compartment</td>
61392    <td class='s-error'></td>
61393    <td class='s-error'></td>
61394    <td class='s-error'></td>
61395    <td class='s-error'></td>
61396    <td class='s-error'></td>
61397    <td class='s-warning'></td>
61398    <td class='s-warning'></td>
61399    <td class='s-warning'></td>
61400    </tr>
61401    <tr><td class='code'>@link libsbml#RateRuleSpeciesMismatch RateRuleSpeciesMismatch@endlink</td>
61402    <td class='meaning'>Mismatched units in rate rule for species</td>
61403    <td class='s-error'></td>
61404    <td class='s-error'></td>
61405    <td class='s-error'></td>
61406    <td class='s-error'></td>
61407    <td class='s-error'></td>
61408    <td class='s-warning'></td>
61409    <td class='s-warning'></td>
61410    <td class='s-warning'></td>
61411    </tr>
61412    <tr><td class='code'>@link libsbml#RateRuleParameterMismatch RateRuleParameterMismatch@endlink</td>
61413    <td class='meaning'>Mismatched units in rate rule for parameter</td>
61414    <td class='s-error'></td>
61415    <td class='s-error'></td>
61416    <td class='s-error'></td>
61417    <td class='s-error'></td>
61418    <td class='s-error'></td>
61419    <td class='s-warning'></td>
61420    <td class='s-warning'></td>
61421    <td class='s-warning'></td>
61422    </tr>
61423    <tr><td class='code'>@link libsbml#RateRuleStoichiometryMismatch RateRuleStoichiometryMismatch@endlink</td>
61424    <td class='meaning'>Mismatched units in rate rule for stoichiometry</td>
61425    <td class='s-na'></td>
61426    <td class='s-na'></td>
61427    <td class='s-na'></td>
61428    <td class='s-na'></td>
61429    <td class='s-na'></td>
61430    <td class='s-na'></td>
61431    <td class='s-warning'></td>
61432    <td class='s-warning'></td>
61433    </tr>
61434    <tr><td class='code'>@link libsbml#KineticLawNotSubstancePerTime KineticLawNotSubstancePerTime@endlink</td>
61435    <td class='meaning'>The units of the kinetic law are not 'substance'/'time'</td>
61436    <td class='s-error'></td>
61437    <td class='s-error'></td>
61438    <td class='s-error'></td>
61439    <td class='s-error'></td>
61440    <td class='s-error'></td>
61441    <td class='s-warning'></td>
61442    <td class='s-warning'></td>
61443    <td class='s-warning'></td>
61444    </tr>
61445    <tr><td class='code'>@link libsbml#SpeciesInvalidExtentUnits SpeciesInvalidExtentUnits@endlink</td>
61446    <td class='meaning'>The species' units are not consistent with units of extent</td>
61447    <td class='s-na'></td>
61448    <td class='s-na'></td>
61449    <td class='s-na'></td>
61450    <td class='s-na'></td>
61451    <td class='s-na'></td>
61452    <td class='s-na'></td>
61453    <td class='s-warning'></td>
61454    <td class='s-warning'></td>
61455    </tr>
61456    <tr><td class='code'>@link libsbml#DelayUnitsNotTime DelayUnitsNotTime@endlink</td>
61457    <td class='meaning'>The units of the delay expression are not units of time</td>
61458    <td class='s-na'></td>
61459    <td class='s-na'></td>
61460    <td class='s-error'></td>
61461    <td class='s-error'></td>
61462    <td class='s-error'></td>
61463    <td class='s-warning'></td>
61464    <td class='s-warning'></td>
61465    <td class='s-warning'></td>
61466    </tr>
61467    <tr><td class='code'>@link libsbml#EventAssignCompartmentMismatch EventAssignCompartmentMismatch@endlink</td>
61468    <td class='meaning'>Mismatched units in event assignment for compartment</td>
61469    <td class='s-na'></td>
61470    <td class='s-na'></td>
61471    <td class='s-error'></td>
61472    <td class='s-error'></td>
61473    <td class='s-error'></td>
61474    <td class='s-warning'></td>
61475    <td class='s-warning'></td>
61476    <td class='s-warning'></td>
61477    </tr>
61478    <tr><td class='code'>@link libsbml#EventAssignSpeciesMismatch EventAssignSpeciesMismatch@endlink</td>
61479    <td class='meaning'>Mismatched units in event assignment for species</td>
61480    <td class='s-na'></td>
61481    <td class='s-na'></td>
61482    <td class='s-error'></td>
61483    <td class='s-error'></td>
61484    <td class='s-error'></td>
61485    <td class='s-warning'></td>
61486    <td class='s-warning'></td>
61487    <td class='s-warning'></td>
61488    </tr>
61489    <tr><td class='code'>@link libsbml#EventAssignParameterMismatch EventAssignParameterMismatch@endlink</td>
61490    <td class='meaning'>Mismatched units in event assignment for parameter</td>
61491    <td class='s-na'></td>
61492    <td class='s-na'></td>
61493    <td class='s-error'></td>
61494    <td class='s-error'></td>
61495    <td class='s-error'></td>
61496    <td class='s-warning'></td>
61497    <td class='s-warning'></td>
61498    <td class='s-warning'></td>
61499    </tr>
61500    <tr><td class='code'>@link libsbml#EventAssignStoichiometryMismatch EventAssignStoichiometryMismatch@endlink</td>
61501    <td class='meaning'>Mismatched units in event assignment for stoichiometry</td>
61502    <td class='s-na'></td>
61503    <td class='s-na'></td>
61504    <td class='s-na'></td>
61505    <td class='s-na'></td>
61506    <td class='s-na'></td>
61507    <td class='s-na'></td>
61508    <td class='s-warning'></td>
61509    <td class='s-warning'></td>
61510    </tr>
61511    <tr><td class='code'>@link libsbml#PriorityUnitsNotDimensionless PriorityUnitsNotDimensionless@endlink</td>
61512    <td class='meaning'>The units of a priority expression must be 'dimensionless'</td>
61513    <td class='s-na'></td>
61514    <td class='s-na'></td>
61515    <td class='s-na'></td>
61516    <td class='s-na'></td>
61517    <td class='s-na'></td>
61518    <td class='s-na'></td>
61519    <td class='s-warning'></td>
61520    <td class='s-warning'></td>
61521    </tr>
61522    <tr><td class='code'>@link libsbml#OverdeterminedSystem OverdeterminedSystem@endlink</td>
61523    <td class='meaning'>The model is overdetermined</td>
61524    <td class='s-warning'></td>
61525    <td class='s-warning'></td>
61526    <td class='s-warning'></td>
61527    <td class='s-error'></td>
61528    <td class='s-error'></td>
61529    <td class='s-error'></td>
61530    <td class='s-error'></td>
61531    <td class='s-error'></td>
61532    </tr>
61533    <tr><td class='code'>@link libsbml#InvalidModelSBOTerm InvalidModelSBOTerm@endlink</td>
61534    <td class='meaning'>Invalid 'sboTerm' attribute value for a Model object</td>
61535    <td class='s-na'></td>
61536    <td class='s-na'></td>
61537    <td class='s-na'></td>
61538    <td class='s-error'></td>
61539    <td class='s-error'></td>
61540    <td class='s-warning'></td>
61541    <td class='s-warning'></td>
61542    <td class='s-warning'></td>
61543    </tr>
61544    <tr><td class='code'>@link libsbml#InvalidFunctionDefSBOTerm InvalidFunctionDefSBOTerm@endlink</td>
61545    <td class='meaning'>Invalid 'sboTerm' attribute value for a FunctionDefinition object</td>
61546    <td class='s-na'></td>
61547    <td class='s-na'></td>
61548    <td class='s-na'></td>
61549    <td class='s-error'></td>
61550    <td class='s-error'></td>
61551    <td class='s-warning'></td>
61552    <td class='s-warning'></td>
61553    <td class='s-warning'></td>
61554    </tr>
61555    <tr><td class='code'>@link libsbml#InvalidParameterSBOTerm InvalidParameterSBOTerm@endlink</td>
61556    <td class='meaning'>Invalid 'sboTerm' attribute value for a Parameter object</td>
61557    <td class='s-na'></td>
61558    <td class='s-na'></td>
61559    <td class='s-na'></td>
61560    <td class='s-error'></td>
61561    <td class='s-error'></td>
61562    <td class='s-warning'></td>
61563    <td class='s-warning'></td>
61564    <td class='s-warning'></td>
61565    </tr>
61566    <tr><td class='code'>@link libsbml#InvalidInitAssignSBOTerm InvalidInitAssignSBOTerm@endlink</td>
61567    <td class='meaning'>Invalid 'sboTerm' attribute value for an InitialAssignment object</td>
61568    <td class='s-na'></td>
61569    <td class='s-na'></td>
61570    <td class='s-na'></td>
61571    <td class='s-error'></td>
61572    <td class='s-error'></td>
61573    <td class='s-warning'></td>
61574    <td class='s-warning'></td>
61575    <td class='s-warning'></td>
61576    </tr>
61577    <tr><td class='code'>@link libsbml#InvalidRuleSBOTerm InvalidRuleSBOTerm@endlink</td>
61578    <td class='meaning'>Invalid 'sboTerm' attribute value for a Rule object</td>
61579    <td class='s-na'></td>
61580    <td class='s-na'></td>
61581    <td class='s-na'></td>
61582    <td class='s-error'></td>
61583    <td class='s-error'></td>
61584    <td class='s-warning'></td>
61585    <td class='s-warning'></td>
61586    <td class='s-warning'></td>
61587    </tr>
61588    <tr><td class='code'>@link libsbml#InvalidConstraintSBOTerm InvalidConstraintSBOTerm@endlink</td>
61589    <td class='meaning'>Invalid 'sboTerm' attribute value for a Constraint object</td>
61590    <td class='s-na'></td>
61591    <td class='s-na'></td>
61592    <td class='s-na'></td>
61593    <td class='s-error'></td>
61594    <td class='s-error'></td>
61595    <td class='s-warning'></td>
61596    <td class='s-warning'></td>
61597    <td class='s-warning'></td>
61598    </tr>
61599    <tr><td class='code'>@link libsbml#InvalidReactionSBOTerm InvalidReactionSBOTerm@endlink</td>
61600    <td class='meaning'>Invalid 'sboTerm' attribute value for a Reaction object</td>
61601    <td class='s-na'></td>
61602    <td class='s-na'></td>
61603    <td class='s-na'></td>
61604    <td class='s-error'></td>
61605    <td class='s-error'></td>
61606    <td class='s-warning'></td>
61607    <td class='s-warning'></td>
61608    <td class='s-warning'></td>
61609    </tr>
61610    <tr><td class='code'>@link libsbml#InvalidSpeciesReferenceSBOTerm InvalidSpeciesReferenceSBOTerm@endlink</td>
61611    <td class='meaning'>Invalid 'sboTerm' attribute value for a SpeciesReference object</td>
61612    <td class='s-na'></td>
61613    <td class='s-na'></td>
61614    <td class='s-na'></td>
61615    <td class='s-error'></td>
61616    <td class='s-error'></td>
61617    <td class='s-warning'></td>
61618    <td class='s-warning'></td>
61619    <td class='s-warning'></td>
61620    </tr>
61621    <tr><td class='code'>@link libsbml#InvalidKineticLawSBOTerm InvalidKineticLawSBOTerm@endlink</td>
61622    <td class='meaning'>Invalid 'sboTerm' attribute value for a KineticLaw object</td>
61623    <td class='s-na'></td>
61624    <td class='s-na'></td>
61625    <td class='s-na'></td>
61626    <td class='s-error'></td>
61627    <td class='s-error'></td>
61628    <td class='s-warning'></td>
61629    <td class='s-warning'></td>
61630    <td class='s-warning'></td>
61631    </tr>
61632    <tr><td class='code'>@link libsbml#InvalidEventSBOTerm InvalidEventSBOTerm@endlink</td>
61633    <td class='meaning'>Invalid 'sboTerm' attribute value for an Event object</td>
61634    <td class='s-na'></td>
61635    <td class='s-na'></td>
61636    <td class='s-na'></td>
61637    <td class='s-error'></td>
61638    <td class='s-error'></td>
61639    <td class='s-warning'></td>
61640    <td class='s-warning'></td>
61641    <td class='s-warning'></td>
61642    </tr>
61643    <tr><td class='code'>@link libsbml#InvalidEventAssignmentSBOTerm InvalidEventAssignmentSBOTerm@endlink</td>
61644    <td class='meaning'>Invalid 'sboTerm' attribute value for an EventAssignment object</td>
61645    <td class='s-na'></td>
61646    <td class='s-na'></td>
61647    <td class='s-na'></td>
61648    <td class='s-error'></td>
61649    <td class='s-error'></td>
61650    <td class='s-warning'></td>
61651    <td class='s-warning'></td>
61652    <td class='s-warning'></td>
61653    </tr>
61654    <tr><td class='code'>@link libsbml#InvalidCompartmentSBOTerm InvalidCompartmentSBOTerm@endlink</td>
61655    <td class='meaning'>Invalid 'sboTerm' attribute value for a Compartment object</td>
61656    <td class='s-na'></td>
61657    <td class='s-na'></td>
61658    <td class='s-na'></td>
61659    <td class='s-na'></td>
61660    <td class='s-error'></td>
61661    <td class='s-warning'></td>
61662    <td class='s-warning'></td>
61663    <td class='s-warning'></td>
61664    </tr>
61665    <tr><td class='code'>@link libsbml#InvalidSpeciesSBOTerm InvalidSpeciesSBOTerm@endlink</td>
61666    <td class='meaning'>Invalid 'sboTerm' attribute value for a Species object</td>
61667    <td class='s-na'></td>
61668    <td class='s-na'></td>
61669    <td class='s-na'></td>
61670    <td class='s-na'></td>
61671    <td class='s-error'></td>
61672    <td class='s-warning'></td>
61673    <td class='s-warning'></td>
61674    <td class='s-warning'></td>
61675    </tr>
61676    <tr><td class='code'>@link libsbml#InvalidCompartmentTypeSBOTerm InvalidCompartmentTypeSBOTerm@endlink</td>
61677    <td class='meaning'>Invalid 'sboTerm' attribute value for a CompartmentType object</td>
61678    <td class='s-na'></td>
61679    <td class='s-na'></td>
61680    <td class='s-na'></td>
61681    <td class='s-na'></td>
61682    <td class='s-error'></td>
61683    <td class='s-warning'></td>
61684    <td class='s-na'></td>
61685    <td class='s-na'></td>
61686    </tr>
61687    <tr><td class='code'>@link libsbml#InvalidSpeciesTypeSBOTerm InvalidSpeciesTypeSBOTerm@endlink</td>
61688    <td class='meaning'>Invalid 'sboTerm' attribute value for a SpeciesType object</td>
61689    <td class='s-na'></td>
61690    <td class='s-na'></td>
61691    <td class='s-na'></td>
61692    <td class='s-na'></td>
61693    <td class='s-error'></td>
61694    <td class='s-warning'></td>
61695    <td class='s-na'></td>
61696    <td class='s-na'></td>
61697    </tr>
61698    <tr><td class='code'>@link libsbml#InvalidTriggerSBOTerm InvalidTriggerSBOTerm@endlink</td>
61699    <td class='meaning'>Invalid 'sboTerm' attribute value for an Event Trigger object</td>
61700    <td class='s-na'></td>
61701    <td class='s-na'></td>
61702    <td class='s-na'></td>
61703    <td class='s-na'></td>
61704    <td class='s-error'></td>
61705    <td class='s-warning'></td>
61706    <td class='s-warning'></td>
61707    <td class='s-warning'></td>
61708    </tr>
61709    <tr><td class='code'>@link libsbml#InvalidDelaySBOTerm InvalidDelaySBOTerm@endlink</td>
61710    <td class='meaning'>Invalid 'sboTerm' attribute value for an Event Delay object</td>
61711    <td class='s-na'></td>
61712    <td class='s-na'></td>
61713    <td class='s-na'></td>
61714    <td class='s-na'></td>
61715    <td class='s-error'></td>
61716    <td class='s-warning'></td>
61717    <td class='s-warning'></td>
61718    <td class='s-warning'></td>
61719    </tr>
61720    <tr><td class='code'>@link libsbml#InvalidLocalParameterSBOTerm InvalidLocalParameterSBOTerm@endlink</td>
61721    <td class='meaning'>Invalid 'sboTerm' attribute value for a LocalParameter object</td>
61722    <td class='s-na'></td>
61723    <td class='s-na'></td>
61724    <td class='s-na'></td>
61725    <td class='s-na'></td>
61726    <td class='s-na'></td>
61727    <td class='s-na'></td>
61728    <td class='s-warning'></td>
61729    <td class='s-warning'></td>
61730    </tr>
61731    <tr><td class='code'>@link libsbml#InvalidSBMLElementSBOTerm InvalidSBMLElementSBOTerm@endlink</td>
61732    <td class='meaning'>Invalid 'sboTerm' attribute value for the <code>&lt;sbml&gt;</code> element</td>
61733    <td class='s-na'></td>
61734    <td class='s-na'></td>
61735    <td class='s-na'></td>
61736    <td class='s-na'></td>
61737    <td class='s-na'></td>
61738    <td class='s-na'></td>
61739    <td class='s-na'></td>
61740    <td class='s-warning'></td>
61741    </tr>
61742    <tr><td class='code'>@link libsbml#NotesNotInXHTMLNamespace NotesNotInXHTMLNamespace@endlink</td>
61743    <td class='meaning'>Notes must be placed in the XHTML XML namespace</td>
61744    <td class='s-error'></td>
61745    <td class='s-error'></td>
61746    <td class='s-error'></td>
61747    <td class='s-error'></td>
61748    <td class='s-error'></td>
61749    <td class='s-error'></td>
61750    <td class='s-error'></td>
61751    <td class='s-error'></td>
61752    </tr>
61753    <tr><td class='code'>@link libsbml#NotesContainsXMLDecl NotesContainsXMLDecl@endlink</td>
61754    <td class='meaning'>XML declarations are not permitted in Notes objects</td>
61755    <td class='s-na'></td>
61756    <td class='s-na'></td>
61757    <td class='s-na'></td>
61758    <td class='s-error'></td>
61759    <td class='s-error'></td>
61760    <td class='s-error'></td>
61761    <td class='s-error'></td>
61762    <td class='s-error'></td>
61763    </tr>
61764    <tr><td class='code'>@link libsbml#NotesContainsDOCTYPE NotesContainsDOCTYPE@endlink</td>
61765    <td class='meaning'>XML DOCTYPE elements are not permitted in Notes objects</td>
61766    <td class='s-na'></td>
61767    <td class='s-na'></td>
61768    <td class='s-na'></td>
61769    <td class='s-error'></td>
61770    <td class='s-error'></td>
61771    <td class='s-error'></td>
61772    <td class='s-error'></td>
61773    <td class='s-error'></td>
61774    </tr>
61775    <tr><td class='code'>@link libsbml#InvalidNotesContent InvalidNotesContent@endlink</td>
61776    <td class='meaning'>Invalid notes content found</td>
61777    <td class='s-na'></td>
61778    <td class='s-na'></td>
61779    <td class='s-na'></td>
61780    <td class='s-error'></td>
61781    <td class='s-error'></td>
61782    <td class='s-error'></td>
61783    <td class='s-na'></td>
61784    <td class='s-na'></td>
61785    </tr>
61786    <tr><td class='code'>@link libsbml#OnlyOneNotesElementAllowed OnlyOneNotesElementAllowed@endlink</td>
61787    <td class='meaning'>Only one Notes subobject is permitted on a given SBML object</td>
61788    <td class='s-na'></td>
61789    <td class='s-na'></td>
61790    <td class='s-na'></td>
61791    <td class='s-na'></td>
61792    <td class='s-na'></td>
61793    <td class='s-na'></td>
61794    <td class='s-error'></td>
61795    <td class='s-error'></td>
61796    </tr>
61797    <tr><td class='code'>@link libsbml#InvalidNamespaceOnSBML InvalidNamespaceOnSBML@endlink</td>
61798    <td class='meaning'>Invalid XML namespace for the SBML container element</td>
61799    <td class='s-error'></td>
61800    <td class='s-error'></td>
61801    <td class='s-error'></td>
61802    <td class='s-error'></td>
61803    <td class='s-error'></td>
61804    <td class='s-error'></td>
61805    <td class='s-error'></td>
61806    <td class='s-error'></td>
61807    </tr>
61808    <tr><td class='code'>@link libsbml#MissingOrInconsistentLevel MissingOrInconsistentLevel@endlink</td>
61809    <td class='meaning'>Missing or inconsistent value for the 'level' attribute</td>
61810    <td class='s-error'></td>
61811    <td class='s-error'></td>
61812    <td class='s-error'></td>
61813    <td class='s-error'></td>
61814    <td class='s-error'></td>
61815    <td class='s-error'></td>
61816    <td class='s-error'></td>
61817    <td class='s-error'></td>
61818    </tr>
61819    <tr><td class='code'>@link libsbml#MissingOrInconsistentVersion MissingOrInconsistentVersion@endlink</td>
61820    <td class='meaning'>Missing or inconsistent value for the 'version' attribute</td>
61821    <td class='s-error'></td>
61822    <td class='s-error'></td>
61823    <td class='s-error'></td>
61824    <td class='s-error'></td>
61825    <td class='s-error'></td>
61826    <td class='s-error'></td>
61827    <td class='s-error'></td>
61828    <td class='s-error'></td>
61829    </tr>
61830    <tr><td class='code'>@link libsbml#PackageNSMustMatch PackageNSMustMatch@endlink</td>
61831    <td class='meaning'>Inconsistent or invalid SBML Level/Version for the package namespace declaration</td>
61832    <td class='s-na'></td>
61833    <td class='s-na'></td>
61834    <td class='s-na'></td>
61835    <td class='s-na'></td>
61836    <td class='s-na'></td>
61837    <td class='s-na'></td>
61838    <td class='s-error'></td>
61839    <td class='s-error'></td>
61840    </tr>
61841    <tr><td class='code'>@link libsbml#LevelPositiveInteger LevelPositiveInteger@endlink</td>
61842    <td class='meaning'>The 'level' attribute must have a positive integer value</td>
61843    <td class='s-na'></td>
61844    <td class='s-na'></td>
61845    <td class='s-na'></td>
61846    <td class='s-na'></td>
61847    <td class='s-na'></td>
61848    <td class='s-na'></td>
61849    <td class='s-error'></td>
61850    <td class='s-error'></td>
61851    </tr>
61852    <tr><td class='code'>@link libsbml#VersionPositiveInteger VersionPositiveInteger@endlink</td>
61853    <td class='meaning'>The 'version' attribute must have a positive integer value</td>
61854    <td class='s-na'></td>
61855    <td class='s-na'></td>
61856    <td class='s-na'></td>
61857    <td class='s-na'></td>
61858    <td class='s-na'></td>
61859    <td class='s-na'></td>
61860    <td class='s-error'></td>
61861    <td class='s-error'></td>
61862    </tr>
61863    <tr><td class='code'>@link libsbml#AllowedAttributesOnSBML AllowedAttributesOnSBML@endlink</td>
61864    <td class='meaning'>Invalid attribute found on the SBML container element</td>
61865    <td class='s-na'></td>
61866    <td class='s-na'></td>
61867    <td class='s-na'></td>
61868    <td class='s-na'></td>
61869    <td class='s-na'></td>
61870    <td class='s-na'></td>
61871    <td class='s-error'></td>
61872    <td class='s-error'></td>
61873    </tr>
61874    <tr><td class='code'>@link libsbml#L3PackageOnLowerSBML L3PackageOnLowerSBML@endlink</td>
61875    <td class='meaning'>An L3 package ns found on the SBML container element</td>
61876    <td class='s-warning'></td>
61877    <td class='s-warning'></td>
61878    <td class='s-warning'></td>
61879    <td class='s-warning'></td>
61880    <td class='s-warning'></td>
61881    <td class='s-warning'></td>
61882    <td class='s-na'></td>
61883    <td class='s-na'></td>
61884    </tr>
61885    <tr><td class='code'>@link libsbml#MissingModel MissingModel@endlink</td>
61886    <td class='meaning'>No model definition found</td>
61887    <td class='s-error'></td>
61888    <td class='s-error'></td>
61889    <td class='s-error'></td>
61890    <td class='s-error'></td>
61891    <td class='s-error'></td>
61892    <td class='s-error'></td>
61893    <td class='s-error'></td>
61894    <td class='s-error'></td>
61895    </tr>
61896    <tr><td class='code'>@link libsbml#IncorrectOrderInModel IncorrectOrderInModel@endlink</td>
61897    <td class='meaning'>Incorrect ordering of components within the Model object</td>
61898    <td class='s-error'></td>
61899    <td class='s-error'></td>
61900    <td class='s-error'></td>
61901    <td class='s-error'></td>
61902    <td class='s-error'></td>
61903    <td class='s-error'></td>
61904    <td class='s-na'></td>
61905    <td class='s-na'></td>
61906    </tr>
61907    <tr><td class='code'>@link libsbml#EmptyListElement EmptyListElement@endlink</td>
61908    <td class='meaning'>Empty ListOf___ object found</td>
61909    <td class='s-error'></td>
61910    <td class='s-error'></td>
61911    <td class='s-error'></td>
61912    <td class='s-error'></td>
61913    <td class='s-error'></td>
61914    <td class='s-error'></td>
61915    <td class='s-error'></td>
61916    <td class='s-na'></td>
61917    </tr>
61918    <tr><td class='code'>@link libsbml#NeedCompartmentIfHaveSpecies NeedCompartmentIfHaveSpecies@endlink</td>
61919    <td class='meaning'>The presence of a species requires a compartment</td>
61920    <td class='s-error'></td>
61921    <td class='s-error'></td>
61922    <td class='s-error'></td>
61923    <td class='s-error'></td>
61924    <td class='s-error'></td>
61925    <td class='s-error'></td>
61926    <td class='s-error'></td>
61927    <td class='s-error'></td>
61928    </tr>
61929    <tr><td class='code'>@link libsbml#OneOfEachListOf OneOfEachListOf@endlink</td>
61930    <td class='meaning'>Only one of each kind of ListOf___ object is allowed inside a Model object</td>
61931    <td class='s-na'></td>
61932    <td class='s-na'></td>
61933    <td class='s-na'></td>
61934    <td class='s-na'></td>
61935    <td class='s-na'></td>
61936    <td class='s-na'></td>
61937    <td class='s-error'></td>
61938    <td class='s-error'></td>
61939    </tr>
61940    <tr><td class='code'>@link libsbml#OnlyFuncDefsInListOfFuncDefs OnlyFuncDefsInListOfFuncDefs@endlink</td>
61941    <td class='meaning'>Only FunctionDefinition, Notes and Annotation objects are allowed in ListOfFunctionDefinitions</td>
61942    <td class='s-na'></td>
61943    <td class='s-na'></td>
61944    <td class='s-na'></td>
61945    <td class='s-na'></td>
61946    <td class='s-na'></td>
61947    <td class='s-na'></td>
61948    <td class='s-error'></td>
61949    <td class='s-error'></td>
61950    </tr>
61951    <tr><td class='code'>@link libsbml#OnlyUnitDefsInListOfUnitDefs OnlyUnitDefsInListOfUnitDefs@endlink</td>
61952    <td class='meaning'>Only UnitDefinition, Notes and Annotation objects are allowed in ListOfUnitDefinitions objects</td>
61953    <td class='s-na'></td>
61954    <td class='s-na'></td>
61955    <td class='s-na'></td>
61956    <td class='s-na'></td>
61957    <td class='s-na'></td>
61958    <td class='s-na'></td>
61959    <td class='s-error'></td>
61960    <td class='s-error'></td>
61961    </tr>
61962    <tr><td class='code'>@link libsbml#OnlyCompartmentsInListOfCompartments OnlyCompartmentsInListOfCompartments@endlink</td>
61963    <td class='meaning'>Only Compartment, Notes and Annotation objects are allowed in ListOfCompartments objects</td>
61964    <td class='s-na'></td>
61965    <td class='s-na'></td>
61966    <td class='s-na'></td>
61967    <td class='s-na'></td>
61968    <td class='s-na'></td>
61969    <td class='s-na'></td>
61970    <td class='s-error'></td>
61971    <td class='s-error'></td>
61972    </tr>
61973    <tr><td class='code'>@link libsbml#OnlySpeciesInListOfSpecies OnlySpeciesInListOfSpecies@endlink</td>
61974    <td class='meaning'>Only Species, Notes and Annotation objects are allowed in ListOfSpecies objects</td>
61975    <td class='s-na'></td>
61976    <td class='s-na'></td>
61977    <td class='s-na'></td>
61978    <td class='s-na'></td>
61979    <td class='s-na'></td>
61980    <td class='s-na'></td>
61981    <td class='s-error'></td>
61982    <td class='s-error'></td>
61983    </tr>
61984    <tr><td class='code'>@link libsbml#OnlyParametersInListOfParameters OnlyParametersInListOfParameters@endlink</td>
61985    <td class='meaning'>Only Parameter, Notes and Annotation objects are allowed in ListOfParameters objects</td>
61986    <td class='s-na'></td>
61987    <td class='s-na'></td>
61988    <td class='s-na'></td>
61989    <td class='s-na'></td>
61990    <td class='s-na'></td>
61991    <td class='s-na'></td>
61992    <td class='s-error'></td>
61993    <td class='s-error'></td>
61994    </tr>
61995    <tr><td class='code'>@link libsbml#OnlyInitAssignsInListOfInitAssigns OnlyInitAssignsInListOfInitAssigns@endlink</td>
61996    <td class='meaning'>Only InitialAssignment, Notes and Annotation objects are allowed in ListOfInitialAssignments objects</td>
61997    <td class='s-na'></td>
61998    <td class='s-na'></td>
61999    <td class='s-na'></td>
62000    <td class='s-na'></td>
62001    <td class='s-na'></td>
62002    <td class='s-na'></td>
62003    <td class='s-error'></td>
62004    <td class='s-error'></td>
62005    </tr>
62006    <tr><td class='code'>@link libsbml#OnlyRulesInListOfRules OnlyRulesInListOfRules@endlink</td>
62007    <td class='meaning'>Only Rule, Notes and Annotation objects are allowed in ListOfRules objects</td>
62008    <td class='s-na'></td>
62009    <td class='s-na'></td>
62010    <td class='s-na'></td>
62011    <td class='s-na'></td>
62012    <td class='s-na'></td>
62013    <td class='s-na'></td>
62014    <td class='s-error'></td>
62015    <td class='s-error'></td>
62016    </tr>
62017    <tr><td class='code'>@link libsbml#OnlyConstraintsInListOfConstraints OnlyConstraintsInListOfConstraints@endlink</td>
62018    <td class='meaning'>Only Constraint, Notes and Annotation objects are allowed in ListOfConstraints objects</td>
62019    <td class='s-na'></td>
62020    <td class='s-na'></td>
62021    <td class='s-na'></td>
62022    <td class='s-na'></td>
62023    <td class='s-na'></td>
62024    <td class='s-na'></td>
62025    <td class='s-error'></td>
62026    <td class='s-error'></td>
62027    </tr>
62028    <tr><td class='code'>@link libsbml#OnlyReactionsInListOfReactions OnlyReactionsInListOfReactions@endlink</td>
62029    <td class='meaning'>Only Reaction, Notes and Annotation objects are allowed in ListOfReactions objects</td>
62030    <td class='s-na'></td>
62031    <td class='s-na'></td>
62032    <td class='s-na'></td>
62033    <td class='s-na'></td>
62034    <td class='s-na'></td>
62035    <td class='s-na'></td>
62036    <td class='s-error'></td>
62037    <td class='s-error'></td>
62038    </tr>
62039    <tr><td class='code'>@link libsbml#OnlyEventsInListOfEvents OnlyEventsInListOfEvents@endlink</td>
62040    <td class='meaning'>Only Event, Notes and Annotation objects are allowed in ListOfEvents objects</td>
62041    <td class='s-na'></td>
62042    <td class='s-na'></td>
62043    <td class='s-na'></td>
62044    <td class='s-na'></td>
62045    <td class='s-na'></td>
62046    <td class='s-na'></td>
62047    <td class='s-error'></td>
62048    <td class='s-error'></td>
62049    </tr>
62050    <tr><td class='code'>@link libsbml#L3ConversionFactorOnModel L3ConversionFactorOnModel@endlink</td>
62051    <td class='meaning'>A 'conversionFactor' attribute value must reference a Parameter object</td>
62052    <td class='s-na'></td>
62053    <td class='s-na'></td>
62054    <td class='s-na'></td>
62055    <td class='s-na'></td>
62056    <td class='s-na'></td>
62057    <td class='s-na'></td>
62058    <td class='s-error'></td>
62059    <td class='s-error'></td>
62060    </tr>
62061    <tr><td class='code'>@link libsbml#L3TimeUnitsOnModel L3TimeUnitsOnModel@endlink</td>
62062    <td class='meaning'>Invalid 'timeUnits' attribute value</td>
62063    <td class='s-na'></td>
62064    <td class='s-na'></td>
62065    <td class='s-na'></td>
62066    <td class='s-na'></td>
62067    <td class='s-na'></td>
62068    <td class='s-na'></td>
62069    <td class='s-warning'></td>
62070    <td class='s-warning'></td>
62071    </tr>
62072    <tr><td class='code'>@link libsbml#L3VolumeUnitsOnModel L3VolumeUnitsOnModel@endlink</td>
62073    <td class='meaning'>Invalid 'volumeUnits' attribute value</td>
62074    <td class='s-na'></td>
62075    <td class='s-na'></td>
62076    <td class='s-na'></td>
62077    <td class='s-na'></td>
62078    <td class='s-na'></td>
62079    <td class='s-na'></td>
62080    <td class='s-warning'></td>
62081    <td class='s-warning'></td>
62082    </tr>
62083    <tr><td class='code'>@link libsbml#L3AreaUnitsOnModel L3AreaUnitsOnModel@endlink</td>
62084    <td class='meaning'>Invalid 'areaUnits' attribute value</td>
62085    <td class='s-na'></td>
62086    <td class='s-na'></td>
62087    <td class='s-na'></td>
62088    <td class='s-na'></td>
62089    <td class='s-na'></td>
62090    <td class='s-na'></td>
62091    <td class='s-warning'></td>
62092    <td class='s-warning'></td>
62093    </tr>
62094    <tr><td class='code'>@link libsbml#L3LengthUnitsOnModel L3LengthUnitsOnModel@endlink</td>
62095    <td class='meaning'>Invalid 'lengthUnits' attribute value</td>
62096    <td class='s-na'></td>
62097    <td class='s-na'></td>
62098    <td class='s-na'></td>
62099    <td class='s-na'></td>
62100    <td class='s-na'></td>
62101    <td class='s-na'></td>
62102    <td class='s-warning'></td>
62103    <td class='s-warning'></td>
62104    </tr>
62105    <tr><td class='code'>@link libsbml#L3ExtentUnitsOnModel L3ExtentUnitsOnModel@endlink</td>
62106    <td class='meaning'>Invalid 'extentUnits' attribute value</td>
62107    <td class='s-na'></td>
62108    <td class='s-na'></td>
62109    <td class='s-na'></td>
62110    <td class='s-na'></td>
62111    <td class='s-na'></td>
62112    <td class='s-na'></td>
62113    <td class='s-warning'></td>
62114    <td class='s-warning'></td>
62115    </tr>
62116    <tr><td class='code'>@link libsbml#AllowedAttributesOnModel AllowedAttributesOnModel@endlink</td>
62117    <td class='meaning'>Invalid attribute found on the Model object</td>
62118    <td class='s-na'></td>
62119    <td class='s-na'></td>
62120    <td class='s-na'></td>
62121    <td class='s-na'></td>
62122    <td class='s-na'></td>
62123    <td class='s-na'></td>
62124    <td class='s-error'></td>
62125    <td class='s-error'></td>
62126    </tr>
62127    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfFuncs AllowedAttributesOnListOfFuncs@endlink</td>
62128    <td class='meaning'>Invalid attribute found on the ListOfFunctionDefinitions object</td>
62129    <td class='s-na'></td>
62130    <td class='s-na'></td>
62131    <td class='s-na'></td>
62132    <td class='s-na'></td>
62133    <td class='s-na'></td>
62134    <td class='s-na'></td>
62135    <td class='s-error'></td>
62136    <td class='s-error'></td>
62137    </tr>
62138    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfUnitDefs AllowedAttributesOnListOfUnitDefs@endlink</td>
62139    <td class='meaning'>Invalid attribute found on the ListOfUnitDefinitions object</td>
62140    <td class='s-na'></td>
62141    <td class='s-na'></td>
62142    <td class='s-na'></td>
62143    <td class='s-na'></td>
62144    <td class='s-na'></td>
62145    <td class='s-na'></td>
62146    <td class='s-error'></td>
62147    <td class='s-error'></td>
62148    </tr>
62149    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfComps AllowedAttributesOnListOfComps@endlink</td>
62150    <td class='meaning'>Invalid attribute found on the ListOfCompartments object</td>
62151    <td class='s-na'></td>
62152    <td class='s-na'></td>
62153    <td class='s-na'></td>
62154    <td class='s-na'></td>
62155    <td class='s-na'></td>
62156    <td class='s-na'></td>
62157    <td class='s-error'></td>
62158    <td class='s-error'></td>
62159    </tr>
62160    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfSpecies AllowedAttributesOnListOfSpecies@endlink</td>
62161    <td class='meaning'>Invalid attribute found on the ListOfSpecies object</td>
62162    <td class='s-na'></td>
62163    <td class='s-na'></td>
62164    <td class='s-na'></td>
62165    <td class='s-na'></td>
62166    <td class='s-na'></td>
62167    <td class='s-na'></td>
62168    <td class='s-error'></td>
62169    <td class='s-error'></td>
62170    </tr>
62171    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfParams AllowedAttributesOnListOfParams@endlink</td>
62172    <td class='meaning'>Invalid attribute found on the ListOfParameters object</td>
62173    <td class='s-na'></td>
62174    <td class='s-na'></td>
62175    <td class='s-na'></td>
62176    <td class='s-na'></td>
62177    <td class='s-na'></td>
62178    <td class='s-na'></td>
62179    <td class='s-error'></td>
62180    <td class='s-error'></td>
62181    </tr>
62182    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfInitAssign AllowedAttributesOnListOfInitAssign@endlink</td>
62183    <td class='meaning'>Invalid attribute found on the ListOfInitialAssignments object</td>
62184    <td class='s-na'></td>
62185    <td class='s-na'></td>
62186    <td class='s-na'></td>
62187    <td class='s-na'></td>
62188    <td class='s-na'></td>
62189    <td class='s-na'></td>
62190    <td class='s-error'></td>
62191    <td class='s-error'></td>
62192    </tr>
62193    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfRules AllowedAttributesOnListOfRules@endlink</td>
62194    <td class='meaning'>Invalid attribute found on the ListOfRules object</td>
62195    <td class='s-na'></td>
62196    <td class='s-na'></td>
62197    <td class='s-na'></td>
62198    <td class='s-na'></td>
62199    <td class='s-na'></td>
62200    <td class='s-na'></td>
62201    <td class='s-error'></td>
62202    <td class='s-error'></td>
62203    </tr>
62204    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfConstraints AllowedAttributesOnListOfConstraints@endlink</td>
62205    <td class='meaning'>Invalid attribute found on the ListOfConstraints object</td>
62206    <td class='s-na'></td>
62207    <td class='s-na'></td>
62208    <td class='s-na'></td>
62209    <td class='s-na'></td>
62210    <td class='s-na'></td>
62211    <td class='s-na'></td>
62212    <td class='s-error'></td>
62213    <td class='s-error'></td>
62214    </tr>
62215    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfReactions AllowedAttributesOnListOfReactions@endlink</td>
62216    <td class='meaning'>Invalid attribute found on the ListOfReactions object</td>
62217    <td class='s-na'></td>
62218    <td class='s-na'></td>
62219    <td class='s-na'></td>
62220    <td class='s-na'></td>
62221    <td class='s-na'></td>
62222    <td class='s-na'></td>
62223    <td class='s-error'></td>
62224    <td class='s-error'></td>
62225    </tr>
62226    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfEvents AllowedAttributesOnListOfEvents@endlink</td>
62227    <td class='meaning'>Invalid attribute found on the ListOfEvents object</td>
62228    <td class='s-na'></td>
62229    <td class='s-na'></td>
62230    <td class='s-na'></td>
62231    <td class='s-na'></td>
62232    <td class='s-na'></td>
62233    <td class='s-na'></td>
62234    <td class='s-error'></td>
62235    <td class='s-error'></td>
62236    </tr>
62237    <tr><td class='code'>@link libsbml#L3V2SubstanceUnitsOnModel L3V2SubstanceUnitsOnModel@endlink</td>
62238    <td class='meaning'>Invalid 'substanceUnits' attribute value</td>
62239    <td class='s-na'></td>
62240    <td class='s-na'></td>
62241    <td class='s-na'></td>
62242    <td class='s-na'></td>
62243    <td class='s-na'></td>
62244    <td class='s-na'></td>
62245    <td class='s-warning'></td>
62246    <td class='s-warning'></td>
62247    </tr>
62248    <tr><td class='code'>@link libsbml#FunctionDefMathNotLambda FunctionDefMathNotLambda@endlink</td>
62249    <td class='meaning'>Invalid expression found in the function definition</td>
62250    <td class='s-na'></td>
62251    <td class='s-na'></td>
62252    <td class='s-error'></td>
62253    <td class='s-error'></td>
62254    <td class='s-error'></td>
62255    <td class='s-error'></td>
62256    <td class='s-error'></td>
62257    <td class='s-error'></td>
62258    </tr>
62259    <tr><td class='code'>@link libsbml#InvalidApplyCiInLambda InvalidApplyCiInLambda@endlink</td>
62260    <td class='meaning'>Invalid forward reference in the MathML <code>&lt;apply&gt;</code><code>&lt;ci&gt;</code>...<code>&lt;/ci&gt;</code><code>&lt;/apply&gt;</code> expression</td>
62261    <td class='s-na'></td>
62262    <td class='s-na'></td>
62263    <td class='s-error'></td>
62264    <td class='s-error'></td>
62265    <td class='s-error'></td>
62266    <td class='s-na'></td>
62267    <td class='s-na'></td>
62268    <td class='s-na'></td>
62269    </tr>
62270    <tr><td class='code'>@link libsbml#RecursiveFunctionDefinition RecursiveFunctionDefinition@endlink</td>
62271    <td class='meaning'>Recursive function definitions are not permitted</td>
62272    <td class='s-na'></td>
62273    <td class='s-na'></td>
62274    <td class='s-error'></td>
62275    <td class='s-error'></td>
62276    <td class='s-error'></td>
62277    <td class='s-error'></td>
62278    <td class='s-error'></td>
62279    <td class='s-error'></td>
62280    </tr>
62281    <tr><td class='code'>@link libsbml#InvalidCiInLambda InvalidCiInLambda@endlink</td>
62282    <td class='meaning'>Invalid <code>&lt;ci&gt;</code> reference found inside the <code>&lt;lambda&gt;</code> mathematical formula</td>
62283    <td class='s-na'></td>
62284    <td class='s-na'></td>
62285    <td class='s-error'></td>
62286    <td class='s-error'></td>
62287    <td class='s-error'></td>
62288    <td class='s-error'></td>
62289    <td class='s-error'></td>
62290    <td class='s-error'></td>
62291    </tr>
62292    <tr><td class='code'>@link libsbml#InvalidFunctionDefReturnType InvalidFunctionDefReturnType@endlink</td>
62293    <td class='meaning'>A function's return type must be either a number or a Boolean</td>
62294    <td class='s-na'></td>
62295    <td class='s-na'></td>
62296    <td class='s-error'></td>
62297    <td class='s-error'></td>
62298    <td class='s-error'></td>
62299    <td class='s-error'></td>
62300    <td class='s-error'></td>
62301    <td class='s-error'></td>
62302    </tr>
62303    <tr><td class='code'>@link libsbml#OneMathElementPerFunc OneMathElementPerFunc@endlink</td>
62304    <td class='meaning'>A FunctionDefinition object may contain one <code>&lt;math&gt;</code> element</td>
62305    <td class='s-na'></td>
62306    <td class='s-na'></td>
62307    <td class='s-na'></td>
62308    <td class='s-na'></td>
62309    <td class='s-na'></td>
62310    <td class='s-na'></td>
62311    <td class='s-error'></td>
62312    <td class='s-error'></td>
62313    </tr>
62314    <tr><td class='code'>@link libsbml#AllowedAttributesOnFunc AllowedAttributesOnFunc@endlink</td>
62315    <td class='meaning'>Invalid attribute found on the FunctionDefinition object</td>
62316    <td class='s-na'></td>
62317    <td class='s-na'></td>
62318    <td class='s-na'></td>
62319    <td class='s-na'></td>
62320    <td class='s-na'></td>
62321    <td class='s-na'></td>
62322    <td class='s-error'></td>
62323    <td class='s-error'></td>
62324    </tr>
62325    <tr><td class='code'>@link libsbml#InvalidUnitDefId InvalidUnitDefId@endlink</td>
62326    <td class='meaning'>Invalid 'id' attribute value for a UnitDefinition object</td>
62327    <td class='s-error'></td>
62328    <td class='s-error'></td>
62329    <td class='s-error'></td>
62330    <td class='s-error'></td>
62331    <td class='s-error'></td>
62332    <td class='s-error'></td>
62333    <td class='s-error'></td>
62334    <td class='s-error'></td>
62335    </tr>
62336    <tr><td class='code'>@link libsbml#InvalidSubstanceRedefinition InvalidSubstanceRedefinition@endlink</td>
62337    <td class='meaning'>Invalid redefinition of built-in type 'substance'</td>
62338    <td class='s-error'></td>
62339    <td class='s-error'></td>
62340    <td class='s-error'></td>
62341    <td class='s-error'></td>
62342    <td class='s-error'></td>
62343    <td class='s-error'></td>
62344    <td class='s-na'></td>
62345    <td class='s-na'></td>
62346    </tr>
62347    <tr><td class='code'>@link libsbml#InvalidLengthRedefinition InvalidLengthRedefinition@endlink</td>
62348    <td class='meaning'>Invalid redefinition of built-in type 'length'</td>
62349    <td class='s-warning'></td>
62350    <td class='s-warning'></td>
62351    <td class='s-error'></td>
62352    <td class='s-error'></td>
62353    <td class='s-error'></td>
62354    <td class='s-error'></td>
62355    <td class='s-na'></td>
62356    <td class='s-na'></td>
62357    </tr>
62358    <tr><td class='code'>@link libsbml#InvalidAreaRedefinition InvalidAreaRedefinition@endlink</td>
62359    <td class='meaning'>Invalid redefinition of built-in type name 'area'</td>
62360    <td class='s-warning'></td>
62361    <td class='s-warning'></td>
62362    <td class='s-error'></td>
62363    <td class='s-error'></td>
62364    <td class='s-error'></td>
62365    <td class='s-error'></td>
62366    <td class='s-na'></td>
62367    <td class='s-na'></td>
62368    </tr>
62369    <tr><td class='code'>@link libsbml#InvalidTimeRedefinition InvalidTimeRedefinition@endlink</td>
62370    <td class='meaning'>Invalid redefinition of built-in type name 'time'</td>
62371    <td class='s-error'></td>
62372    <td class='s-error'></td>
62373    <td class='s-error'></td>
62374    <td class='s-error'></td>
62375    <td class='s-error'></td>
62376    <td class='s-error'></td>
62377    <td class='s-na'></td>
62378    <td class='s-na'></td>
62379    </tr>
62380    <tr><td class='code'>@link libsbml#InvalidVolumeRedefinition InvalidVolumeRedefinition@endlink</td>
62381    <td class='meaning'>Invalid redefinition of built-in type name 'volume'</td>
62382    <td class='s-error'></td>
62383    <td class='s-error'></td>
62384    <td class='s-error'></td>
62385    <td class='s-error'></td>
62386    <td class='s-error'></td>
62387    <td class='s-error'></td>
62388    <td class='s-na'></td>
62389    <td class='s-na'></td>
62390    </tr>
62391    <tr><td class='code'>@link libsbml#VolumeLitreDefExponentNotOne VolumeLitreDefExponentNotOne@endlink</td>
62392    <td class='meaning'>Must use 'exponent'=1 when defining 'volume' in terms of litres</td>
62393    <td class='s-error'></td>
62394    <td class='s-error'></td>
62395    <td class='s-error'></td>
62396    <td class='s-error'></td>
62397    <td class='s-error'></td>
62398    <td class='s-na'></td>
62399    <td class='s-na'></td>
62400    <td class='s-na'></td>
62401    </tr>
62402    <tr><td class='code'>@link libsbml#VolumeMetreDefExponentNot3 VolumeMetreDefExponentNot3@endlink</td>
62403    <td class='meaning'>Must use 'exponent'=3 when defining 'volume' in terms of metres</td>
62404    <td class='s-na'></td>
62405    <td class='s-na'></td>
62406    <td class='s-error'></td>
62407    <td class='s-error'></td>
62408    <td class='s-error'></td>
62409    <td class='s-na'></td>
62410    <td class='s-na'></td>
62411    <td class='s-na'></td>
62412    </tr>
62413    <tr><td class='code'>@link libsbml#EmptyListOfUnits EmptyListOfUnits@endlink</td>
62414    <td class='meaning'>An empty list of Unit objects is not permitted in a UnitDefinition object</td>
62415    <td class='s-error'></td>
62416    <td class='s-error'></td>
62417    <td class='s-error'></td>
62418    <td class='s-error'></td>
62419    <td class='s-error'></td>
62420    <td class='s-error'></td>
62421    <td class='s-na'></td>
62422    <td class='s-na'></td>
62423    </tr>
62424    <tr><td class='code'>@link libsbml#InvalidUnitKind InvalidUnitKind@endlink</td>
62425    <td class='meaning'>Invalid value for the 'kind' attribute of a UnitDefinition object</td>
62426    <td class='s-error'></td>
62427    <td class='s-error'></td>
62428    <td class='s-error'></td>
62429    <td class='s-error'></td>
62430    <td class='s-error'></td>
62431    <td class='s-error'></td>
62432    <td class='s-error'></td>
62433    <td class='s-error'></td>
62434    </tr>
62435    <tr><td class='code'>@link libsbml#OffsetNoLongerValid OffsetNoLongerValid@endlink</td>
62436    <td class='meaning'>Unit attribute 'offset' is not supported in this Level+Version of SBML</td>
62437    <td class='s-na'></td>
62438    <td class='s-na'></td>
62439    <td class='s-na'></td>
62440    <td class='s-error'></td>
62441    <td class='s-error'></td>
62442    <td class='s-error'></td>
62443    <td class='s-na'></td>
62444    <td class='s-na'></td>
62445    </tr>
62446    <tr><td class='code'>@link libsbml#CelsiusNoLongerValid CelsiusNoLongerValid@endlink</td>
62447    <td class='meaning'>Unit name 'Celsius' is not defined in this Level+Version of SBML</td>
62448    <td class='s-na'></td>
62449    <td class='s-na'></td>
62450    <td class='s-na'></td>
62451    <td class='s-error'></td>
62452    <td class='s-error'></td>
62453    <td class='s-error'></td>
62454    <td class='s-na'></td>
62455    <td class='s-na'></td>
62456    </tr>
62457    <tr><td class='code'>@link libsbml#EmptyUnitListElement EmptyUnitListElement@endlink</td>
62458    <td class='meaning'>A ListOfUnits object must not be empty</td>
62459    <td class='s-na'></td>
62460    <td class='s-na'></td>
62461    <td class='s-na'></td>
62462    <td class='s-na'></td>
62463    <td class='s-na'></td>
62464    <td class='s-na'></td>
62465    <td class='s-error'></td>
62466    <td class='s-na'></td>
62467    </tr>
62468    <tr><td class='code'>@link libsbml#OneListOfUnitsPerUnitDef OneListOfUnitsPerUnitDef@endlink</td>
62469    <td class='meaning'>At most one ListOfUnits object is allowed inside a UnitDefinition object</td>
62470    <td class='s-na'></td>
62471    <td class='s-na'></td>
62472    <td class='s-na'></td>
62473    <td class='s-na'></td>
62474    <td class='s-na'></td>
62475    <td class='s-na'></td>
62476    <td class='s-error'></td>
62477    <td class='s-error'></td>
62478    </tr>
62479    <tr><td class='code'>@link libsbml#OnlyUnitsInListOfUnits OnlyUnitsInListOfUnits@endlink</td>
62480    <td class='meaning'>Only Unit, Notes and Annotation objects are allowed in ListOfUnits objects</td>
62481    <td class='s-na'></td>
62482    <td class='s-na'></td>
62483    <td class='s-na'></td>
62484    <td class='s-na'></td>
62485    <td class='s-na'></td>
62486    <td class='s-na'></td>
62487    <td class='s-error'></td>
62488    <td class='s-error'></td>
62489    </tr>
62490    <tr><td class='code'>@link libsbml#AllowedAttributesOnUnitDefinition AllowedAttributesOnUnitDefinition@endlink</td>
62491    <td class='meaning'>Invalid attribute found on the UnitDefinition object</td>
62492    <td class='s-na'></td>
62493    <td class='s-na'></td>
62494    <td class='s-na'></td>
62495    <td class='s-na'></td>
62496    <td class='s-na'></td>
62497    <td class='s-na'></td>
62498    <td class='s-error'></td>
62499    <td class='s-error'></td>
62500    </tr>
62501    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfUnits AllowedAttributesOnListOfUnits@endlink</td>
62502    <td class='meaning'>Invalid attribute found on the ListOfUnits object</td>
62503    <td class='s-na'></td>
62504    <td class='s-na'></td>
62505    <td class='s-na'></td>
62506    <td class='s-na'></td>
62507    <td class='s-na'></td>
62508    <td class='s-na'></td>
62509    <td class='s-error'></td>
62510    <td class='s-error'></td>
62511    </tr>
62512    <tr><td class='code'>@link libsbml#AllowedAttributesOnUnit AllowedAttributesOnUnit@endlink</td>
62513    <td class='meaning'>Invalid attribute found on the Unit object</td>
62514    <td class='s-na'></td>
62515    <td class='s-na'></td>
62516    <td class='s-na'></td>
62517    <td class='s-na'></td>
62518    <td class='s-na'></td>
62519    <td class='s-na'></td>
62520    <td class='s-error'></td>
62521    <td class='s-error'></td>
62522    </tr>
62523    <tr><td class='code'>@link libsbml#ZeroDimensionalCompartmentSize ZeroDimensionalCompartmentSize@endlink</td>
62524    <td class='meaning'>Invalid use of the 'size' attribute for a zero-dimensional compartment</td>
62525    <td class='s-na'></td>
62526    <td class='s-na'></td>
62527    <td class='s-error'></td>
62528    <td class='s-error'></td>
62529    <td class='s-error'></td>
62530    <td class='s-error'></td>
62531    <td class='s-na'></td>
62532    <td class='s-na'></td>
62533    </tr>
62534    <tr><td class='code'>@link libsbml#ZeroDimensionalCompartmentUnits ZeroDimensionalCompartmentUnits@endlink</td>
62535    <td class='meaning'>Invalid use of the 'units' attribute for a zero-dimensional compartment</td>
62536    <td class='s-na'></td>
62537    <td class='s-na'></td>
62538    <td class='s-error'></td>
62539    <td class='s-error'></td>
62540    <td class='s-error'></td>
62541    <td class='s-error'></td>
62542    <td class='s-na'></td>
62543    <td class='s-na'></td>
62544    </tr>
62545    <tr><td class='code'>@link libsbml#ZeroDimensionalCompartmentConst ZeroDimensionalCompartmentConst@endlink</td>
62546    <td class='meaning'>Zero-dimensional compartments must be defined to be constant</td>
62547    <td class='s-na'></td>
62548    <td class='s-na'></td>
62549    <td class='s-error'></td>
62550    <td class='s-error'></td>
62551    <td class='s-error'></td>
62552    <td class='s-error'></td>
62553    <td class='s-na'></td>
62554    <td class='s-na'></td>
62555    </tr>
62556    <tr><td class='code'>@link libsbml#UndefinedOutsideCompartment UndefinedOutsideCompartment@endlink</td>
62557    <td class='meaning'>Invalid value for the 'outside' attribute of a Compartment object</td>
62558    <td class='s-error'></td>
62559    <td class='s-error'></td>
62560    <td class='s-error'></td>
62561    <td class='s-error'></td>
62562    <td class='s-error'></td>
62563    <td class='s-error'></td>
62564    <td class='s-na'></td>
62565    <td class='s-na'></td>
62566    </tr>
62567    <tr><td class='code'>@link libsbml#RecursiveCompartmentContainment RecursiveCompartmentContainment@endlink</td>
62568    <td class='meaning'>Recursive nesting of compartments via the 'outside' attribute is not permitted</td>
62569    <td class='s-warning'></td>
62570    <td class='s-warning'></td>
62571    <td class='s-warning'></td>
62572    <td class='s-error'></td>
62573    <td class='s-error'></td>
62574    <td class='s-error'></td>
62575    <td class='s-na'></td>
62576    <td class='s-na'></td>
62577    </tr>
62578    <tr><td class='code'>@link libsbml#ZeroDCompartmentContainment ZeroDCompartmentContainment@endlink</td>
62579    <td class='meaning'>Invalid nesting of zero-dimensional compartments</td>
62580    <td class='s-na'></td>
62581    <td class='s-na'></td>
62582    <td class='s-warning'></td>
62583    <td class='s-error'></td>
62584    <td class='s-error'></td>
62585    <td class='s-error'></td>
62586    <td class='s-na'></td>
62587    <td class='s-na'></td>
62588    </tr>
62589    <tr><td class='code'>@link libsbml#Invalid1DCompartmentUnits Invalid1DCompartmentUnits@endlink</td>
62590    <td class='meaning'>Invalid value for the 'units' attribute of a one-dimensional compartment</td>
62591    <td class='s-na'></td>
62592    <td class='s-na'></td>
62593    <td class='s-error'></td>
62594    <td class='s-error'></td>
62595    <td class='s-error'></td>
62596    <td class='s-error'></td>
62597    <td class='s-warning'></td>
62598    <td class='s-warning'></td>
62599    </tr>
62600    <tr><td class='code'>@link libsbml#Invalid2DCompartmentUnits Invalid2DCompartmentUnits@endlink</td>
62601    <td class='meaning'>Invalid value for the 'units' attribute of a two-dimensional compartment</td>
62602    <td class='s-na'></td>
62603    <td class='s-na'></td>
62604    <td class='s-error'></td>
62605    <td class='s-error'></td>
62606    <td class='s-error'></td>
62607    <td class='s-error'></td>
62608    <td class='s-warning'></td>
62609    <td class='s-warning'></td>
62610    </tr>
62611    <tr><td class='code'>@link libsbml#Invalid3DCompartmentUnits Invalid3DCompartmentUnits@endlink</td>
62612    <td class='meaning'>Invalid value for the 'units' attribute of a three-dimensional compartment</td>
62613    <td class='s-error'></td>
62614    <td class='s-error'></td>
62615    <td class='s-error'></td>
62616    <td class='s-error'></td>
62617    <td class='s-error'></td>
62618    <td class='s-error'></td>
62619    <td class='s-warning'></td>
62620    <td class='s-warning'></td>
62621    </tr>
62622    <tr><td class='code'>@link libsbml#InvalidCompartmentTypeRef InvalidCompartmentTypeRef@endlink</td>
62623    <td class='meaning'>Invalid value for the 'compartmentType' attribute of a compartment</td>
62624    <td class='s-na'></td>
62625    <td class='s-na'></td>
62626    <td class='s-na'></td>
62627    <td class='s-error'></td>
62628    <td class='s-error'></td>
62629    <td class='s-error'></td>
62630    <td class='s-na'></td>
62631    <td class='s-na'></td>
62632    </tr>
62633    <tr><td class='code'>@link libsbml#OneDimensionalCompartmentUnits OneDimensionalCompartmentUnits@endlink</td>
62634    <td class='meaning'>No units defined for 1-D compartment</td>
62635    <td class='s-na'></td>
62636    <td class='s-na'></td>
62637    <td class='s-na'></td>
62638    <td class='s-na'></td>
62639    <td class='s-na'></td>
62640    <td class='s-na'></td>
62641    <td class='s-warning'></td>
62642    <td class='s-warning'></td>
62643    </tr>
62644    <tr><td class='code'>@link libsbml#TwoDimensionalCompartmentUnits TwoDimensionalCompartmentUnits@endlink</td>
62645    <td class='meaning'>No units defined for 2-D compartment</td>
62646    <td class='s-na'></td>
62647    <td class='s-na'></td>
62648    <td class='s-na'></td>
62649    <td class='s-na'></td>
62650    <td class='s-na'></td>
62651    <td class='s-na'></td>
62652    <td class='s-warning'></td>
62653    <td class='s-warning'></td>
62654    </tr>
62655    <tr><td class='code'>@link libsbml#ThreeDimensionalCompartmentUnits ThreeDimensionalCompartmentUnits@endlink</td>
62656    <td class='meaning'>No units defined for 3-D Compartment object</td>
62657    <td class='s-na'></td>
62658    <td class='s-na'></td>
62659    <td class='s-na'></td>
62660    <td class='s-na'></td>
62661    <td class='s-na'></td>
62662    <td class='s-na'></td>
62663    <td class='s-warning'></td>
62664    <td class='s-warning'></td>
62665    </tr>
62666    <tr><td class='code'>@link libsbml#AllowedAttributesOnCompartment AllowedAttributesOnCompartment@endlink</td>
62667    <td class='meaning'>Invalid attribute found on Compartment object</td>
62668    <td class='s-na'></td>
62669    <td class='s-na'></td>
62670    <td class='s-na'></td>
62671    <td class='s-na'></td>
62672    <td class='s-na'></td>
62673    <td class='s-na'></td>
62674    <td class='s-error'></td>
62675    <td class='s-error'></td>
62676    </tr>
62677    <tr><td class='code'>@link libsbml#NoUnitsOnCompartment NoUnitsOnCompartment@endlink</td>
62678    <td class='meaning'>No units defined for Compartment object</td>
62679    <td class='s-na'></td>
62680    <td class='s-na'></td>
62681    <td class='s-na'></td>
62682    <td class='s-na'></td>
62683    <td class='s-na'></td>
62684    <td class='s-na'></td>
62685    <td class='s-warning'></td>
62686    <td class='s-warning'></td>
62687    </tr>
62688    <tr><td class='code'>@link libsbml#InvalidSpeciesCompartmentRef InvalidSpeciesCompartmentRef@endlink</td>
62689    <td class='meaning'>Invalid value found for Species 'compartment' attribute</td>
62690    <td class='s-error'></td>
62691    <td class='s-error'></td>
62692    <td class='s-error'></td>
62693    <td class='s-error'></td>
62694    <td class='s-error'></td>
62695    <td class='s-error'></td>
62696    <td class='s-error'></td>
62697    <td class='s-error'></td>
62698    </tr>
62699    <tr><td class='code'>@link libsbml#HasOnlySubsNoSpatialUnits HasOnlySubsNoSpatialUnits@endlink</td>
62700    <td class='meaning'>Attribute 'spatialSizeUnits' must not be set if 'hasOnlySubstanceUnits'='true'</td>
62701    <td class='s-na'></td>
62702    <td class='s-na'></td>
62703    <td class='s-error'></td>
62704    <td class='s-error'></td>
62705    <td class='s-na'></td>
62706    <td class='s-na'></td>
62707    <td class='s-na'></td>
62708    <td class='s-na'></td>
62709    </tr>
62710    <tr><td class='code'>@link libsbml#NoSpatialUnitsInZeroD NoSpatialUnitsInZeroD@endlink</td>
62711    <td class='meaning'>Attribute 'spatialSizeUnits' must not be set if the compartment is zero-dimensional</td>
62712    <td class='s-na'></td>
62713    <td class='s-na'></td>
62714    <td class='s-error'></td>
62715    <td class='s-error'></td>
62716    <td class='s-na'></td>
62717    <td class='s-na'></td>
62718    <td class='s-na'></td>
62719    <td class='s-na'></td>
62720    </tr>
62721    <tr><td class='code'>@link libsbml#NoConcentrationInZeroD NoConcentrationInZeroD@endlink</td>
62722    <td class='meaning'>Attribute 'initialConcentration' must not be set if the compartment is zero-dimensional</td>
62723    <td class='s-na'></td>
62724    <td class='s-na'></td>
62725    <td class='s-error'></td>
62726    <td class='s-error'></td>
62727    <td class='s-error'></td>
62728    <td class='s-error'></td>
62729    <td class='s-na'></td>
62730    <td class='s-na'></td>
62731    </tr>
62732    <tr><td class='code'>@link libsbml#SpatialUnitsInOneD SpatialUnitsInOneD@endlink</td>
62733    <td class='meaning'>Invalid value for 'spatialSizeUnits' attribute of a one-dimensional compartment</td>
62734    <td class='s-na'></td>
62735    <td class='s-na'></td>
62736    <td class='s-error'></td>
62737    <td class='s-error'></td>
62738    <td class='s-na'></td>
62739    <td class='s-na'></td>
62740    <td class='s-na'></td>
62741    <td class='s-na'></td>
62742    </tr>
62743    <tr><td class='code'>@link libsbml#SpatialUnitsInTwoD SpatialUnitsInTwoD@endlink</td>
62744    <td class='meaning'>Invalid value for the 'spatialSizeUnits' attribute of a two-dimensional compartment</td>
62745    <td class='s-na'></td>
62746    <td class='s-na'></td>
62747    <td class='s-error'></td>
62748    <td class='s-error'></td>
62749    <td class='s-na'></td>
62750    <td class='s-na'></td>
62751    <td class='s-na'></td>
62752    <td class='s-na'></td>
62753    </tr>
62754    <tr><td class='code'>@link libsbml#SpatialUnitsInThreeD SpatialUnitsInThreeD@endlink</td>
62755    <td class='meaning'>Invalid value for the 'spatialSizeUnits' attribute of a three-dimensional compartment</td>
62756    <td class='s-na'></td>
62757    <td class='s-na'></td>
62758    <td class='s-error'></td>
62759    <td class='s-error'></td>
62760    <td class='s-na'></td>
62761    <td class='s-na'></td>
62762    <td class='s-na'></td>
62763    <td class='s-na'></td>
62764    </tr>
62765    <tr><td class='code'>@link libsbml#InvalidSpeciesSusbstanceUnits InvalidSpeciesSusbstanceUnits@endlink</td>
62766    <td class='meaning'>Invalid value for a Species 'units' attribute</td>
62767    <td class='s-error'></td>
62768    <td class='s-error'></td>
62769    <td class='s-error'></td>
62770    <td class='s-error'></td>
62771    <td class='s-error'></td>
62772    <td class='s-error'></td>
62773    <td class='s-warning'></td>
62774    <td class='s-warning'></td>
62775    </tr>
62776    <tr><td class='code'>@link libsbml#BothAmountAndConcentrationSet BothAmountAndConcentrationSet@endlink</td>
62777    <td class='meaning'>Cannot set both 'initialConcentration' and 'initialAmount' attributes simultaneously</td>
62778    <td class='s-na'></td>
62779    <td class='s-na'></td>
62780    <td class='s-error'></td>
62781    <td class='s-error'></td>
62782    <td class='s-error'></td>
62783    <td class='s-error'></td>
62784    <td class='s-error'></td>
62785    <td class='s-error'></td>
62786    </tr>
62787    <tr><td class='code'>@link libsbml#NonBoundarySpeciesAssignedAndUsed NonBoundarySpeciesAssignedAndUsed@endlink</td>
62788    <td class='meaning'>Cannot use a non-boundary species in both reactions and rules simultaneously</td>
62789    <td class='s-warning'></td>
62790    <td class='s-warning'></td>
62791    <td class='s-error'></td>
62792    <td class='s-error'></td>
62793    <td class='s-error'></td>
62794    <td class='s-error'></td>
62795    <td class='s-error'></td>
62796    <td class='s-error'></td>
62797    </tr>
62798    <tr><td class='code'>@link libsbml#NonConstantSpeciesUsed NonConstantSpeciesUsed@endlink</td>
62799    <td class='meaning'>Cannot use a constant, non-boundary species as a reactant or product</td>
62800    <td class='s-na'></td>
62801    <td class='s-na'></td>
62802    <td class='s-error'></td>
62803    <td class='s-error'></td>
62804    <td class='s-error'></td>
62805    <td class='s-error'></td>
62806    <td class='s-error'></td>
62807    <td class='s-error'></td>
62808    </tr>
62809    <tr><td class='code'>@link libsbml#InvalidSpeciesTypeRef InvalidSpeciesTypeRef@endlink</td>
62810    <td class='meaning'>Invalid value for the 'speciesType' attribute of a species</td>
62811    <td class='s-na'></td>
62812    <td class='s-na'></td>
62813    <td class='s-na'></td>
62814    <td class='s-error'></td>
62815    <td class='s-error'></td>
62816    <td class='s-error'></td>
62817    <td class='s-na'></td>
62818    <td class='s-na'></td>
62819    </tr>
62820    <tr><td class='code'>@link libsbml#MultSpeciesSameTypeInCompartment MultSpeciesSameTypeInCompartment@endlink</td>
62821    <td class='meaning'>Cannot have multiple species of the same species type in the same compartment</td>
62822    <td class='s-na'></td>
62823    <td class='s-na'></td>
62824    <td class='s-na'></td>
62825    <td class='s-error'></td>
62826    <td class='s-error'></td>
62827    <td class='s-error'></td>
62828    <td class='s-na'></td>
62829    <td class='s-na'></td>
62830    </tr>
62831    <tr><td class='code'>@link libsbml#MissingSpeciesCompartment MissingSpeciesCompartment@endlink</td>
62832    <td class='meaning'>Missing value for the 'compartment' attribute</td>
62833    <td class='s-error'></td>
62834    <td class='s-error'></td>
62835    <td class='s-error'></td>
62836    <td class='s-error'></td>
62837    <td class='s-error'></td>
62838    <td class='s-error'></td>
62839    <td class='s-error'></td>
62840    <td class='s-error'></td>
62841    </tr>
62842    <tr><td class='code'>@link libsbml#SpatialSizeUnitsRemoved SpatialSizeUnitsRemoved@endlink</td>
62843    <td class='meaning'>Attribute 'spatialSizeUnits' is not supported in this Level+Version of SBML</td>
62844    <td class='s-na'></td>
62845    <td class='s-na'></td>
62846    <td class='s-na'></td>
62847    <td class='s-na'></td>
62848    <td class='s-error'></td>
62849    <td class='s-error'></td>
62850    <td class='s-na'></td>
62851    <td class='s-na'></td>
62852    </tr>
62853    <tr><td class='code'>@link libsbml#SubstanceUnitsOnSpecies SubstanceUnitsOnSpecies@endlink</td>
62854    <td class='meaning'>No substance units defined for the species</td>
62855    <td class='s-na'></td>
62856    <td class='s-na'></td>
62857    <td class='s-na'></td>
62858    <td class='s-na'></td>
62859    <td class='s-na'></td>
62860    <td class='s-na'></td>
62861    <td class='s-warning'></td>
62862    <td class='s-warning'></td>
62863    </tr>
62864    <tr><td class='code'>@link libsbml#ConversionFactorOnSpecies ConversionFactorOnSpecies@endlink</td>
62865    <td class='meaning'>Invalid value for the 'conversionFactor' attribute</td>
62866    <td class='s-na'></td>
62867    <td class='s-na'></td>
62868    <td class='s-na'></td>
62869    <td class='s-na'></td>
62870    <td class='s-na'></td>
62871    <td class='s-na'></td>
62872    <td class='s-error'></td>
62873    <td class='s-error'></td>
62874    </tr>
62875    <tr><td class='code'>@link libsbml#AllowedAttributesOnSpecies AllowedAttributesOnSpecies@endlink</td>
62876    <td class='meaning'>Invalid attribute found on Species object</td>
62877    <td class='s-na'></td>
62878    <td class='s-na'></td>
62879    <td class='s-na'></td>
62880    <td class='s-na'></td>
62881    <td class='s-na'></td>
62882    <td class='s-na'></td>
62883    <td class='s-error'></td>
62884    <td class='s-error'></td>
62885    </tr>
62886    <tr><td class='code'>@link libsbml#InvalidParameterUnits InvalidParameterUnits@endlink</td>
62887    <td class='meaning'>Invalid value for the 'units' attribute of a Parameter object</td>
62888    <td class='s-error'></td>
62889    <td class='s-error'></td>
62890    <td class='s-error'></td>
62891    <td class='s-error'></td>
62892    <td class='s-error'></td>
62893    <td class='s-error'></td>
62894    <td class='s-warning'></td>
62895    <td class='s-warning'></td>
62896    </tr>
62897    <tr><td class='code'>@link libsbml#ParameterUnits ParameterUnits@endlink</td>
62898    <td class='meaning'>No units defined for the parameter</td>
62899    <td class='s-na'></td>
62900    <td class='s-na'></td>
62901    <td class='s-na'></td>
62902    <td class='s-na'></td>
62903    <td class='s-na'></td>
62904    <td class='s-na'></td>
62905    <td class='s-warning'></td>
62906    <td class='s-warning'></td>
62907    </tr>
62908    <tr><td class='code'>@link libsbml#ConversionFactorMustConstant ConversionFactorMustConstant@endlink</td>
62909    <td class='meaning'>A conversion factor must reference a Parameter object declared to be a constant</td>
62910    <td class='s-na'></td>
62911    <td class='s-na'></td>
62912    <td class='s-na'></td>
62913    <td class='s-na'></td>
62914    <td class='s-na'></td>
62915    <td class='s-na'></td>
62916    <td class='s-error'></td>
62917    <td class='s-error'></td>
62918    </tr>
62919    <tr><td class='code'>@link libsbml#AllowedAttributesOnParameter AllowedAttributesOnParameter@endlink</td>
62920    <td class='meaning'>Invalid attribute found on Parameter object</td>
62921    <td class='s-na'></td>
62922    <td class='s-na'></td>
62923    <td class='s-na'></td>
62924    <td class='s-na'></td>
62925    <td class='s-na'></td>
62926    <td class='s-na'></td>
62927    <td class='s-error'></td>
62928    <td class='s-error'></td>
62929    </tr>
62930    <tr><td class='code'>@link libsbml#InvalidInitAssignSymbol InvalidInitAssignSymbol@endlink</td>
62931    <td class='meaning'>Invalid value for the 'symbol' attribute of an InitialAssignment object</td>
62932    <td class='s-na'></td>
62933    <td class='s-na'></td>
62934    <td class='s-na'></td>
62935    <td class='s-error'></td>
62936    <td class='s-error'></td>
62937    <td class='s-error'></td>
62938    <td class='s-error'></td>
62939    <td class='s-error'></td>
62940    </tr>
62941    <tr><td class='code'>@link libsbml#MultipleInitAssignments MultipleInitAssignments@endlink</td>
62942    <td class='meaning'>Multiple initial assignments for the same 'symbol' value are not allowed</td>
62943    <td class='s-na'></td>
62944    <td class='s-na'></td>
62945    <td class='s-na'></td>
62946    <td class='s-error'></td>
62947    <td class='s-error'></td>
62948    <td class='s-error'></td>
62949    <td class='s-error'></td>
62950    <td class='s-error'></td>
62951    </tr>
62952    <tr><td class='code'>@link libsbml#InitAssignmentAndRuleForSameId InitAssignmentAndRuleForSameId@endlink</td>
62953    <td class='meaning'>Cannot set a value using both an initial assignment and an assignment rule simultaneously</td>
62954    <td class='s-na'></td>
62955    <td class='s-na'></td>
62956    <td class='s-na'></td>
62957    <td class='s-error'></td>
62958    <td class='s-error'></td>
62959    <td class='s-error'></td>
62960    <td class='s-error'></td>
62961    <td class='s-error'></td>
62962    </tr>
62963    <tr><td class='code'>@link libsbml#OneMathElementPerInitialAssign OneMathElementPerInitialAssign@endlink</td>
62964    <td class='meaning'>An InitialAssignment object may contain one <code>&lt;math&gt;</code> element</td>
62965    <td class='s-na'></td>
62966    <td class='s-na'></td>
62967    <td class='s-na'></td>
62968    <td class='s-na'></td>
62969    <td class='s-na'></td>
62970    <td class='s-na'></td>
62971    <td class='s-error'></td>
62972    <td class='s-error'></td>
62973    </tr>
62974    <tr><td class='code'>@link libsbml#AllowedAttributesOnInitialAssign AllowedAttributesOnInitialAssign@endlink</td>
62975    <td class='meaning'>Invalid attribute found on an InitialAssignment object</td>
62976    <td class='s-na'></td>
62977    <td class='s-na'></td>
62978    <td class='s-na'></td>
62979    <td class='s-na'></td>
62980    <td class='s-na'></td>
62981    <td class='s-na'></td>
62982    <td class='s-error'></td>
62983    <td class='s-error'></td>
62984    </tr>
62985    <tr><td class='code'>@link libsbml#InitAssignmentCannotRef0DComp InitAssignmentCannotRef0DComp@endlink</td>
62986    <td class='meaning'>InitialAssignment cannot reference 0D compartment</td>
62987    <td class='s-na'></td>
62988    <td class='s-na'></td>
62989    <td class='s-na'></td>
62990    <td class='s-na'></td>
62991    <td class='s-na'></td>
62992    <td class='s-na'></td>
62993    <td class='s-na'></td>
62994    <td class='s-na'></td>
62995    </tr>
62996    <tr><td class='code'>@link libsbml#InvalidAssignRuleVariable InvalidAssignRuleVariable@endlink</td>
62997    <td class='meaning'>Invalid value for the 'variable' attribute of an AssignmentRule object</td>
62998    <td class='s-error'></td>
62999    <td class='s-error'></td>
63000    <td class='s-error'></td>
63001    <td class='s-error'></td>
63002    <td class='s-error'></td>
63003    <td class='s-error'></td>
63004    <td class='s-error'></td>
63005    <td class='s-error'></td>
63006    </tr>
63007    <tr><td class='code'>@link libsbml#InvalidRateRuleVariable InvalidRateRuleVariable@endlink</td>
63008    <td class='meaning'>Invalid value for the 'variable' attribute of a RateRule object</td>
63009    <td class='s-error'></td>
63010    <td class='s-error'></td>
63011    <td class='s-error'></td>
63012    <td class='s-error'></td>
63013    <td class='s-error'></td>
63014    <td class='s-error'></td>
63015    <td class='s-error'></td>
63016    <td class='s-error'></td>
63017    </tr>
63018    <tr><td class='code'>@link libsbml#AssignmentToConstantEntity AssignmentToConstantEntity@endlink</td>
63019    <td class='meaning'>An assignment rule cannot assign an entity declared to be constant</td>
63020    <td class='s-na'></td>
63021    <td class='s-na'></td>
63022    <td class='s-error'></td>
63023    <td class='s-error'></td>
63024    <td class='s-error'></td>
63025    <td class='s-error'></td>
63026    <td class='s-error'></td>
63027    <td class='s-error'></td>
63028    </tr>
63029    <tr><td class='code'>@link libsbml#RateRuleForConstantEntity RateRuleForConstantEntity@endlink</td>
63030    <td class='meaning'>A rate rule cannot assign an entity declared to be constant</td>
63031    <td class='s-na'></td>
63032    <td class='s-na'></td>
63033    <td class='s-error'></td>
63034    <td class='s-error'></td>
63035    <td class='s-error'></td>
63036    <td class='s-error'></td>
63037    <td class='s-error'></td>
63038    <td class='s-error'></td>
63039    </tr>
63040    <tr><td class='code'>@link libsbml#CircularRuleDependency CircularRuleDependency@endlink</td>
63041    <td class='meaning'>Circular dependencies involving rules and reactions are not permitted</td>
63042    <td class='s-na'></td>
63043    <td class='s-na'></td>
63044    <td class='s-na'></td>
63045    <td class='s-error'></td>
63046    <td class='s-error'></td>
63047    <td class='s-error'></td>
63048    <td class='s-error'></td>
63049    <td class='s-error'></td>
63050    </tr>
63051    <tr><td class='code'>@link libsbml#OneMathElementPerRule OneMathElementPerRule@endlink</td>
63052    <td class='meaning'>A rule object may contain one <code>&lt;math&gt;</code> element</td>
63053    <td class='s-na'></td>
63054    <td class='s-na'></td>
63055    <td class='s-na'></td>
63056    <td class='s-na'></td>
63057    <td class='s-na'></td>
63058    <td class='s-na'></td>
63059    <td class='s-error'></td>
63060    <td class='s-error'></td>
63061    </tr>
63062    <tr><td class='code'>@link libsbml#AllowedAttributesOnAssignRule AllowedAttributesOnAssignRule@endlink</td>
63063    <td class='meaning'>Invalid attribute found on an AssignmentRule object</td>
63064    <td class='s-na'></td>
63065    <td class='s-na'></td>
63066    <td class='s-na'></td>
63067    <td class='s-na'></td>
63068    <td class='s-na'></td>
63069    <td class='s-na'></td>
63070    <td class='s-error'></td>
63071    <td class='s-error'></td>
63072    </tr>
63073    <tr><td class='code'>@link libsbml#AllowedAttributesOnRateRule AllowedAttributesOnRateRule@endlink</td>
63074    <td class='meaning'>Invalid attribute found on a RateRule object</td>
63075    <td class='s-na'></td>
63076    <td class='s-na'></td>
63077    <td class='s-na'></td>
63078    <td class='s-na'></td>
63079    <td class='s-na'></td>
63080    <td class='s-na'></td>
63081    <td class='s-error'></td>
63082    <td class='s-error'></td>
63083    </tr>
63084    <tr><td class='code'>@link libsbml#AllowedAttributesOnAlgRule AllowedAttributesOnAlgRule@endlink</td>
63085    <td class='meaning'>Invalid attribute found on an AlgebraicRule object</td>
63086    <td class='s-na'></td>
63087    <td class='s-na'></td>
63088    <td class='s-na'></td>
63089    <td class='s-na'></td>
63090    <td class='s-na'></td>
63091    <td class='s-na'></td>
63092    <td class='s-error'></td>
63093    <td class='s-error'></td>
63094    </tr>
63095    <tr><td class='code'>@link libsbml#RuleCannotRef0DComp RuleCannotRef0DComp@endlink</td>
63096    <td class='meaning'>Rule cannot reference 0D compartment</td>
63097    <td class='s-na'></td>
63098    <td class='s-na'></td>
63099    <td class='s-na'></td>
63100    <td class='s-na'></td>
63101    <td class='s-na'></td>
63102    <td class='s-na'></td>
63103    <td class='s-na'></td>
63104    <td class='s-na'></td>
63105    </tr>
63106    <tr><td class='code'>@link libsbml#CircularDependencyRateOf CircularDependencyRateOf@endlink</td>
63107    <td class='meaning'>Circular dependencies are not permitted in RateRule and KineticLaw objects</td>
63108    <td class='s-na'></td>
63109    <td class='s-na'></td>
63110    <td class='s-na'></td>
63111    <td class='s-na'></td>
63112    <td class='s-na'></td>
63113    <td class='s-na'></td>
63114    <td class='s-na'></td>
63115    <td class='s-error'></td>
63116    </tr>
63117    <tr><td class='code'>@link libsbml#ConstraintMathNotBoolean ConstraintMathNotBoolean@endlink</td>
63118    <td class='meaning'>A Constraint object's <code>&lt;math&gt;</code> must evaluate to a Boolean value</td>
63119    <td class='s-na'></td>
63120    <td class='s-na'></td>
63121    <td class='s-na'></td>
63122    <td class='s-error'></td>
63123    <td class='s-error'></td>
63124    <td class='s-error'></td>
63125    <td class='s-error'></td>
63126    <td class='s-na'></td>
63127    </tr>
63128    <tr><td class='code'>@link libsbml#IncorrectOrderInConstraint IncorrectOrderInConstraint@endlink</td>
63129    <td class='meaning'>Subobjects inside the Constraint object are not in the prescribed order</td>
63130    <td class='s-na'></td>
63131    <td class='s-na'></td>
63132    <td class='s-na'></td>
63133    <td class='s-error'></td>
63134    <td class='s-error'></td>
63135    <td class='s-error'></td>
63136    <td class='s-na'></td>
63137    <td class='s-na'></td>
63138    </tr>
63139    <tr><td class='code'>@link libsbml#ConstraintNotInXHTMLNamespace ConstraintNotInXHTMLNamespace@endlink</td>
63140    <td class='meaning'>A Constraint's Message subobject must be in the XHTML XML namespace</td>
63141    <td class='s-na'></td>
63142    <td class='s-na'></td>
63143    <td class='s-na'></td>
63144    <td class='s-error'></td>
63145    <td class='s-error'></td>
63146    <td class='s-error'></td>
63147    <td class='s-na'></td>
63148    <td class='s-na'></td>
63149    </tr>
63150    <tr><td class='code'>@link libsbml#ConstraintContainsXMLDecl ConstraintContainsXMLDecl@endlink</td>
63151    <td class='meaning'>XML declarations are not permitted within Constraint's Message objects</td>
63152    <td class='s-na'></td>
63153    <td class='s-na'></td>
63154    <td class='s-na'></td>
63155    <td class='s-error'></td>
63156    <td class='s-error'></td>
63157    <td class='s-error'></td>
63158    <td class='s-error'></td>
63159    <td class='s-error'></td>
63160    </tr>
63161    <tr><td class='code'>@link libsbml#ConstraintContainsDOCTYPE ConstraintContainsDOCTYPE@endlink</td>
63162    <td class='meaning'>XML DOCTYPE elements are not permitted within Constraint's Message objects</td>
63163    <td class='s-na'></td>
63164    <td class='s-na'></td>
63165    <td class='s-na'></td>
63166    <td class='s-error'></td>
63167    <td class='s-error'></td>
63168    <td class='s-error'></td>
63169    <td class='s-error'></td>
63170    <td class='s-error'></td>
63171    </tr>
63172    <tr><td class='code'>@link libsbml#InvalidConstraintContent InvalidConstraintContent@endlink</td>
63173    <td class='meaning'>Invalid content for a Constraint object's Message object</td>
63174    <td class='s-na'></td>
63175    <td class='s-na'></td>
63176    <td class='s-na'></td>
63177    <td class='s-error'></td>
63178    <td class='s-error'></td>
63179    <td class='s-error'></td>
63180    <td class='s-na'></td>
63181    <td class='s-na'></td>
63182    </tr>
63183    <tr><td class='code'>@link libsbml#OneMathElementPerConstraint OneMathElementPerConstraint@endlink</td>
63184    <td class='meaning'>A Constraint object may contain one <code>&lt;math&gt;</code> element</td>
63185    <td class='s-na'></td>
63186    <td class='s-na'></td>
63187    <td class='s-na'></td>
63188    <td class='s-na'></td>
63189    <td class='s-na'></td>
63190    <td class='s-na'></td>
63191    <td class='s-error'></td>
63192    <td class='s-error'></td>
63193    </tr>
63194    <tr><td class='code'>@link libsbml#OneMessageElementPerConstraint OneMessageElementPerConstraint@endlink</td>
63195    <td class='meaning'>A Constraint object can only have one Message subobject</td>
63196    <td class='s-na'></td>
63197    <td class='s-na'></td>
63198    <td class='s-na'></td>
63199    <td class='s-na'></td>
63200    <td class='s-na'></td>
63201    <td class='s-na'></td>
63202    <td class='s-error'></td>
63203    <td class='s-error'></td>
63204    </tr>
63205    <tr><td class='code'>@link libsbml#AllowedAttributesOnConstraint AllowedAttributesOnConstraint@endlink</td>
63206    <td class='meaning'>Invalid attribute found on Constraint object</td>
63207    <td class='s-na'></td>
63208    <td class='s-na'></td>
63209    <td class='s-na'></td>
63210    <td class='s-na'></td>
63211    <td class='s-na'></td>
63212    <td class='s-na'></td>
63213    <td class='s-error'></td>
63214    <td class='s-error'></td>
63215    </tr>
63216    <tr><td class='code'>@link libsbml#NoReactantsOrProducts NoReactantsOrProducts@endlink</td>
63217    <td class='meaning'>Cannot have a reaction with neither reactants nor products</td>
63218    <td class='s-error'></td>
63219    <td class='s-error'></td>
63220    <td class='s-error'></td>
63221    <td class='s-error'></td>
63222    <td class='s-error'></td>
63223    <td class='s-error'></td>
63224    <td class='s-error'></td>
63225    <td class='s-na'></td>
63226    </tr>
63227    <tr><td class='code'>@link libsbml#IncorrectOrderInReaction IncorrectOrderInReaction@endlink</td>
63228    <td class='meaning'>Subobjects inside the Reaction object are not in the prescribed order</td>
63229    <td class='s-error'></td>
63230    <td class='s-error'></td>
63231    <td class='s-error'></td>
63232    <td class='s-error'></td>
63233    <td class='s-error'></td>
63234    <td class='s-error'></td>
63235    <td class='s-na'></td>
63236    <td class='s-na'></td>
63237    </tr>
63238    <tr><td class='code'>@link libsbml#EmptyListInReaction EmptyListInReaction@endlink</td>
63239    <td class='meaning'>Reaction components, if present, cannot be empty</td>
63240    <td class='s-error'></td>
63241    <td class='s-error'></td>
63242    <td class='s-error'></td>
63243    <td class='s-error'></td>
63244    <td class='s-error'></td>
63245    <td class='s-error'></td>
63246    <td class='s-error'></td>
63247    <td class='s-na'></td>
63248    </tr>
63249    <tr><td class='code'>@link libsbml#InvalidReactantsProductsList InvalidReactantsProductsList@endlink</td>
63250    <td class='meaning'>Invalid object found in the list of reactants or products</td>
63251    <td class='s-error'></td>
63252    <td class='s-error'></td>
63253    <td class='s-error'></td>
63254    <td class='s-error'></td>
63255    <td class='s-error'></td>
63256    <td class='s-error'></td>
63257    <td class='s-error'></td>
63258    <td class='s-error'></td>
63259    </tr>
63260    <tr><td class='code'>@link libsbml#InvalidModifiersList InvalidModifiersList@endlink</td>
63261    <td class='meaning'>Invalid object found in the list of modifiers</td>
63262    <td class='s-na'></td>
63263    <td class='s-na'></td>
63264    <td class='s-error'></td>
63265    <td class='s-error'></td>
63266    <td class='s-error'></td>
63267    <td class='s-error'></td>
63268    <td class='s-error'></td>
63269    <td class='s-error'></td>
63270    </tr>
63271    <tr><td class='code'>@link libsbml#OneSubElementPerReaction OneSubElementPerReaction@endlink</td>
63272    <td class='meaning'>A Reaction object can only contain one of each allowed type of object</td>
63273    <td class='s-na'></td>
63274    <td class='s-na'></td>
63275    <td class='s-na'></td>
63276    <td class='s-na'></td>
63277    <td class='s-na'></td>
63278    <td class='s-na'></td>
63279    <td class='s-error'></td>
63280    <td class='s-error'></td>
63281    </tr>
63282    <tr><td class='code'>@link libsbml#CompartmentOnReaction CompartmentOnReaction@endlink</td>
63283    <td class='meaning'>Invalid value for the Reaction 'compartment' attribute</td>
63284    <td class='s-na'></td>
63285    <td class='s-na'></td>
63286    <td class='s-na'></td>
63287    <td class='s-na'></td>
63288    <td class='s-na'></td>
63289    <td class='s-na'></td>
63290    <td class='s-error'></td>
63291    <td class='s-error'></td>
63292    </tr>
63293    <tr><td class='code'>@link libsbml#AllowedAttributesOnReaction AllowedAttributesOnReaction@endlink</td>
63294    <td class='meaning'>Invalid attribute for a Reaction object</td>
63295    <td class='s-na'></td>
63296    <td class='s-na'></td>
63297    <td class='s-na'></td>
63298    <td class='s-na'></td>
63299    <td class='s-na'></td>
63300    <td class='s-na'></td>
63301    <td class='s-error'></td>
63302    <td class='s-error'></td>
63303    </tr>
63304    <tr><td class='code'>@link libsbml#InvalidSpeciesReference InvalidSpeciesReference@endlink</td>
63305    <td class='meaning'>Invalid 'species' attribute value in SpeciesReference object</td>
63306    <td class='s-error'></td>
63307    <td class='s-error'></td>
63308    <td class='s-error'></td>
63309    <td class='s-error'></td>
63310    <td class='s-error'></td>
63311    <td class='s-error'></td>
63312    <td class='s-error'></td>
63313    <td class='s-error'></td>
63314    </tr>
63315    <tr><td class='code'>@link libsbml#BothStoichiometryAndMath BothStoichiometryAndMath@endlink</td>
63316    <td class='meaning'>The 'stoichiometry' attribute and StoichiometryMath subobject are mutually exclusive</td>
63317    <td class='s-na'></td>
63318    <td class='s-na'></td>
63319    <td class='s-error'></td>
63320    <td class='s-error'></td>
63321    <td class='s-error'></td>
63322    <td class='s-error'></td>
63323    <td class='s-na'></td>
63324    <td class='s-na'></td>
63325    </tr>
63326    <tr><td class='code'>@link libsbml#AllowedAttributesOnSpeciesReference AllowedAttributesOnSpeciesReference@endlink</td>
63327    <td class='meaning'>Invalid attribute found on the SpeciesReference object</td>
63328    <td class='s-na'></td>
63329    <td class='s-na'></td>
63330    <td class='s-na'></td>
63331    <td class='s-na'></td>
63332    <td class='s-na'></td>
63333    <td class='s-na'></td>
63334    <td class='s-error'></td>
63335    <td class='s-error'></td>
63336    </tr>
63337    <tr><td class='code'>@link libsbml#AllowedAttributesOnModifier AllowedAttributesOnModifier@endlink</td>
63338    <td class='meaning'>Invalid attribute found on the ModifierSpeciesReference object</td>
63339    <td class='s-na'></td>
63340    <td class='s-na'></td>
63341    <td class='s-na'></td>
63342    <td class='s-na'></td>
63343    <td class='s-na'></td>
63344    <td class='s-na'></td>
63345    <td class='s-error'></td>
63346    <td class='s-error'></td>
63347    </tr>
63348    <tr><td class='code'>@link libsbml#UndeclaredSpeciesRef UndeclaredSpeciesRef@endlink</td>
63349    <td class='meaning'>Unknown species referenced in the kinetic law <code>&lt;math&gt;</code> formula</td>
63350    <td class='s-na'></td>
63351    <td class='s-na'></td>
63352    <td class='s-error'></td>
63353    <td class='s-error'></td>
63354    <td class='s-error'></td>
63355    <td class='s-error'></td>
63356    <td class='s-error'></td>
63357    <td class='s-error'></td>
63358    </tr>
63359    <tr><td class='code'>@link libsbml#IncorrectOrderInKineticLaw IncorrectOrderInKineticLaw@endlink</td>
63360    <td class='meaning'>Incorrect ordering of components in the KineticLaw object</td>
63361    <td class='s-na'></td>
63362    <td class='s-na'></td>
63363    <td class='s-error'></td>
63364    <td class='s-error'></td>
63365    <td class='s-error'></td>
63366    <td class='s-error'></td>
63367    <td class='s-na'></td>
63368    <td class='s-na'></td>
63369    </tr>
63370    <tr><td class='code'>@link libsbml#EmptyListInKineticLaw EmptyListInKineticLaw@endlink</td>
63371    <td class='meaning'>The list of parameters, if present, cannot be empty</td>
63372    <td class='s-error'></td>
63373    <td class='s-error'></td>
63374    <td class='s-error'></td>
63375    <td class='s-error'></td>
63376    <td class='s-error'></td>
63377    <td class='s-error'></td>
63378    <td class='s-error'></td>
63379    <td class='s-na'></td>
63380    </tr>
63381    <tr><td class='code'>@link libsbml#NonConstantLocalParameter NonConstantLocalParameter@endlink</td>
63382    <td class='meaning'>Parameters local to a KineticLaw object must have a 'constant' attribute value of 'true'</td>
63383    <td class='s-na'></td>
63384    <td class='s-na'></td>
63385    <td class='s-warning'></td>
63386    <td class='s-error'></td>
63387    <td class='s-error'></td>
63388    <td class='s-error'></td>
63389    <td class='s-na'></td>
63390    <td class='s-na'></td>
63391    </tr>
63392    <tr><td class='code'>@link libsbml#SubsUnitsNoLongerValid SubsUnitsNoLongerValid@endlink</td>
63393    <td class='meaning'>Attribute 'substanceUnits' is not supported in this Level+Version of SBML</td>
63394    <td class='s-na'></td>
63395    <td class='s-na'></td>
63396    <td class='s-na'></td>
63397    <td class='s-error'></td>
63398    <td class='s-error'></td>
63399    <td class='s-error'></td>
63400    <td class='s-na'></td>
63401    <td class='s-na'></td>
63402    </tr>
63403    <tr><td class='code'>@link libsbml#TimeUnitsNoLongerValid TimeUnitsNoLongerValid@endlink</td>
63404    <td class='meaning'>Attribute 'timeUnits' is not supported in this Level+Version of SBML</td>
63405    <td class='s-na'></td>
63406    <td class='s-na'></td>
63407    <td class='s-na'></td>
63408    <td class='s-error'></td>
63409    <td class='s-error'></td>
63410    <td class='s-error'></td>
63411    <td class='s-na'></td>
63412    <td class='s-na'></td>
63413    </tr>
63414    <tr><td class='code'>@link libsbml#OneListOfPerKineticLaw OneListOfPerKineticLaw@endlink</td>
63415    <td class='meaning'>Only one ListOfLocalParameters object is permitted within a KineticLaw object</td>
63416    <td class='s-na'></td>
63417    <td class='s-na'></td>
63418    <td class='s-na'></td>
63419    <td class='s-na'></td>
63420    <td class='s-na'></td>
63421    <td class='s-na'></td>
63422    <td class='s-error'></td>
63423    <td class='s-error'></td>
63424    </tr>
63425    <tr><td class='code'>@link libsbml#OnlyLocalParamsInListOfLocalParams OnlyLocalParamsInListOfLocalParams@endlink</td>
63426    <td class='meaning'>Only LocalParameter, Notes and Annotation objects are allowed in ListOfLocalParameter objects</td>
63427    <td class='s-na'></td>
63428    <td class='s-na'></td>
63429    <td class='s-na'></td>
63430    <td class='s-na'></td>
63431    <td class='s-na'></td>
63432    <td class='s-na'></td>
63433    <td class='s-error'></td>
63434    <td class='s-error'></td>
63435    </tr>
63436    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfLocalParam AllowedAttributesOnListOfLocalParam@endlink</td>
63437    <td class='meaning'>Invalid attribute found on the ListOfLocalParameters object</td>
63438    <td class='s-na'></td>
63439    <td class='s-na'></td>
63440    <td class='s-na'></td>
63441    <td class='s-na'></td>
63442    <td class='s-na'></td>
63443    <td class='s-na'></td>
63444    <td class='s-error'></td>
63445    <td class='s-error'></td>
63446    </tr>
63447    <tr><td class='code'>@link libsbml#OneMathPerKineticLaw OneMathPerKineticLaw@endlink</td>
63448    <td class='meaning'>Only one <code>&lt;math&gt;</code> element is allowed in a KineticLaw object</td>
63449    <td class='s-na'></td>
63450    <td class='s-na'></td>
63451    <td class='s-error'></td>
63452    <td class='s-error'></td>
63453    <td class='s-error'></td>
63454    <td class='s-error'></td>
63455    <td class='s-error'></td>
63456    <td class='s-error'></td>
63457    </tr>
63458    <tr><td class='code'>@link libsbml#UndeclaredSpeciesInStoichMath UndeclaredSpeciesInStoichMath@endlink</td>
63459    <td class='meaning'>Unknown species referenced in the StoichiometryMath object's <code>&lt;math&gt;</code> formula</td>
63460    <td class='s-na'></td>
63461    <td class='s-na'></td>
63462    <td class='s-warning'></td>
63463    <td class='s-error'></td>
63464    <td class='s-error'></td>
63465    <td class='s-error'></td>
63466    <td class='s-na'></td>
63467    <td class='s-na'></td>
63468    </tr>
63469    <tr><td class='code'>@link libsbml#AllowedAttributesOnKineticLaw AllowedAttributesOnKineticLaw@endlink</td>
63470    <td class='meaning'>Invalid attribute found on the KineticLaw object</td>
63471    <td class='s-na'></td>
63472    <td class='s-na'></td>
63473    <td class='s-na'></td>
63474    <td class='s-na'></td>
63475    <td class='s-na'></td>
63476    <td class='s-na'></td>
63477    <td class='s-error'></td>
63478    <td class='s-error'></td>
63479    </tr>
63480    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfSpeciesRef AllowedAttributesOnListOfSpeciesRef@endlink</td>
63481    <td class='meaning'>Invalid attribute found on the ListOfSpeciesReferences object</td>
63482    <td class='s-na'></td>
63483    <td class='s-na'></td>
63484    <td class='s-na'></td>
63485    <td class='s-na'></td>
63486    <td class='s-na'></td>
63487    <td class='s-na'></td>
63488    <td class='s-error'></td>
63489    <td class='s-error'></td>
63490    </tr>
63491    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfMods AllowedAttributesOnListOfMods@endlink</td>
63492    <td class='meaning'>Invalid attribute found on the ListOfModifiers object</td>
63493    <td class='s-na'></td>
63494    <td class='s-na'></td>
63495    <td class='s-na'></td>
63496    <td class='s-na'></td>
63497    <td class='s-na'></td>
63498    <td class='s-na'></td>
63499    <td class='s-error'></td>
63500    <td class='s-error'></td>
63501    </tr>
63502    <tr><td class='code'>@link libsbml#L3V2FastDeprecated L3V2FastDeprecated@endlink</td>
63503    <td class='meaning'>Fast attribute deprecated</td>
63504    <td class='s-na'></td>
63505    <td class='s-na'></td>
63506    <td class='s-na'></td>
63507    <td class='s-na'></td>
63508    <td class='s-na'></td>
63509    <td class='s-na'></td>
63510    <td class='s-na'></td>
63511    <td class='s-warning'></td>
63512    </tr>
63513    <tr><td class='code'>@link libsbml#AllowedAttributesOnLocalParameter AllowedAttributesOnLocalParameter@endlink</td>
63514    <td class='meaning'>Invalid attribute found on the LocalParameter object</td>
63515    <td class='s-na'></td>
63516    <td class='s-na'></td>
63517    <td class='s-na'></td>
63518    <td class='s-na'></td>
63519    <td class='s-na'></td>
63520    <td class='s-na'></td>
63521    <td class='s-error'></td>
63522    <td class='s-error'></td>
63523    </tr>
63524    <tr><td class='code'>@link libsbml#LocalParameterShadowsSpecies LocalParameterShadowsSpecies@endlink</td>
63525    <td class='meaning'>Invalid attribute found on the LocalParameter object</td>
63526    <td class='s-na'></td>
63527    <td class='s-na'></td>
63528    <td class='s-na'></td>
63529    <td class='s-na'></td>
63530    <td class='s-na'></td>
63531    <td class='s-na'></td>
63532    <td class='s-warning'></td>
63533    <td class='s-error'></td>
63534    </tr>
63535    <tr><td class='code'>@link libsbml#MissingTriggerInEvent MissingTriggerInEvent@endlink</td>
63536    <td class='meaning'>The Event object is missing a Trigger subobject</td>
63537    <td class='s-na'></td>
63538    <td class='s-na'></td>
63539    <td class='s-error'></td>
63540    <td class='s-error'></td>
63541    <td class='s-error'></td>
63542    <td class='s-error'></td>
63543    <td class='s-error'></td>
63544    <td class='s-error'></td>
63545    </tr>
63546    <tr><td class='code'>@link libsbml#TriggerMathNotBoolean TriggerMathNotBoolean@endlink</td>
63547    <td class='meaning'>A Trigger object's <code>&lt;math&gt;</code> expression must evaluate to a Boolean value</td>
63548    <td class='s-na'></td>
63549    <td class='s-na'></td>
63550    <td class='s-error'></td>
63551    <td class='s-error'></td>
63552    <td class='s-error'></td>
63553    <td class='s-error'></td>
63554    <td class='s-error'></td>
63555    <td class='s-na'></td>
63556    </tr>
63557    <tr><td class='code'>@link libsbml#MissingEventAssignment MissingEventAssignment@endlink</td>
63558    <td class='meaning'>The Event object is missing an EventAssignment subobject</td>
63559    <td class='s-na'></td>
63560    <td class='s-na'></td>
63561    <td class='s-error'></td>
63562    <td class='s-error'></td>
63563    <td class='s-error'></td>
63564    <td class='s-error'></td>
63565    <td class='s-error'></td>
63566    <td class='s-na'></td>
63567    </tr>
63568    <tr><td class='code'>@link libsbml#TimeUnitsEvent TimeUnitsEvent@endlink</td>
63569    <td class='meaning'>Units referenced by 'timeUnits' attribute are not compatible with units of time</td>
63570    <td class='s-na'></td>
63571    <td class='s-na'></td>
63572    <td class='s-error'></td>
63573    <td class='s-error'></td>
63574    <td class='s-na'></td>
63575    <td class='s-na'></td>
63576    <td class='s-na'></td>
63577    <td class='s-na'></td>
63578    </tr>
63579    <tr><td class='code'>@link libsbml#IncorrectOrderInEvent IncorrectOrderInEvent@endlink</td>
63580    <td class='meaning'>Incorrect ordering of components in Event object</td>
63581    <td class='s-na'></td>
63582    <td class='s-na'></td>
63583    <td class='s-error'></td>
63584    <td class='s-error'></td>
63585    <td class='s-error'></td>
63586    <td class='s-error'></td>
63587    <td class='s-na'></td>
63588    <td class='s-na'></td>
63589    </tr>
63590    <tr><td class='code'>@link libsbml#ValuesFromTriggerTimeNeedDelay ValuesFromTriggerTimeNeedDelay@endlink</td>
63591    <td class='meaning'>Attribute 'useValuesFromTriggerTime'='false', but the Event object does not define a delay</td>
63592    <td class='s-na'></td>
63593    <td class='s-na'></td>
63594    <td class='s-na'></td>
63595    <td class='s-na'></td>
63596    <td class='s-na'></td>
63597    <td class='s-error'></td>
63598    <td class='s-na'></td>
63599    <td class='s-na'></td>
63600    </tr>
63601    <tr><td class='code'>@link libsbml#DelayNeedsValuesFromTriggerTime DelayNeedsValuesFromTriggerTime@endlink</td>
63602    <td class='meaning'>The use of a Delay object requires the Event attribute 'useValuesFromTriggerTime'</td>
63603    <td class='s-na'></td>
63604    <td class='s-na'></td>
63605    <td class='s-na'></td>
63606    <td class='s-na'></td>
63607    <td class='s-na'></td>
63608    <td class='s-na'></td>
63609    <td class='s-na'></td>
63610    <td class='s-na'></td>
63611    </tr>
63612    <tr><td class='code'>@link libsbml#OneMathPerTrigger OneMathPerTrigger@endlink</td>
63613    <td class='meaning'>A Trigger object may have one <code>&lt;math&gt;</code> element</td>
63614    <td class='s-na'></td>
63615    <td class='s-na'></td>
63616    <td class='s-na'></td>
63617    <td class='s-na'></td>
63618    <td class='s-na'></td>
63619    <td class='s-na'></td>
63620    <td class='s-error'></td>
63621    <td class='s-error'></td>
63622    </tr>
63623    <tr><td class='code'>@link libsbml#OneMathPerDelay OneMathPerDelay@endlink</td>
63624    <td class='meaning'>A Delay object may have one <code>&lt;math&gt;</code> element</td>
63625    <td class='s-na'></td>
63626    <td class='s-na'></td>
63627    <td class='s-na'></td>
63628    <td class='s-na'></td>
63629    <td class='s-na'></td>
63630    <td class='s-na'></td>
63631    <td class='s-error'></td>
63632    <td class='s-error'></td>
63633    </tr>
63634    <tr><td class='code'>@link libsbml#InvalidEventAssignmentVariable InvalidEventAssignmentVariable@endlink</td>
63635    <td class='meaning'>Invalid 'variable' attribute value in Event object</td>
63636    <td class='s-na'></td>
63637    <td class='s-na'></td>
63638    <td class='s-error'></td>
63639    <td class='s-error'></td>
63640    <td class='s-error'></td>
63641    <td class='s-error'></td>
63642    <td class='s-error'></td>
63643    <td class='s-error'></td>
63644    </tr>
63645    <tr><td class='code'>@link libsbml#EventAssignmentForConstantEntity EventAssignmentForConstantEntity@endlink</td>
63646    <td class='meaning'>An EventAssignment object cannot assign to a component having attribute 'constant'='true'</td>
63647    <td class='s-na'></td>
63648    <td class='s-na'></td>
63649    <td class='s-warning'></td>
63650    <td class='s-error'></td>
63651    <td class='s-error'></td>
63652    <td class='s-error'></td>
63653    <td class='s-error'></td>
63654    <td class='s-error'></td>
63655    </tr>
63656    <tr><td class='code'>@link libsbml#OneMathPerEventAssignment OneMathPerEventAssignment@endlink</td>
63657    <td class='meaning'>An EventAssignment object may have one <code>&lt;math&gt;</code> element</td>
63658    <td class='s-na'></td>
63659    <td class='s-na'></td>
63660    <td class='s-na'></td>
63661    <td class='s-na'></td>
63662    <td class='s-na'></td>
63663    <td class='s-na'></td>
63664    <td class='s-error'></td>
63665    <td class='s-error'></td>
63666    </tr>
63667    <tr><td class='code'>@link libsbml#AllowedAttributesOnEventAssignment AllowedAttributesOnEventAssignment@endlink</td>
63668    <td class='meaning'>Invalid attribute found on the EventAssignment object</td>
63669    <td class='s-na'></td>
63670    <td class='s-na'></td>
63671    <td class='s-na'></td>
63672    <td class='s-na'></td>
63673    <td class='s-na'></td>
63674    <td class='s-na'></td>
63675    <td class='s-error'></td>
63676    <td class='s-error'></td>
63677    </tr>
63678    <tr><td class='code'>@link libsbml#OnlyOneDelayPerEvent OnlyOneDelayPerEvent@endlink</td>
63679    <td class='meaning'>An Event object can only have one Delay subobject</td>
63680    <td class='s-na'></td>
63681    <td class='s-na'></td>
63682    <td class='s-na'></td>
63683    <td class='s-na'></td>
63684    <td class='s-na'></td>
63685    <td class='s-na'></td>
63686    <td class='s-error'></td>
63687    <td class='s-error'></td>
63688    </tr>
63689    <tr><td class='code'>@link libsbml#OneListOfEventAssignmentsPerEvent OneListOfEventAssignmentsPerEvent@endlink</td>
63690    <td class='meaning'>An Event object can only have one ListOfEventAssignments subobject</td>
63691    <td class='s-na'></td>
63692    <td class='s-na'></td>
63693    <td class='s-na'></td>
63694    <td class='s-na'></td>
63695    <td class='s-na'></td>
63696    <td class='s-na'></td>
63697    <td class='s-error'></td>
63698    <td class='s-error'></td>
63699    </tr>
63700    <tr><td class='code'>@link libsbml#OnlyEventAssignInListOfEventAssign OnlyEventAssignInListOfEventAssign@endlink</td>
63701    <td class='meaning'>Only EventAssignment, Notes and Annotation objects are allowed in ListOfEventAssignments</td>
63702    <td class='s-na'></td>
63703    <td class='s-na'></td>
63704    <td class='s-na'></td>
63705    <td class='s-na'></td>
63706    <td class='s-na'></td>
63707    <td class='s-na'></td>
63708    <td class='s-error'></td>
63709    <td class='s-error'></td>
63710    </tr>
63711    <tr><td class='code'>@link libsbml#AllowedAttributesOnListOfEventAssign AllowedAttributesOnListOfEventAssign@endlink</td>
63712    <td class='meaning'>Invalid attribute found on the ListOfEventAssignments object</td>
63713    <td class='s-na'></td>
63714    <td class='s-na'></td>
63715    <td class='s-na'></td>
63716    <td class='s-na'></td>
63717    <td class='s-na'></td>
63718    <td class='s-na'></td>
63719    <td class='s-error'></td>
63720    <td class='s-error'></td>
63721    </tr>
63722    <tr><td class='code'>@link libsbml#AllowedAttributesOnEvent AllowedAttributesOnEvent@endlink</td>
63723    <td class='meaning'>Invalid attribute found on the Event object</td>
63724    <td class='s-na'></td>
63725    <td class='s-na'></td>
63726    <td class='s-na'></td>
63727    <td class='s-na'></td>
63728    <td class='s-na'></td>
63729    <td class='s-na'></td>
63730    <td class='s-error'></td>
63731    <td class='s-error'></td>
63732    </tr>
63733    <tr><td class='code'>@link libsbml#AllowedAttributesOnTrigger AllowedAttributesOnTrigger@endlink</td>
63734    <td class='meaning'>Invalid attribute found on the Trigger object</td>
63735    <td class='s-na'></td>
63736    <td class='s-na'></td>
63737    <td class='s-na'></td>
63738    <td class='s-na'></td>
63739    <td class='s-na'></td>
63740    <td class='s-na'></td>
63741    <td class='s-error'></td>
63742    <td class='s-error'></td>
63743    </tr>
63744    <tr><td class='code'>@link libsbml#AllowedAttributesOnDelay AllowedAttributesOnDelay@endlink</td>
63745    <td class='meaning'>Invalid attribute found on the Delay object</td>
63746    <td class='s-na'></td>
63747    <td class='s-na'></td>
63748    <td class='s-na'></td>
63749    <td class='s-na'></td>
63750    <td class='s-na'></td>
63751    <td class='s-na'></td>
63752    <td class='s-error'></td>
63753    <td class='s-error'></td>
63754    </tr>
63755    <tr><td class='code'>@link libsbml#PersistentNotBoolean PersistentNotBoolean@endlink</td>
63756    <td class='meaning'>The Trigger attribute 'persistent' must evaluate to a Boolean value</td>
63757    <td class='s-na'></td>
63758    <td class='s-na'></td>
63759    <td class='s-na'></td>
63760    <td class='s-na'></td>
63761    <td class='s-na'></td>
63762    <td class='s-na'></td>
63763    <td class='s-error'></td>
63764    <td class='s-error'></td>
63765    </tr>
63766    <tr><td class='code'>@link libsbml#InitialValueNotBoolean InitialValueNotBoolean@endlink</td>
63767    <td class='meaning'>The Trigger attribute 'initialValue' must evaluate to a Boolean value</td>
63768    <td class='s-na'></td>
63769    <td class='s-na'></td>
63770    <td class='s-na'></td>
63771    <td class='s-na'></td>
63772    <td class='s-na'></td>
63773    <td class='s-na'></td>
63774    <td class='s-error'></td>
63775    <td class='s-error'></td>
63776    </tr>
63777    <tr><td class='code'>@link libsbml#OnlyOnePriorityPerEvent OnlyOnePriorityPerEvent@endlink</td>
63778    <td class='meaning'>An Event object can only have one Priority subobject</td>
63779    <td class='s-na'></td>
63780    <td class='s-na'></td>
63781    <td class='s-na'></td>
63782    <td class='s-na'></td>
63783    <td class='s-na'></td>
63784    <td class='s-na'></td>
63785    <td class='s-error'></td>
63786    <td class='s-error'></td>
63787    </tr>
63788    <tr><td class='code'>@link libsbml#OneMathPerPriority OneMathPerPriority@endlink</td>
63789    <td class='meaning'>A Priority object may have one <code>&lt;math&gt;</code> element</td>
63790    <td class='s-na'></td>
63791    <td class='s-na'></td>
63792    <td class='s-na'></td>
63793    <td class='s-na'></td>
63794    <td class='s-na'></td>
63795    <td class='s-na'></td>
63796    <td class='s-error'></td>
63797    <td class='s-error'></td>
63798    </tr>
63799    <tr><td class='code'>@link libsbml#AllowedAttributesOnPriority AllowedAttributesOnPriority@endlink</td>
63800    <td class='meaning'>Invalid attribute found on the Priority object</td>
63801    <td class='s-na'></td>
63802    <td class='s-na'></td>
63803    <td class='s-na'></td>
63804    <td class='s-na'></td>
63805    <td class='s-na'></td>
63806    <td class='s-na'></td>
63807    <td class='s-error'></td>
63808    <td class='s-error'></td>
63809    </tr>
63810    <tr><td class='code'>@link libsbml#CompartmentShouldHaveSize CompartmentShouldHaveSize@endlink</td>
63811    <td class='meaning'>It's best to define a size for every compartment in a model</td>
63812    <td class='s-na'></td>
63813    <td class='s-na'></td>
63814    <td class='s-warning'></td>
63815    <td class='s-warning'></td>
63816    <td class='s-warning'></td>
63817    <td class='s-warning'></td>
63818    <td class='s-warning'></td>
63819    <td class='s-warning'></td>
63820    </tr>
63821    <tr><td class='code'>@link libsbml#SpeciesShouldHaveValue SpeciesShouldHaveValue@endlink</td>
63822    <td class='meaning'>It's best to define an initial amount or initial concentration for every species in a model</td>
63823    <td class='s-na'></td>
63824    <td class='s-na'></td>
63825    <td class='s-warning'></td>
63826    <td class='s-warning'></td>
63827    <td class='s-warning'></td>
63828    <td class='s-warning'></td>
63829    <td class='s-warning'></td>
63830    <td class='s-warning'></td>
63831    </tr>
63832    <tr><td class='code'>@link libsbml#ParameterShouldHaveUnits ParameterShouldHaveUnits@endlink</td>
63833    <td class='meaning'>It's best to declare units for every parameter in a model</td>
63834    <td class='s-warning'></td>
63835    <td class='s-warning'></td>
63836    <td class='s-warning'></td>
63837    <td class='s-warning'></td>
63838    <td class='s-warning'></td>
63839    <td class='s-warning'></td>
63840    <td class='s-warning'></td>
63841    <td class='s-warning'></td>
63842    </tr>
63843    <tr><td class='code'>@link libsbml#ParameterShouldHaveValue ParameterShouldHaveValue@endlink</td>
63844    <td class='meaning'>It's best to declare values for every parameter in a model</td>
63845    <td class='s-warning'></td>
63846    <td class='s-warning'></td>
63847    <td class='s-warning'></td>
63848    <td class='s-warning'></td>
63849    <td class='s-warning'></td>
63850    <td class='s-warning'></td>
63851    <td class='s-warning'></td>
63852    <td class='s-warning'></td>
63853    </tr>
63854    <tr><td class='code'>@link libsbml#LocalParameterShadowsId LocalParameterShadowsId@endlink</td>
63855    <td class='meaning'>Local parameters defined within a kinetic law shadow global object symbols</td>
63856    <td class='s-warning'></td>
63857    <td class='s-warning'></td>
63858    <td class='s-warning'></td>
63859    <td class='s-warning'></td>
63860    <td class='s-warning'></td>
63861    <td class='s-warning'></td>
63862    <td class='s-warning'></td>
63863    <td class='s-warning'></td>
63864    </tr>
63865    <tr><td class='code'>@link libsbml#CannotConvertToL1V1 CannotConvertToL1V1@endlink</td>
63866    <td class='meaning'>Cannot convert to SBML Level 1 Version 1</td>
63867    <td class='s-na'></td>
63868    <td class='s-error'></td>
63869    <td class='s-error'></td>
63870    <td class='s-error'></td>
63871    <td class='s-error'></td>
63872    <td class='s-error'></td>
63873    <td class='s-error'></td>
63874    <td class='s-error'></td>
63875    </tr>
63876    <tr><td class='code'>@link libsbml#NoEventsInL1 NoEventsInL1@endlink</td>
63877    <td class='meaning'>SBML Level 1 does not support events</td>
63878    <td class='s-na'></td>
63879    <td class='s-na'></td>
63880    <td class='s-error'></td>
63881    <td class='s-error'></td>
63882    <td class='s-error'></td>
63883    <td class='s-error'></td>
63884    <td class='s-error'></td>
63885    <td class='s-error'></td>
63886    </tr>
63887    <tr><td class='code'>@link libsbml#NoFunctionDefinitionsInL1 NoFunctionDefinitionsInL1@endlink</td>
63888    <td class='meaning'>SBML Level 1 does not support function definitions</td>
63889    <td class='s-na'></td>
63890    <td class='s-na'></td>
63891    <td class='s-warning'></td>
63892    <td class='s-warning'></td>
63893    <td class='s-warning'></td>
63894    <td class='s-warning'></td>
63895    <td class='s-warning'></td>
63896    <td class='s-warning'></td>
63897    </tr>
63898    <tr><td class='code'>@link libsbml#NoConstraintsInL1 NoConstraintsInL1@endlink</td>
63899    <td class='meaning'>SBML Level 1 does not support constraints</td>
63900    <td class='s-na'></td>
63901    <td class='s-na'></td>
63902    <td class='s-na'></td>
63903    <td class='s-warning'></td>
63904    <td class='s-warning'></td>
63905    <td class='s-warning'></td>
63906    <td class='s-warning'></td>
63907    <td class='s-warning'></td>
63908    </tr>
63909    <tr><td class='code'>@link libsbml#NoInitialAssignmentsInL1 NoInitialAssignmentsInL1@endlink</td>
63910    <td class='meaning'>SBML Level 1 does not support initial assignments</td>
63911    <td class='s-na'></td>
63912    <td class='s-na'></td>
63913    <td class='s-na'></td>
63914    <td class='s-warning'></td>
63915    <td class='s-warning'></td>
63916    <td class='s-warning'></td>
63917    <td class='s-warning'></td>
63918    <td class='s-warning'></td>
63919    </tr>
63920    <tr><td class='code'>@link libsbml#NoSpeciesTypesInL1 NoSpeciesTypesInL1@endlink</td>
63921    <td class='meaning'>SBML Level 1 does not support species types</td>
63922    <td class='s-na'></td>
63923    <td class='s-na'></td>
63924    <td class='s-na'></td>
63925    <td class='s-warning'></td>
63926    <td class='s-warning'></td>
63927    <td class='s-warning'></td>
63928    <td class='s-na'></td>
63929    <td class='s-na'></td>
63930    </tr>
63931    <tr><td class='code'>@link libsbml#NoCompartmentTypeInL1 NoCompartmentTypeInL1@endlink</td>
63932    <td class='meaning'>SBML Level 1 does not support compartment types</td>
63933    <td class='s-na'></td>
63934    <td class='s-na'></td>
63935    <td class='s-na'></td>
63936    <td class='s-warning'></td>
63937    <td class='s-warning'></td>
63938    <td class='s-warning'></td>
63939    <td class='s-na'></td>
63940    <td class='s-na'></td>
63941    </tr>
63942    <tr><td class='code'>@link libsbml#NoNon3DCompartmentsInL1 NoNon3DCompartmentsInL1@endlink</td>
63943    <td class='meaning'>SBML Level 1 only supports three-dimensional compartments</td>
63944    <td class='s-na'></td>
63945    <td class='s-na'></td>
63946    <td class='s-error'></td>
63947    <td class='s-error'></td>
63948    <td class='s-error'></td>
63949    <td class='s-error'></td>
63950    <td class='s-error'></td>
63951    <td class='s-error'></td>
63952    </tr>
63953    <tr><td class='code'>@link libsbml#NoFancyStoichiometryMathInL1 NoFancyStoichiometryMathInL1@endlink</td>
63954    <td class='meaning'>SBML Level 1 does not support non-integer nor non-rational stoichiometry formulas</td>
63955    <td class='s-na'></td>
63956    <td class='s-na'></td>
63957    <td class='s-error'></td>
63958    <td class='s-error'></td>
63959    <td class='s-error'></td>
63960    <td class='s-error'></td>
63961    <td class='s-error'></td>
63962    <td class='s-error'></td>
63963    </tr>
63964    <tr><td class='code'>@link libsbml#NoNonIntegerStoichiometryInL1 NoNonIntegerStoichiometryInL1@endlink</td>
63965    <td class='meaning'>SBML Level 1 does not support non-integer 'stoichiometry' attribute values</td>
63966    <td class='s-na'></td>
63967    <td class='s-na'></td>
63968    <td class='s-error'></td>
63969    <td class='s-error'></td>
63970    <td class='s-error'></td>
63971    <td class='s-error'></td>
63972    <td class='s-error'></td>
63973    <td class='s-error'></td>
63974    </tr>
63975    <tr><td class='code'>@link libsbml#NoUnitMultipliersOrOffsetsInL1 NoUnitMultipliersOrOffsetsInL1@endlink</td>
63976    <td class='meaning'>SBML Level 1 does not support multipliers or offsets in unit definitions</td>
63977    <td class='s-na'></td>
63978    <td class='s-na'></td>
63979    <td class='s-error'></td>
63980    <td class='s-error'></td>
63981    <td class='s-error'></td>
63982    <td class='s-error'></td>
63983    <td class='s-error'></td>
63984    <td class='s-error'></td>
63985    </tr>
63986    <tr><td class='code'>@link libsbml#SpeciesCompartmentRequiredInL1 SpeciesCompartmentRequiredInL1@endlink</td>
63987    <td class='meaning'>In SBML Level 1, a value for 'compartment' is mandatory in species definitions</td>
63988    <td class='s-na'></td>
63989    <td class='s-na'></td>
63990    <td class='s-error'></td>
63991    <td class='s-error'></td>
63992    <td class='s-error'></td>
63993    <td class='s-error'></td>
63994    <td class='s-error'></td>
63995    <td class='s-error'></td>
63996    </tr>
63997    <tr><td class='code'>@link libsbml#NoSpeciesSpatialSizeUnitsInL1 NoSpeciesSpatialSizeUnitsInL1@endlink</td>
63998    <td class='meaning'>SBML Level 1 does not support species 'spatialSizeUnits' settings</td>
63999    <td class='s-na'></td>
64000    <td class='s-na'></td>
64001    <td class='s-error'></td>
64002    <td class='s-error'></td>
64003    <td class='s-error'></td>
64004    <td class='s-error'></td>
64005    <td class='s-na'></td>
64006    <td class='s-na'></td>
64007    </tr>
64008    <tr><td class='code'>@link libsbml#NoSBOTermsInL1 NoSBOTermsInL1@endlink</td>
64009    <td class='meaning'>SBML Level 1 does not support the 'sboTerm' attribute</td>
64010    <td class='s-na'></td>
64011    <td class='s-na'></td>
64012    <td class='s-na'></td>
64013    <td class='s-warning'></td>
64014    <td class='s-warning'></td>
64015    <td class='s-warning'></td>
64016    <td class='s-warning'></td>
64017    <td class='s-warning'></td>
64018    </tr>
64019    <tr><td class='code'>@link libsbml#StrictUnitsRequiredInL1 StrictUnitsRequiredInL1@endlink</td>
64020    <td class='meaning'>SBML Level 1 requires strict unit consistency</td>
64021    <td class='s-na'></td>
64022    <td class='s-na'></td>
64023    <td class='s-na'></td>
64024    <td class='s-na'></td>
64025    <td class='s-na'></td>
64026    <td class='s-error'></td>
64027    <td class='s-error'></td>
64028    <td class='s-error'></td>
64029    </tr>
64030    <tr><td class='code'>@link libsbml#ConversionFactorNotInL1 ConversionFactorNotInL1@endlink</td>
64031    <td class='meaning'>SBML Level 1 does not support the 'conversionFactor' attribute</td>
64032    <td class='s-na'></td>
64033    <td class='s-na'></td>
64034    <td class='s-na'></td>
64035    <td class='s-na'></td>
64036    <td class='s-na'></td>
64037    <td class='s-na'></td>
64038    <td class='s-error'></td>
64039    <td class='s-error'></td>
64040    </tr>
64041    <tr><td class='code'>@link libsbml#CompartmentNotOnL1Reaction CompartmentNotOnL1Reaction@endlink</td>
64042    <td class='meaning'>SBML Level 1 does not support the 'compartment' attribute on Reaction objects</td>
64043    <td class='s-na'></td>
64044    <td class='s-na'></td>
64045    <td class='s-na'></td>
64046    <td class='s-na'></td>
64047    <td class='s-na'></td>
64048    <td class='s-na'></td>
64049    <td class='s-warning'></td>
64050    <td class='s-warning'></td>
64051    </tr>
64052    <tr><td class='code'>@link libsbml#ExtentUnitsNotSubstance ExtentUnitsNotSubstance@endlink</td>
64053    <td class='meaning'>Units of extent must be compatible with units of substance</td>
64054    <td class='s-na'></td>
64055    <td class='s-na'></td>
64056    <td class='s-na'></td>
64057    <td class='s-na'></td>
64058    <td class='s-na'></td>
64059    <td class='s-na'></td>
64060    <td class='s-error'></td>
64061    <td class='s-error'></td>
64062    </tr>
64063    <tr><td class='code'>@link libsbml#GlobalUnitsNotDeclared GlobalUnitsNotDeclared@endlink</td>
64064    <td class='meaning'>Global units must be refer to unit kind or unitDefinition</td>
64065    <td class='s-na'></td>
64066    <td class='s-na'></td>
64067    <td class='s-na'></td>
64068    <td class='s-na'></td>
64069    <td class='s-na'></td>
64070    <td class='s-na'></td>
64071    <td class='s-error'></td>
64072    <td class='s-error'></td>
64073    </tr>
64074    <tr><td class='code'>@link libsbml#HasOnlySubstanceUnitsNotinL1 HasOnlySubstanceUnitsNotinL1@endlink</td>
64075    <td class='meaning'>The concept of hasOnlySubstanceUnits was not available in SBML Level 1</td>
64076    <td class='s-na'></td>
64077    <td class='s-na'></td>
64078    <td class='s-error'></td>
64079    <td class='s-error'></td>
64080    <td class='s-error'></td>
64081    <td class='s-error'></td>
64082    <td class='s-error'></td>
64083    <td class='s-error'></td>
64084    </tr>
64085    <tr><td class='code'>@link libsbml#AvogadroNotSupported AvogadroNotSupported@endlink</td>
64086    <td class='meaning'>Avogadro not supported in Levels 2 and 1</td>
64087    <td class='s-na'></td>
64088    <td class='s-na'></td>
64089    <td class='s-na'></td>
64090    <td class='s-na'></td>
64091    <td class='s-na'></td>
64092    <td class='s-na'></td>
64093    <td class='s-error'></td>
64094    <td class='s-error'></td>
64095    </tr>
64096    <tr><td class='code'>@link libsbml#NoConstraintsInL2v1 NoConstraintsInL2v1@endlink</td>
64097    <td class='meaning'>SBML Level 2 Version 1 does not support Constraint objects</td>
64098    <td class='s-na'></td>
64099    <td class='s-na'></td>
64100    <td class='s-na'></td>
64101    <td class='s-warning'></td>
64102    <td class='s-warning'></td>
64103    <td class='s-warning'></td>
64104    <td class='s-warning'></td>
64105    <td class='s-warning'></td>
64106    </tr>
64107    <tr><td class='code'>@link libsbml#NoInitialAssignmentsInL2v1 NoInitialAssignmentsInL2v1@endlink</td>
64108    <td class='meaning'>SBML Level 2 Version 1 does not support InitialAssignment objects</td>
64109    <td class='s-na'></td>
64110    <td class='s-na'></td>
64111    <td class='s-na'></td>
64112    <td class='s-warning'></td>
64113    <td class='s-warning'></td>
64114    <td class='s-warning'></td>
64115    <td class='s-warning'></td>
64116    <td class='s-warning'></td>
64117    </tr>
64118    <tr><td class='code'>@link libsbml#NoSpeciesTypeInL2v1 NoSpeciesTypeInL2v1@endlink</td>
64119    <td class='meaning'>SBML Level 2 Version 1 does not support SpeciesType objects</td>
64120    <td class='s-na'></td>
64121    <td class='s-na'></td>
64122    <td class='s-na'></td>
64123    <td class='s-warning'></td>
64124    <td class='s-warning'></td>
64125    <td class='s-warning'></td>
64126    <td class='s-na'></td>
64127    <td class='s-na'></td>
64128    </tr>
64129    <tr><td class='code'>@link libsbml#NoCompartmentTypeInL2v1 NoCompartmentTypeInL2v1@endlink</td>
64130    <td class='meaning'>SBML Level 2 Version 1 does not support CompartmentType objects</td>
64131    <td class='s-na'></td>
64132    <td class='s-na'></td>
64133    <td class='s-na'></td>
64134    <td class='s-warning'></td>
64135    <td class='s-warning'></td>
64136    <td class='s-warning'></td>
64137    <td class='s-na'></td>
64138    <td class='s-na'></td>
64139    </tr>
64140    <tr><td class='code'>@link libsbml#NoSBOTermsInL2v1 NoSBOTermsInL2v1@endlink</td>
64141    <td class='meaning'>SBML Level 2 Version 1 does not support the 'sboTerm' attribute</td>
64142    <td class='s-na'></td>
64143    <td class='s-na'></td>
64144    <td class='s-na'></td>
64145    <td class='s-warning'></td>
64146    <td class='s-warning'></td>
64147    <td class='s-warning'></td>
64148    <td class='s-warning'></td>
64149    <td class='s-warning'></td>
64150    </tr>
64151    <tr><td class='code'>@link libsbml#NoIdOnSpeciesReferenceInL2v1 NoIdOnSpeciesReferenceInL2v1@endlink</td>
64152    <td class='meaning'>SBML Level 2 Version 1 does not support the 'id' attribute on SpeciesReference objects</td>
64153    <td class='s-na'></td>
64154    <td class='s-na'></td>
64155    <td class='s-na'></td>
64156    <td class='s-warning'></td>
64157    <td class='s-warning'></td>
64158    <td class='s-warning'></td>
64159    <td class='s-warning'></td>
64160    <td class='s-warning'></td>
64161    </tr>
64162    <tr><td class='code'>@link libsbml#NoDelayedEventAssignmentInL2v1 NoDelayedEventAssignmentInL2v1@endlink</td>
64163    <td class='meaning'>SBML Level 2 Version 1 does not support the 'useValuesFromTriggerTime' attribute</td>
64164    <td class='s-na'></td>
64165    <td class='s-na'></td>
64166    <td class='s-na'></td>
64167    <td class='s-na'></td>
64168    <td class='s-na'></td>
64169    <td class='s-error'></td>
64170    <td class='s-error'></td>
64171    <td class='s-error'></td>
64172    </tr>
64173    <tr><td class='code'>@link libsbml#StrictUnitsRequiredInL2v1 StrictUnitsRequiredInL2v1@endlink</td>
64174    <td class='meaning'>SBML Level 2 Version 1 requires strict unit consistency</td>
64175    <td class='s-na'></td>
64176    <td class='s-na'></td>
64177    <td class='s-na'></td>
64178    <td class='s-na'></td>
64179    <td class='s-na'></td>
64180    <td class='s-error'></td>
64181    <td class='s-error'></td>
64182    <td class='s-error'></td>
64183    </tr>
64184    <tr><td class='code'>@link libsbml#IntegerSpatialDimensions IntegerSpatialDimensions@endlink</td>
64185    <td class='meaning'>SBML Level 2 Version 1 requires that compartments have spatial dimensions of 0-3</td>
64186    <td class='s-na'></td>
64187    <td class='s-na'></td>
64188    <td class='s-na'></td>
64189    <td class='s-na'></td>
64190    <td class='s-na'></td>
64191    <td class='s-na'></td>
64192    <td class='s-error'></td>
64193    <td class='s-error'></td>
64194    </tr>
64195    <tr><td class='code'>@link libsbml#StoichiometryMathNotYetSupported StoichiometryMathNotYetSupported@endlink</td>
64196    <td class='meaning'>Conversion to StoichiometryMath objects not yet supported</td>
64197    <td class='s-na'></td>
64198    <td class='s-na'></td>
64199    <td class='s-na'></td>
64200    <td class='s-na'></td>
64201    <td class='s-na'></td>
64202    <td class='s-na'></td>
64203    <td class='s-na'></td>
64204    <td class='s-na'></td>
64205    </tr>
64206    <tr><td class='code'>@link libsbml#PriorityLostFromL3 PriorityLostFromL3@endlink</td>
64207    <td class='meaning'>SBML Level 2 Version 1 does not support priorities on Event objects</td>
64208    <td class='s-na'></td>
64209    <td class='s-na'></td>
64210    <td class='s-na'></td>
64211    <td class='s-na'></td>
64212    <td class='s-na'></td>
64213    <td class='s-na'></td>
64214    <td class='s-error'></td>
64215    <td class='s-error'></td>
64216    </tr>
64217    <tr><td class='code'>@link libsbml#NonPersistentNotSupported NonPersistentNotSupported@endlink</td>
64218    <td class='meaning'>SBML Level 2 Version 1 does not support the 'persistent' attribute on Trigger objects</td>
64219    <td class='s-na'></td>
64220    <td class='s-na'></td>
64221    <td class='s-na'></td>
64222    <td class='s-na'></td>
64223    <td class='s-na'></td>
64224    <td class='s-na'></td>
64225    <td class='s-error'></td>
64226    <td class='s-error'></td>
64227    </tr>
64228    <tr><td class='code'>@link libsbml#InitialValueFalseEventNotSupported InitialValueFalseEventNotSupported@endlink</td>
64229    <td class='meaning'>SBML Level 2 Version 1 does not support the 'initialValue' attribute on Trigger objects</td>
64230    <td class='s-na'></td>
64231    <td class='s-na'></td>
64232    <td class='s-na'></td>
64233    <td class='s-na'></td>
64234    <td class='s-na'></td>
64235    <td class='s-na'></td>
64236    <td class='s-error'></td>
64237    <td class='s-error'></td>
64238    </tr>
64239    <tr><td class='code'>@link libsbml#SBOTermNotUniversalInL2v2 SBOTermNotUniversalInL2v2@endlink</td>
64240    <td class='meaning'>The 'sboTerm' attribute is invalid for this component in SBML Level 2 Version 2</td>
64241    <td class='s-na'></td>
64242    <td class='s-na'></td>
64243    <td class='s-na'></td>
64244    <td class='s-na'></td>
64245    <td class='s-warning'></td>
64246    <td class='s-warning'></td>
64247    <td class='s-warning'></td>
64248    <td class='s-warning'></td>
64249    </tr>
64250    <tr><td class='code'>@link libsbml#NoUnitOffsetInL2v2 NoUnitOffsetInL2v2@endlink</td>
64251    <td class='meaning'>This Level+Version of SBML does not support the 'offset' attribute on Unit objects</td>
64252    <td class='s-na'></td>
64253    <td class='s-na'></td>
64254    <td class='s-error'></td>
64255    <td class='s-na'></td>
64256    <td class='s-na'></td>
64257    <td class='s-na'></td>
64258    <td class='s-na'></td>
64259    <td class='s-na'></td>
64260    </tr>
64261    <tr><td class='code'>@link libsbml#NoKineticLawTimeUnitsInL2v2 NoKineticLawTimeUnitsInL2v2@endlink</td>
64262    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects</td>
64263    <td class='s-error'></td>
64264    <td class='s-error'></td>
64265    <td class='s-error'></td>
64266    <td class='s-na'></td>
64267    <td class='s-na'></td>
64268    <td class='s-na'></td>
64269    <td class='s-na'></td>
64270    <td class='s-na'></td>
64271    </tr>
64272    <tr><td class='code'>@link libsbml#NoKineticLawSubstanceUnitsInL2v2 NoKineticLawSubstanceUnitsInL2v2@endlink</td>
64273    <td class='meaning'>This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects</td>
64274    <td class='s-error'></td>
64275    <td class='s-error'></td>
64276    <td class='s-error'></td>
64277    <td class='s-na'></td>
64278    <td class='s-na'></td>
64279    <td class='s-na'></td>
64280    <td class='s-na'></td>
64281    <td class='s-na'></td>
64282    </tr>
64283    <tr><td class='code'>@link libsbml#NoDelayedEventAssignmentInL2v2 NoDelayedEventAssignmentInL2v2@endlink</td>
64284    <td class='meaning'>This Level+Version of SBML does not support the 'useValuesFromTriggerTime' attribute</td>
64285    <td class='s-na'></td>
64286    <td class='s-na'></td>
64287    <td class='s-na'></td>
64288    <td class='s-na'></td>
64289    <td class='s-na'></td>
64290    <td class='s-error'></td>
64291    <td class='s-error'></td>
64292    <td class='s-error'></td>
64293    </tr>
64294    <tr><td class='code'>@link libsbml#ModelSBOBranchChangedBeyondL2v2 ModelSBOBranchChangedBeyondL2v2@endlink</td>
64295    <td class='meaning'>The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version</td>
64296    <td class='s-na'></td>
64297    <td class='s-na'></td>
64298    <td class='s-na'></td>
64299    <td class='s-na'></td>
64300    <td class='s-na'></td>
64301    <td class='s-error'></td>
64302    <td class='s-error'></td>
64303    <td class='s-error'></td>
64304    </tr>
64305    <tr><td class='code'>@link libsbml#StrictUnitsRequiredInL2v2 StrictUnitsRequiredInL2v2@endlink</td>
64306    <td class='meaning'>SBML Level 2 Version 2 requires strict unit consistency</td>
64307    <td class='s-na'></td>
64308    <td class='s-na'></td>
64309    <td class='s-na'></td>
64310    <td class='s-na'></td>
64311    <td class='s-na'></td>
64312    <td class='s-error'></td>
64313    <td class='s-error'></td>
64314    <td class='s-error'></td>
64315    </tr>
64316    <tr><td class='code'>@link libsbml#StrictSBORequiredInL2v2 StrictSBORequiredInL2v2@endlink</td>
64317    <td class='meaning'>SBML Level 2 Version 2 requires strict SBO term consistency</td>
64318    <td class='s-na'></td>
64319    <td class='s-na'></td>
64320    <td class='s-na'></td>
64321    <td class='s-na'></td>
64322    <td class='s-na'></td>
64323    <td class='s-warning'></td>
64324    <td class='s-warning'></td>
64325    <td class='s-warning'></td>
64326    </tr>
64327    <tr><td class='code'>@link libsbml#DuplicateAnnotationInvalidInL2v2 DuplicateAnnotationInvalidInL2v2@endlink</td>
64328    <td class='meaning'>Duplicate top-level annotations are invalid in SBML Level 2 Version 2</td>
64329    <td class='s-warning'></td>
64330    <td class='s-warning'></td>
64331    <td class='s-warning'></td>
64332    <td class='s-na'></td>
64333    <td class='s-na'></td>
64334    <td class='s-na'></td>
64335    <td class='s-na'></td>
64336    <td class='s-na'></td>
64337    </tr>
64338    <tr><td class='code'>@link libsbml#NoUnitOffsetInL2v3 NoUnitOffsetInL2v3@endlink</td>
64339    <td class='meaning'>This Level+Version of SBML does not support the 'offset' attribute on Unit objects</td>
64340    <td class='s-na'></td>
64341    <td class='s-na'></td>
64342    <td class='s-error'></td>
64343    <td class='s-na'></td>
64344    <td class='s-na'></td>
64345    <td class='s-na'></td>
64346    <td class='s-na'></td>
64347    <td class='s-na'></td>
64348    </tr>
64349    <tr><td class='code'>@link libsbml#NoKineticLawTimeUnitsInL2v3 NoKineticLawTimeUnitsInL2v3@endlink</td>
64350    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects</td>
64351    <td class='s-error'></td>
64352    <td class='s-error'></td>
64353    <td class='s-error'></td>
64354    <td class='s-na'></td>
64355    <td class='s-na'></td>
64356    <td class='s-na'></td>
64357    <td class='s-na'></td>
64358    <td class='s-na'></td>
64359    </tr>
64360    <tr><td class='code'>@link libsbml#NoKineticLawSubstanceUnitsInL2v3 NoKineticLawSubstanceUnitsInL2v3@endlink</td>
64361    <td class='meaning'>This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects</td>
64362    <td class='s-error'></td>
64363    <td class='s-error'></td>
64364    <td class='s-error'></td>
64365    <td class='s-na'></td>
64366    <td class='s-na'></td>
64367    <td class='s-na'></td>
64368    <td class='s-na'></td>
64369    <td class='s-na'></td>
64370    </tr>
64371    <tr><td class='code'>@link libsbml#NoSpeciesSpatialSizeUnitsInL2v3 NoSpeciesSpatialSizeUnitsInL2v3@endlink</td>
64372    <td class='meaning'>This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objects</td>
64373    <td class='s-na'></td>
64374    <td class='s-na'></td>
64375    <td class='s-error'></td>
64376    <td class='s-error'></td>
64377    <td class='s-na'></td>
64378    <td class='s-na'></td>
64379    <td class='s-na'></td>
64380    <td class='s-na'></td>
64381    </tr>
64382    <tr><td class='code'>@link libsbml#NoEventTimeUnitsInL2v3 NoEventTimeUnitsInL2v3@endlink</td>
64383    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects</td>
64384    <td class='s-na'></td>
64385    <td class='s-na'></td>
64386    <td class='s-error'></td>
64387    <td class='s-error'></td>
64388    <td class='s-na'></td>
64389    <td class='s-na'></td>
64390    <td class='s-na'></td>
64391    <td class='s-na'></td>
64392    </tr>
64393    <tr><td class='code'>@link libsbml#NoDelayedEventAssignmentInL2v3 NoDelayedEventAssignmentInL2v3@endlink</td>
64394    <td class='meaning'>This Level+Version of SBML does not support the 'useValuesFromTriggerTime' attribute</td>
64395    <td class='s-na'></td>
64396    <td class='s-na'></td>
64397    <td class='s-na'></td>
64398    <td class='s-na'></td>
64399    <td class='s-na'></td>
64400    <td class='s-error'></td>
64401    <td class='s-error'></td>
64402    <td class='s-error'></td>
64403    </tr>
64404    <tr><td class='code'>@link libsbml#ModelSBOBranchChangedBeyondL2v3 ModelSBOBranchChangedBeyondL2v3@endlink</td>
64405    <td class='meaning'>The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version</td>
64406    <td class='s-na'></td>
64407    <td class='s-na'></td>
64408    <td class='s-na'></td>
64409    <td class='s-na'></td>
64410    <td class='s-na'></td>
64411    <td class='s-error'></td>
64412    <td class='s-error'></td>
64413    <td class='s-error'></td>
64414    </tr>
64415    <tr><td class='code'>@link libsbml#StrictUnitsRequiredInL2v3 StrictUnitsRequiredInL2v3@endlink</td>
64416    <td class='meaning'>SBML Level 2 Version 3 requires strict unit consistency</td>
64417    <td class='s-na'></td>
64418    <td class='s-na'></td>
64419    <td class='s-na'></td>
64420    <td class='s-na'></td>
64421    <td class='s-na'></td>
64422    <td class='s-error'></td>
64423    <td class='s-error'></td>
64424    <td class='s-error'></td>
64425    </tr>
64426    <tr><td class='code'>@link libsbml#StrictSBORequiredInL2v3 StrictSBORequiredInL2v3@endlink</td>
64427    <td class='meaning'>SBML Level 2 Version 3 requires strict SBO term consistency</td>
64428    <td class='s-na'></td>
64429    <td class='s-na'></td>
64430    <td class='s-na'></td>
64431    <td class='s-na'></td>
64432    <td class='s-na'></td>
64433    <td class='s-warning'></td>
64434    <td class='s-warning'></td>
64435    <td class='s-warning'></td>
64436    </tr>
64437    <tr><td class='code'>@link libsbml#DuplicateAnnotationInvalidInL2v3 DuplicateAnnotationInvalidInL2v3@endlink</td>
64438    <td class='meaning'>Duplicate top-level annotations are invalid in SBML Level 2 Version 3</td>
64439    <td class='s-warning'></td>
64440    <td class='s-warning'></td>
64441    <td class='s-warning'></td>
64442    <td class='s-na'></td>
64443    <td class='s-na'></td>
64444    <td class='s-na'></td>
64445    <td class='s-na'></td>
64446    <td class='s-na'></td>
64447    </tr>
64448    <tr><td class='code'>@link libsbml#NoUnitOffsetInL2v4 NoUnitOffsetInL2v4@endlink</td>
64449    <td class='meaning'>This Level+Version of SBML does not support the 'offset' attribute on Unit objects</td>
64450    <td class='s-na'></td>
64451    <td class='s-na'></td>
64452    <td class='s-error'></td>
64453    <td class='s-na'></td>
64454    <td class='s-na'></td>
64455    <td class='s-na'></td>
64456    <td class='s-na'></td>
64457    <td class='s-na'></td>
64458    </tr>
64459    <tr><td class='code'>@link libsbml#NoKineticLawTimeUnitsInL2v4 NoKineticLawTimeUnitsInL2v4@endlink</td>
64460    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects</td>
64461    <td class='s-error'></td>
64462    <td class='s-error'></td>
64463    <td class='s-error'></td>
64464    <td class='s-na'></td>
64465    <td class='s-na'></td>
64466    <td class='s-na'></td>
64467    <td class='s-na'></td>
64468    <td class='s-na'></td>
64469    </tr>
64470    <tr><td class='code'>@link libsbml#NoKineticLawSubstanceUnitsInL2v4 NoKineticLawSubstanceUnitsInL2v4@endlink</td>
64471    <td class='meaning'>This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects</td>
64472    <td class='s-error'></td>
64473    <td class='s-error'></td>
64474    <td class='s-error'></td>
64475    <td class='s-na'></td>
64476    <td class='s-na'></td>
64477    <td class='s-na'></td>
64478    <td class='s-na'></td>
64479    <td class='s-na'></td>
64480    </tr>
64481    <tr><td class='code'>@link libsbml#NoSpeciesSpatialSizeUnitsInL2v4 NoSpeciesSpatialSizeUnitsInL2v4@endlink</td>
64482    <td class='meaning'>This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objects</td>
64483    <td class='s-na'></td>
64484    <td class='s-na'></td>
64485    <td class='s-error'></td>
64486    <td class='s-error'></td>
64487    <td class='s-na'></td>
64488    <td class='s-na'></td>
64489    <td class='s-na'></td>
64490    <td class='s-na'></td>
64491    </tr>
64492    <tr><td class='code'>@link libsbml#NoEventTimeUnitsInL2v4 NoEventTimeUnitsInL2v4@endlink</td>
64493    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects</td>
64494    <td class='s-na'></td>
64495    <td class='s-na'></td>
64496    <td class='s-error'></td>
64497    <td class='s-error'></td>
64498    <td class='s-na'></td>
64499    <td class='s-na'></td>
64500    <td class='s-na'></td>
64501    <td class='s-na'></td>
64502    </tr>
64503    <tr><td class='code'>@link libsbml#ModelSBOBranchChangedInL2v4 ModelSBOBranchChangedInL2v4@endlink</td>
64504    <td class='meaning'>The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version</td>
64505    <td class='s-na'></td>
64506    <td class='s-na'></td>
64507    <td class='s-na'></td>
64508    <td class='s-error'></td>
64509    <td class='s-error'></td>
64510    <td class='s-na'></td>
64511    <td class='s-na'></td>
64512    <td class='s-na'></td>
64513    </tr>
64514    <tr><td class='code'>@link libsbml#DuplicateAnnotationInvalidInL2v4 DuplicateAnnotationInvalidInL2v4@endlink</td>
64515    <td class='meaning'>Duplicate top-level annotations are invalid in SBML Level 2 Version 4</td>
64516    <td class='s-warning'></td>
64517    <td class='s-warning'></td>
64518    <td class='s-warning'></td>
64519    <td class='s-na'></td>
64520    <td class='s-na'></td>
64521    <td class='s-na'></td>
64522    <td class='s-na'></td>
64523    <td class='s-na'></td>
64524    </tr>
64525    <tr><td class='code'>@link libsbml#NoSpeciesTypeInL3v1 NoSpeciesTypeInL3v1@endlink</td>
64526    <td class='meaning'>SBML Level 3 Version 1 does not support SpeciesType objects</td>
64527    <td class='s-na'></td>
64528    <td class='s-na'></td>
64529    <td class='s-na'></td>
64530    <td class='s-warning'></td>
64531    <td class='s-warning'></td>
64532    <td class='s-warning'></td>
64533    <td class='s-na'></td>
64534    <td class='s-na'></td>
64535    </tr>
64536    <tr><td class='code'>@link libsbml#NoCompartmentTypeInL3v1 NoCompartmentTypeInL3v1@endlink</td>
64537    <td class='meaning'>SBML Level 3 Version 1 does not support CompartmentType objects</td>
64538    <td class='s-na'></td>
64539    <td class='s-na'></td>
64540    <td class='s-na'></td>
64541    <td class='s-warning'></td>
64542    <td class='s-warning'></td>
64543    <td class='s-warning'></td>
64544    <td class='s-na'></td>
64545    <td class='s-na'></td>
64546    </tr>
64547    <tr><td class='code'>@link libsbml#NoUnitOffsetInL3v1 NoUnitOffsetInL3v1@endlink</td>
64548    <td class='meaning'>This Level+Version of SBML does not support the 'offset' attribute on Unit objects</td>
64549    <td class='s-na'></td>
64550    <td class='s-na'></td>
64551    <td class='s-error'></td>
64552    <td class='s-na'></td>
64553    <td class='s-na'></td>
64554    <td class='s-na'></td>
64555    <td class='s-na'></td>
64556    <td class='s-na'></td>
64557    </tr>
64558    <tr><td class='code'>@link libsbml#NoKineticLawTimeUnitsInL3v1 NoKineticLawTimeUnitsInL3v1@endlink</td>
64559    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on KineticLaw objects</td>
64560    <td class='s-error'></td>
64561    <td class='s-error'></td>
64562    <td class='s-error'></td>
64563    <td class='s-na'></td>
64564    <td class='s-na'></td>
64565    <td class='s-na'></td>
64566    <td class='s-na'></td>
64567    <td class='s-na'></td>
64568    </tr>
64569    <tr><td class='code'>@link libsbml#NoKineticLawSubstanceUnitsInL3v1 NoKineticLawSubstanceUnitsInL3v1@endlink</td>
64570    <td class='meaning'>This Level+Version of SBML does not support the 'substanceUnits' attribute on KineticLaw objects</td>
64571    <td class='s-error'></td>
64572    <td class='s-error'></td>
64573    <td class='s-error'></td>
64574    <td class='s-na'></td>
64575    <td class='s-na'></td>
64576    <td class='s-na'></td>
64577    <td class='s-na'></td>
64578    <td class='s-na'></td>
64579    </tr>
64580    <tr><td class='code'>@link libsbml#NoSpeciesSpatialSizeUnitsInL3v1 NoSpeciesSpatialSizeUnitsInL3v1@endlink</td>
64581    <td class='meaning'>This Level+Version of SBML does not support the 'spatialSizeUnit' attribute on Species objects</td>
64582    <td class='s-na'></td>
64583    <td class='s-na'></td>
64584    <td class='s-error'></td>
64585    <td class='s-error'></td>
64586    <td class='s-na'></td>
64587    <td class='s-na'></td>
64588    <td class='s-na'></td>
64589    <td class='s-na'></td>
64590    </tr>
64591    <tr><td class='code'>@link libsbml#NoEventTimeUnitsInL3v1 NoEventTimeUnitsInL3v1@endlink</td>
64592    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects</td>
64593    <td class='s-na'></td>
64594    <td class='s-na'></td>
64595    <td class='s-error'></td>
64596    <td class='s-error'></td>
64597    <td class='s-na'></td>
64598    <td class='s-na'></td>
64599    <td class='s-na'></td>
64600    <td class='s-na'></td>
64601    </tr>
64602    <tr><td class='code'>@link libsbml#ModelSBOBranchChangedInL3v1 ModelSBOBranchChangedInL3v1@endlink</td>
64603    <td class='meaning'>The allowable 'sboTerm' attribute values for Model objects differ for this SBML Level+Version</td>
64604    <td class='s-na'></td>
64605    <td class='s-na'></td>
64606    <td class='s-na'></td>
64607    <td class='s-error'></td>
64608    <td class='s-error'></td>
64609    <td class='s-na'></td>
64610    <td class='s-na'></td>
64611    <td class='s-na'></td>
64612    </tr>
64613    <tr><td class='code'>@link libsbml#DuplicateAnnotationInvalidInL3v1 DuplicateAnnotationInvalidInL3v1@endlink</td>
64614    <td class='meaning'>Duplicate top-level annotations are invalid in SBML Level 3 Version 1</td>
64615    <td class='s-warning'></td>
64616    <td class='s-warning'></td>
64617    <td class='s-warning'></td>
64618    <td class='s-na'></td>
64619    <td class='s-na'></td>
64620    <td class='s-na'></td>
64621    <td class='s-na'></td>
64622    <td class='s-na'></td>
64623    </tr>
64624    <tr><td class='code'>@link libsbml#NoCompartmentOutsideInL3v1 NoCompartmentOutsideInL3v1@endlink</td>
64625    <td class='meaning'>This Level+Version of SBML does not support the 'outside' attribute on Compartment objects</td>
64626    <td class='s-warning'></td>
64627    <td class='s-warning'></td>
64628    <td class='s-warning'></td>
64629    <td class='s-warning'></td>
64630    <td class='s-warning'></td>
64631    <td class='s-warning'></td>
64632    <td class='s-na'></td>
64633    <td class='s-na'></td>
64634    </tr>
64635    <tr><td class='code'>@link libsbml#NoStoichiometryMathInL3v1 NoStoichiometryMathInL3v1@endlink</td>
64636    <td class='meaning'>This Level+Version of SBML does not support the StoichiometryMath object</td>
64637    <td class='s-na'></td>
64638    <td class='s-na'></td>
64639    <td class='s-error'></td>
64640    <td class='s-error'></td>
64641    <td class='s-error'></td>
64642    <td class='s-error'></td>
64643    <td class='s-na'></td>
64644    <td class='s-na'></td>
64645    </tr>
64646    <tr><td class='code'>@link libsbml#DoubleExponentNotSupported DoubleExponentNotSupported@endlink</td>
64647    <td class='meaning'>Exponent of type double not supported in Levels 2 and 1.</td>
64648    <td class='s-error'></td>
64649    <td class='s-error'></td>
64650    <td class='s-error'></td>
64651    <td class='s-error'></td>
64652    <td class='s-error'></td>
64653    <td class='s-error'></td>
64654    <td class='s-na'></td>
64655    <td class='s-na'></td>
64656    </tr>
64657    <tr><td class='code'>@link libsbml#MathMLElementNotSupported MathMLElementNotSupported@endlink</td>
64658    <td class='meaning'>This MathML element is only permitted in L3V2</td>
64659    <td class='s-error'></td>
64660    <td class='s-error'></td>
64661    <td class='s-error'></td>
64662    <td class='s-error'></td>
64663    <td class='s-error'></td>
64664    <td class='s-error'></td>
64665    <td class='s-error'></td>
64666    <td class='s-na'></td>
64667    </tr>
64668    <tr><td class='code'>@link libsbml#EmptyListOfElementNotSupported EmptyListOfElementNotSupported@endlink</td>
64669    <td class='meaning'>Empty 'ListOf' element is only permitted in L3V2</td>
64670    <td class='s-warning'></td>
64671    <td class='s-warning'></td>
64672    <td class='s-warning'></td>
64673    <td class='s-warning'></td>
64674    <td class='s-warning'></td>
64675    <td class='s-warning'></td>
64676    <td class='s-warning'></td>
64677    <td class='s-na'></td>
64678    </tr>
64679    <tr><td class='code'>@link libsbml#MissingMathElementNotSupported MissingMathElementNotSupported@endlink</td>
64680    <td class='meaning'>Missing <code>&lt;math&gt;</code> element is only permitted in L3V2</td>
64681    <td class='s-warning'></td>
64682    <td class='s-warning'></td>
64683    <td class='s-warning'></td>
64684    <td class='s-warning'></td>
64685    <td class='s-warning'></td>
64686    <td class='s-warning'></td>
64687    <td class='s-warning'></td>
64688    <td class='s-na'></td>
64689    </tr>
64690    <tr><td class='code'>@link libsbml#MissingTriggerElementNotSupported MissingTriggerElementNotSupported@endlink</td>
64691    <td class='meaning'>missing <code>&lt;trigger&gt;</code> element is only permitted in L3V2</td>
64692    <td class='s-na'></td>
64693    <td class='s-na'></td>
64694    <td class='s-warning'></td>
64695    <td class='s-warning'></td>
64696    <td class='s-warning'></td>
64697    <td class='s-warning'></td>
64698    <td class='s-warning'></td>
64699    <td class='s-na'></td>
64700    </tr>
64701    <tr><td class='code'>@link libsbml#BooleanNumericDiscrepancy BooleanNumericDiscrepancy@endlink</td>
64702    <td class='meaning'>Interchange of Boolean and numeric values only permitted in L3V2</td>
64703    <td class='s-error'></td>
64704    <td class='s-error'></td>
64705    <td class='s-error'></td>
64706    <td class='s-error'></td>
64707    <td class='s-error'></td>
64708    <td class='s-error'></td>
64709    <td class='s-error'></td>
64710    <td class='s-na'></td>
64711    </tr>
64712    <tr><td class='code'>@link libsbml#IdNameSBaseInL3V2 IdNameSBaseInL3V2@endlink</td>
64713    <td class='meaning'>Conversion will lose attributes only available in L3V2 and higher</td>
64714    <td class='s-warning'></td>
64715    <td class='s-warning'></td>
64716    <td class='s-warning'></td>
64717    <td class='s-warning'></td>
64718    <td class='s-warning'></td>
64719    <td class='s-warning'></td>
64720    <td class='s-warning'></td>
64721    <td class='s-na'></td>
64722    </tr>
64723    <tr><td class='code'>@link libsbml#MissingParticipantsNotSupported MissingParticipantsNotSupported@endlink</td>
64724    <td class='meaning'>Omission of both <code>&lt;listOfReactants&gt;</code> and <code>&lt;listOfProducts&gt;</code> is only valid in L3V2</td>
64725    <td class='s-error'></td>
64726    <td class='s-error'></td>
64727    <td class='s-error'></td>
64728    <td class='s-error'></td>
64729    <td class='s-error'></td>
64730    <td class='s-error'></td>
64731    <td class='s-error'></td>
64732    <td class='s-na'></td>
64733    </tr>
64734    <tr><td class='code'>@link libsbml#ConvertibleMathInitialAssignment ConvertibleMathInitialAssignment@endlink</td>
64735    <td class='meaning'>Some L3V2-specific MathML elements are not permitted in InitialAssignment objects</td>
64736    <td class='s-warning'></td>
64737    <td class='s-warning'></td>
64738    <td class='s-warning'></td>
64739    <td class='s-warning'></td>
64740    <td class='s-warning'></td>
64741    <td class='s-warning'></td>
64742    <td class='s-warning'></td>
64743    <td class='s-na'></td>
64744    </tr>
64745    <tr><td class='code'>@link libsbml#FastReactionsNotSupported FastReactionsNotSupported@endlink</td>
64746    <td class='meaning'>Conversion of reactions employing the 'fast' attribute is not supported</td>
64747    <td class='s-error'></td>
64748    <td class='s-error'></td>
64749    <td class='s-error'></td>
64750    <td class='s-error'></td>
64751    <td class='s-error'></td>
64752    <td class='s-error'></td>
64753    <td class='s-error'></td>
64754    <td class='s-na'></td>
64755    </tr>
64756    <tr><td class='code'>@link libsbml#InvalidSBMLLevelVersion InvalidSBMLLevelVersion@endlink</td>
64757    <td class='meaning'>Unknown Level+Version combination of SBML</td>
64758    <td class='s-error'></td>
64759    <td class='s-error'></td>
64760    <td class='s-error'></td>
64761    <td class='s-error'></td>
64762    <td class='s-error'></td>
64763    <td class='s-error'></td>
64764    <td class='s-error'></td>
64765    <td class='s-error'></td>
64766    </tr>
64767    <tr><td class='code'>@link libsbml#AnnotationNotesNotAllowedLevel1 AnnotationNotesNotAllowedLevel1@endlink</td>
64768    <td class='meaning'>Annotation objects on the SBML container element are not permitted in SBML Level 1</td>
64769    <td class='s-error'></td>
64770    <td class='s-error'></td>
64771    <td class='s-na'></td>
64772    <td class='s-na'></td>
64773    <td class='s-na'></td>
64774    <td class='s-na'></td>
64775    <td class='s-na'></td>
64776    <td class='s-na'></td>
64777    </tr>
64778    <tr><td class='code'>@link libsbml#InvalidRuleOrdering InvalidRuleOrdering@endlink</td>
64779    <td class='meaning'>Invalid ordering of rules</td>
64780    <td class='s-error'></td>
64781    <td class='s-error'></td>
64782    <td class='s-error'></td>
64783    <td class='s-na'></td>
64784    <td class='s-na'></td>
64785    <td class='s-na'></td>
64786    <td class='s-na'></td>
64787    <td class='s-na'></td>
64788    </tr>
64789    <tr><td class='code'>@link libsbml#RequiredPackagePresent RequiredPackagePresent@endlink</td>
64790    <td class='meaning'>The SBML document requires an SBML Level 3 package unavailable in this software</td>
64791    <td class='s-na'></td>
64792    <td class='s-na'></td>
64793    <td class='s-na'></td>
64794    <td class='s-na'></td>
64795    <td class='s-na'></td>
64796    <td class='s-na'></td>
64797    <td class='s-error'></td>
64798    <td class='s-error'></td>
64799    </tr>
64800    <tr><td class='code'>@link libsbml#UnrequiredPackagePresent UnrequiredPackagePresent@endlink</td>
64801    <td class='meaning'>The SBML document uses an SBML Level 3 package unavailable in this software</td>
64802    <td class='s-na'></td>
64803    <td class='s-na'></td>
64804    <td class='s-na'></td>
64805    <td class='s-na'></td>
64806    <td class='s-na'></td>
64807    <td class='s-na'></td>
64808    <td class='s-warning'></td>
64809    <td class='s-warning'></td>
64810    </tr>
64811    <tr><td class='code'>@link libsbml#PackageRequiredShouldBeFalse PackageRequiredShouldBeFalse@endlink</td>
64812    <td class='meaning'>This package expects required to be false</td>
64813    <td class='s-na'></td>
64814    <td class='s-na'></td>
64815    <td class='s-na'></td>
64816    <td class='s-na'></td>
64817    <td class='s-na'></td>
64818    <td class='s-na'></td>
64819    <td class='s-warning'></td>
64820    <td class='s-warning'></td>
64821    </tr>
64822    <tr><td class='code'>@link libsbml#SubsUnitsAllowedInKL SubsUnitsAllowedInKL@endlink</td>
64823    <td class='meaning'>Disallowed value for attribute 'substanceUnits' on KineticLaw object</td>
64824    <td class='s-error'></td>
64825    <td class='s-error'></td>
64826    <td class='s-error'></td>
64827    <td class='s-na'></td>
64828    <td class='s-na'></td>
64829    <td class='s-na'></td>
64830    <td class='s-na'></td>
64831    <td class='s-na'></td>
64832    </tr>
64833    <tr><td class='code'>@link libsbml#TimeUnitsAllowedInKL TimeUnitsAllowedInKL@endlink</td>
64834    <td class='meaning'>Disallowed value for attribute 'timeUnits' on KineticLaw object</td>
64835    <td class='s-error'></td>
64836    <td class='s-error'></td>
64837    <td class='s-error'></td>
64838    <td class='s-na'></td>
64839    <td class='s-na'></td>
64840    <td class='s-na'></td>
64841    <td class='s-na'></td>
64842    <td class='s-na'></td>
64843    </tr>
64844    <tr><td class='code'>@link libsbml#FormulaInLevel1KL FormulaInLevel1KL@endlink</td>
64845    <td class='meaning'>Only predefined functions are allowed in SBML Level 1 formulas</td>
64846    <td class='s-error'></td>
64847    <td class='s-error'></td>
64848    <td class='s-na'></td>
64849    <td class='s-na'></td>
64850    <td class='s-na'></td>
64851    <td class='s-na'></td>
64852    <td class='s-na'></td>
64853    <td class='s-na'></td>
64854    </tr>
64855    <tr><td class='code'>@link libsbml#L3SubstanceUnitsOnModel L3SubstanceUnitsOnModel@endlink</td>
64856    <td class='meaning'>Invalid 'substanceUnits' attribute value</td>
64857    <td class='s-na'></td>
64858    <td class='s-na'></td>
64859    <td class='s-na'></td>
64860    <td class='s-na'></td>
64861    <td class='s-na'></td>
64862    <td class='s-na'></td>
64863    <td class='s-warning'></td>
64864    <td class='s-na'></td>
64865    </tr>
64866    <tr><td class='code'>@link libsbml#StoichiometryMathMissingMath StoichiometryMathMissingMath@endlink</td>
64867    <td class='meaning'>The <code>&lt;stoichiometryMath&gt;</code> element must contain a <code>&lt;math&gt;</code> element</td>
64868    <td class='s-na'></td>
64869    <td class='s-na'></td>
64870    <td class='s-error'></td>
64871    <td class='s-error'></td>
64872    <td class='s-error'></td>
64873    <td class='s-error'></td>
64874    <td class='s-na'></td>
64875    <td class='s-na'></td>
64876    </tr>
64877    <tr><td class='code'>@link libsbml#TimeUnitsRemoved TimeUnitsRemoved@endlink</td>
64878    <td class='meaning'>This Level+Version of SBML does not support the 'timeUnits' attribute on Event objects</td>
64879    <td class='s-na'></td>
64880    <td class='s-na'></td>
64881    <td class='s-na'></td>
64882    <td class='s-na'></td>
64883    <td class='s-error'></td>
64884    <td class='s-error'></td>
64885    <td class='s-error'></td>
64886    <td class='s-error'></td>
64887    </tr>
64888    <tr><td class='code'>@link libsbml#BadMathML BadMathML@endlink</td>
64889    <td class='meaning'>Invalid MathML expression</td>
64890    <td class='s-na'></td>
64891    <td class='s-na'></td>
64892    <td class='s-error'></td>
64893    <td class='s-error'></td>
64894    <td class='s-error'></td>
64895    <td class='s-error'></td>
64896    <td class='s-error'></td>
64897    <td class='s-error'></td>
64898    </tr>
64899    <tr><td class='code'>@link libsbml#FailedMathMLReadOfDouble FailedMathMLReadOfDouble@endlink</td>
64900    <td class='meaning'>Missing or invalid floating-point number in MathML expression</td>
64901    <td class='s-na'></td>
64902    <td class='s-na'></td>
64903    <td class='s-error'></td>
64904    <td class='s-error'></td>
64905    <td class='s-error'></td>
64906    <td class='s-error'></td>
64907    <td class='s-error'></td>
64908    <td class='s-error'></td>
64909    </tr>
64910    <tr><td class='code'>@link libsbml#FailedMathMLReadOfInteger FailedMathMLReadOfInteger@endlink</td>
64911    <td class='meaning'>Missing or invalid integer in MathML expression</td>
64912    <td class='s-na'></td>
64913    <td class='s-na'></td>
64914    <td class='s-error'></td>
64915    <td class='s-error'></td>
64916    <td class='s-error'></td>
64917    <td class='s-error'></td>
64918    <td class='s-error'></td>
64919    <td class='s-error'></td>
64920    </tr>
64921    <tr><td class='code'>@link libsbml#FailedMathMLReadOfExponential FailedMathMLReadOfExponential@endlink</td>
64922    <td class='meaning'>Missing or invalid exponential expression in MathML</td>
64923    <td class='s-na'></td>
64924    <td class='s-na'></td>
64925    <td class='s-error'></td>
64926    <td class='s-error'></td>
64927    <td class='s-error'></td>
64928    <td class='s-error'></td>
64929    <td class='s-error'></td>
64930    <td class='s-error'></td>
64931    </tr>
64932    <tr><td class='code'>@link libsbml#FailedMathMLReadOfRational FailedMathMLReadOfRational@endlink</td>
64933    <td class='meaning'>Missing or invalid rational expression in MathML</td>
64934    <td class='s-na'></td>
64935    <td class='s-na'></td>
64936    <td class='s-error'></td>
64937    <td class='s-error'></td>
64938    <td class='s-error'></td>
64939    <td class='s-error'></td>
64940    <td class='s-error'></td>
64941    <td class='s-error'></td>
64942    </tr>
64943    <tr><td class='code'>@link libsbml#BadMathMLNodeType BadMathMLNodeType@endlink</td>
64944    <td class='meaning'>Invalid MathML element</td>
64945    <td class='s-na'></td>
64946    <td class='s-na'></td>
64947    <td class='s-error'></td>
64948    <td class='s-error'></td>
64949    <td class='s-error'></td>
64950    <td class='s-error'></td>
64951    <td class='s-error'></td>
64952    <td class='s-error'></td>
64953    </tr>
64954    <tr><td class='code'>@link libsbml#InvalidMathMLAttribute InvalidMathMLAttribute@endlink</td>
64955    <td class='meaning'>Invalid MathML attribute</td>
64956    <td class='s-na'></td>
64957    <td class='s-na'></td>
64958    <td class='s-error'></td>
64959    <td class='s-error'></td>
64960    <td class='s-error'></td>
64961    <td class='s-error'></td>
64962    <td class='s-error'></td>
64963    <td class='s-error'></td>
64964    </tr>
64965    <tr><td class='code'>@link libsbml#NoTimeSymbolInFunctionDef NoTimeSymbolInFunctionDef@endlink</td>
64966    <td class='meaning'>Use of <code>&lt;csymbol&gt;</code> for 'time' not allowed within FunctionDefinition objects</td>
64967    <td class='s-na'></td>
64968    <td class='s-na'></td>
64969    <td class='s-warning'></td>
64970    <td class='s-error'></td>
64971    <td class='s-error'></td>
64972    <td class='s-error'></td>
64973    <td class='s-error'></td>
64974    <td class='s-error'></td>
64975    </tr>
64976    <tr><td class='code'>@link libsbml#NoBodyInFunctionDef NoBodyInFunctionDef@endlink</td>
64977    <td class='meaning'>There must be a <code>&lt;lambda&gt;</code> body within the <code>&lt;math&gt;</code> element of a FunctionDefinition object</td>
64978    <td class='s-na'></td>
64979    <td class='s-na'></td>
64980    <td class='s-error'></td>
64981    <td class='s-error'></td>
64982    <td class='s-error'></td>
64983    <td class='s-error'></td>
64984    <td class='s-error'></td>
64985    <td class='s-error'></td>
64986    </tr>
64987    <tr><td class='code'>@link libsbml#DanglingUnitSIdRef DanglingUnitSIdRef@endlink</td>
64988    <td class='meaning'>Units must refer to valid unit or unitDefinition</td>
64989    <td class='s-warning'></td>
64990    <td class='s-warning'></td>
64991    <td class='s-warning'></td>
64992    <td class='s-warning'></td>
64993    <td class='s-warning'></td>
64994    <td class='s-warning'></td>
64995    <td class='s-na'></td>
64996    <td class='s-na'></td>
64997    </tr>
64998    <tr><td class='code'>@link libsbml#RDFMissingAboutTag RDFMissingAboutTag@endlink</td>
64999    <td class='meaning'>RDF missing the <code>&lt;about&gt;</code> tag</td>
65000    <td class='s-na'></td>
65001    <td class='s-na'></td>
65002    <td class='s-na'></td>
65003    <td class='s-warning'></td>
65004    <td class='s-warning'></td>
65005    <td class='s-warning'></td>
65006    <td class='s-warning'></td>
65007    <td class='s-warning'></td>
65008    </tr>
65009    <tr><td class='code'>@link libsbml#RDFEmptyAboutTag RDFEmptyAboutTag@endlink</td>
65010    <td class='meaning'>RDF empty <code>&lt;about&gt;</code> tag</td>
65011    <td class='s-na'></td>
65012    <td class='s-na'></td>
65013    <td class='s-na'></td>
65014    <td class='s-warning'></td>
65015    <td class='s-warning'></td>
65016    <td class='s-warning'></td>
65017    <td class='s-warning'></td>
65018    <td class='s-warning'></td>
65019    </tr>
65020    <tr><td class='code'>@link libsbml#RDFAboutTagNotMetaid RDFAboutTagNotMetaid@endlink</td>
65021    <td class='meaning'>RDF <code>&lt;about&gt;</code> tag is not metaid</td>
65022    <td class='s-na'></td>
65023    <td class='s-na'></td>
65024    <td class='s-na'></td>
65025    <td class='s-warning'></td>
65026    <td class='s-warning'></td>
65027    <td class='s-warning'></td>
65028    <td class='s-warning'></td>
65029    <td class='s-warning'></td>
65030    </tr>
65031    <tr><td class='code'>@link libsbml#RDFNotCompleteModelHistory RDFNotCompleteModelHistory@endlink</td>
65032    <td class='meaning'>RDF does not contain valid ModelHistory</td>
65033    <td class='s-na'></td>
65034    <td class='s-na'></td>
65035    <td class='s-na'></td>
65036    <td class='s-warning'></td>
65037    <td class='s-warning'></td>
65038    <td class='s-warning'></td>
65039    <td class='s-warning'></td>
65040    <td class='s-warning'></td>
65041    </tr>
65042    <tr><td class='code'>@link libsbml#RDFNotModelHistory RDFNotModelHistory@endlink</td>
65043    <td class='meaning'>RDF does not result in a ModelHistory</td>
65044    <td class='s-na'></td>
65045    <td class='s-na'></td>
65046    <td class='s-na'></td>
65047    <td class='s-warning'></td>
65048    <td class='s-warning'></td>
65049    <td class='s-warning'></td>
65050    <td class='s-warning'></td>
65051    <td class='s-warning'></td>
65052    </tr>
65053    <tr><td class='code'>@link libsbml#AnnotationNotElement AnnotationNotElement@endlink</td>
65054    <td class='meaning'>Annotation must contain element</td>
65055    <td class='s-na'></td>
65056    <td class='s-na'></td>
65057    <td class='s-warning'></td>
65058    <td class='s-warning'></td>
65059    <td class='s-warning'></td>
65060    <td class='s-warning'></td>
65061    <td class='s-warning'></td>
65062    <td class='s-warning'></td>
65063    </tr>
65064    <tr><td class='code'>@link libsbml#NestedAnnotationNotAllowed NestedAnnotationNotAllowed@endlink</td>
65065    <td class='meaning'>Nested annotations not allowed</td>
65066    <td class='s-warning'></td>
65067    <td class='s-warning'></td>
65068    <td class='s-warning'></td>
65069    <td class='s-warning'></td>
65070    <td class='s-warning'></td>
65071    <td class='s-warning'></td>
65072    <td class='s-na'></td>
65073    <td class='s-na'></td>
65074    </tr>
65075    <tr><td class='code'>@link libsbml#UndeclaredUnits UndeclaredUnits@endlink</td>
65076    <td class='meaning'>Missing unit declarations on parameters or literal numbers in expression</td>
65077    <td class='s-warning'></td>
65078    <td class='s-warning'></td>
65079    <td class='s-warning'></td>
65080    <td class='s-warning'></td>
65081    <td class='s-warning'></td>
65082    <td class='s-warning'></td>
65083    <td class='s-warning'></td>
65084    <td class='s-warning'></td>
65085    </tr>
65086    <tr><td class='code'>@link libsbml#UndeclaredTimeUnitsL3 UndeclaredTimeUnitsL3@endlink</td>
65087    <td class='meaning'>Unable to verify consistency of units: the unit of time has not been declared</td>
65088    <td class='s-na'></td>
65089    <td class='s-na'></td>
65090    <td class='s-na'></td>
65091    <td class='s-na'></td>
65092    <td class='s-na'></td>
65093    <td class='s-na'></td>
65094    <td class='s-warning'></td>
65095    <td class='s-warning'></td>
65096    </tr>
65097    <tr><td class='code'>@link libsbml#UndeclaredExtentUnitsL3 UndeclaredExtentUnitsL3@endlink</td>
65098    <td class='meaning'>Unable to verify consistency of units: the units of reaction extent have not been declared</td>
65099    <td class='s-na'></td>
65100    <td class='s-na'></td>
65101    <td class='s-na'></td>
65102    <td class='s-na'></td>
65103    <td class='s-na'></td>
65104    <td class='s-na'></td>
65105    <td class='s-warning'></td>
65106    <td class='s-warning'></td>
65107    </tr>
65108    <tr><td class='code'>@link libsbml#UndeclaredObjectUnitsL3 UndeclaredObjectUnitsL3@endlink</td>
65109    <td class='meaning'>Unable to verify consistency of units: encountered a model entity with no declared units</td>
65110    <td class='s-na'></td>
65111    <td class='s-na'></td>
65112    <td class='s-na'></td>
65113    <td class='s-na'></td>
65114    <td class='s-na'></td>
65115    <td class='s-na'></td>
65116    <td class='s-warning'></td>
65117    <td class='s-warning'></td>
65118    </tr>
65119    <tr><td class='code'>@link libsbml#CannotVerifyUnitsObjectNoMath CannotVerifyUnitsObjectNoMath@endlink</td>
65120    <td class='meaning'>Unable to verify consistency of units: encountered an object with no <code>&lt;math&gt;</code> element</td>
65121    <td class='s-na'></td>
65122    <td class='s-na'></td>
65123    <td class='s-na'></td>
65124    <td class='s-na'></td>
65125    <td class='s-na'></td>
65126    <td class='s-na'></td>
65127    <td class='s-na'></td>
65128    <td class='s-warning'></td>
65129    </tr>
65130    <tr><td class='code'>@link libsbml#UnrecognisedSBOTerm UnrecognisedSBOTerm@endlink</td>
65131    <td class='meaning'>Unrecognized 'sboTerm' attribute value</td>
65132    <td class='s-na'></td>
65133    <td class='s-na'></td>
65134    <td class='s-na'></td>
65135    <td class='s-warning'></td>
65136    <td class='s-warning'></td>
65137    <td class='s-warning'></td>
65138    <td class='s-warning'></td>
65139    <td class='s-warning'></td>
65140    </tr>
65141    <tr><td class='code'>@link libsbml#ObseleteSBOTerm ObseleteSBOTerm@endlink</td>
65142    <td class='meaning'>Obsolete 'sboTerm' attribute value</td>
65143    <td class='s-na'></td>
65144    <td class='s-na'></td>
65145    <td class='s-na'></td>
65146    <td class='s-warning'></td>
65147    <td class='s-warning'></td>
65148    <td class='s-warning'></td>
65149    <td class='s-warning'></td>
65150    <td class='s-warning'></td>
65151    </tr>
65152    <tr><td class='code'>@link libsbml#IncorrectCompartmentSpatialDimensions IncorrectCompartmentSpatialDimensions@endlink</td>
65153    <td class='meaning'>In SBML Level 1, only three-dimensional compartments are allowed</td>
65154    <td class='s-error'></td>
65155    <td class='s-error'></td>
65156    <td class='s-na'></td>
65157    <td class='s-na'></td>
65158    <td class='s-na'></td>
65159    <td class='s-na'></td>
65160    <td class='s-na'></td>
65161    <td class='s-na'></td>
65162    </tr>
65163    <tr><td class='code'>@link libsbml#CompartmentTypeNotValidAttribute CompartmentTypeNotValidAttribute@endlink</td>
65164    <td class='meaning'>CompartmentType objects are not available in this Level+Version of SBML</td>
65165    <td class='s-error'></td>
65166    <td class='s-error'></td>
65167    <td class='s-error'></td>
65168    <td class='s-na'></td>
65169    <td class='s-na'></td>
65170    <td class='s-na'></td>
65171    <td class='s-error'></td>
65172    <td class='s-error'></td>
65173    </tr>
65174    <tr><td class='code'>@link libsbml#ConstantNotValidAttribute ConstantNotValidAttribute@endlink</td>
65175    <td class='meaning'>This Level+Version of SBML does not support the 'constant' attribute on this component</td>
65176    <td class='s-error'></td>
65177    <td class='s-error'></td>
65178    <td class='s-na'></td>
65179    <td class='s-na'></td>
65180    <td class='s-na'></td>
65181    <td class='s-na'></td>
65182    <td class='s-na'></td>
65183    <td class='s-na'></td>
65184    </tr>
65185    <tr><td class='code'>@link libsbml#MetaIdNotValidAttribute MetaIdNotValidAttribute@endlink</td>
65186    <td class='meaning'>Attribute 'metaid' is not available in SBML Level 1</td>
65187    <td class='s-error'></td>
65188    <td class='s-error'></td>
65189    <td class='s-na'></td>
65190    <td class='s-na'></td>
65191    <td class='s-na'></td>
65192    <td class='s-na'></td>
65193    <td class='s-na'></td>
65194    <td class='s-na'></td>
65195    </tr>
65196    <tr><td class='code'>@link libsbml#SBOTermNotValidAttributeBeforeL2V3 SBOTermNotValidAttributeBeforeL2V3@endlink</td>
65197    <td class='meaning'>The 'sboTerm' attribute is not available on this component before SBML Level 2 Version 3</td>
65198    <td class='s-error'></td>
65199    <td class='s-error'></td>
65200    <td class='s-error'></td>
65201    <td class='s-error'></td>
65202    <td class='s-na'></td>
65203    <td class='s-na'></td>
65204    <td class='s-na'></td>
65205    <td class='s-na'></td>
65206    </tr>
65207    <tr><td class='code'>@link libsbml#InvalidL1CompartmentUnits InvalidL1CompartmentUnits@endlink</td>
65208    <td class='meaning'>Invalid units for a compartment in SBML Level 1</td>
65209    <td class='s-error'></td>
65210    <td class='s-error'></td>
65211    <td class='s-na'></td>
65212    <td class='s-na'></td>
65213    <td class='s-na'></td>
65214    <td class='s-na'></td>
65215    <td class='s-na'></td>
65216    <td class='s-na'></td>
65217    </tr>
65218    <tr><td class='code'>@link libsbml#L1V1CompartmentVolumeReqd L1V1CompartmentVolumeReqd@endlink</td>
65219    <td class='meaning'>In SBML Level 1, a compartment's volume must be specified</td>
65220    <td class='s-error'></td>
65221    <td class='s-na'></td>
65222    <td class='s-na'></td>
65223    <td class='s-na'></td>
65224    <td class='s-na'></td>
65225    <td class='s-na'></td>
65226    <td class='s-na'></td>
65227    <td class='s-na'></td>
65228    </tr>
65229    <tr><td class='code'>@link libsbml#CompartmentTypeNotValidComponent CompartmentTypeNotValidComponent@endlink</td>
65230    <td class='meaning'>CompartmentType objects are not available in this Level+Version of SBML</td>
65231    <td class='s-error'></td>
65232    <td class='s-error'></td>
65233    <td class='s-error'></td>
65234    <td class='s-na'></td>
65235    <td class='s-na'></td>
65236    <td class='s-na'></td>
65237    <td class='s-error'></td>
65238    <td class='s-error'></td>
65239    </tr>
65240    <tr><td class='code'>@link libsbml#ConstraintNotValidComponent ConstraintNotValidComponent@endlink</td>
65241    <td class='meaning'>Constraint objects are not available in this Level+Version of SBML</td>
65242    <td class='s-error'></td>
65243    <td class='s-error'></td>
65244    <td class='s-error'></td>
65245    <td class='s-na'></td>
65246    <td class='s-na'></td>
65247    <td class='s-na'></td>
65248    <td class='s-na'></td>
65249    <td class='s-na'></td>
65250    </tr>
65251    <tr><td class='code'>@link libsbml#EventNotValidComponent EventNotValidComponent@endlink</td>
65252    <td class='meaning'>Event objects are not available in this Level+Version of SBML</td>
65253    <td class='s-error'></td>
65254    <td class='s-error'></td>
65255    <td class='s-na'></td>
65256    <td class='s-na'></td>
65257    <td class='s-na'></td>
65258    <td class='s-na'></td>
65259    <td class='s-na'></td>
65260    <td class='s-na'></td>
65261    </tr>
65262    <tr><td class='code'>@link libsbml#SBOTermNotValidAttributeBeforeL2V2 SBOTermNotValidAttributeBeforeL2V2@endlink</td>
65263    <td class='meaning'>The 'sboTerm' attribute is invalid for this component before Level 2 Version 2</td>
65264    <td class='s-error'></td>
65265    <td class='s-error'></td>
65266    <td class='s-error'></td>
65267    <td class='s-na'></td>
65268    <td class='s-na'></td>
65269    <td class='s-na'></td>
65270    <td class='s-na'></td>
65271    <td class='s-na'></td>
65272    </tr>
65273    <tr><td class='code'>@link libsbml#FuncDefNotValidComponent FuncDefNotValidComponent@endlink</td>
65274    <td class='meaning'>FunctionDefinition objects are not available in this Level+Version of SBML</td>
65275    <td class='s-error'></td>
65276    <td class='s-error'></td>
65277    <td class='s-na'></td>
65278    <td class='s-na'></td>
65279    <td class='s-na'></td>
65280    <td class='s-na'></td>
65281    <td class='s-na'></td>
65282    <td class='s-na'></td>
65283    </tr>
65284    <tr><td class='code'>@link libsbml#InitialAssignNotValidComponent InitialAssignNotValidComponent@endlink</td>
65285    <td class='meaning'>InitialAssignment objects are not available in this Level+Version of SBML</td>
65286    <td class='s-error'></td>
65287    <td class='s-error'></td>
65288    <td class='s-error'></td>
65289    <td class='s-na'></td>
65290    <td class='s-na'></td>
65291    <td class='s-na'></td>
65292    <td class='s-na'></td>
65293    <td class='s-na'></td>
65294    </tr>
65295    <tr><td class='code'>@link libsbml#VariableNotValidAttribute VariableNotValidAttribute@endlink</td>
65296    <td class='meaning'>Attribute 'variable' is not available on this component in this Level+Version of SBML</td>
65297    <td class='s-error'></td>
65298    <td class='s-error'></td>
65299    <td class='s-error'></td>
65300    <td class='s-error'></td>
65301    <td class='s-error'></td>
65302    <td class='s-error'></td>
65303    <td class='s-error'></td>
65304    <td class='s-error'></td>
65305    </tr>
65306    <tr><td class='code'>@link libsbml#UnitsNotValidAttribute UnitsNotValidAttribute@endlink</td>
65307    <td class='meaning'>Attribute 'units' is not available on this component in this Level+Version of SBML</td>
65308    <td class='s-error'></td>
65309    <td class='s-error'></td>
65310    <td class='s-error'></td>
65311    <td class='s-error'></td>
65312    <td class='s-error'></td>
65313    <td class='s-error'></td>
65314    <td class='s-error'></td>
65315    <td class='s-error'></td>
65316    </tr>
65317    <tr><td class='code'>@link libsbml#ConstantSpeciesNotValidAttribute ConstantSpeciesNotValidAttribute@endlink</td>
65318    <td class='meaning'>Attribute 'constant' is not available on Species objects in SBML Level 1</td>
65319    <td class='s-error'></td>
65320    <td class='s-error'></td>
65321    <td class='s-na'></td>
65322    <td class='s-na'></td>
65323    <td class='s-na'></td>
65324    <td class='s-na'></td>
65325    <td class='s-na'></td>
65326    <td class='s-na'></td>
65327    </tr>
65328    <tr><td class='code'>@link libsbml#SpatialSizeUnitsNotValidAttribute SpatialSizeUnitsNotValidAttribute@endlink</td>
65329    <td class='meaning'>Attribute 'spatialSizeUnits' is not available on Species objects in SBML Level 1</td>
65330    <td class='s-error'></td>
65331    <td class='s-error'></td>
65332    <td class='s-na'></td>
65333    <td class='s-na'></td>
65334    <td class='s-na'></td>
65335    <td class='s-na'></td>
65336    <td class='s-na'></td>
65337    <td class='s-na'></td>
65338    </tr>
65339    <tr><td class='code'>@link libsbml#SpeciesTypeNotValidAttribute SpeciesTypeNotValidAttribute@endlink</td>
65340    <td class='meaning'>Attribute 'speciesType' is not available on Species objects in SBML Level 1</td>
65341    <td class='s-error'></td>
65342    <td class='s-error'></td>
65343    <td class='s-error'></td>
65344    <td class='s-na'></td>
65345    <td class='s-na'></td>
65346    <td class='s-na'></td>
65347    <td class='s-error'></td>
65348    <td class='s-error'></td>
65349    </tr>
65350    <tr><td class='code'>@link libsbml#HasOnlySubsUnitsNotValidAttribute HasOnlySubsUnitsNotValidAttribute@endlink</td>
65351    <td class='meaning'>Attribute 'hasOnlySubstanceUnits' is not available on Species objects in SBML Level 1</td>
65352    <td class='s-error'></td>
65353    <td class='s-error'></td>
65354    <td class='s-na'></td>
65355    <td class='s-na'></td>
65356    <td class='s-na'></td>
65357    <td class='s-na'></td>
65358    <td class='s-na'></td>
65359    <td class='s-na'></td>
65360    </tr>
65361    <tr><td class='code'>@link libsbml#IdNotValidAttribute IdNotValidAttribute@endlink</td>
65362    <td class='meaning'>Attribute 'id' is not available on SpeciesReference objects in SBML Level 1</td>
65363    <td class='s-error'></td>
65364    <td class='s-error'></td>
65365    <td class='s-error'></td>
65366    <td class='s-na'></td>
65367    <td class='s-na'></td>
65368    <td class='s-na'></td>
65369    <td class='s-na'></td>
65370    <td class='s-na'></td>
65371    </tr>
65372    <tr><td class='code'>@link libsbml#NameNotValidAttribute NameNotValidAttribute@endlink</td>
65373    <td class='meaning'>Attribute 'name' is not available on SpeciesReference objects in SBML Level 1</td>
65374    <td class='s-error'></td>
65375    <td class='s-error'></td>
65376    <td class='s-error'></td>
65377    <td class='s-na'></td>
65378    <td class='s-na'></td>
65379    <td class='s-na'></td>
65380    <td class='s-na'></td>
65381    <td class='s-na'></td>
65382    </tr>
65383    <tr><td class='code'>@link libsbml#SpeciesTypeNotValidComponent SpeciesTypeNotValidComponent@endlink</td>
65384    <td class='meaning'>The SpeciesType object is not supported in SBML Level 1</td>
65385    <td class='s-error'></td>
65386    <td class='s-error'></td>
65387    <td class='s-error'></td>
65388    <td class='s-na'></td>
65389    <td class='s-na'></td>
65390    <td class='s-na'></td>
65391    <td class='s-error'></td>
65392    <td class='s-error'></td>
65393    </tr>
65394    <tr><td class='code'>@link libsbml#StoichiometryMathNotValidComponent StoichiometryMathNotValidComponent@endlink</td>
65395    <td class='meaning'>The StoichiometryMath object is not supported in SBML Level 1</td>
65396    <td class='s-error'></td>
65397    <td class='s-error'></td>
65398    <td class='s-na'></td>
65399    <td class='s-na'></td>
65400    <td class='s-na'></td>
65401    <td class='s-na'></td>
65402    <td class='s-error'></td>
65403    <td class='s-error'></td>
65404    </tr>
65405    <tr><td class='code'>@link libsbml#MultiplierNotValidAttribute MultiplierNotValidAttribute@endlink</td>
65406    <td class='meaning'>Attribute 'multiplier' on Unit objects is not supported in SBML Level 1</td>
65407    <td class='s-error'></td>
65408    <td class='s-error'></td>
65409    <td class='s-na'></td>
65410    <td class='s-na'></td>
65411    <td class='s-na'></td>
65412    <td class='s-na'></td>
65413    <td class='s-na'></td>
65414    <td class='s-na'></td>
65415    </tr>
65416    <tr><td class='code'>@link libsbml#OffsetNotValidAttribute OffsetNotValidAttribute@endlink</td>
65417    <td class='meaning'>Attribute 'offset' on Unit objects is only available in SBML Level 2 Version 1</td>
65418    <td class='s-error'></td>
65419    <td class='s-error'></td>
65420    <td class='s-na'></td>
65421    <td class='s-na'></td>
65422    <td class='s-na'></td>
65423    <td class='s-na'></td>
65424    <td class='s-na'></td>
65425    <td class='s-na'></td>
65426    </tr>
65427    <tr><td class='code'>@link libsbml#L3SpatialDimensionsUnset L3SpatialDimensionsUnset@endlink</td>
65428    <td class='meaning'>No value given for 'spatialDimensions' attribute; assuming a value of 3</td>
65429    <td class='s-na'></td>
65430    <td class='s-na'></td>
65431    <td class='s-na'></td>
65432    <td class='s-na'></td>
65433    <td class='s-na'></td>
65434    <td class='s-na'></td>
65435    <td class='s-warning'></td>
65436    <td class='s-warning'></td>
65437    </tr>
65438    <tr><td class='code'>@link libsbml#PackageConversionNotSupported PackageConversionNotSupported@endlink</td>
65439    <td class='meaning'>Conversion of SBML Level 3 package constructs is not yet supported</td>
65440    <td class='s-error'></td>
65441    <td class='s-error'></td>
65442    <td class='s-error'></td>
65443    <td class='s-error'></td>
65444    <td class='s-error'></td>
65445    <td class='s-error'></td>
65446    <td class='s-error'></td>
65447    <td class='s-error'></td>
65448    </tr>
65449    <tr><td class='code'>@link libsbml#InvalidTargetLevelVersion InvalidTargetLevelVersion@endlink</td>
65450    <td class='meaning'>The requested SBML Level/Version combination is not known to exist</td>
65451    <td class='s-error'></td>
65452    <td class='s-error'></td>
65453    <td class='s-error'></td>
65454    <td class='s-error'></td>
65455    <td class='s-error'></td>
65456    <td class='s-error'></td>
65457    <td class='s-error'></td>
65458    <td class='s-error'></td>
65459    </tr>
65460    <tr><td class='code'>@link libsbml#L3NotSupported L3NotSupported@endlink</td>
65461    <td class='meaning'>SBML Level 3 is not yet supported</td>
65462    <td class='s-error'></td>
65463    <td class='s-error'></td>
65464    <td class='s-error'></td>
65465    <td class='s-error'></td>
65466    <td class='s-error'></td>
65467    <td class='s-error'></td>
65468    <td class='s-error'></td>
65469    <td class='s-error'></td>
65470    </tr>
65471    <tr><td class='code'>@link libsbml#CompUnknown CompUnknown@endlink</td>
65472    <td class='meaning'></td>
65473    <td class='s-na'></td>
65474    <td class='s-na'></td>
65475    <td class='s-na'></td>
65476    <td class='s-na'></td>
65477    <td class='s-na'></td>
65478    <td class='s-na'></td>
65479    <td class='s-na'></td>
65480    <td class='s-na'></td>
65481    </tr>
65482    <tr><td class='code'>@link libsbml#CompNSUndeclared CompNSUndeclared@endlink</td>
65483    <td class='meaning'>The comp ns is not correctly declared</td>
65484    <td class='s-na'></td>
65485    <td class='s-na'></td>
65486    <td class='s-na'></td>
65487    <td class='s-na'></td>
65488    <td class='s-na'></td>
65489    <td class='s-na'></td>
65490    <td class='s-error'></td>
65491    <td class='s-error'></td>
65492    </tr>
65493    <tr><td class='code'>@link libsbml#CompElementNotInNs CompElementNotInNs@endlink</td>
65494    <td class='meaning'>Element not in comp namespace</td>
65495    <td class='s-na'></td>
65496    <td class='s-na'></td>
65497    <td class='s-na'></td>
65498    <td class='s-na'></td>
65499    <td class='s-na'></td>
65500    <td class='s-na'></td>
65501    <td class='s-error'></td>
65502    <td class='s-error'></td>
65503    </tr>
65504    <tr><td class='code'>@link libsbml#CompDuplicateComponentId CompDuplicateComponentId@endlink</td>
65505    <td class='meaning'>Duplicate 'id' attribute value</td>
65506    <td class='s-na'></td>
65507    <td class='s-na'></td>
65508    <td class='s-na'></td>
65509    <td class='s-na'></td>
65510    <td class='s-na'></td>
65511    <td class='s-na'></td>
65512    <td class='s-error'></td>
65513    <td class='s-error'></td>
65514    </tr>
65515    <tr><td class='code'>@link libsbml#CompUniqueModelIds CompUniqueModelIds@endlink</td>
65516    <td class='meaning'>Model and ExternalModelDefinitions must have unique ids</td>
65517    <td class='s-na'></td>
65518    <td class='s-na'></td>
65519    <td class='s-na'></td>
65520    <td class='s-na'></td>
65521    <td class='s-na'></td>
65522    <td class='s-na'></td>
65523    <td class='s-error'></td>
65524    <td class='s-error'></td>
65525    </tr>
65526    <tr><td class='code'>@link libsbml#CompUniquePortIds CompUniquePortIds@endlink</td>
65527    <td class='meaning'>Ports must have unique ids</td>
65528    <td class='s-na'></td>
65529    <td class='s-na'></td>
65530    <td class='s-na'></td>
65531    <td class='s-na'></td>
65532    <td class='s-na'></td>
65533    <td class='s-na'></td>
65534    <td class='s-error'></td>
65535    <td class='s-error'></td>
65536    </tr>
65537    <tr><td class='code'>@link libsbml#CompInvalidSIdSyntax CompInvalidSIdSyntax@endlink</td>
65538    <td class='meaning'>Invalid SId syntax</td>
65539    <td class='s-na'></td>
65540    <td class='s-na'></td>
65541    <td class='s-na'></td>
65542    <td class='s-na'></td>
65543    <td class='s-na'></td>
65544    <td class='s-na'></td>
65545    <td class='s-error'></td>
65546    <td class='s-error'></td>
65547    </tr>
65548    <tr><td class='code'>@link libsbml#CompInvalidSubmodelRefSyntax CompInvalidSubmodelRefSyntax@endlink</td>
65549    <td class='meaning'>Invalid submodelRef syntax</td>
65550    <td class='s-na'></td>
65551    <td class='s-na'></td>
65552    <td class='s-na'></td>
65553    <td class='s-na'></td>
65554    <td class='s-na'></td>
65555    <td class='s-na'></td>
65556    <td class='s-error'></td>
65557    <td class='s-error'></td>
65558    </tr>
65559    <tr><td class='code'>@link libsbml#CompInvalidDeletionSyntax CompInvalidDeletionSyntax@endlink</td>
65560    <td class='meaning'>Invalid deletion syntax</td>
65561    <td class='s-na'></td>
65562    <td class='s-na'></td>
65563    <td class='s-na'></td>
65564    <td class='s-na'></td>
65565    <td class='s-na'></td>
65566    <td class='s-na'></td>
65567    <td class='s-error'></td>
65568    <td class='s-error'></td>
65569    </tr>
65570    <tr><td class='code'>@link libsbml#CompInvalidConversionFactorSyntax CompInvalidConversionFactorSyntax@endlink</td>
65571    <td class='meaning'>Invalid conversionFactor syntax</td>
65572    <td class='s-na'></td>
65573    <td class='s-na'></td>
65574    <td class='s-na'></td>
65575    <td class='s-na'></td>
65576    <td class='s-na'></td>
65577    <td class='s-na'></td>
65578    <td class='s-error'></td>
65579    <td class='s-error'></td>
65580    </tr>
65581    <tr><td class='code'>@link libsbml#CompInvalidNameSyntax CompInvalidNameSyntax@endlink</td>
65582    <td class='meaning'>Invalid name syntax</td>
65583    <td class='s-na'></td>
65584    <td class='s-na'></td>
65585    <td class='s-na'></td>
65586    <td class='s-na'></td>
65587    <td class='s-na'></td>
65588    <td class='s-na'></td>
65589    <td class='s-error'></td>
65590    <td class='s-error'></td>
65591    </tr>
65592    <tr><td class='code'>@link libsbml#CompReplacedUnitsShouldMatch CompReplacedUnitsShouldMatch@endlink</td>
65593    <td class='meaning'>Units of replaced elements should match replacement units.</td>
65594    <td class='s-na'></td>
65595    <td class='s-na'></td>
65596    <td class='s-na'></td>
65597    <td class='s-na'></td>
65598    <td class='s-na'></td>
65599    <td class='s-na'></td>
65600    <td class='s-warning'></td>
65601    <td class='s-warning'></td>
65602    </tr>
65603    <tr><td class='code'>@link libsbml#CompOneListOfReplacedElements CompOneListOfReplacedElements@endlink</td>
65604    <td class='meaning'>Only one <code>&lt;listOfReplacedElements&gt;</code> allowed.</td>
65605    <td class='s-na'></td>
65606    <td class='s-na'></td>
65607    <td class='s-na'></td>
65608    <td class='s-na'></td>
65609    <td class='s-na'></td>
65610    <td class='s-na'></td>
65611    <td class='s-error'></td>
65612    <td class='s-error'></td>
65613    </tr>
65614    <tr><td class='code'>@link libsbml#CompLOReplaceElementsAllowedElements CompLOReplaceElementsAllowedElements@endlink</td>
65615    <td class='meaning'>Allowed children of <code>&lt;listOfReplacedElements&gt;</code></td>
65616    <td class='s-na'></td>
65617    <td class='s-na'></td>
65618    <td class='s-na'></td>
65619    <td class='s-na'></td>
65620    <td class='s-na'></td>
65621    <td class='s-na'></td>
65622    <td class='s-error'></td>
65623    <td class='s-error'></td>
65624    </tr>
65625    <tr><td class='code'>@link libsbml#CompLOReplacedElementsAllowedAttribs CompLOReplacedElementsAllowedAttribs@endlink</td>
65626    <td class='meaning'>Allowed <code>&lt;listOfReplacedElements&gt;</code> attributes</td>
65627    <td class='s-na'></td>
65628    <td class='s-na'></td>
65629    <td class='s-na'></td>
65630    <td class='s-na'></td>
65631    <td class='s-na'></td>
65632    <td class='s-na'></td>
65633    <td class='s-error'></td>
65634    <td class='s-error'></td>
65635    </tr>
65636    <tr><td class='code'>@link libsbml#CompEmptyLOReplacedElements CompEmptyLOReplacedElements@endlink</td>
65637    <td class='meaning'><code>&lt;listOfReplacedElements&gt;</code> must not be empty</td>
65638    <td class='s-na'></td>
65639    <td class='s-na'></td>
65640    <td class='s-na'></td>
65641    <td class='s-na'></td>
65642    <td class='s-na'></td>
65643    <td class='s-na'></td>
65644    <td class='s-error'></td>
65645    <td class='s-error'></td>
65646    </tr>
65647    <tr><td class='code'>@link libsbml#CompOneReplacedByElement CompOneReplacedByElement@endlink</td>
65648    <td class='meaning'>Only one <code>&lt;replacedBy&gt;</code> object allowed.</td>
65649    <td class='s-na'></td>
65650    <td class='s-na'></td>
65651    <td class='s-na'></td>
65652    <td class='s-na'></td>
65653    <td class='s-na'></td>
65654    <td class='s-na'></td>
65655    <td class='s-error'></td>
65656    <td class='s-error'></td>
65657    </tr>
65658    <tr><td class='code'>@link libsbml#CompAttributeRequiredMissing CompAttributeRequiredMissing@endlink</td>
65659    <td class='meaning'>Required comp:required attribute on <code>&lt;sbml&gt;</code></td>
65660    <td class='s-na'></td>
65661    <td class='s-na'></td>
65662    <td class='s-na'></td>
65663    <td class='s-na'></td>
65664    <td class='s-na'></td>
65665    <td class='s-na'></td>
65666    <td class='s-error'></td>
65667    <td class='s-error'></td>
65668    </tr>
65669    <tr><td class='code'>@link libsbml#CompAttributeRequiredMustBeBoolean CompAttributeRequiredMustBeBoolean@endlink</td>
65670    <td class='meaning'>The comp:required attribute must be Boolean</td>
65671    <td class='s-na'></td>
65672    <td class='s-na'></td>
65673    <td class='s-na'></td>
65674    <td class='s-na'></td>
65675    <td class='s-na'></td>
65676    <td class='s-na'></td>
65677    <td class='s-error'></td>
65678    <td class='s-error'></td>
65679    </tr>
65680    <tr><td class='code'>@link libsbml#CompRequiredTrueIfElementsRemain CompRequiredTrueIfElementsRemain@endlink</td>
65681    <td class='meaning'>The comp:required attribute must be 'true' if math changes</td>
65682    <td class='s-na'></td>
65683    <td class='s-na'></td>
65684    <td class='s-na'></td>
65685    <td class='s-na'></td>
65686    <td class='s-na'></td>
65687    <td class='s-na'></td>
65688    <td class='s-na'></td>
65689    <td class='s-na'></td>
65690    </tr>
65691    <tr><td class='code'>@link libsbml#CompRequiredFalseIfAllElementsReplaced CompRequiredFalseIfAllElementsReplaced@endlink</td>
65692    <td class='meaning'>The comp:required attribute must be 'false' if math does not change</td>
65693    <td class='s-na'></td>
65694    <td class='s-na'></td>
65695    <td class='s-na'></td>
65696    <td class='s-na'></td>
65697    <td class='s-na'></td>
65698    <td class='s-na'></td>
65699    <td class='s-na'></td>
65700    <td class='s-na'></td>
65701    </tr>
65702    <tr><td class='code'>@link libsbml#CompOneListOfModelDefinitions CompOneListOfModelDefinitions@endlink</td>
65703    <td class='meaning'>Only one <code>&lt;listOfModelDefinitions&gt;</code> allowed.</td>
65704    <td class='s-na'></td>
65705    <td class='s-na'></td>
65706    <td class='s-na'></td>
65707    <td class='s-na'></td>
65708    <td class='s-na'></td>
65709    <td class='s-na'></td>
65710    <td class='s-error'></td>
65711    <td class='s-error'></td>
65712    </tr>
65713    <tr><td class='code'>@link libsbml#CompEmptyLOModelDefs CompEmptyLOModelDefs@endlink</td>
65714    <td class='meaning'><code>&lt;listOfModelDefinitions&gt;</code> and <code>&lt;listOfExternalModelDefinitions&gt;</code> must not be empty</td>
65715    <td class='s-na'></td>
65716    <td class='s-na'></td>
65717    <td class='s-na'></td>
65718    <td class='s-na'></td>
65719    <td class='s-na'></td>
65720    <td class='s-na'></td>
65721    <td class='s-error'></td>
65722    <td class='s-error'></td>
65723    </tr>
65724    <tr><td class='code'>@link libsbml#CompLOModelDefsAllowedElements CompLOModelDefsAllowedElements@endlink</td>
65725    <td class='meaning'>Only <code>&lt;modelDefinitions&gt;</code> in <code>&lt;listOfModelDefinitions&gt;</code></td>
65726    <td class='s-na'></td>
65727    <td class='s-na'></td>
65728    <td class='s-na'></td>
65729    <td class='s-na'></td>
65730    <td class='s-na'></td>
65731    <td class='s-na'></td>
65732    <td class='s-error'></td>
65733    <td class='s-error'></td>
65734    </tr>
65735    <tr><td class='code'>@link libsbml#CompLOExtModelDefsAllowedElements CompLOExtModelDefsAllowedElements@endlink</td>
65736    <td class='meaning'>Only <code>&lt;externalModelDefinitions&gt;</code> in <code>&lt;listOfExternalModelDefinitions&gt;</code></td>
65737    <td class='s-na'></td>
65738    <td class='s-na'></td>
65739    <td class='s-na'></td>
65740    <td class='s-na'></td>
65741    <td class='s-na'></td>
65742    <td class='s-na'></td>
65743    <td class='s-error'></td>
65744    <td class='s-error'></td>
65745    </tr>
65746    <tr><td class='code'>@link libsbml#CompLOModelDefsAllowedAttributes CompLOModelDefsAllowedAttributes@endlink</td>
65747    <td class='meaning'>Allowed <code>&lt;listOfModelDefinitions&gt;</code> attributes</td>
65748    <td class='s-na'></td>
65749    <td class='s-na'></td>
65750    <td class='s-na'></td>
65751    <td class='s-na'></td>
65752    <td class='s-na'></td>
65753    <td class='s-na'></td>
65754    <td class='s-error'></td>
65755    <td class='s-error'></td>
65756    </tr>
65757    <tr><td class='code'>@link libsbml#CompLOExtModDefsAllowedAttributes CompLOExtModDefsAllowedAttributes@endlink</td>
65758    <td class='meaning'>Allowed <code>&lt;listOfExternalModelDefinitions&gt;</code> attributes</td>
65759    <td class='s-na'></td>
65760    <td class='s-na'></td>
65761    <td class='s-na'></td>
65762    <td class='s-na'></td>
65763    <td class='s-na'></td>
65764    <td class='s-na'></td>
65765    <td class='s-error'></td>
65766    <td class='s-error'></td>
65767    </tr>
65768    <tr><td class='code'>@link libsbml#CompOneListOfExtModelDefinitions CompOneListOfExtModelDefinitions@endlink</td>
65769    <td class='meaning'>Only one <code>&lt;listOfExternalModelDefinitions&gt;</code> allowed.</td>
65770    <td class='s-na'></td>
65771    <td class='s-na'></td>
65772    <td class='s-na'></td>
65773    <td class='s-na'></td>
65774    <td class='s-na'></td>
65775    <td class='s-na'></td>
65776    <td class='s-error'></td>
65777    <td class='s-error'></td>
65778    </tr>
65779    <tr><td class='code'>@link libsbml#CompAttributeRequiredMustBeTrue CompAttributeRequiredMustBeTrue@endlink</td>
65780    <td class='meaning'>The comp:required attribute must be 'true'</td>
65781    <td class='s-na'></td>
65782    <td class='s-na'></td>
65783    <td class='s-na'></td>
65784    <td class='s-na'></td>
65785    <td class='s-na'></td>
65786    <td class='s-na'></td>
65787    <td class='s-error'></td>
65788    <td class='s-error'></td>
65789    </tr>
65790    <tr><td class='code'>@link libsbml#CompExtModDefAllowedCoreAttributes CompExtModDefAllowedCoreAttributes@endlink</td>
65791    <td class='meaning'>Allowed <code>&lt;externalModelDefinitions&gt;</code> core attributes</td>
65792    <td class='s-na'></td>
65793    <td class='s-na'></td>
65794    <td class='s-na'></td>
65795    <td class='s-na'></td>
65796    <td class='s-na'></td>
65797    <td class='s-na'></td>
65798    <td class='s-error'></td>
65799    <td class='s-error'></td>
65800    </tr>
65801    <tr><td class='code'>@link libsbml#CompExtModDefAllowedElements CompExtModDefAllowedElements@endlink</td>
65802    <td class='meaning'>Allowed <code>&lt;externalModelDefinitions&gt;</code> elements</td>
65803    <td class='s-na'></td>
65804    <td class='s-na'></td>
65805    <td class='s-na'></td>
65806    <td class='s-na'></td>
65807    <td class='s-na'></td>
65808    <td class='s-na'></td>
65809    <td class='s-error'></td>
65810    <td class='s-error'></td>
65811    </tr>
65812    <tr><td class='code'>@link libsbml#CompExtModDefAllowedAttributes CompExtModDefAllowedAttributes@endlink</td>
65813    <td class='meaning'>Allowed <code>&lt;externalModelDefinitions&gt;</code> attributes</td>
65814    <td class='s-na'></td>
65815    <td class='s-na'></td>
65816    <td class='s-na'></td>
65817    <td class='s-na'></td>
65818    <td class='s-na'></td>
65819    <td class='s-na'></td>
65820    <td class='s-error'></td>
65821    <td class='s-error'></td>
65822    </tr>
65823    <tr><td class='code'>@link libsbml#CompReferenceMustBeL3 CompReferenceMustBeL3@endlink</td>
65824    <td class='meaning'>External models must be L3</td>
65825    <td class='s-na'></td>
65826    <td class='s-na'></td>
65827    <td class='s-na'></td>
65828    <td class='s-na'></td>
65829    <td class='s-na'></td>
65830    <td class='s-na'></td>
65831    <td class='s-error'></td>
65832    <td class='s-error'></td>
65833    </tr>
65834    <tr><td class='code'>@link libsbml#CompModReferenceMustIdOfModel CompModReferenceMustIdOfModel@endlink</td>
65835    <td class='meaning'>'modelRef' must be the 'id' of a model in the 'source' document</td>
65836    <td class='s-na'></td>
65837    <td class='s-na'></td>
65838    <td class='s-na'></td>
65839    <td class='s-na'></td>
65840    <td class='s-na'></td>
65841    <td class='s-na'></td>
65842    <td class='s-error'></td>
65843    <td class='s-error'></td>
65844    </tr>
65845    <tr><td class='code'>@link libsbml#CompExtModMd5DoesNotMatch CompExtModMd5DoesNotMatch@endlink</td>
65846    <td class='meaning'>MD5 checksum does not match the 'source' document</td>
65847    <td class='s-na'></td>
65848    <td class='s-na'></td>
65849    <td class='s-na'></td>
65850    <td class='s-na'></td>
65851    <td class='s-na'></td>
65852    <td class='s-na'></td>
65853    <td class='s-warning'></td>
65854    <td class='s-warning'></td>
65855    </tr>
65856    <tr><td class='code'>@link libsbml#CompInvalidSourceSyntax CompInvalidSourceSyntax@endlink</td>
65857    <td class='meaning'>The 'comp:source' attribute must be of type 'anyURI'</td>
65858    <td class='s-na'></td>
65859    <td class='s-na'></td>
65860    <td class='s-na'></td>
65861    <td class='s-na'></td>
65862    <td class='s-na'></td>
65863    <td class='s-na'></td>
65864    <td class='s-error'></td>
65865    <td class='s-error'></td>
65866    </tr>
65867    <tr><td class='code'>@link libsbml#CompInvalidModelRefSyntax CompInvalidModelRefSyntax@endlink</td>
65868    <td class='meaning'>The 'comp:modelRef' attribute must have the syntax of 'SId'</td>
65869    <td class='s-na'></td>
65870    <td class='s-na'></td>
65871    <td class='s-na'></td>
65872    <td class='s-na'></td>
65873    <td class='s-na'></td>
65874    <td class='s-na'></td>
65875    <td class='s-error'></td>
65876    <td class='s-error'></td>
65877    </tr>
65878    <tr><td class='code'>@link libsbml#CompInvalidMD5Syntax CompInvalidMD5Syntax@endlink</td>
65879    <td class='meaning'>The 'comp:md5' attribute must have the syntax of 'string'</td>
65880    <td class='s-na'></td>
65881    <td class='s-na'></td>
65882    <td class='s-na'></td>
65883    <td class='s-na'></td>
65884    <td class='s-na'></td>
65885    <td class='s-na'></td>
65886    <td class='s-error'></td>
65887    <td class='s-error'></td>
65888    </tr>
65889    <tr><td class='code'>@link libsbml#CompCircularExternalModelReference CompCircularExternalModelReference@endlink</td>
65890    <td class='meaning'>Circular reference in <code>&lt;externalModelDefinition&gt;</code></td>
65891    <td class='s-na'></td>
65892    <td class='s-na'></td>
65893    <td class='s-na'></td>
65894    <td class='s-na'></td>
65895    <td class='s-na'></td>
65896    <td class='s-na'></td>
65897    <td class='s-error'></td>
65898    <td class='s-error'></td>
65899    </tr>
65900    <tr><td class='code'>@link libsbml#CompOneListOfOnModel CompOneListOfOnModel@endlink</td>
65901    <td class='meaning'>Only one <code>&lt;listOfSubmodels&gt;</code> and one <code>&lt;listOfPorts&gt;</code> allowed</td>
65902    <td class='s-na'></td>
65903    <td class='s-na'></td>
65904    <td class='s-na'></td>
65905    <td class='s-na'></td>
65906    <td class='s-na'></td>
65907    <td class='s-na'></td>
65908    <td class='s-error'></td>
65909    <td class='s-error'></td>
65910    </tr>
65911    <tr><td class='code'>@link libsbml#CompNoEmptyListOfOnModel CompNoEmptyListOfOnModel@endlink</td>
65912    <td class='meaning'>No empty listOf elements allowed</td>
65913    <td class='s-na'></td>
65914    <td class='s-na'></td>
65915    <td class='s-na'></td>
65916    <td class='s-na'></td>
65917    <td class='s-na'></td>
65918    <td class='s-na'></td>
65919    <td class='s-error'></td>
65920    <td class='s-error'></td>
65921    </tr>
65922    <tr><td class='code'>@link libsbml#CompLOSubmodelsAllowedElements CompLOSubmodelsAllowedElements@endlink</td>
65923    <td class='meaning'>Allowed elements on <code>&lt;listOfSubmodels&gt;</code></td>
65924    <td class='s-na'></td>
65925    <td class='s-na'></td>
65926    <td class='s-na'></td>
65927    <td class='s-na'></td>
65928    <td class='s-na'></td>
65929    <td class='s-na'></td>
65930    <td class='s-error'></td>
65931    <td class='s-error'></td>
65932    </tr>
65933    <tr><td class='code'>@link libsbml#CompLOPortsAllowedElements CompLOPortsAllowedElements@endlink</td>
65934    <td class='meaning'>Allowed elements on <code>&lt;listOfPorts&gt;</code></td>
65935    <td class='s-na'></td>
65936    <td class='s-na'></td>
65937    <td class='s-na'></td>
65938    <td class='s-na'></td>
65939    <td class='s-na'></td>
65940    <td class='s-na'></td>
65941    <td class='s-error'></td>
65942    <td class='s-error'></td>
65943    </tr>
65944    <tr><td class='code'>@link libsbml#CompLOSubmodelsAllowedAttributes CompLOSubmodelsAllowedAttributes@endlink</td>
65945    <td class='meaning'>Allowed attributes on <code>&lt;listOfSubmodels&gt;</code></td>
65946    <td class='s-na'></td>
65947    <td class='s-na'></td>
65948    <td class='s-na'></td>
65949    <td class='s-na'></td>
65950    <td class='s-na'></td>
65951    <td class='s-na'></td>
65952    <td class='s-error'></td>
65953    <td class='s-error'></td>
65954    </tr>
65955    <tr><td class='code'>@link libsbml#CompLOPortsAllowedAttributes CompLOPortsAllowedAttributes@endlink</td>
65956    <td class='meaning'>Allowed attributes on <code>&lt;listOfPorts&gt;</code></td>
65957    <td class='s-na'></td>
65958    <td class='s-na'></td>
65959    <td class='s-na'></td>
65960    <td class='s-na'></td>
65961    <td class='s-na'></td>
65962    <td class='s-na'></td>
65963    <td class='s-error'></td>
65964    <td class='s-error'></td>
65965    </tr>
65966    <tr><td class='code'>@link libsbml#CompSubmodelAllowedCoreAttributes CompSubmodelAllowedCoreAttributes@endlink</td>
65967    <td class='meaning'>Allowed core attributes on <code>&lt;submodel&gt;</code></td>
65968    <td class='s-na'></td>
65969    <td class='s-na'></td>
65970    <td class='s-na'></td>
65971    <td class='s-na'></td>
65972    <td class='s-na'></td>
65973    <td class='s-na'></td>
65974    <td class='s-error'></td>
65975    <td class='s-error'></td>
65976    </tr>
65977    <tr><td class='code'>@link libsbml#CompSubmodelAllowedElements CompSubmodelAllowedElements@endlink</td>
65978    <td class='meaning'>Allowed elements on <code>&lt;submodel&gt;</code></td>
65979    <td class='s-na'></td>
65980    <td class='s-na'></td>
65981    <td class='s-na'></td>
65982    <td class='s-na'></td>
65983    <td class='s-na'></td>
65984    <td class='s-na'></td>
65985    <td class='s-error'></td>
65986    <td class='s-error'></td>
65987    </tr>
65988    <tr><td class='code'>@link libsbml#CompOneListOfDeletionOnSubmodel CompOneListOfDeletionOnSubmodel@endlink</td>
65989    <td class='meaning'>Only one <code>&lt;listOfDeletions&gt;</code> on a <code>&lt;submodel&gt;</code> allowed</td>
65990    <td class='s-na'></td>
65991    <td class='s-na'></td>
65992    <td class='s-na'></td>
65993    <td class='s-na'></td>
65994    <td class='s-na'></td>
65995    <td class='s-na'></td>
65996    <td class='s-error'></td>
65997    <td class='s-error'></td>
65998    </tr>
65999    <tr><td class='code'>@link libsbml#CompSubmodelNoEmptyLODeletions CompSubmodelNoEmptyLODeletions@endlink</td>
66000    <td class='meaning'>No empty listOfDeletions elements allowed</td>
66001    <td class='s-na'></td>
66002    <td class='s-na'></td>
66003    <td class='s-na'></td>
66004    <td class='s-na'></td>
66005    <td class='s-na'></td>
66006    <td class='s-na'></td>
66007    <td class='s-error'></td>
66008    <td class='s-error'></td>
66009    </tr>
66010    <tr><td class='code'>@link libsbml#CompLODeletionsAllowedElements CompLODeletionsAllowedElements@endlink</td>
66011    <td class='meaning'>Allowed elements on <code>&lt;listOfDeletions&gt;</code></td>
66012    <td class='s-na'></td>
66013    <td class='s-na'></td>
66014    <td class='s-na'></td>
66015    <td class='s-na'></td>
66016    <td class='s-na'></td>
66017    <td class='s-na'></td>
66018    <td class='s-error'></td>
66019    <td class='s-error'></td>
66020    </tr>
66021    <tr><td class='code'>@link libsbml#CompLODeletionAllowedAttributes CompLODeletionAllowedAttributes@endlink</td>
66022    <td class='meaning'>Allowed <code>&lt;listOfDeletions&gt;</code> attributes</td>
66023    <td class='s-na'></td>
66024    <td class='s-na'></td>
66025    <td class='s-na'></td>
66026    <td class='s-na'></td>
66027    <td class='s-na'></td>
66028    <td class='s-na'></td>
66029    <td class='s-error'></td>
66030    <td class='s-error'></td>
66031    </tr>
66032    <tr><td class='code'>@link libsbml#CompSubmodelAllowedAttributes CompSubmodelAllowedAttributes@endlink</td>
66033    <td class='meaning'>Allowed <code>&lt;submodel&gt;</code> attributes</td>
66034    <td class='s-na'></td>
66035    <td class='s-na'></td>
66036    <td class='s-na'></td>
66037    <td class='s-na'></td>
66038    <td class='s-na'></td>
66039    <td class='s-na'></td>
66040    <td class='s-error'></td>
66041    <td class='s-error'></td>
66042    </tr>
66043    <tr><td class='code'>@link libsbml#CompModReferenceSyntax CompModReferenceSyntax@endlink</td>
66044    <td class='meaning'>'comp:modelRef' must conform to SId syntax</td>
66045    <td class='s-na'></td>
66046    <td class='s-na'></td>
66047    <td class='s-na'></td>
66048    <td class='s-na'></td>
66049    <td class='s-na'></td>
66050    <td class='s-na'></td>
66051    <td class='s-error'></td>
66052    <td class='s-error'></td>
66053    </tr>
66054    <tr><td class='code'>@link libsbml#CompInvalidTimeConvFactorSyntax CompInvalidTimeConvFactorSyntax@endlink</td>
66055    <td class='meaning'>'comp:timeConversionFactor' must conform to SId syntax</td>
66056    <td class='s-na'></td>
66057    <td class='s-na'></td>
66058    <td class='s-na'></td>
66059    <td class='s-na'></td>
66060    <td class='s-na'></td>
66061    <td class='s-na'></td>
66062    <td class='s-error'></td>
66063    <td class='s-error'></td>
66064    </tr>
66065    <tr><td class='code'>@link libsbml#CompInvalidExtentConvFactorSyntax CompInvalidExtentConvFactorSyntax@endlink</td>
66066    <td class='meaning'>'comp:extentConversionFactor' must conform to SId syntax</td>
66067    <td class='s-na'></td>
66068    <td class='s-na'></td>
66069    <td class='s-na'></td>
66070    <td class='s-na'></td>
66071    <td class='s-na'></td>
66072    <td class='s-na'></td>
66073    <td class='s-error'></td>
66074    <td class='s-error'></td>
66075    </tr>
66076    <tr><td class='code'>@link libsbml#CompSubmodelMustReferenceModel CompSubmodelMustReferenceModel@endlink</td>
66077    <td class='meaning'>The 'comp:modelRef' attribute must reference a model</td>
66078    <td class='s-na'></td>
66079    <td class='s-na'></td>
66080    <td class='s-na'></td>
66081    <td class='s-na'></td>
66082    <td class='s-na'></td>
66083    <td class='s-na'></td>
66084    <td class='s-error'></td>
66085    <td class='s-error'></td>
66086    </tr>
66087    <tr><td class='code'>@link libsbml#CompSubmodelCannotReferenceSelf CompSubmodelCannotReferenceSelf@endlink</td>
66088    <td class='meaning'>The 'comp:modelRef' attribute cannot reference own model</td>
66089    <td class='s-na'></td>
66090    <td class='s-na'></td>
66091    <td class='s-na'></td>
66092    <td class='s-na'></td>
66093    <td class='s-na'></td>
66094    <td class='s-na'></td>
66095    <td class='s-error'></td>
66096    <td class='s-error'></td>
66097    </tr>
66098    <tr><td class='code'>@link libsbml#CompModCannotCircularlyReferenceSelf CompModCannotCircularlyReferenceSelf@endlink</td>
66099    <td class='meaning'><code>&lt;model&gt;</code> may not reference <code>&lt;submodel&gt;</code> that references itself.</td>
66100    <td class='s-na'></td>
66101    <td class='s-na'></td>
66102    <td class='s-na'></td>
66103    <td class='s-na'></td>
66104    <td class='s-na'></td>
66105    <td class='s-na'></td>
66106    <td class='s-error'></td>
66107    <td class='s-error'></td>
66108    </tr>
66109    <tr><td class='code'>@link libsbml#CompTimeConversionMustBeParameter CompTimeConversionMustBeParameter@endlink</td>
66110    <td class='meaning'>The 'comp:timeConversionFactor' must reference a parameter</td>
66111    <td class='s-na'></td>
66112    <td class='s-na'></td>
66113    <td class='s-na'></td>
66114    <td class='s-na'></td>
66115    <td class='s-na'></td>
66116    <td class='s-na'></td>
66117    <td class='s-error'></td>
66118    <td class='s-error'></td>
66119    </tr>
66120    <tr><td class='code'>@link libsbml#CompExtentConversionMustBeParameter CompExtentConversionMustBeParameter@endlink</td>
66121    <td class='meaning'>The 'comp:extentConversionFactor' must reference a parameter</td>
66122    <td class='s-na'></td>
66123    <td class='s-na'></td>
66124    <td class='s-na'></td>
66125    <td class='s-na'></td>
66126    <td class='s-na'></td>
66127    <td class='s-na'></td>
66128    <td class='s-error'></td>
66129    <td class='s-error'></td>
66130    </tr>
66131    <tr><td class='code'>@link libsbml#CompPortRefMustReferencePort CompPortRefMustReferencePort@endlink</td>
66132    <td class='meaning'>The 'comp:portRef' attribute must be the 'id' of a <code>&lt;port&gt;</code></td>
66133    <td class='s-na'></td>
66134    <td class='s-na'></td>
66135    <td class='s-na'></td>
66136    <td class='s-na'></td>
66137    <td class='s-na'></td>
66138    <td class='s-na'></td>
66139    <td class='s-error'></td>
66140    <td class='s-error'></td>
66141    </tr>
66142    <tr><td class='code'>@link libsbml#CompIdRefMustReferenceObject CompIdRefMustReferenceObject@endlink</td>
66143    <td class='meaning'>The 'comp:idRef' attribute must be the 'id' of a model element</td>
66144    <td class='s-na'></td>
66145    <td class='s-na'></td>
66146    <td class='s-na'></td>
66147    <td class='s-na'></td>
66148    <td class='s-na'></td>
66149    <td class='s-na'></td>
66150    <td class='s-error'></td>
66151    <td class='s-error'></td>
66152    </tr>
66153    <tr><td class='code'>@link libsbml#CompUnitRefMustReferenceUnitDef CompUnitRefMustReferenceUnitDef@endlink</td>
66154    <td class='meaning'>The 'comp:unitRef' attribute must be the 'id' of a UnitDefinition</td>
66155    <td class='s-na'></td>
66156    <td class='s-na'></td>
66157    <td class='s-na'></td>
66158    <td class='s-na'></td>
66159    <td class='s-na'></td>
66160    <td class='s-na'></td>
66161    <td class='s-error'></td>
66162    <td class='s-error'></td>
66163    </tr>
66164    <tr><td class='code'>@link libsbml#CompMetaIdRefMustReferenceObject CompMetaIdRefMustReferenceObject@endlink</td>
66165    <td class='meaning'>The 'comp:metaIdRef' attribute must be the 'metaid' of an object</td>
66166    <td class='s-na'></td>
66167    <td class='s-na'></td>
66168    <td class='s-na'></td>
66169    <td class='s-na'></td>
66170    <td class='s-na'></td>
66171    <td class='s-na'></td>
66172    <td class='s-error'></td>
66173    <td class='s-error'></td>
66174    </tr>
66175    <tr><td class='code'>@link libsbml#CompParentOfSBRefChildMustBeSubmodel CompParentOfSBRefChildMustBeSubmodel@endlink</td>
66176    <td class='meaning'>If <code>&lt;sBaseRef&gt;</code> has a child <code>&lt;sBaseRef&gt;</code> its parent must be a <code>&lt;submodel&gt;</code></td>
66177    <td class='s-na'></td>
66178    <td class='s-na'></td>
66179    <td class='s-na'></td>
66180    <td class='s-na'></td>
66181    <td class='s-na'></td>
66182    <td class='s-na'></td>
66183    <td class='s-error'></td>
66184    <td class='s-error'></td>
66185    </tr>
66186    <tr><td class='code'>@link libsbml#CompInvalidPortRefSyntax CompInvalidPortRefSyntax@endlink</td>
66187    <td class='meaning'>The 'comp:portRef' attribute must have the syntax of an SBML SId</td>
66188    <td class='s-na'></td>
66189    <td class='s-na'></td>
66190    <td class='s-na'></td>
66191    <td class='s-na'></td>
66192    <td class='s-na'></td>
66193    <td class='s-na'></td>
66194    <td class='s-error'></td>
66195    <td class='s-error'></td>
66196    </tr>
66197    <tr><td class='code'>@link libsbml#CompInvalidIdRefSyntax CompInvalidIdRefSyntax@endlink</td>
66198    <td class='meaning'>The 'comp:idRef' attribute must have the syntax of an SBML SId</td>
66199    <td class='s-na'></td>
66200    <td class='s-na'></td>
66201    <td class='s-na'></td>
66202    <td class='s-na'></td>
66203    <td class='s-na'></td>
66204    <td class='s-na'></td>
66205    <td class='s-error'></td>
66206    <td class='s-error'></td>
66207    </tr>
66208    <tr><td class='code'>@link libsbml#CompInvalidUnitRefSyntax CompInvalidUnitRefSyntax@endlink</td>
66209    <td class='meaning'>The 'comp:unitRef' attribute must have the syntax of an SBML SId</td>
66210    <td class='s-na'></td>
66211    <td class='s-na'></td>
66212    <td class='s-na'></td>
66213    <td class='s-na'></td>
66214    <td class='s-na'></td>
66215    <td class='s-na'></td>
66216    <td class='s-error'></td>
66217    <td class='s-error'></td>
66218    </tr>
66219    <tr><td class='code'>@link libsbml#CompInvalidMetaIdRefSyntax CompInvalidMetaIdRefSyntax@endlink</td>
66220    <td class='meaning'>The 'comp:metaIdRef' attribute must have the syntax of an XML ID</td>
66221    <td class='s-na'></td>
66222    <td class='s-na'></td>
66223    <td class='s-na'></td>
66224    <td class='s-na'></td>
66225    <td class='s-na'></td>
66226    <td class='s-na'></td>
66227    <td class='s-error'></td>
66228    <td class='s-error'></td>
66229    </tr>
66230    <tr><td class='code'>@link libsbml#CompOneSBaseRefOnly CompOneSBaseRefOnly@endlink</td>
66231    <td class='meaning'>Only one <code>&lt;sbaseRef&gt;</code></td>
66232    <td class='s-na'></td>
66233    <td class='s-na'></td>
66234    <td class='s-na'></td>
66235    <td class='s-na'></td>
66236    <td class='s-na'></td>
66237    <td class='s-na'></td>
66238    <td class='s-error'></td>
66239    <td class='s-error'></td>
66240    </tr>
66241    <tr><td class='code'>@link libsbml#CompDeprecatedSBaseRefSpelling CompDeprecatedSBaseRefSpelling@endlink</td>
66242    <td class='meaning'>The spelling 'sbaseRef' is deprecated</td>
66243    <td class='s-na'></td>
66244    <td class='s-na'></td>
66245    <td class='s-na'></td>
66246    <td class='s-na'></td>
66247    <td class='s-na'></td>
66248    <td class='s-na'></td>
66249    <td class='s-warning'></td>
66250    <td class='s-warning'></td>
66251    </tr>
66252    <tr><td class='code'>@link libsbml#CompSBaseRefMustReferenceObject CompSBaseRefMustReferenceObject@endlink</td>
66253    <td class='meaning'>An SBaseRef must reference an object.</td>
66254    <td class='s-na'></td>
66255    <td class='s-na'></td>
66256    <td class='s-na'></td>
66257    <td class='s-na'></td>
66258    <td class='s-na'></td>
66259    <td class='s-na'></td>
66260    <td class='s-error'></td>
66261    <td class='s-error'></td>
66262    </tr>
66263    <tr><td class='code'>@link libsbml#CompSBaseRefMustReferenceOnlyOneObject CompSBaseRefMustReferenceOnlyOneObject@endlink</td>
66264    <td class='meaning'>An SBaseRef must reference only one other object.</td>
66265    <td class='s-na'></td>
66266    <td class='s-na'></td>
66267    <td class='s-na'></td>
66268    <td class='s-na'></td>
66269    <td class='s-na'></td>
66270    <td class='s-na'></td>
66271    <td class='s-error'></td>
66272    <td class='s-error'></td>
66273    </tr>
66274    <tr><td class='code'>@link libsbml#CompNoMultipleReferences CompNoMultipleReferences@endlink</td>
66275    <td class='meaning'>Objects may not be referenced by mutiple SBaseRef constructs.</td>
66276    <td class='s-na'></td>
66277    <td class='s-na'></td>
66278    <td class='s-na'></td>
66279    <td class='s-na'></td>
66280    <td class='s-na'></td>
66281    <td class='s-na'></td>
66282    <td class='s-error'></td>
66283    <td class='s-error'></td>
66284    </tr>
66285    <tr><td class='code'>@link libsbml#CompPortMustReferenceObject CompPortMustReferenceObject@endlink</td>
66286    <td class='meaning'>Port must reference an object</td>
66287    <td class='s-na'></td>
66288    <td class='s-na'></td>
66289    <td class='s-na'></td>
66290    <td class='s-na'></td>
66291    <td class='s-na'></td>
66292    <td class='s-na'></td>
66293    <td class='s-error'></td>
66294    <td class='s-error'></td>
66295    </tr>
66296    <tr><td class='code'>@link libsbml#CompPortMustReferenceOnlyOneObject CompPortMustReferenceOnlyOneObject@endlink</td>
66297    <td class='meaning'>Port must reference only one other object.</td>
66298    <td class='s-na'></td>
66299    <td class='s-na'></td>
66300    <td class='s-na'></td>
66301    <td class='s-na'></td>
66302    <td class='s-na'></td>
66303    <td class='s-na'></td>
66304    <td class='s-error'></td>
66305    <td class='s-error'></td>
66306    </tr>
66307    <tr><td class='code'>@link libsbml#CompPortAllowedAttributes CompPortAllowedAttributes@endlink</td>
66308    <td class='meaning'>Allowed attributes on a Port</td>
66309    <td class='s-na'></td>
66310    <td class='s-na'></td>
66311    <td class='s-na'></td>
66312    <td class='s-na'></td>
66313    <td class='s-na'></td>
66314    <td class='s-na'></td>
66315    <td class='s-error'></td>
66316    <td class='s-error'></td>
66317    </tr>
66318    <tr><td class='code'>@link libsbml#CompPortReferencesUnique CompPortReferencesUnique@endlink</td>
66319    <td class='meaning'>Port definitions must be unique.</td>
66320    <td class='s-na'></td>
66321    <td class='s-na'></td>
66322    <td class='s-na'></td>
66323    <td class='s-na'></td>
66324    <td class='s-na'></td>
66325    <td class='s-na'></td>
66326    <td class='s-error'></td>
66327    <td class='s-error'></td>
66328    </tr>
66329    <tr><td class='code'>@link libsbml#CompDeletionMustReferenceObject CompDeletionMustReferenceObject@endlink</td>
66330    <td class='meaning'>Deletion must reference an object</td>
66331    <td class='s-na'></td>
66332    <td class='s-na'></td>
66333    <td class='s-na'></td>
66334    <td class='s-na'></td>
66335    <td class='s-na'></td>
66336    <td class='s-na'></td>
66337    <td class='s-error'></td>
66338    <td class='s-error'></td>
66339    </tr>
66340    <tr><td class='code'>@link libsbml#CompDeletionMustReferOnlyOneObject CompDeletionMustReferOnlyOneObject@endlink</td>
66341    <td class='meaning'>Deletion must reference only one other object.</td>
66342    <td class='s-na'></td>
66343    <td class='s-na'></td>
66344    <td class='s-na'></td>
66345    <td class='s-na'></td>
66346    <td class='s-na'></td>
66347    <td class='s-na'></td>
66348    <td class='s-error'></td>
66349    <td class='s-error'></td>
66350    </tr>
66351    <tr><td class='code'>@link libsbml#CompDeletionAllowedAttributes CompDeletionAllowedAttributes@endlink</td>
66352    <td class='meaning'>Allowed attributes on a Deletion</td>
66353    <td class='s-na'></td>
66354    <td class='s-na'></td>
66355    <td class='s-na'></td>
66356    <td class='s-na'></td>
66357    <td class='s-na'></td>
66358    <td class='s-na'></td>
66359    <td class='s-error'></td>
66360    <td class='s-error'></td>
66361    </tr>
66362    <tr><td class='code'>@link libsbml#CompReplacedElementMustRefObject CompReplacedElementMustRefObject@endlink</td>
66363    <td class='meaning'>ReplacedElement must reference an object</td>
66364    <td class='s-na'></td>
66365    <td class='s-na'></td>
66366    <td class='s-na'></td>
66367    <td class='s-na'></td>
66368    <td class='s-na'></td>
66369    <td class='s-na'></td>
66370    <td class='s-error'></td>
66371    <td class='s-error'></td>
66372    </tr>
66373    <tr><td class='code'>@link libsbml#CompReplacedElementMustRefOnlyOne CompReplacedElementMustRefOnlyOne@endlink</td>
66374    <td class='meaning'>ReplacedElement must reference only one other object.</td>
66375    <td class='s-na'></td>
66376    <td class='s-na'></td>
66377    <td class='s-na'></td>
66378    <td class='s-na'></td>
66379    <td class='s-na'></td>
66380    <td class='s-na'></td>
66381    <td class='s-error'></td>
66382    <td class='s-error'></td>
66383    </tr>
66384    <tr><td class='code'>@link libsbml#CompReplacedElementAllowedAttributes CompReplacedElementAllowedAttributes@endlink</td>
66385    <td class='meaning'>Allowed attributes on <code>&lt;replacedElement&gt;</code></td>
66386    <td class='s-na'></td>
66387    <td class='s-na'></td>
66388    <td class='s-na'></td>
66389    <td class='s-na'></td>
66390    <td class='s-na'></td>
66391    <td class='s-na'></td>
66392    <td class='s-error'></td>
66393    <td class='s-error'></td>
66394    </tr>
66395    <tr><td class='code'>@link libsbml#CompReplacedElementSubModelRef CompReplacedElementSubModelRef@endlink</td>
66396    <td class='meaning'>The 'comp:submodelRef' attribute must point to a <code>&lt;submodel&gt;</code></td>
66397    <td class='s-na'></td>
66398    <td class='s-na'></td>
66399    <td class='s-na'></td>
66400    <td class='s-na'></td>
66401    <td class='s-na'></td>
66402    <td class='s-na'></td>
66403    <td class='s-error'></td>
66404    <td class='s-error'></td>
66405    </tr>
66406    <tr><td class='code'>@link libsbml#CompReplacedElementDeletionRef CompReplacedElementDeletionRef@endlink</td>
66407    <td class='meaning'>The 'comp:deletion' attribute must point to a <code>&lt;deletion&gt;</code></td>
66408    <td class='s-na'></td>
66409    <td class='s-na'></td>
66410    <td class='s-na'></td>
66411    <td class='s-na'></td>
66412    <td class='s-na'></td>
66413    <td class='s-na'></td>
66414    <td class='s-error'></td>
66415    <td class='s-error'></td>
66416    </tr>
66417    <tr><td class='code'>@link libsbml#CompReplacedElementConvFactorRef CompReplacedElementConvFactorRef@endlink</td>
66418    <td class='meaning'>The 'comp:conversionFactor attribute must point to a <code>&lt;parameter&gt;</code></td>
66419    <td class='s-na'></td>
66420    <td class='s-na'></td>
66421    <td class='s-na'></td>
66422    <td class='s-na'></td>
66423    <td class='s-na'></td>
66424    <td class='s-na'></td>
66425    <td class='s-error'></td>
66426    <td class='s-error'></td>
66427    </tr>
66428    <tr><td class='code'>@link libsbml#CompReplacedElementSameReference CompReplacedElementSameReference@endlink</td>
66429    <td class='meaning'>No <code>&lt;replacedElement&gt;</code> refer to same object</td>
66430    <td class='s-na'></td>
66431    <td class='s-na'></td>
66432    <td class='s-na'></td>
66433    <td class='s-na'></td>
66434    <td class='s-na'></td>
66435    <td class='s-na'></td>
66436    <td class='s-error'></td>
66437    <td class='s-error'></td>
66438    </tr>
66439    <tr><td class='code'>@link libsbml#CompReplacedElementNoDelAndConvFact CompReplacedElementNoDelAndConvFact@endlink</td>
66440    <td class='meaning'>No <code>&lt;replacedElement&gt;</code> with deletion and conversionfactor</td>
66441    <td class='s-na'></td>
66442    <td class='s-na'></td>
66443    <td class='s-na'></td>
66444    <td class='s-na'></td>
66445    <td class='s-na'></td>
66446    <td class='s-na'></td>
66447    <td class='s-error'></td>
66448    <td class='s-error'></td>
66449    </tr>
66450    <tr><td class='code'>@link libsbml#CompReplacedByMustRefObject CompReplacedByMustRefObject@endlink</td>
66451    <td class='meaning'>ReplacedBy must reference an object</td>
66452    <td class='s-na'></td>
66453    <td class='s-na'></td>
66454    <td class='s-na'></td>
66455    <td class='s-na'></td>
66456    <td class='s-na'></td>
66457    <td class='s-na'></td>
66458    <td class='s-error'></td>
66459    <td class='s-error'></td>
66460    </tr>
66461    <tr><td class='code'>@link libsbml#CompReplacedByMustRefOnlyOne CompReplacedByMustRefOnlyOne@endlink</td>
66462    <td class='meaning'>ReplacedBy must reference only one other object.</td>
66463    <td class='s-na'></td>
66464    <td class='s-na'></td>
66465    <td class='s-na'></td>
66466    <td class='s-na'></td>
66467    <td class='s-na'></td>
66468    <td class='s-na'></td>
66469    <td class='s-error'></td>
66470    <td class='s-error'></td>
66471    </tr>
66472    <tr><td class='code'>@link libsbml#CompReplacedByAllowedAttributes CompReplacedByAllowedAttributes@endlink</td>
66473    <td class='meaning'>Allowed attributes on <code>&lt;replacedBy&gt;</code></td>
66474    <td class='s-na'></td>
66475    <td class='s-na'></td>
66476    <td class='s-na'></td>
66477    <td class='s-na'></td>
66478    <td class='s-na'></td>
66479    <td class='s-na'></td>
66480    <td class='s-error'></td>
66481    <td class='s-error'></td>
66482    </tr>
66483    <tr><td class='code'>@link libsbml#CompReplacedBySubModelRef CompReplacedBySubModelRef@endlink</td>
66484    <td class='meaning'>The 'comp:submodelRef' attribute must point to a <code>&lt;submodel&gt;</code></td>
66485    <td class='s-na'></td>
66486    <td class='s-na'></td>
66487    <td class='s-na'></td>
66488    <td class='s-na'></td>
66489    <td class='s-na'></td>
66490    <td class='s-na'></td>
66491    <td class='s-error'></td>
66492    <td class='s-error'></td>
66493    </tr>
66494    <tr><td class='code'>@link libsbml#CompMustReplaceSameClass CompMustReplaceSameClass@endlink</td>
66495    <td class='meaning'>Replaced classes must match.</td>
66496    <td class='s-na'></td>
66497    <td class='s-na'></td>
66498    <td class='s-na'></td>
66499    <td class='s-na'></td>
66500    <td class='s-na'></td>
66501    <td class='s-na'></td>
66502    <td class='s-error'></td>
66503    <td class='s-error'></td>
66504    </tr>
66505    <tr><td class='code'>@link libsbml#CompMustReplaceIDs CompMustReplaceIDs@endlink</td>
66506    <td class='meaning'>Replaced IDs must be replaced with IDs.</td>
66507    <td class='s-na'></td>
66508    <td class='s-na'></td>
66509    <td class='s-na'></td>
66510    <td class='s-na'></td>
66511    <td class='s-na'></td>
66512    <td class='s-na'></td>
66513    <td class='s-error'></td>
66514    <td class='s-error'></td>
66515    </tr>
66516    <tr><td class='code'>@link libsbml#CompMustReplaceMetaIDs CompMustReplaceMetaIDs@endlink</td>
66517    <td class='meaning'>Replaced metaids must be replaced with metaids.</td>
66518    <td class='s-na'></td>
66519    <td class='s-na'></td>
66520    <td class='s-na'></td>
66521    <td class='s-na'></td>
66522    <td class='s-na'></td>
66523    <td class='s-na'></td>
66524    <td class='s-error'></td>
66525    <td class='s-error'></td>
66526    </tr>
66527    <tr><td class='code'>@link libsbml#CompMustReplacePackageIDs CompMustReplacePackageIDs@endlink</td>
66528    <td class='meaning'>Replaced package IDs must be replaced with package IDs.</td>
66529    <td class='s-na'></td>
66530    <td class='s-na'></td>
66531    <td class='s-na'></td>
66532    <td class='s-na'></td>
66533    <td class='s-na'></td>
66534    <td class='s-na'></td>
66535    <td class='s-error'></td>
66536    <td class='s-error'></td>
66537    </tr>
66538    <tr><td class='code'>@link libsbml#CompUnresolvedReference CompUnresolvedReference@endlink</td>
66539    <td class='meaning'>Unresolved reference.</td>
66540    <td class='s-na'></td>
66541    <td class='s-na'></td>
66542    <td class='s-na'></td>
66543    <td class='s-na'></td>
66544    <td class='s-na'></td>
66545    <td class='s-na'></td>
66546    <td class='s-error'></td>
66547    <td class='s-error'></td>
66548    </tr>
66549    <tr><td class='code'>@link libsbml#CompNoModelInReference CompNoModelInReference@endlink</td>
66550    <td class='meaning'>No model in referenced document.</td>
66551    <td class='s-na'></td>
66552    <td class='s-na'></td>
66553    <td class='s-na'></td>
66554    <td class='s-na'></td>
66555    <td class='s-na'></td>
66556    <td class='s-na'></td>
66557    <td class='s-error'></td>
66558    <td class='s-error'></td>
66559    </tr>
66560    <tr><td class='code'>@link libsbml#CompExtModDefBad CompExtModDefBad@endlink</td>
66561    <td class='meaning'>Referenced <code>&lt;externalModelDefinition&gt;</code> unresolvable.</td>
66562    <td class='s-na'></td>
66563    <td class='s-na'></td>
66564    <td class='s-na'></td>
66565    <td class='s-na'></td>
66566    <td class='s-na'></td>
66567    <td class='s-na'></td>
66568    <td class='s-error'></td>
66569    <td class='s-error'></td>
66570    </tr>
66571    <tr><td class='code'>@link libsbml#CompModelFlatteningFailed CompModelFlatteningFailed@endlink</td>
66572    <td class='meaning'>Model failed to flatten.</td>
66573    <td class='s-na'></td>
66574    <td class='s-na'></td>
66575    <td class='s-na'></td>
66576    <td class='s-na'></td>
66577    <td class='s-na'></td>
66578    <td class='s-na'></td>
66579    <td class='s-error'></td>
66580    <td class='s-error'></td>
66581    </tr>
66582    <tr><td class='code'>@link libsbml#CompFlatModelNotValid CompFlatModelNotValid@endlink</td>
66583    <td class='meaning'>Flat model not valid.</td>
66584    <td class='s-na'></td>
66585    <td class='s-na'></td>
66586    <td class='s-na'></td>
66587    <td class='s-na'></td>
66588    <td class='s-na'></td>
66589    <td class='s-na'></td>
66590    <td class='s-error'></td>
66591    <td class='s-error'></td>
66592    </tr>
66593    <tr><td class='code'>@link libsbml#CompLineNumbersUnreliable CompLineNumbersUnreliable@endlink</td>
66594    <td class='meaning'>Line numbers unreliable.</td>
66595    <td class='s-na'></td>
66596    <td class='s-na'></td>
66597    <td class='s-na'></td>
66598    <td class='s-na'></td>
66599    <td class='s-na'></td>
66600    <td class='s-na'></td>
66601    <td class='s-warning'></td>
66602    <td class='s-warning'></td>
66603    </tr>
66604    <tr><td class='code'>@link libsbml#CompFlatteningNotRecognisedReqd CompFlatteningNotRecognisedReqd@endlink</td>
66605    <td class='meaning'>Flattening not implemented for required package.</td>
66606    <td class='s-na'></td>
66607    <td class='s-na'></td>
66608    <td class='s-na'></td>
66609    <td class='s-na'></td>
66610    <td class='s-na'></td>
66611    <td class='s-na'></td>
66612    <td class='s-warning'></td>
66613    <td class='s-warning'></td>
66614    </tr>
66615    <tr><td class='code'>@link libsbml#CompFlatteningNotRecognisedNotReqd CompFlatteningNotRecognisedNotReqd@endlink</td>
66616    <td class='meaning'>Flattening not implemented for unrequired package.</td>
66617    <td class='s-na'></td>
66618    <td class='s-na'></td>
66619    <td class='s-na'></td>
66620    <td class='s-na'></td>
66621    <td class='s-na'></td>
66622    <td class='s-na'></td>
66623    <td class='s-warning'></td>
66624    <td class='s-warning'></td>
66625    </tr>
66626    <tr><td class='code'>@link libsbml#CompFlatteningNotImplementedNotReqd CompFlatteningNotImplementedNotReqd@endlink</td>
66627    <td class='meaning'>Flattening not implemented for unrequired package.</td>
66628    <td class='s-na'></td>
66629    <td class='s-na'></td>
66630    <td class='s-na'></td>
66631    <td class='s-na'></td>
66632    <td class='s-na'></td>
66633    <td class='s-na'></td>
66634    <td class='s-warning'></td>
66635    <td class='s-warning'></td>
66636    </tr>
66637    <tr><td class='code'>@link libsbml#CompFlatteningNotImplementedReqd CompFlatteningNotImplementedReqd@endlink</td>
66638    <td class='meaning'>Flattening not implemented for required package.</td>
66639    <td class='s-na'></td>
66640    <td class='s-na'></td>
66641    <td class='s-na'></td>
66642    <td class='s-na'></td>
66643    <td class='s-na'></td>
66644    <td class='s-na'></td>
66645    <td class='s-warning'></td>
66646    <td class='s-warning'></td>
66647    </tr>
66648    <tr><td class='code'>@link libsbml#CompFlatteningWarning CompFlatteningWarning@endlink</td>
66649    <td class='meaning'>Flattening reference may come from package.</td>
66650    <td class='s-na'></td>
66651    <td class='s-na'></td>
66652    <td class='s-na'></td>
66653    <td class='s-na'></td>
66654    <td class='s-na'></td>
66655    <td class='s-na'></td>
66656    <td class='s-warning'></td>
66657    <td class='s-warning'></td>
66658    </tr>
66659    <tr><td class='code'>@link libsbml#CompDeprecatedDeleteFunction CompDeprecatedDeleteFunction@endlink</td>
66660    <td class='meaning'>The performDeletions functions is deprecated.</td>
66661    <td class='s-na'></td>
66662    <td class='s-na'></td>
66663    <td class='s-na'></td>
66664    <td class='s-na'></td>
66665    <td class='s-na'></td>
66666    <td class='s-na'></td>
66667    <td class='s-error'></td>
66668    <td class='s-error'></td>
66669    </tr>
66670    <tr><td class='code'>@link libsbml#CompDeprecatedReplaceFunction CompDeprecatedReplaceFunction@endlink</td>
66671    <td class='meaning'>The performReplacementsAndConversions fuctions is deprecated.</td>
66672    <td class='s-na'></td>
66673    <td class='s-na'></td>
66674    <td class='s-na'></td>
66675    <td class='s-na'></td>
66676    <td class='s-na'></td>
66677    <td class='s-na'></td>
66678    <td class='s-error'></td>
66679    <td class='s-error'></td>
66680    </tr>
66681    <tr><td class='code'>@link libsbml#CompDeletedReplacement CompDeletedReplacement@endlink</td>
66682    <td class='meaning'>Element deleted before a subelement could be replaced.</td>
66683    <td class='s-na'></td>
66684    <td class='s-na'></td>
66685    <td class='s-na'></td>
66686    <td class='s-na'></td>
66687    <td class='s-na'></td>
66688    <td class='s-na'></td>
66689    <td class='s-error'></td>
66690    <td class='s-error'></td>
66691    </tr>
66692    <tr><td class='code'>@link libsbml#CompIdRefMayReferenceUnknownPackage CompIdRefMayReferenceUnknownPackage@endlink</td>
66693    <td class='meaning'>The 'comp:idRef' attribute must be the 'id' of a model element</td>
66694    <td class='s-na'></td>
66695    <td class='s-na'></td>
66696    <td class='s-na'></td>
66697    <td class='s-na'></td>
66698    <td class='s-na'></td>
66699    <td class='s-na'></td>
66700    <td class='s-warning'></td>
66701    <td class='s-warning'></td>
66702    </tr>
66703    <tr><td class='code'>@link libsbml#CompMetaIdRefMayReferenceUnknownPkg CompMetaIdRefMayReferenceUnknownPkg@endlink</td>
66704    <td class='meaning'>The 'comp:metaIdRef' attribute must be the 'metaid' of a model element</td>
66705    <td class='s-na'></td>
66706    <td class='s-na'></td>
66707    <td class='s-na'></td>
66708    <td class='s-na'></td>
66709    <td class='s-na'></td>
66710    <td class='s-na'></td>
66711    <td class='s-warning'></td>
66712    <td class='s-warning'></td>
66713    </tr>
66714    <tr><td class='code'>@link libsbml#FbcUnknown FbcUnknown@endlink</td>
66715    <td class='meaning'></td>
66716    <td class='s-na'></td>
66717    <td class='s-na'></td>
66718    <td class='s-na'></td>
66719    <td class='s-na'></td>
66720    <td class='s-na'></td>
66721    <td class='s-na'></td>
66722    <td class='s-na'></td>
66723    <td class='s-na'></td>
66724    </tr>
66725    <tr><td class='code'>@link libsbml#FbcNSUndeclared FbcNSUndeclared@endlink</td>
66726    <td class='meaning'>The fbc ns is not correctly declared</td>
66727    <td class='s-na'></td>
66728    <td class='s-na'></td>
66729    <td class='s-na'></td>
66730    <td class='s-na'></td>
66731    <td class='s-na'></td>
66732    <td class='s-na'></td>
66733    <td class='s-error'></td>
66734    <td class='s-error'></td>
66735    </tr>
66736    <tr><td class='code'>@link libsbml#FbcElementNotInNs FbcElementNotInNs@endlink</td>
66737    <td class='meaning'>Element not in fbc namespace</td>
66738    <td class='s-na'></td>
66739    <td class='s-na'></td>
66740    <td class='s-na'></td>
66741    <td class='s-na'></td>
66742    <td class='s-na'></td>
66743    <td class='s-na'></td>
66744    <td class='s-error'></td>
66745    <td class='s-error'></td>
66746    </tr>
66747    <tr><td class='code'>@link libsbml#FbcDuplicateComponentId FbcDuplicateComponentId@endlink</td>
66748    <td class='meaning'>Duplicate 'id' attribute value</td>
66749    <td class='s-na'></td>
66750    <td class='s-na'></td>
66751    <td class='s-na'></td>
66752    <td class='s-na'></td>
66753    <td class='s-na'></td>
66754    <td class='s-na'></td>
66755    <td class='s-error'></td>
66756    <td class='s-error'></td>
66757    </tr>
66758    <tr><td class='code'>@link libsbml#FbcSBMLSIdSyntax FbcSBMLSIdSyntax@endlink</td>
66759    <td class='meaning'>Invalid 'id' attribute</td>
66760    <td class='s-na'></td>
66761    <td class='s-na'></td>
66762    <td class='s-na'></td>
66763    <td class='s-na'></td>
66764    <td class='s-na'></td>
66765    <td class='s-na'></td>
66766    <td class='s-error'></td>
66767    <td class='s-error'></td>
66768    </tr>
66769    <tr><td class='code'>@link libsbml#FbcAttributeRequiredMissing FbcAttributeRequiredMissing@endlink</td>
66770    <td class='meaning'>Required fbc:required attribute on <code>&lt;sbml&gt;</code></td>
66771    <td class='s-na'></td>
66772    <td class='s-na'></td>
66773    <td class='s-na'></td>
66774    <td class='s-na'></td>
66775    <td class='s-na'></td>
66776    <td class='s-na'></td>
66777    <td class='s-error'></td>
66778    <td class='s-error'></td>
66779    </tr>
66780    <tr><td class='code'>@link libsbml#FbcAttributeRequiredMustBeBoolean FbcAttributeRequiredMustBeBoolean@endlink</td>
66781    <td class='meaning'>The fbc:required attribute must be Boolean</td>
66782    <td class='s-na'></td>
66783    <td class='s-na'></td>
66784    <td class='s-na'></td>
66785    <td class='s-na'></td>
66786    <td class='s-na'></td>
66787    <td class='s-na'></td>
66788    <td class='s-error'></td>
66789    <td class='s-error'></td>
66790    </tr>
66791    <tr><td class='code'>@link libsbml#FbcRequiredFalse FbcRequiredFalse@endlink</td>
66792    <td class='meaning'>The fbc:required attribute must be 'false'</td>
66793    <td class='s-na'></td>
66794    <td class='s-na'></td>
66795    <td class='s-na'></td>
66796    <td class='s-na'></td>
66797    <td class='s-na'></td>
66798    <td class='s-na'></td>
66799    <td class='s-error'></td>
66800    <td class='s-error'></td>
66801    </tr>
66802    <tr><td class='code'>@link libsbml#FbcOnlyOneEachListOf FbcOnlyOneEachListOf@endlink</td>
66803    <td class='meaning'>One of each list of allowed</td>
66804    <td class='s-na'></td>
66805    <td class='s-na'></td>
66806    <td class='s-na'></td>
66807    <td class='s-na'></td>
66808    <td class='s-na'></td>
66809    <td class='s-na'></td>
66810    <td class='s-error'></td>
66811    <td class='s-error'></td>
66812    </tr>
66813    <tr><td class='code'>@link libsbml#FbcNoEmptyListOfs FbcNoEmptyListOfs@endlink</td>
66814    <td class='meaning'>ListOf elements cannot be empty</td>
66815    <td class='s-na'></td>
66816    <td class='s-na'></td>
66817    <td class='s-na'></td>
66818    <td class='s-na'></td>
66819    <td class='s-na'></td>
66820    <td class='s-na'></td>
66821    <td class='s-error'></td>
66822    <td class='s-error'></td>
66823    </tr>
66824    <tr><td class='code'>@link libsbml#FbcLOFluxBoundsAllowedElements FbcLOFluxBoundsAllowedElements@endlink</td>
66825    <td class='meaning'>Allowed elements on ListOfFluxBounds</td>
66826    <td class='s-na'></td>
66827    <td class='s-na'></td>
66828    <td class='s-na'></td>
66829    <td class='s-na'></td>
66830    <td class='s-na'></td>
66831    <td class='s-na'></td>
66832    <td class='s-error'></td>
66833    <td class='s-error'></td>
66834    </tr>
66835    <tr><td class='code'>@link libsbml#FbcLOObjectivesAllowedElements FbcLOObjectivesAllowedElements@endlink</td>
66836    <td class='meaning'>Allowed elements on ListOfObjectives</td>
66837    <td class='s-na'></td>
66838    <td class='s-na'></td>
66839    <td class='s-na'></td>
66840    <td class='s-na'></td>
66841    <td class='s-na'></td>
66842    <td class='s-na'></td>
66843    <td class='s-error'></td>
66844    <td class='s-error'></td>
66845    </tr>
66846    <tr><td class='code'>@link libsbml#FbcLOFluxBoundsAllowedAttributes FbcLOFluxBoundsAllowedAttributes@endlink</td>
66847    <td class='meaning'>Allowed attributes on ListOfFluxBounds</td>
66848    <td class='s-na'></td>
66849    <td class='s-na'></td>
66850    <td class='s-na'></td>
66851    <td class='s-na'></td>
66852    <td class='s-na'></td>
66853    <td class='s-na'></td>
66854    <td class='s-error'></td>
66855    <td class='s-error'></td>
66856    </tr>
66857    <tr><td class='code'>@link libsbml#FbcLOObjectivesAllowedAttributes FbcLOObjectivesAllowedAttributes@endlink</td>
66858    <td class='meaning'>Allowed attributes on ListOfObjectives</td>
66859    <td class='s-na'></td>
66860    <td class='s-na'></td>
66861    <td class='s-na'></td>
66862    <td class='s-na'></td>
66863    <td class='s-na'></td>
66864    <td class='s-na'></td>
66865    <td class='s-error'></td>
66866    <td class='s-error'></td>
66867    </tr>
66868    <tr><td class='code'>@link libsbml#FbcActiveObjectiveSyntax FbcActiveObjectiveSyntax@endlink</td>
66869    <td class='meaning'>Type of activeObjective attribute</td>
66870    <td class='s-na'></td>
66871    <td class='s-na'></td>
66872    <td class='s-na'></td>
66873    <td class='s-na'></td>
66874    <td class='s-na'></td>
66875    <td class='s-na'></td>
66876    <td class='s-error'></td>
66877    <td class='s-error'></td>
66878    </tr>
66879    <tr><td class='code'>@link libsbml#FbcActiveObjectiveRefersObjective FbcActiveObjectiveRefersObjective@endlink</td>
66880    <td class='meaning'>ActiveObjective must reference Objective</td>
66881    <td class='s-na'></td>
66882    <td class='s-na'></td>
66883    <td class='s-na'></td>
66884    <td class='s-na'></td>
66885    <td class='s-na'></td>
66886    <td class='s-na'></td>
66887    <td class='s-error'></td>
66888    <td class='s-error'></td>
66889    </tr>
66890    <tr><td class='code'>@link libsbml#FbcModelMustHaveStrict FbcModelMustHaveStrict@endlink</td>
66891    <td class='meaning'>'Strict' attribute required on <code>&lt;model&gt;</code></td>
66892    <td class='s-na'></td>
66893    <td class='s-na'></td>
66894    <td class='s-na'></td>
66895    <td class='s-na'></td>
66896    <td class='s-na'></td>
66897    <td class='s-na'></td>
66898    <td class='s-na'></td>
66899    <td class='s-na'></td>
66900    </tr>
66901    <tr><td class='code'>@link libsbml#FbcModelStrictMustBeBoolean FbcModelStrictMustBeBoolean@endlink</td>
66902    <td class='meaning'>'Strict' attribute must be Boolean</td>
66903    <td class='s-na'></td>
66904    <td class='s-na'></td>
66905    <td class='s-na'></td>
66906    <td class='s-na'></td>
66907    <td class='s-na'></td>
66908    <td class='s-na'></td>
66909    <td class='s-na'></td>
66910    <td class='s-na'></td>
66911    </tr>
66912    <tr><td class='code'>@link libsbml#FbcLOGeneProductsAllowedElements FbcLOGeneProductsAllowedElements@endlink</td>
66913    <td class='meaning'>Allowed elements on ListOfGeneProducts</td>
66914    <td class='s-na'></td>
66915    <td class='s-na'></td>
66916    <td class='s-na'></td>
66917    <td class='s-na'></td>
66918    <td class='s-na'></td>
66919    <td class='s-na'></td>
66920    <td class='s-na'></td>
66921    <td class='s-na'></td>
66922    </tr>
66923    <tr><td class='code'>@link libsbml#FbcLOGeneProductsAllowedAttributes FbcLOGeneProductsAllowedAttributes@endlink</td>
66924    <td class='meaning'>Allowed attributes on ListOfGeneProducts</td>
66925    <td class='s-na'></td>
66926    <td class='s-na'></td>
66927    <td class='s-na'></td>
66928    <td class='s-na'></td>
66929    <td class='s-na'></td>
66930    <td class='s-na'></td>
66931    <td class='s-na'></td>
66932    <td class='s-na'></td>
66933    </tr>
66934    <tr><td class='code'>@link libsbml#FbcSpeciesAllowedL3Attributes FbcSpeciesAllowedL3Attributes@endlink</td>
66935    <td class='meaning'>Species allowed attributes</td>
66936    <td class='s-na'></td>
66937    <td class='s-na'></td>
66938    <td class='s-na'></td>
66939    <td class='s-na'></td>
66940    <td class='s-na'></td>
66941    <td class='s-na'></td>
66942    <td class='s-error'></td>
66943    <td class='s-error'></td>
66944    </tr>
66945    <tr><td class='code'>@link libsbml#FbcSpeciesChargeMustBeInteger FbcSpeciesChargeMustBeInteger@endlink</td>
66946    <td class='meaning'>Charge must be integer</td>
66947    <td class='s-na'></td>
66948    <td class='s-na'></td>
66949    <td class='s-na'></td>
66950    <td class='s-na'></td>
66951    <td class='s-na'></td>
66952    <td class='s-na'></td>
66953    <td class='s-error'></td>
66954    <td class='s-error'></td>
66955    </tr>
66956    <tr><td class='code'>@link libsbml#FbcSpeciesFormulaMustBeString FbcSpeciesFormulaMustBeString@endlink</td>
66957    <td class='meaning'>Chemical formula must be string</td>
66958    <td class='s-na'></td>
66959    <td class='s-na'></td>
66960    <td class='s-na'></td>
66961    <td class='s-na'></td>
66962    <td class='s-na'></td>
66963    <td class='s-na'></td>
66964    <td class='s-error'></td>
66965    <td class='s-error'></td>
66966    </tr>
66967    <tr><td class='code'>@link libsbml#FbcFluxBoundAllowedL3Attributes FbcFluxBoundAllowedL3Attributes@endlink</td>
66968    <td class='meaning'><code>&lt;fluxBound&gt;</code> may only have 'metaId' and 'sboTerm' from L3 namespace</td>
66969    <td class='s-na'></td>
66970    <td class='s-na'></td>
66971    <td class='s-na'></td>
66972    <td class='s-na'></td>
66973    <td class='s-na'></td>
66974    <td class='s-na'></td>
66975    <td class='s-error'></td>
66976    <td class='s-error'></td>
66977    </tr>
66978    <tr><td class='code'>@link libsbml#FbcFluxBoundAllowedElements FbcFluxBoundAllowedElements@endlink</td>
66979    <td class='meaning'><code>&lt;fluxBound&gt;</code> may only have <code>&lt;notes&gt;</code> and <code>&lt;annotations&gt;</code> from L3 Core</td>
66980    <td class='s-na'></td>
66981    <td class='s-na'></td>
66982    <td class='s-na'></td>
66983    <td class='s-na'></td>
66984    <td class='s-na'></td>
66985    <td class='s-na'></td>
66986    <td class='s-error'></td>
66987    <td class='s-error'></td>
66988    </tr>
66989    <tr><td class='code'>@link libsbml#FbcFluxBoundRequiredAttributes FbcFluxBoundRequiredAttributes@endlink</td>
66990    <td class='meaning'>Invalid attribute found on <code>&lt;fluxBound&gt;</code> object</td>
66991    <td class='s-na'></td>
66992    <td class='s-na'></td>
66993    <td class='s-na'></td>
66994    <td class='s-na'></td>
66995    <td class='s-na'></td>
66996    <td class='s-na'></td>
66997    <td class='s-error'></td>
66998    <td class='s-error'></td>
66999    </tr>
67000    <tr><td class='code'>@link libsbml#FbcFluxBoundRectionMustBeSIdRef FbcFluxBoundRectionMustBeSIdRef@endlink</td>
67001    <td class='meaning'>Datatype for 'fbc:reaction' must be SIdRef</td>
67002    <td class='s-na'></td>
67003    <td class='s-na'></td>
67004    <td class='s-na'></td>
67005    <td class='s-na'></td>
67006    <td class='s-na'></td>
67007    <td class='s-na'></td>
67008    <td class='s-error'></td>
67009    <td class='s-error'></td>
67010    </tr>
67011    <tr><td class='code'>@link libsbml#FbcFluxBoundNameMustBeString FbcFluxBoundNameMustBeString@endlink</td>
67012    <td class='meaning'>The attribute 'fbc:name' must be of the data type string</td>
67013    <td class='s-na'></td>
67014    <td class='s-na'></td>
67015    <td class='s-na'></td>
67016    <td class='s-na'></td>
67017    <td class='s-na'></td>
67018    <td class='s-na'></td>
67019    <td class='s-error'></td>
67020    <td class='s-error'></td>
67021    </tr>
67022    <tr><td class='code'>@link libsbml#FbcFluxBoundOperationMustBeEnum FbcFluxBoundOperationMustBeEnum@endlink</td>
67023    <td class='meaning'>The attribute 'fbc:operation' must be of data type FbcOperation</td>
67024    <td class='s-na'></td>
67025    <td class='s-na'></td>
67026    <td class='s-na'></td>
67027    <td class='s-na'></td>
67028    <td class='s-na'></td>
67029    <td class='s-na'></td>
67030    <td class='s-error'></td>
67031    <td class='s-error'></td>
67032    </tr>
67033    <tr><td class='code'>@link libsbml#FbcFluxBoundValueMustBeDouble FbcFluxBoundValueMustBeDouble@endlink</td>
67034    <td class='meaning'>The attribute 'fbc:value' must be of the data type double</td>
67035    <td class='s-na'></td>
67036    <td class='s-na'></td>
67037    <td class='s-na'></td>
67038    <td class='s-na'></td>
67039    <td class='s-na'></td>
67040    <td class='s-na'></td>
67041    <td class='s-error'></td>
67042    <td class='s-error'></td>
67043    </tr>
67044    <tr><td class='code'>@link libsbml#FbcFluxBoundReactionMustExist FbcFluxBoundReactionMustExist@endlink</td>
67045    <td class='meaning'>'fbc:reaction' must refer to valid reaction</td>
67046    <td class='s-na'></td>
67047    <td class='s-na'></td>
67048    <td class='s-na'></td>
67049    <td class='s-na'></td>
67050    <td class='s-na'></td>
67051    <td class='s-na'></td>
67052    <td class='s-error'></td>
67053    <td class='s-error'></td>
67054    </tr>
67055    <tr><td class='code'>@link libsbml#FbcFluxBoundsForReactionConflict FbcFluxBoundsForReactionConflict@endlink</td>
67056    <td class='meaning'>Conflicting set of FluxBounds for a reaction</td>
67057    <td class='s-na'></td>
67058    <td class='s-na'></td>
67059    <td class='s-na'></td>
67060    <td class='s-na'></td>
67061    <td class='s-na'></td>
67062    <td class='s-na'></td>
67063    <td class='s-error'></td>
67064    <td class='s-error'></td>
67065    </tr>
67066    <tr><td class='code'>@link libsbml#FbcObjectiveAllowedL3Attributes FbcObjectiveAllowedL3Attributes@endlink</td>
67067    <td class='meaning'><code>&lt;objective&gt;</code> may only have 'metaId' and 'sboTerm' from L3 namespace</td>
67068    <td class='s-na'></td>
67069    <td class='s-na'></td>
67070    <td class='s-na'></td>
67071    <td class='s-na'></td>
67072    <td class='s-na'></td>
67073    <td class='s-na'></td>
67074    <td class='s-error'></td>
67075    <td class='s-error'></td>
67076    </tr>
67077    <tr><td class='code'>@link libsbml#FbcObjectiveAllowedElements FbcObjectiveAllowedElements@endlink</td>
67078    <td class='meaning'><code>&lt;objective&gt;</code> may only have <code>&lt;notes&gt;</code> and <code>&lt;annotations&gt;</code> from L3 Core</td>
67079    <td class='s-na'></td>
67080    <td class='s-na'></td>
67081    <td class='s-na'></td>
67082    <td class='s-na'></td>
67083    <td class='s-na'></td>
67084    <td class='s-na'></td>
67085    <td class='s-error'></td>
67086    <td class='s-error'></td>
67087    </tr>
67088    <tr><td class='code'>@link libsbml#FbcObjectiveRequiredAttributes FbcObjectiveRequiredAttributes@endlink</td>
67089    <td class='meaning'>Invalid attribute found on <code>&lt;objective&gt;</code> object</td>
67090    <td class='s-na'></td>
67091    <td class='s-na'></td>
67092    <td class='s-na'></td>
67093    <td class='s-na'></td>
67094    <td class='s-na'></td>
67095    <td class='s-na'></td>
67096    <td class='s-error'></td>
67097    <td class='s-error'></td>
67098    </tr>
67099    <tr><td class='code'>@link libsbml#FbcObjectiveNameMustBeString FbcObjectiveNameMustBeString@endlink</td>
67100    <td class='meaning'>The attribute 'fbc:name' must be of the data type string</td>
67101    <td class='s-na'></td>
67102    <td class='s-na'></td>
67103    <td class='s-na'></td>
67104    <td class='s-na'></td>
67105    <td class='s-na'></td>
67106    <td class='s-na'></td>
67107    <td class='s-error'></td>
67108    <td class='s-error'></td>
67109    </tr>
67110    <tr><td class='code'>@link libsbml#FbcObjectiveTypeMustBeEnum FbcObjectiveTypeMustBeEnum@endlink</td>
67111    <td class='meaning'>The attribute 'fbc:type' must be of data type FbcType.</td>
67112    <td class='s-na'></td>
67113    <td class='s-na'></td>
67114    <td class='s-na'></td>
67115    <td class='s-na'></td>
67116    <td class='s-na'></td>
67117    <td class='s-na'></td>
67118    <td class='s-error'></td>
67119    <td class='s-error'></td>
67120    </tr>
67121    <tr><td class='code'>@link libsbml#FbcObjectiveOneListOfObjectives FbcObjectiveOneListOfObjectives@endlink</td>
67122    <td class='meaning'>An <code>&lt;objective&gt;</code> must have one <code>&lt;listOfFluxObjectives&gt;</code>.</td>
67123    <td class='s-na'></td>
67124    <td class='s-na'></td>
67125    <td class='s-na'></td>
67126    <td class='s-na'></td>
67127    <td class='s-na'></td>
67128    <td class='s-na'></td>
67129    <td class='s-error'></td>
67130    <td class='s-error'></td>
67131    </tr>
67132    <tr><td class='code'>@link libsbml#FbcObjectiveLOFluxObjMustNotBeEmpty FbcObjectiveLOFluxObjMustNotBeEmpty@endlink</td>
67133    <td class='meaning'><code>&lt;listOfFluxObjectives&gt;</code> subobject must not be empty</td>
67134    <td class='s-na'></td>
67135    <td class='s-na'></td>
67136    <td class='s-na'></td>
67137    <td class='s-na'></td>
67138    <td class='s-na'></td>
67139    <td class='s-na'></td>
67140    <td class='s-error'></td>
67141    <td class='s-error'></td>
67142    </tr>
67143    <tr><td class='code'>@link libsbml#FbcObjectiveLOFluxObjOnlyFluxObj FbcObjectiveLOFluxObjOnlyFluxObj@endlink</td>
67144    <td class='meaning'>Invalid element found in <code>&lt;listOfFluxObjectives&gt;</code></td>
67145    <td class='s-na'></td>
67146    <td class='s-na'></td>
67147    <td class='s-na'></td>
67148    <td class='s-na'></td>
67149    <td class='s-na'></td>
67150    <td class='s-na'></td>
67151    <td class='s-error'></td>
67152    <td class='s-error'></td>
67153    </tr>
67154    <tr><td class='code'>@link libsbml#FbcObjectiveLOFluxObjAllowedAttribs FbcObjectiveLOFluxObjAllowedAttribs@endlink</td>
67155    <td class='meaning'><code>&lt;listOfFluxObjectives&gt;</code> may only have 'metaId' and 'sboTerm' from L3 core</td>
67156    <td class='s-na'></td>
67157    <td class='s-na'></td>
67158    <td class='s-na'></td>
67159    <td class='s-na'></td>
67160    <td class='s-na'></td>
67161    <td class='s-na'></td>
67162    <td class='s-error'></td>
67163    <td class='s-error'></td>
67164    </tr>
67165    <tr><td class='code'>@link libsbml#FbcFluxObjectAllowedL3Attributes FbcFluxObjectAllowedL3Attributes@endlink</td>
67166    <td class='meaning'><code>&lt;fluxObjective&gt;</code> may only have 'metaId' and 'sboTerm' from L3 namespace</td>
67167    <td class='s-na'></td>
67168    <td class='s-na'></td>
67169    <td class='s-na'></td>
67170    <td class='s-na'></td>
67171    <td class='s-na'></td>
67172    <td class='s-na'></td>
67173    <td class='s-error'></td>
67174    <td class='s-error'></td>
67175    </tr>
67176    <tr><td class='code'>@link libsbml#FbcFluxObjectAllowedElements FbcFluxObjectAllowedElements@endlink</td>
67177    <td class='meaning'><code>&lt;fluxObjective&gt;</code> may only have <code>&lt;notes&gt;</code> and <code>&lt;annotations&gt;</code> from L3 Core</td>
67178    <td class='s-na'></td>
67179    <td class='s-na'></td>
67180    <td class='s-na'></td>
67181    <td class='s-na'></td>
67182    <td class='s-na'></td>
67183    <td class='s-na'></td>
67184    <td class='s-error'></td>
67185    <td class='s-error'></td>
67186    </tr>
67187    <tr><td class='code'>@link libsbml#FbcFluxObjectRequiredAttributes FbcFluxObjectRequiredAttributes@endlink</td>
67188    <td class='meaning'>Invalid attribute found on <code>&lt;fluxObjective&gt;</code> object</td>
67189    <td class='s-na'></td>
67190    <td class='s-na'></td>
67191    <td class='s-na'></td>
67192    <td class='s-na'></td>
67193    <td class='s-na'></td>
67194    <td class='s-na'></td>
67195    <td class='s-error'></td>
67196    <td class='s-error'></td>
67197    </tr>
67198    <tr><td class='code'>@link libsbml#FbcFluxObjectNameMustBeString FbcFluxObjectNameMustBeString@endlink</td>
67199    <td class='meaning'>The attribute 'fbc:name' must be of the data type string</td>
67200    <td class='s-na'></td>
67201    <td class='s-na'></td>
67202    <td class='s-na'></td>
67203    <td class='s-na'></td>
67204    <td class='s-na'></td>
67205    <td class='s-na'></td>
67206    <td class='s-error'></td>
67207    <td class='s-error'></td>
67208    </tr>
67209    <tr><td class='code'>@link libsbml#FbcFluxObjectReactionMustBeSIdRef FbcFluxObjectReactionMustBeSIdRef@endlink</td>
67210    <td class='meaning'>Datatype for 'fbc:reaction' must be SIdRef</td>
67211    <td class='s-na'></td>
67212    <td class='s-na'></td>
67213    <td class='s-na'></td>
67214    <td class='s-na'></td>
67215    <td class='s-na'></td>
67216    <td class='s-na'></td>
67217    <td class='s-error'></td>
67218    <td class='s-error'></td>
67219    </tr>
67220    <tr><td class='code'>@link libsbml#FbcFluxObjectReactionMustExist FbcFluxObjectReactionMustExist@endlink</td>
67221    <td class='meaning'>'fbc:reaction' must refer to valid reaction</td>
67222    <td class='s-na'></td>
67223    <td class='s-na'></td>
67224    <td class='s-na'></td>
67225    <td class='s-na'></td>
67226    <td class='s-na'></td>
67227    <td class='s-na'></td>
67228    <td class='s-error'></td>
67229    <td class='s-error'></td>
67230    </tr>
67231    <tr><td class='code'>@link libsbml#FbcFluxObjectCoefficientMustBeDouble FbcFluxObjectCoefficientMustBeDouble@endlink</td>
67232    <td class='meaning'>The attribute 'fbc:coefficient' must be of the data type double</td>
67233    <td class='s-na'></td>
67234    <td class='s-na'></td>
67235    <td class='s-na'></td>
67236    <td class='s-na'></td>
67237    <td class='s-na'></td>
67238    <td class='s-na'></td>
67239    <td class='s-error'></td>
67240    <td class='s-error'></td>
67241    </tr>
67242    <tr><td class='code'>@link libsbml#FbcFluxObjectCoefficientWhenStrict FbcFluxObjectCoefficientWhenStrict@endlink</td>
67243    <td class='meaning'>The 'fbc:coefficient' must be declared when strict</td>
67244    <td class='s-na'></td>
67245    <td class='s-na'></td>
67246    <td class='s-na'></td>
67247    <td class='s-na'></td>
67248    <td class='s-na'></td>
67249    <td class='s-na'></td>
67250    <td class='s-na'></td>
67251    <td class='s-na'></td>
67252    </tr>
67253    <tr><td class='code'>@link libsbml#FbcReactionOnlyOneGeneProdAss FbcReactionOnlyOneGeneProdAss@endlink</td>
67254    <td class='meaning'>One GeneProductAssociation in a Reaction</td>
67255    <td class='s-na'></td>
67256    <td class='s-na'></td>
67257    <td class='s-na'></td>
67258    <td class='s-na'></td>
67259    <td class='s-na'></td>
67260    <td class='s-na'></td>
67261    <td class='s-na'></td>
67262    <td class='s-na'></td>
67263    </tr>
67264    <tr><td class='code'>@link libsbml#FbcReactionAllowedAttributes FbcReactionAllowedAttributes@endlink</td>
67265    <td class='meaning'>Fbc attributes on a Reaction</td>
67266    <td class='s-na'></td>
67267    <td class='s-na'></td>
67268    <td class='s-na'></td>
67269    <td class='s-na'></td>
67270    <td class='s-na'></td>
67271    <td class='s-na'></td>
67272    <td class='s-na'></td>
67273    <td class='s-na'></td>
67274    </tr>
67275    <tr><td class='code'>@link libsbml#FbcReactionLwrBoundSIdRef FbcReactionLwrBoundSIdRef@endlink</td>
67276    <td class='meaning'>LowerBound must be SIdRef</td>
67277    <td class='s-na'></td>
67278    <td class='s-na'></td>
67279    <td class='s-na'></td>
67280    <td class='s-na'></td>
67281    <td class='s-na'></td>
67282    <td class='s-na'></td>
67283    <td class='s-na'></td>
67284    <td class='s-na'></td>
67285    </tr>
67286    <tr><td class='code'>@link libsbml#FbcReactionUpBoundSIdRef FbcReactionUpBoundSIdRef@endlink</td>
67287    <td class='meaning'>UpperBound must be SIdRef</td>
67288    <td class='s-na'></td>
67289    <td class='s-na'></td>
67290    <td class='s-na'></td>
67291    <td class='s-na'></td>
67292    <td class='s-na'></td>
67293    <td class='s-na'></td>
67294    <td class='s-na'></td>
67295    <td class='s-na'></td>
67296    </tr>
67297    <tr><td class='code'>@link libsbml#FbcReactionLwrBoundRefExists FbcReactionLwrBoundRefExists@endlink</td>
67298    <td class='meaning'>LowerBound must point to Parameter</td>
67299    <td class='s-na'></td>
67300    <td class='s-na'></td>
67301    <td class='s-na'></td>
67302    <td class='s-na'></td>
67303    <td class='s-na'></td>
67304    <td class='s-na'></td>
67305    <td class='s-na'></td>
67306    <td class='s-na'></td>
67307    </tr>
67308    <tr><td class='code'>@link libsbml#FbcReactionUpBoundRefExists FbcReactionUpBoundRefExists@endlink</td>
67309    <td class='meaning'>UpperBound must point to Parameter</td>
67310    <td class='s-na'></td>
67311    <td class='s-na'></td>
67312    <td class='s-na'></td>
67313    <td class='s-na'></td>
67314    <td class='s-na'></td>
67315    <td class='s-na'></td>
67316    <td class='s-na'></td>
67317    <td class='s-na'></td>
67318    </tr>
67319    <tr><td class='code'>@link libsbml#FbcReactionMustHaveBoundsStrict FbcReactionMustHaveBoundsStrict@endlink</td>
67320    <td class='meaning'>Reaction must have bounds when strict</td>
67321    <td class='s-na'></td>
67322    <td class='s-na'></td>
67323    <td class='s-na'></td>
67324    <td class='s-na'></td>
67325    <td class='s-na'></td>
67326    <td class='s-na'></td>
67327    <td class='s-na'></td>
67328    <td class='s-na'></td>
67329    </tr>
67330    <tr><td class='code'>@link libsbml#FbcReactionConstantBoundsStrict FbcReactionConstantBoundsStrict@endlink</td>
67331    <td class='meaning'>Reaction bounds constant when strict</td>
67332    <td class='s-na'></td>
67333    <td class='s-na'></td>
67334    <td class='s-na'></td>
67335    <td class='s-na'></td>
67336    <td class='s-na'></td>
67337    <td class='s-na'></td>
67338    <td class='s-na'></td>
67339    <td class='s-na'></td>
67340    </tr>
67341    <tr><td class='code'>@link libsbml#FbcReactionBoundsMustHaveValuesStrict FbcReactionBoundsMustHaveValuesStrict@endlink</td>
67342    <td class='meaning'>Reaction bounds must have values when strict</td>
67343    <td class='s-na'></td>
67344    <td class='s-na'></td>
67345    <td class='s-na'></td>
67346    <td class='s-na'></td>
67347    <td class='s-na'></td>
67348    <td class='s-na'></td>
67349    <td class='s-na'></td>
67350    <td class='s-na'></td>
67351    </tr>
67352    <tr><td class='code'>@link libsbml#FbcReactionBoundsNotAssignedStrict FbcReactionBoundsNotAssignedStrict@endlink</td>
67353    <td class='meaning'>Reaction bounds not assigned when strict</td>
67354    <td class='s-na'></td>
67355    <td class='s-na'></td>
67356    <td class='s-na'></td>
67357    <td class='s-na'></td>
67358    <td class='s-na'></td>
67359    <td class='s-na'></td>
67360    <td class='s-na'></td>
67361    <td class='s-na'></td>
67362    </tr>
67363    <tr><td class='code'>@link libsbml#FbcReactionLwrBoundNotInfStrict FbcReactionLwrBoundNotInfStrict@endlink</td>
67364    <td class='meaning'>LowerBound cannot be INF when strict</td>
67365    <td class='s-na'></td>
67366    <td class='s-na'></td>
67367    <td class='s-na'></td>
67368    <td class='s-na'></td>
67369    <td class='s-na'></td>
67370    <td class='s-na'></td>
67371    <td class='s-na'></td>
67372    <td class='s-na'></td>
67373    </tr>
67374    <tr><td class='code'>@link libsbml#FbcReactionUpBoundNotNegInfStrict FbcReactionUpBoundNotNegInfStrict@endlink</td>
67375    <td class='meaning'>UpperBound cannot be -INF when strict</td>
67376    <td class='s-na'></td>
67377    <td class='s-na'></td>
67378    <td class='s-na'></td>
67379    <td class='s-na'></td>
67380    <td class='s-na'></td>
67381    <td class='s-na'></td>
67382    <td class='s-na'></td>
67383    <td class='s-na'></td>
67384    </tr>
67385    <tr><td class='code'>@link libsbml#FbcReactionLwrLessThanUpStrict FbcReactionLwrLessThanUpStrict@endlink</td>
67386    <td class='meaning'>LowerBound less than upperBound when strict</td>
67387    <td class='s-na'></td>
67388    <td class='s-na'></td>
67389    <td class='s-na'></td>
67390    <td class='s-na'></td>
67391    <td class='s-na'></td>
67392    <td class='s-na'></td>
67393    <td class='s-na'></td>
67394    <td class='s-na'></td>
67395    </tr>
67396    <tr><td class='code'>@link libsbml#FbcSpeciesReferenceConstantStrict FbcSpeciesReferenceConstantStrict@endlink</td>
67397    <td class='meaning'>SpeciesReferences must be constant when strict</td>
67398    <td class='s-na'></td>
67399    <td class='s-na'></td>
67400    <td class='s-na'></td>
67401    <td class='s-na'></td>
67402    <td class='s-na'></td>
67403    <td class='s-na'></td>
67404    <td class='s-na'></td>
67405    <td class='s-na'></td>
67406    </tr>
67407    <tr><td class='code'>@link libsbml#FbcSpeciesRefsStoichMustBeRealStrict FbcSpeciesRefsStoichMustBeRealStrict@endlink</td>
67408    <td class='meaning'>Stoichiometry of SpeciesReferences must be real valued when strict</td>
67409    <td class='s-na'></td>
67410    <td class='s-na'></td>
67411    <td class='s-na'></td>
67412    <td class='s-na'></td>
67413    <td class='s-na'></td>
67414    <td class='s-na'></td>
67415    <td class='s-na'></td>
67416    <td class='s-na'></td>
67417    </tr>
67418    <tr><td class='code'>@link libsbml#FbcSpeciesRefNotAssignedStrict FbcSpeciesRefNotAssignedStrict@endlink</td>
67419    <td class='meaning'>SpeciesReference not target of InitialAssignment when strict</td>
67420    <td class='s-na'></td>
67421    <td class='s-na'></td>
67422    <td class='s-na'></td>
67423    <td class='s-na'></td>
67424    <td class='s-na'></td>
67425    <td class='s-na'></td>
67426    <td class='s-na'></td>
67427    <td class='s-na'></td>
67428    </tr>
67429    <tr><td class='code'>@link libsbml#FbcGeneProdAssocAllowedCoreAttribs FbcGeneProdAssocAllowedCoreAttribs@endlink</td>
67430    <td class='meaning'>Allowed core attributes on <code>&lt;GeneProductAssociation&gt;</code></td>
67431    <td class='s-na'></td>
67432    <td class='s-na'></td>
67433    <td class='s-na'></td>
67434    <td class='s-na'></td>
67435    <td class='s-na'></td>
67436    <td class='s-na'></td>
67437    <td class='s-na'></td>
67438    <td class='s-na'></td>
67439    </tr>
67440    <tr><td class='code'>@link libsbml#FbcGeneProdAssocAllowedCoreElements FbcGeneProdAssocAllowedCoreElements@endlink</td>
67441    <td class='meaning'>Allowed core elements on <code>&lt;GeneProductAssociation&gt;</code></td>
67442    <td class='s-na'></td>
67443    <td class='s-na'></td>
67444    <td class='s-na'></td>
67445    <td class='s-na'></td>
67446    <td class='s-na'></td>
67447    <td class='s-na'></td>
67448    <td class='s-na'></td>
67449    <td class='s-na'></td>
67450    </tr>
67451    <tr><td class='code'>@link libsbml#FbcGeneProdAssocAllowedAttribs FbcGeneProdAssocAllowedAttribs@endlink</td>
67452    <td class='meaning'>Allowed fbc attributes on <code>&lt;GeneProductAssociation&gt;</code></td>
67453    <td class='s-na'></td>
67454    <td class='s-na'></td>
67455    <td class='s-na'></td>
67456    <td class='s-na'></td>
67457    <td class='s-na'></td>
67458    <td class='s-na'></td>
67459    <td class='s-na'></td>
67460    <td class='s-na'></td>
67461    </tr>
67462    <tr><td class='code'>@link libsbml#FbcGeneProdAssocIdSyntax FbcGeneProdAssocIdSyntax@endlink</td>
67463    <td class='meaning'>'fbc:id' must have SId syntax</td>
67464    <td class='s-na'></td>
67465    <td class='s-na'></td>
67466    <td class='s-na'></td>
67467    <td class='s-na'></td>
67468    <td class='s-na'></td>
67469    <td class='s-na'></td>
67470    <td class='s-na'></td>
67471    <td class='s-na'></td>
67472    </tr>
67473    <tr><td class='code'>@link libsbml#FbcGeneProdAssocContainsOneElement FbcGeneProdAssocContainsOneElement@endlink</td>
67474    <td class='meaning'><code>&lt;GeneProductAssociation&gt;</code> must contain one concrete object</td>
67475    <td class='s-na'></td>
67476    <td class='s-na'></td>
67477    <td class='s-na'></td>
67478    <td class='s-na'></td>
67479    <td class='s-na'></td>
67480    <td class='s-na'></td>
67481    <td class='s-na'></td>
67482    <td class='s-na'></td>
67483    </tr>
67484    <tr><td class='code'>@link libsbml#FbcGeneProdAssocNameMustBeString FbcGeneProdAssocNameMustBeString@endlink</td>
67485    <td class='meaning'>'fbc:name' must be string</td>
67486    <td class='s-na'></td>
67487    <td class='s-na'></td>
67488    <td class='s-na'></td>
67489    <td class='s-na'></td>
67490    <td class='s-na'></td>
67491    <td class='s-na'></td>
67492    <td class='s-na'></td>
67493    <td class='s-na'></td>
67494    </tr>
67495    <tr><td class='code'>@link libsbml#FbcGeneProdRefAllowedCoreAttribs FbcGeneProdRefAllowedCoreAttribs@endlink</td>
67496    <td class='meaning'>Allowed core attributes on <code>&lt;GeneProductRef&gt;</code></td>
67497    <td class='s-na'></td>
67498    <td class='s-na'></td>
67499    <td class='s-na'></td>
67500    <td class='s-na'></td>
67501    <td class='s-na'></td>
67502    <td class='s-na'></td>
67503    <td class='s-na'></td>
67504    <td class='s-na'></td>
67505    </tr>
67506    <tr><td class='code'>@link libsbml#FbcGeneProdRefAllowedCoreElements FbcGeneProdRefAllowedCoreElements@endlink</td>
67507    <td class='meaning'>Allowed core elements on <code>&lt;GeneProductRef&gt;</code></td>
67508    <td class='s-na'></td>
67509    <td class='s-na'></td>
67510    <td class='s-na'></td>
67511    <td class='s-na'></td>
67512    <td class='s-na'></td>
67513    <td class='s-na'></td>
67514    <td class='s-na'></td>
67515    <td class='s-na'></td>
67516    </tr>
67517    <tr><td class='code'>@link libsbml#FbcGeneProdRefAllowedAttribs FbcGeneProdRefAllowedAttribs@endlink</td>
67518    <td class='meaning'>Allowed fbc attributes on <code>&lt;GeneProductRef&gt;</code></td>
67519    <td class='s-na'></td>
67520    <td class='s-na'></td>
67521    <td class='s-na'></td>
67522    <td class='s-na'></td>
67523    <td class='s-na'></td>
67524    <td class='s-na'></td>
67525    <td class='s-na'></td>
67526    <td class='s-na'></td>
67527    </tr>
67528    <tr><td class='code'>@link libsbml#FbcGeneProdRefGeneProductSIdRef FbcGeneProdRefGeneProductSIdRef@endlink</td>
67529    <td class='meaning'>'fbc:geneProduct' must be SIdRef</td>
67530    <td class='s-na'></td>
67531    <td class='s-na'></td>
67532    <td class='s-na'></td>
67533    <td class='s-na'></td>
67534    <td class='s-na'></td>
67535    <td class='s-na'></td>
67536    <td class='s-na'></td>
67537    <td class='s-na'></td>
67538    </tr>
67539    <tr><td class='code'>@link libsbml#FbcGeneProdRefGeneProductExists FbcGeneProdRefGeneProductExists@endlink</td>
67540    <td class='meaning'>'fbc:geneProduct' must point to existing <code>&lt;GeneProduct&gt;</code></td>
67541    <td class='s-na'></td>
67542    <td class='s-na'></td>
67543    <td class='s-na'></td>
67544    <td class='s-na'></td>
67545    <td class='s-na'></td>
67546    <td class='s-na'></td>
67547    <td class='s-na'></td>
67548    <td class='s-na'></td>
67549    </tr>
67550    <tr><td class='code'>@link libsbml#FbcAndAllowedCoreAttributes FbcAndAllowedCoreAttributes@endlink</td>
67551    <td class='meaning'>Allowed core attributes on <code>&lt;And&gt;</code></td>
67552    <td class='s-na'></td>
67553    <td class='s-na'></td>
67554    <td class='s-na'></td>
67555    <td class='s-na'></td>
67556    <td class='s-na'></td>
67557    <td class='s-na'></td>
67558    <td class='s-na'></td>
67559    <td class='s-na'></td>
67560    </tr>
67561    <tr><td class='code'>@link libsbml#FbcAndAllowedCoreElements FbcAndAllowedCoreElements@endlink</td>
67562    <td class='meaning'>Allowed core attributes on <code>&lt;And&gt;</code></td>
67563    <td class='s-na'></td>
67564    <td class='s-na'></td>
67565    <td class='s-na'></td>
67566    <td class='s-na'></td>
67567    <td class='s-na'></td>
67568    <td class='s-na'></td>
67569    <td class='s-na'></td>
67570    <td class='s-na'></td>
67571    </tr>
67572    <tr><td class='code'>@link libsbml#FbcAndTwoChildren FbcAndTwoChildren@endlink</td>
67573    <td class='meaning'><code>&lt;And&gt;</code> must have at least two child elements</td>
67574    <td class='s-na'></td>
67575    <td class='s-na'></td>
67576    <td class='s-na'></td>
67577    <td class='s-na'></td>
67578    <td class='s-na'></td>
67579    <td class='s-na'></td>
67580    <td class='s-na'></td>
67581    <td class='s-na'></td>
67582    </tr>
67583    <tr><td class='code'>@link libsbml#FbcOrAllowedCoreAttributes FbcOrAllowedCoreAttributes@endlink</td>
67584    <td class='meaning'>Allowed core attributes on <code>&lt;Or&gt;</code></td>
67585    <td class='s-na'></td>
67586    <td class='s-na'></td>
67587    <td class='s-na'></td>
67588    <td class='s-na'></td>
67589    <td class='s-na'></td>
67590    <td class='s-na'></td>
67591    <td class='s-na'></td>
67592    <td class='s-na'></td>
67593    </tr>
67594    <tr><td class='code'>@link libsbml#FbcOrAllowedCoreElements FbcOrAllowedCoreElements@endlink</td>
67595    <td class='meaning'>Allowed core elements on <code>&lt;Or&gt;</code></td>
67596    <td class='s-na'></td>
67597    <td class='s-na'></td>
67598    <td class='s-na'></td>
67599    <td class='s-na'></td>
67600    <td class='s-na'></td>
67601    <td class='s-na'></td>
67602    <td class='s-na'></td>
67603    <td class='s-na'></td>
67604    </tr>
67605    <tr><td class='code'>@link libsbml#FbcOrTwoChildren FbcOrTwoChildren@endlink</td>
67606    <td class='meaning'><code>&lt;Or&gt;</code> must have at least two child elements</td>
67607    <td class='s-na'></td>
67608    <td class='s-na'></td>
67609    <td class='s-na'></td>
67610    <td class='s-na'></td>
67611    <td class='s-na'></td>
67612    <td class='s-na'></td>
67613    <td class='s-na'></td>
67614    <td class='s-na'></td>
67615    </tr>
67616    <tr><td class='code'>@link libsbml#FbcGeneProductAllowedCoreAttributes FbcGeneProductAllowedCoreAttributes@endlink</td>
67617    <td class='meaning'>Allowed core attributes on <code>&lt;GeneProduct&gt;</code></td>
67618    <td class='s-na'></td>
67619    <td class='s-na'></td>
67620    <td class='s-na'></td>
67621    <td class='s-na'></td>
67622    <td class='s-na'></td>
67623    <td class='s-na'></td>
67624    <td class='s-na'></td>
67625    <td class='s-na'></td>
67626    </tr>
67627    <tr><td class='code'>@link libsbml#FbcGeneProductAllowedCoreElements FbcGeneProductAllowedCoreElements@endlink</td>
67628    <td class='meaning'>Allowed core elements on <code>&lt;GeneProduct&gt;</code></td>
67629    <td class='s-na'></td>
67630    <td class='s-na'></td>
67631    <td class='s-na'></td>
67632    <td class='s-na'></td>
67633    <td class='s-na'></td>
67634    <td class='s-na'></td>
67635    <td class='s-na'></td>
67636    <td class='s-na'></td>
67637    </tr>
67638    <tr><td class='code'>@link libsbml#FbcGeneProductAllowedAttributes FbcGeneProductAllowedAttributes@endlink</td>
67639    <td class='meaning'>Allowed fbc attributes on <code>&lt;GeneProduct&gt;</code></td>
67640    <td class='s-na'></td>
67641    <td class='s-na'></td>
67642    <td class='s-na'></td>
67643    <td class='s-na'></td>
67644    <td class='s-na'></td>
67645    <td class='s-na'></td>
67646    <td class='s-na'></td>
67647    <td class='s-na'></td>
67648    </tr>
67649    <tr><td class='code'>@link libsbml#FbcGeneProductLabelMustBeString FbcGeneProductLabelMustBeString@endlink</td>
67650    <td class='meaning'>'fbc:label' must be string</td>
67651    <td class='s-na'></td>
67652    <td class='s-na'></td>
67653    <td class='s-na'></td>
67654    <td class='s-na'></td>
67655    <td class='s-na'></td>
67656    <td class='s-na'></td>
67657    <td class='s-na'></td>
67658    <td class='s-na'></td>
67659    </tr>
67660    <tr><td class='code'>@link libsbml#FbcGeneProductLabelMustBeUnique FbcGeneProductLabelMustBeUnique@endlink</td>
67661    <td class='meaning'>'fbc:label' must be unique</td>
67662    <td class='s-na'></td>
67663    <td class='s-na'></td>
67664    <td class='s-na'></td>
67665    <td class='s-na'></td>
67666    <td class='s-na'></td>
67667    <td class='s-na'></td>
67668    <td class='s-na'></td>
67669    <td class='s-na'></td>
67670    </tr>
67671    <tr><td class='code'>@link libsbml#FbcGeneProductNameMustBeString FbcGeneProductNameMustBeString@endlink</td>
67672    <td class='meaning'>'fbc:name' must be string</td>
67673    <td class='s-na'></td>
67674    <td class='s-na'></td>
67675    <td class='s-na'></td>
67676    <td class='s-na'></td>
67677    <td class='s-na'></td>
67678    <td class='s-na'></td>
67679    <td class='s-na'></td>
67680    <td class='s-na'></td>
67681    </tr>
67682    <tr><td class='code'>@link libsbml#FbcGeneProductAssocSpeciesMustExist FbcGeneProductAssocSpeciesMustExist@endlink</td>
67683    <td class='meaning'>'fbc:associatedSpecies' must point to existing <code>&lt;species&gt;</code></td>
67684    <td class='s-na'></td>
67685    <td class='s-na'></td>
67686    <td class='s-na'></td>
67687    <td class='s-na'></td>
67688    <td class='s-na'></td>
67689    <td class='s-na'></td>
67690    <td class='s-na'></td>
67691    <td class='s-na'></td>
67692    </tr>
67693    <tr><td class='code'>@link libsbml#QualUnknown QualUnknown@endlink</td>
67694    <td class='meaning'></td>
67695    <td class='s-na'></td>
67696    <td class='s-na'></td>
67697    <td class='s-na'></td>
67698    <td class='s-na'></td>
67699    <td class='s-na'></td>
67700    <td class='s-na'></td>
67701    <td class='s-na'></td>
67702    <td class='s-na'></td>
67703    </tr>
67704    <tr><td class='code'>@link libsbml#QualNSUndeclared QualNSUndeclared@endlink</td>
67705    <td class='meaning'>The qual ns is not correctly declared</td>
67706    <td class='s-na'></td>
67707    <td class='s-na'></td>
67708    <td class='s-na'></td>
67709    <td class='s-na'></td>
67710    <td class='s-na'></td>
67711    <td class='s-na'></td>
67712    <td class='s-error'></td>
67713    <td class='s-error'></td>
67714    </tr>
67715    <tr><td class='code'>@link libsbml#QualElementNotInNs QualElementNotInNs@endlink</td>
67716    <td class='meaning'>Element not in qual namespace</td>
67717    <td class='s-na'></td>
67718    <td class='s-na'></td>
67719    <td class='s-na'></td>
67720    <td class='s-na'></td>
67721    <td class='s-na'></td>
67722    <td class='s-na'></td>
67723    <td class='s-error'></td>
67724    <td class='s-error'></td>
67725    </tr>
67726    <tr><td class='code'>@link libsbml#QualFunctionTermBool QualFunctionTermBool@endlink</td>
67727    <td class='meaning'>FunctionTerm should return Boolean</td>
67728    <td class='s-na'></td>
67729    <td class='s-na'></td>
67730    <td class='s-na'></td>
67731    <td class='s-na'></td>
67732    <td class='s-na'></td>
67733    <td class='s-na'></td>
67734    <td class='s-warning'></td>
67735    <td class='s-warning'></td>
67736    </tr>
67737    <tr><td class='code'>@link libsbml#QualMathCSymbolDisallowed QualMathCSymbolDisallowed@endlink</td>
67738    <td class='meaning'>CSymbol time or delay not allowed</td>
67739    <td class='s-na'></td>
67740    <td class='s-na'></td>
67741    <td class='s-na'></td>
67742    <td class='s-na'></td>
67743    <td class='s-na'></td>
67744    <td class='s-na'></td>
67745    <td class='s-warning'></td>
67746    <td class='s-warning'></td>
67747    </tr>
67748    <tr><td class='code'>@link libsbml#QualDuplicateComponentId QualDuplicateComponentId@endlink</td>
67749    <td class='meaning'>Duplicate 'id' attribute value</td>
67750    <td class='s-na'></td>
67751    <td class='s-na'></td>
67752    <td class='s-na'></td>
67753    <td class='s-na'></td>
67754    <td class='s-na'></td>
67755    <td class='s-na'></td>
67756    <td class='s-error'></td>
67757    <td class='s-error'></td>
67758    </tr>
67759    <tr><td class='code'>@link libsbml#QualAttributeRequiredMissing QualAttributeRequiredMissing@endlink</td>
67760    <td class='meaning'>Required qual:required attribute on <code>&lt;sbml&gt;</code></td>
67761    <td class='s-na'></td>
67762    <td class='s-na'></td>
67763    <td class='s-na'></td>
67764    <td class='s-na'></td>
67765    <td class='s-na'></td>
67766    <td class='s-na'></td>
67767    <td class='s-error'></td>
67768    <td class='s-error'></td>
67769    </tr>
67770    <tr><td class='code'>@link libsbml#QualAttributeRequiredMustBeBoolean QualAttributeRequiredMustBeBoolean@endlink</td>
67771    <td class='meaning'>The qual:required attribute must be Boolean</td>
67772    <td class='s-na'></td>
67773    <td class='s-na'></td>
67774    <td class='s-na'></td>
67775    <td class='s-na'></td>
67776    <td class='s-na'></td>
67777    <td class='s-na'></td>
67778    <td class='s-error'></td>
67779    <td class='s-error'></td>
67780    </tr>
67781    <tr><td class='code'>@link libsbml#QualRequiredTrueIfTransitions QualRequiredTrueIfTransitions@endlink</td>
67782    <td class='meaning'>The qual:required attribute must be 'true' if math changes</td>
67783    <td class='s-na'></td>
67784    <td class='s-na'></td>
67785    <td class='s-na'></td>
67786    <td class='s-na'></td>
67787    <td class='s-na'></td>
67788    <td class='s-na'></td>
67789    <td class='s-error'></td>
67790    <td class='s-error'></td>
67791    </tr>
67792    <tr><td class='code'>@link libsbml#QualOneListOfTransOrQS QualOneListOfTransOrQS@endlink</td>
67793    <td class='meaning'>Only one <code>&lt;listOfTransitions&gt;</code> or <code>&lt;listOfQualitativeSpeciesgt;</code> allowed.</td>
67794    <td class='s-na'></td>
67795    <td class='s-na'></td>
67796    <td class='s-na'></td>
67797    <td class='s-na'></td>
67798    <td class='s-na'></td>
67799    <td class='s-na'></td>
67800    <td class='s-error'></td>
67801    <td class='s-error'></td>
67802    </tr>
67803    <tr><td class='code'>@link libsbml#QualEmptyLONotAllowed QualEmptyLONotAllowed@endlink</td>
67804    <td class='meaning'>Empty <code>&lt;listOfTransitions&gt;</code> or <code>&lt;listOfQualitativeSpeciesgt;</code> not allowed.</td>
67805    <td class='s-na'></td>
67806    <td class='s-na'></td>
67807    <td class='s-na'></td>
67808    <td class='s-na'></td>
67809    <td class='s-na'></td>
67810    <td class='s-na'></td>
67811    <td class='s-error'></td>
67812    <td class='s-error'></td>
67813    </tr>
67814    <tr><td class='code'>@link libsbml#QualLOTransitiondAllowedElements QualLOTransitiondAllowedElements@endlink</td>
67815    <td class='meaning'>Elements allowed on <code>&lt;listOfTransitions&gt;</code>.</td>
67816    <td class='s-na'></td>
67817    <td class='s-na'></td>
67818    <td class='s-na'></td>
67819    <td class='s-na'></td>
67820    <td class='s-na'></td>
67821    <td class='s-na'></td>
67822    <td class='s-error'></td>
67823    <td class='s-error'></td>
67824    </tr>
67825    <tr><td class='code'>@link libsbml#QualLOQualSpeciesAllowedElements QualLOQualSpeciesAllowedElements@endlink</td>
67826    <td class='meaning'>Elements allowed on <code>&lt;listOfTransitions&gt;</code>.</td>
67827    <td class='s-na'></td>
67828    <td class='s-na'></td>
67829    <td class='s-na'></td>
67830    <td class='s-na'></td>
67831    <td class='s-na'></td>
67832    <td class='s-na'></td>
67833    <td class='s-error'></td>
67834    <td class='s-error'></td>
67835    </tr>
67836    <tr><td class='code'>@link libsbml#QualLOQualSpeciesAllowedAttributes QualLOQualSpeciesAllowedAttributes@endlink</td>
67837    <td class='meaning'>Attributes allowed on <code>&lt;listOfQualitativeSpeciesgt;</code>.</td>
67838    <td class='s-na'></td>
67839    <td class='s-na'></td>
67840    <td class='s-na'></td>
67841    <td class='s-na'></td>
67842    <td class='s-na'></td>
67843    <td class='s-na'></td>
67844    <td class='s-error'></td>
67845    <td class='s-error'></td>
67846    </tr>
67847    <tr><td class='code'>@link libsbml#QualLOTransitionsAllowedAttributes QualLOTransitionsAllowedAttributes@endlink</td>
67848    <td class='meaning'>Attributes allowed on <code>&lt;listOfTransitions&gt;</code>.</td>
67849    <td class='s-na'></td>
67850    <td class='s-na'></td>
67851    <td class='s-na'></td>
67852    <td class='s-na'></td>
67853    <td class='s-na'></td>
67854    <td class='s-na'></td>
67855    <td class='s-error'></td>
67856    <td class='s-error'></td>
67857    </tr>
67858    <tr><td class='code'>@link libsbml#QualQualSpeciesAllowedCoreAttributes QualQualSpeciesAllowedCoreAttributes@endlink</td>
67859    <td class='meaning'>Core attributes allowed on <code>&lt;qualitativeSpeciesgt;</code>.</td>
67860    <td class='s-na'></td>
67861    <td class='s-na'></td>
67862    <td class='s-na'></td>
67863    <td class='s-na'></td>
67864    <td class='s-na'></td>
67865    <td class='s-na'></td>
67866    <td class='s-error'></td>
67867    <td class='s-error'></td>
67868    </tr>
67869    <tr><td class='code'>@link libsbml#QualQualSpeciesAllowedElements QualQualSpeciesAllowedElements@endlink</td>
67870    <td class='meaning'>Elements allowed on <code>&lt;qualitativeSpeciesgt;</code>.</td>
67871    <td class='s-na'></td>
67872    <td class='s-na'></td>
67873    <td class='s-na'></td>
67874    <td class='s-na'></td>
67875    <td class='s-na'></td>
67876    <td class='s-na'></td>
67877    <td class='s-error'></td>
67878    <td class='s-error'></td>
67879    </tr>
67880    <tr><td class='code'>@link libsbml#QualQualSpeciesAllowedAttributes QualQualSpeciesAllowedAttributes@endlink</td>
67881    <td class='meaning'>Attributes allowed on <code>&lt;qualitativeSpeciesgt;</code>.</td>
67882    <td class='s-na'></td>
67883    <td class='s-na'></td>
67884    <td class='s-na'></td>
67885    <td class='s-na'></td>
67886    <td class='s-na'></td>
67887    <td class='s-na'></td>
67888    <td class='s-error'></td>
67889    <td class='s-error'></td>
67890    </tr>
67891    <tr><td class='code'>@link libsbml#QualConstantMustBeBool QualConstantMustBeBool@endlink</td>
67892    <td class='meaning'>Attribute 'constant' on <code>&lt;qualitativeSpeciesgt;</code> must be Boolean.</td>
67893    <td class='s-na'></td>
67894    <td class='s-na'></td>
67895    <td class='s-na'></td>
67896    <td class='s-na'></td>
67897    <td class='s-na'></td>
67898    <td class='s-na'></td>
67899    <td class='s-error'></td>
67900    <td class='s-error'></td>
67901    </tr>
67902    <tr><td class='code'>@link libsbml#QualNameMustBeString QualNameMustBeString@endlink</td>
67903    <td class='meaning'>Attribute 'name' on <code>&lt;qualitativeSpeciesgt;</code> must be string.</td>
67904    <td class='s-na'></td>
67905    <td class='s-na'></td>
67906    <td class='s-na'></td>
67907    <td class='s-na'></td>
67908    <td class='s-na'></td>
67909    <td class='s-na'></td>
67910    <td class='s-error'></td>
67911    <td class='s-error'></td>
67912    </tr>
67913    <tr><td class='code'>@link libsbml#QualInitialLevelMustBeInt QualInitialLevelMustBeInt@endlink</td>
67914    <td class='meaning'>Attribute 'initialLevel' on <code>&lt;qualitativeSpeciesgt;</code> must be integer.</td>
67915    <td class='s-na'></td>
67916    <td class='s-na'></td>
67917    <td class='s-na'></td>
67918    <td class='s-na'></td>
67919    <td class='s-na'></td>
67920    <td class='s-na'></td>
67921    <td class='s-error'></td>
67922    <td class='s-error'></td>
67923    </tr>
67924    <tr><td class='code'>@link libsbml#QualMaxLevelMustBeInt QualMaxLevelMustBeInt@endlink</td>
67925    <td class='meaning'>Attribute 'maxLevel' on <code>&lt;qualitativeSpeciesgt;</code> must be integer.</td>
67926    <td class='s-na'></td>
67927    <td class='s-na'></td>
67928    <td class='s-na'></td>
67929    <td class='s-na'></td>
67930    <td class='s-na'></td>
67931    <td class='s-na'></td>
67932    <td class='s-error'></td>
67933    <td class='s-error'></td>
67934    </tr>
67935    <tr><td class='code'>@link libsbml#QualCompartmentMustReferExisting QualCompartmentMustReferExisting@endlink</td>
67936    <td class='meaning'>Attribute 'compartment' on <code>&lt;qualitativeSpeciesgt;</code> must reference compartment.</td>
67937    <td class='s-na'></td>
67938    <td class='s-na'></td>
67939    <td class='s-na'></td>
67940    <td class='s-na'></td>
67941    <td class='s-na'></td>
67942    <td class='s-na'></td>
67943    <td class='s-error'></td>
67944    <td class='s-error'></td>
67945    </tr>
67946    <tr><td class='code'>@link libsbml#QualInitialLevelCannotExceedMax QualInitialLevelCannotExceedMax@endlink</td>
67947    <td class='meaning'>Attribute 'initialLevel' on <code>&lt;qualitativeSpeciesgt;</code> cannot exceed maxLevel.</td>
67948    <td class='s-na'></td>
67949    <td class='s-na'></td>
67950    <td class='s-na'></td>
67951    <td class='s-na'></td>
67952    <td class='s-na'></td>
67953    <td class='s-na'></td>
67954    <td class='s-error'></td>
67955    <td class='s-error'></td>
67956    </tr>
67957    <tr><td class='code'>@link libsbml#QualConstantQSCannotBeOutput QualConstantQSCannotBeOutput@endlink</td>
67958    <td class='meaning'>Constant <code>&lt;qualitativeSpeciesgt;</code> cannot be an Output.</td>
67959    <td class='s-na'></td>
67960    <td class='s-na'></td>
67961    <td class='s-na'></td>
67962    <td class='s-na'></td>
67963    <td class='s-na'></td>
67964    <td class='s-na'></td>
67965    <td class='s-error'></td>
67966    <td class='s-error'></td>
67967    </tr>
67968    <tr><td class='code'>@link libsbml#QualQSAssignedOnlyOnce QualQSAssignedOnlyOnce@endlink</td>
67969    <td class='meaning'>A <code>&lt;qualitativeSpeciesgt;</code> can only be assigned once.</td>
67970    <td class='s-na'></td>
67971    <td class='s-na'></td>
67972    <td class='s-na'></td>
67973    <td class='s-na'></td>
67974    <td class='s-na'></td>
67975    <td class='s-na'></td>
67976    <td class='s-error'></td>
67977    <td class='s-error'></td>
67978    </tr>
67979    <tr><td class='code'>@link libsbml#QualInitalLevelNotNegative QualInitalLevelNotNegative@endlink</td>
67980    <td class='meaning'>Attribute 'initialLevel' on <code>&lt;qualitativeSpeciesgt;</code> cannot be negative.</td>
67981    <td class='s-na'></td>
67982    <td class='s-na'></td>
67983    <td class='s-na'></td>
67984    <td class='s-na'></td>
67985    <td class='s-na'></td>
67986    <td class='s-na'></td>
67987    <td class='s-error'></td>
67988    <td class='s-error'></td>
67989    </tr>
67990    <tr><td class='code'>@link libsbml#QualMaxLevelNotNegative QualMaxLevelNotNegative@endlink</td>
67991    <td class='meaning'>Attribute 'maxLevel' on <code>&lt;qualitativeSpeciesgt;</code> cannot be negative.</td>
67992    <td class='s-na'></td>
67993    <td class='s-na'></td>
67994    <td class='s-na'></td>
67995    <td class='s-na'></td>
67996    <td class='s-na'></td>
67997    <td class='s-na'></td>
67998    <td class='s-error'></td>
67999    <td class='s-error'></td>
68000    </tr>
68001    <tr><td class='code'>@link libsbml#QualTransitionAllowedCoreAttributes QualTransitionAllowedCoreAttributes@endlink</td>
68002    <td class='meaning'>Core attributes allowed on <code>&lt;transition&gt;</code>.</td>
68003    <td class='s-na'></td>
68004    <td class='s-na'></td>
68005    <td class='s-na'></td>
68006    <td class='s-na'></td>
68007    <td class='s-na'></td>
68008    <td class='s-na'></td>
68009    <td class='s-error'></td>
68010    <td class='s-error'></td>
68011    </tr>
68012    <tr><td class='code'>@link libsbml#QualTransitionAllowedElements QualTransitionAllowedElements@endlink</td>
68013    <td class='meaning'>Elements allowed on <code>&lt;transition&gt;</code>.</td>
68014    <td class='s-na'></td>
68015    <td class='s-na'></td>
68016    <td class='s-na'></td>
68017    <td class='s-na'></td>
68018    <td class='s-na'></td>
68019    <td class='s-na'></td>
68020    <td class='s-error'></td>
68021    <td class='s-error'></td>
68022    </tr>
68023    <tr><td class='code'>@link libsbml#QualTransitionAllowedAttributes QualTransitionAllowedAttributes@endlink</td>
68024    <td class='meaning'>Attributes allowed on <code>&lt;transition&gt;</code>.</td>
68025    <td class='s-na'></td>
68026    <td class='s-na'></td>
68027    <td class='s-na'></td>
68028    <td class='s-na'></td>
68029    <td class='s-na'></td>
68030    <td class='s-na'></td>
68031    <td class='s-error'></td>
68032    <td class='s-error'></td>
68033    </tr>
68034    <tr><td class='code'>@link libsbml#QualTransitionNameMustBeString QualTransitionNameMustBeString@endlink</td>
68035    <td class='meaning'>Attribute 'name' on <code>&lt;transition&gt;</code> must be string.</td>
68036    <td class='s-na'></td>
68037    <td class='s-na'></td>
68038    <td class='s-na'></td>
68039    <td class='s-na'></td>
68040    <td class='s-na'></td>
68041    <td class='s-na'></td>
68042    <td class='s-error'></td>
68043    <td class='s-error'></td>
68044    </tr>
68045    <tr><td class='code'>@link libsbml#QualTransitionLOElements QualTransitionLOElements@endlink</td>
68046    <td class='meaning'>ListOf elements on <code>&lt;transition&gt;</code>.</td>
68047    <td class='s-na'></td>
68048    <td class='s-na'></td>
68049    <td class='s-na'></td>
68050    <td class='s-na'></td>
68051    <td class='s-na'></td>
68052    <td class='s-na'></td>
68053    <td class='s-error'></td>
68054    <td class='s-error'></td>
68055    </tr>
68056    <tr><td class='code'>@link libsbml#QualTransitionEmptyLOElements QualTransitionEmptyLOElements@endlink</td>
68057    <td class='meaning'>ListOf elements on <code>&lt;transition&gt;</code> not empty.</td>
68058    <td class='s-na'></td>
68059    <td class='s-na'></td>
68060    <td class='s-na'></td>
68061    <td class='s-na'></td>
68062    <td class='s-na'></td>
68063    <td class='s-na'></td>
68064    <td class='s-error'></td>
68065    <td class='s-error'></td>
68066    </tr>
68067    <tr><td class='code'>@link libsbml#QualTransitionLOInputElements QualTransitionLOInputElements@endlink</td>
68068    <td class='meaning'>Elements on <code>&lt;listOfInputs&gt;</code>.</td>
68069    <td class='s-na'></td>
68070    <td class='s-na'></td>
68071    <td class='s-na'></td>
68072    <td class='s-na'></td>
68073    <td class='s-na'></td>
68074    <td class='s-na'></td>
68075    <td class='s-error'></td>
68076    <td class='s-error'></td>
68077    </tr>
68078    <tr><td class='code'>@link libsbml#QualTransitionLOOutputElements QualTransitionLOOutputElements@endlink</td>
68079    <td class='meaning'>Elements on <code>&lt;listOfOutputs&gt;</code>.</td>
68080    <td class='s-na'></td>
68081    <td class='s-na'></td>
68082    <td class='s-na'></td>
68083    <td class='s-na'></td>
68084    <td class='s-na'></td>
68085    <td class='s-na'></td>
68086    <td class='s-error'></td>
68087    <td class='s-error'></td>
68088    </tr>
68089    <tr><td class='code'>@link libsbml#QualTransitionLOFuncTermElements QualTransitionLOFuncTermElements@endlink</td>
68090    <td class='meaning'>Elements on <code>&lt;listOfFunctionTerms&gt;</code>.</td>
68091    <td class='s-na'></td>
68092    <td class='s-na'></td>
68093    <td class='s-na'></td>
68094    <td class='s-na'></td>
68095    <td class='s-na'></td>
68096    <td class='s-na'></td>
68097    <td class='s-error'></td>
68098    <td class='s-error'></td>
68099    </tr>
68100    <tr><td class='code'>@link libsbml#QualTransitionLOInputAttributes QualTransitionLOInputAttributes@endlink</td>
68101    <td class='meaning'>Attributes allowed on <code>&lt;listOfInputs&gt;</code>.</td>
68102    <td class='s-na'></td>
68103    <td class='s-na'></td>
68104    <td class='s-na'></td>
68105    <td class='s-na'></td>
68106    <td class='s-na'></td>
68107    <td class='s-na'></td>
68108    <td class='s-error'></td>
68109    <td class='s-error'></td>
68110    </tr>
68111    <tr><td class='code'>@link libsbml#QualTransitionLOOutputAttributes QualTransitionLOOutputAttributes@endlink</td>
68112    <td class='meaning'>Attributes allowed on <code>&lt;listOfOutputs&gt;</code>.</td>
68113    <td class='s-na'></td>
68114    <td class='s-na'></td>
68115    <td class='s-na'></td>
68116    <td class='s-na'></td>
68117    <td class='s-na'></td>
68118    <td class='s-na'></td>
68119    <td class='s-error'></td>
68120    <td class='s-error'></td>
68121    </tr>
68122    <tr><td class='code'>@link libsbml#QualTransitionLOFuncTermAttributes QualTransitionLOFuncTermAttributes@endlink</td>
68123    <td class='meaning'>Attributes allowed on <code>&lt;listOfFunctionTerms&gt;</code>.</td>
68124    <td class='s-na'></td>
68125    <td class='s-na'></td>
68126    <td class='s-na'></td>
68127    <td class='s-na'></td>
68128    <td class='s-na'></td>
68129    <td class='s-na'></td>
68130    <td class='s-error'></td>
68131    <td class='s-error'></td>
68132    </tr>
68133    <tr><td class='code'>@link libsbml#QualTransitionLOFuncTermExceedMax QualTransitionLOFuncTermExceedMax@endlink</td>
68134    <td class='meaning'><code>&lt;listOfFunctionTerms&gt;</code> cannot make qualitativeSpecies exceed maxLevel.</td>
68135    <td class='s-na'></td>
68136    <td class='s-na'></td>
68137    <td class='s-na'></td>
68138    <td class='s-na'></td>
68139    <td class='s-na'></td>
68140    <td class='s-na'></td>
68141    <td class='s-error'></td>
68142    <td class='s-error'></td>
68143    </tr>
68144    <tr><td class='code'>@link libsbml#QualTransitionLOFuncTermNegative QualTransitionLOFuncTermNegative@endlink</td>
68145    <td class='meaning'><code>&lt;listOfFunctionTerms&gt;</code> cannot make qualitativeSpecies negative.</td>
68146    <td class='s-na'></td>
68147    <td class='s-na'></td>
68148    <td class='s-na'></td>
68149    <td class='s-na'></td>
68150    <td class='s-na'></td>
68151    <td class='s-na'></td>
68152    <td class='s-error'></td>
68153    <td class='s-error'></td>
68154    </tr>
68155    <tr><td class='code'>@link libsbml#QualInputAllowedCoreAttributes QualInputAllowedCoreAttributes@endlink</td>
68156    <td class='meaning'>Core attributes allowed on <code>&lt;input&gt;</code>.</td>
68157    <td class='s-na'></td>
68158    <td class='s-na'></td>
68159    <td class='s-na'></td>
68160    <td class='s-na'></td>
68161    <td class='s-na'></td>
68162    <td class='s-na'></td>
68163    <td class='s-error'></td>
68164    <td class='s-error'></td>
68165    </tr>
68166    <tr><td class='code'>@link libsbml#QualInputAllowedElements QualInputAllowedElements@endlink</td>
68167    <td class='meaning'>Elements allowed on <code>&lt;input&gt;</code>.</td>
68168    <td class='s-na'></td>
68169    <td class='s-na'></td>
68170    <td class='s-na'></td>
68171    <td class='s-na'></td>
68172    <td class='s-na'></td>
68173    <td class='s-na'></td>
68174    <td class='s-error'></td>
68175    <td class='s-error'></td>
68176    </tr>
68177    <tr><td class='code'>@link libsbml#QualInputAllowedAttributes QualInputAllowedAttributes@endlink</td>
68178    <td class='meaning'>Attributes allowed on <code>&lt;input&gt;</code>.</td>
68179    <td class='s-na'></td>
68180    <td class='s-na'></td>
68181    <td class='s-na'></td>
68182    <td class='s-na'></td>
68183    <td class='s-na'></td>
68184    <td class='s-na'></td>
68185    <td class='s-error'></td>
68186    <td class='s-error'></td>
68187    </tr>
68188    <tr><td class='code'>@link libsbml#QualInputNameMustBeString QualInputNameMustBeString@endlink</td>
68189    <td class='meaning'>Attribute 'name' on <code>&lt;input&gt;</code> must be string.</td>
68190    <td class='s-na'></td>
68191    <td class='s-na'></td>
68192    <td class='s-na'></td>
68193    <td class='s-na'></td>
68194    <td class='s-na'></td>
68195    <td class='s-na'></td>
68196    <td class='s-error'></td>
68197    <td class='s-error'></td>
68198    </tr>
68199    <tr><td class='code'>@link libsbml#QualInputSignMustBeSignEnum QualInputSignMustBeSignEnum@endlink</td>
68200    <td class='meaning'>Attribute 'sign' on <code>&lt;input&gt;</code> must be enum.</td>
68201    <td class='s-na'></td>
68202    <td class='s-na'></td>
68203    <td class='s-na'></td>
68204    <td class='s-na'></td>
68205    <td class='s-na'></td>
68206    <td class='s-na'></td>
68207    <td class='s-error'></td>
68208    <td class='s-error'></td>
68209    </tr>
68210    <tr><td class='code'>@link libsbml#QualInputTransEffectMustBeInputEffect QualInputTransEffectMustBeInputEffect@endlink</td>
68211    <td class='meaning'>Attribute 'transitionEffect' on <code>&lt;input&gt;</code> must be enum.</td>
68212    <td class='s-na'></td>
68213    <td class='s-na'></td>
68214    <td class='s-na'></td>
68215    <td class='s-na'></td>
68216    <td class='s-na'></td>
68217    <td class='s-na'></td>
68218    <td class='s-error'></td>
68219    <td class='s-error'></td>
68220    </tr>
68221    <tr><td class='code'>@link libsbml#QualInputThreshMustBeInteger QualInputThreshMustBeInteger@endlink</td>
68222    <td class='meaning'>Attribute 'thresholdLevel' on <code>&lt;input&gt;</code> must be non negative integer.</td>
68223    <td class='s-na'></td>
68224    <td class='s-na'></td>
68225    <td class='s-na'></td>
68226    <td class='s-na'></td>
68227    <td class='s-na'></td>
68228    <td class='s-na'></td>
68229    <td class='s-error'></td>
68230    <td class='s-error'></td>
68231    </tr>
68232    <tr><td class='code'>@link libsbml#QualInputQSMustBeExistingQS QualInputQSMustBeExistingQS@endlink</td>
68233    <td class='meaning'>Attribute 'qualitativeSpecies' on <code>&lt;input&gt;</code> must refer to existing</td>
68234    <td class='s-na'></td>
68235    <td class='s-na'></td>
68236    <td class='s-na'></td>
68237    <td class='s-na'></td>
68238    <td class='s-na'></td>
68239    <td class='s-na'></td>
68240    <td class='s-error'></td>
68241    <td class='s-error'></td>
68242    </tr>
68243    <tr><td class='code'>@link libsbml#QualInputConstantCannotBeConsumed QualInputConstantCannotBeConsumed@endlink</td>
68244    <td class='meaning'>Constant <code>&lt;input&gt;</code> cannot be consumed.</td>
68245    <td class='s-na'></td>
68246    <td class='s-na'></td>
68247    <td class='s-na'></td>
68248    <td class='s-na'></td>
68249    <td class='s-na'></td>
68250    <td class='s-na'></td>
68251    <td class='s-error'></td>
68252    <td class='s-error'></td>
68253    </tr>
68254    <tr><td class='code'>@link libsbml#QualInputThreshMustBeNonNegative QualInputThreshMustBeNonNegative@endlink</td>
68255    <td class='meaning'>Attribute 'thresholdLevel' on <code>&lt;input&gt;</code> must be non negative integer.</td>
68256    <td class='s-na'></td>
68257    <td class='s-na'></td>
68258    <td class='s-na'></td>
68259    <td class='s-na'></td>
68260    <td class='s-na'></td>
68261    <td class='s-na'></td>
68262    <td class='s-error'></td>
68263    <td class='s-error'></td>
68264    </tr>
68265    <tr><td class='code'>@link libsbml#QualOutputAllowedCoreAttributes QualOutputAllowedCoreAttributes@endlink</td>
68266    <td class='meaning'>Core attributes allowed on <code>&lt;output&gt;</code>.</td>
68267    <td class='s-na'></td>
68268    <td class='s-na'></td>
68269    <td class='s-na'></td>
68270    <td class='s-na'></td>
68271    <td class='s-na'></td>
68272    <td class='s-na'></td>
68273    <td class='s-error'></td>
68274    <td class='s-error'></td>
68275    </tr>
68276    <tr><td class='code'>@link libsbml#QualOutputAllowedElements QualOutputAllowedElements@endlink</td>
68277    <td class='meaning'>Elements allowed on <code>&lt;output&gt;</code>.</td>
68278    <td class='s-na'></td>
68279    <td class='s-na'></td>
68280    <td class='s-na'></td>
68281    <td class='s-na'></td>
68282    <td class='s-na'></td>
68283    <td class='s-na'></td>
68284    <td class='s-error'></td>
68285    <td class='s-error'></td>
68286    </tr>
68287    <tr><td class='code'>@link libsbml#QualOutputAllowedAttributes QualOutputAllowedAttributes@endlink</td>
68288    <td class='meaning'>Attributes allowed on <code>&lt;output&gt;</code>.</td>
68289    <td class='s-na'></td>
68290    <td class='s-na'></td>
68291    <td class='s-na'></td>
68292    <td class='s-na'></td>
68293    <td class='s-na'></td>
68294    <td class='s-na'></td>
68295    <td class='s-error'></td>
68296    <td class='s-error'></td>
68297    </tr>
68298    <tr><td class='code'>@link libsbml#QualOutputNameMustBeString QualOutputNameMustBeString@endlink</td>
68299    <td class='meaning'>Attribute 'name' on <code>&lt;output&gt;</code> must be string.</td>
68300    <td class='s-na'></td>
68301    <td class='s-na'></td>
68302    <td class='s-na'></td>
68303    <td class='s-na'></td>
68304    <td class='s-na'></td>
68305    <td class='s-na'></td>
68306    <td class='s-error'></td>
68307    <td class='s-error'></td>
68308    </tr>
68309    <tr><td class='code'>@link libsbml#QualOutputTransEffectMustBeOutput QualOutputTransEffectMustBeOutput@endlink</td>
68310    <td class='meaning'>Attribute 'transitionEffect' on <code>&lt;output&gt;</code> must be enum.</td>
68311    <td class='s-na'></td>
68312    <td class='s-na'></td>
68313    <td class='s-na'></td>
68314    <td class='s-na'></td>
68315    <td class='s-na'></td>
68316    <td class='s-na'></td>
68317    <td class='s-error'></td>
68318    <td class='s-error'></td>
68319    </tr>
68320    <tr><td class='code'>@link libsbml#QualOutputLevelMustBeInteger QualOutputLevelMustBeInteger@endlink</td>
68321    <td class='meaning'>Attribute 'outputLevel' on <code>&lt;output&gt;</code> must be non negative integer.</td>
68322    <td class='s-na'></td>
68323    <td class='s-na'></td>
68324    <td class='s-na'></td>
68325    <td class='s-na'></td>
68326    <td class='s-na'></td>
68327    <td class='s-na'></td>
68328    <td class='s-error'></td>
68329    <td class='s-error'></td>
68330    </tr>
68331    <tr><td class='code'>@link libsbml#QualOutputQSMustBeExistingQS QualOutputQSMustBeExistingQS@endlink</td>
68332    <td class='meaning'>Attribute 'qualitativeSpecies' on <code>&lt;output&gt;</code> must refer to existing</td>
68333    <td class='s-na'></td>
68334    <td class='s-na'></td>
68335    <td class='s-na'></td>
68336    <td class='s-na'></td>
68337    <td class='s-na'></td>
68338    <td class='s-na'></td>
68339    <td class='s-error'></td>
68340    <td class='s-error'></td>
68341    </tr>
68342    <tr><td class='code'>@link libsbml#QualOutputConstantMustBeFalse QualOutputConstantMustBeFalse@endlink</td>
68343    <td class='meaning'>Constant 'qualitativeSpecies' cannot be <code>&lt;output&gt;</code></td>
68344    <td class='s-na'></td>
68345    <td class='s-na'></td>
68346    <td class='s-na'></td>
68347    <td class='s-na'></td>
68348    <td class='s-na'></td>
68349    <td class='s-na'></td>
68350    <td class='s-error'></td>
68351    <td class='s-error'></td>
68352    </tr>
68353    <tr><td class='code'>@link libsbml#QualOutputProductionMustHaveLevel QualOutputProductionMustHaveLevel@endlink</td>
68354    <td class='meaning'><code>&lt;output&gt;</code> being produced must have level</td>
68355    <td class='s-na'></td>
68356    <td class='s-na'></td>
68357    <td class='s-na'></td>
68358    <td class='s-na'></td>
68359    <td class='s-na'></td>
68360    <td class='s-na'></td>
68361    <td class='s-error'></td>
68362    <td class='s-error'></td>
68363    </tr>
68364    <tr><td class='code'>@link libsbml#QualOutputLevelMustBeNonNegative QualOutputLevelMustBeNonNegative@endlink</td>
68365    <td class='meaning'>Attribute 'outputLevel' on <code>&lt;output&gt;</code> must be non negative integer.</td>
68366    <td class='s-na'></td>
68367    <td class='s-na'></td>
68368    <td class='s-na'></td>
68369    <td class='s-na'></td>
68370    <td class='s-na'></td>
68371    <td class='s-na'></td>
68372    <td class='s-error'></td>
68373    <td class='s-error'></td>
68374    </tr>
68375    <tr><td class='code'>@link libsbml#QualDefaultTermAllowedCoreAttributes QualDefaultTermAllowedCoreAttributes@endlink</td>
68376    <td class='meaning'>Core attributes allowed on <code>&lt;defaultTerm&gt;</code>.</td>
68377    <td class='s-na'></td>
68378    <td class='s-na'></td>
68379    <td class='s-na'></td>
68380    <td class='s-na'></td>
68381    <td class='s-na'></td>
68382    <td class='s-na'></td>
68383    <td class='s-error'></td>
68384    <td class='s-error'></td>
68385    </tr>
68386    <tr><td class='code'>@link libsbml#QualDefaultTermAllowedElements QualDefaultTermAllowedElements@endlink</td>
68387    <td class='meaning'>Elements allowed on <code>&lt;defaultTerm&gt;</code>.</td>
68388    <td class='s-na'></td>
68389    <td class='s-na'></td>
68390    <td class='s-na'></td>
68391    <td class='s-na'></td>
68392    <td class='s-na'></td>
68393    <td class='s-na'></td>
68394    <td class='s-error'></td>
68395    <td class='s-error'></td>
68396    </tr>
68397    <tr><td class='code'>@link libsbml#QualDefaultTermAllowedAttributes QualDefaultTermAllowedAttributes@endlink</td>
68398    <td class='meaning'>Attributes allowed on <code>&lt;defaultTerm&gt;</code>.</td>
68399    <td class='s-na'></td>
68400    <td class='s-na'></td>
68401    <td class='s-na'></td>
68402    <td class='s-na'></td>
68403    <td class='s-na'></td>
68404    <td class='s-na'></td>
68405    <td class='s-error'></td>
68406    <td class='s-error'></td>
68407    </tr>
68408    <tr><td class='code'>@link libsbml#QualDefaultTermResultMustBeInteger QualDefaultTermResultMustBeInteger@endlink</td>
68409    <td class='meaning'>Attribute 'resultLevel' on <code>&lt;defaultTerm&gt;</code> must be non negative integer.</td>
68410    <td class='s-na'></td>
68411    <td class='s-na'></td>
68412    <td class='s-na'></td>
68413    <td class='s-na'></td>
68414    <td class='s-na'></td>
68415    <td class='s-na'></td>
68416    <td class='s-error'></td>
68417    <td class='s-error'></td>
68418    </tr>
68419    <tr><td class='code'>@link libsbml#QualDefaultTermResultMustBeNonNeg QualDefaultTermResultMustBeNonNeg@endlink</td>
68420    <td class='meaning'>Attribute 'resultLevel' on <code>&lt;defaultTerm&gt;</code> must be non negative integer.</td>
68421    <td class='s-na'></td>
68422    <td class='s-na'></td>
68423    <td class='s-na'></td>
68424    <td class='s-na'></td>
68425    <td class='s-na'></td>
68426    <td class='s-na'></td>
68427    <td class='s-error'></td>
68428    <td class='s-error'></td>
68429    </tr>
68430    <tr><td class='code'>@link libsbml#QualFuncTermAllowedCoreAttributes QualFuncTermAllowedCoreAttributes@endlink</td>
68431    <td class='meaning'>Core attributes allowed on <code>&lt;functionTerm&gt;</code>.</td>
68432    <td class='s-na'></td>
68433    <td class='s-na'></td>
68434    <td class='s-na'></td>
68435    <td class='s-na'></td>
68436    <td class='s-na'></td>
68437    <td class='s-na'></td>
68438    <td class='s-error'></td>
68439    <td class='s-error'></td>
68440    </tr>
68441    <tr><td class='code'>@link libsbml#QualFuncTermAllowedElements QualFuncTermAllowedElements@endlink</td>
68442    <td class='meaning'>Elements allowed on <code>&lt;functionTerm&gt;</code>.</td>
68443    <td class='s-na'></td>
68444    <td class='s-na'></td>
68445    <td class='s-na'></td>
68446    <td class='s-na'></td>
68447    <td class='s-na'></td>
68448    <td class='s-na'></td>
68449    <td class='s-error'></td>
68450    <td class='s-error'></td>
68451    </tr>
68452    <tr><td class='code'>@link libsbml#QualFuncTermAllowedAttributes QualFuncTermAllowedAttributes@endlink</td>
68453    <td class='meaning'>Attributes allowed on <code>&lt;functionTerm&gt;</code>.</td>
68454    <td class='s-na'></td>
68455    <td class='s-na'></td>
68456    <td class='s-na'></td>
68457    <td class='s-na'></td>
68458    <td class='s-na'></td>
68459    <td class='s-na'></td>
68460    <td class='s-error'></td>
68461    <td class='s-error'></td>
68462    </tr>
68463    <tr><td class='code'>@link libsbml#QualFuncTermOnlyOneMath QualFuncTermOnlyOneMath@endlink</td>
68464    <td class='meaning'>Only one <code>&lt;math&gt;</code> on <code>&lt;functionTerm&gt;</code>.</td>
68465    <td class='s-na'></td>
68466    <td class='s-na'></td>
68467    <td class='s-na'></td>
68468    <td class='s-na'></td>
68469    <td class='s-na'></td>
68470    <td class='s-na'></td>
68471    <td class='s-error'></td>
68472    <td class='s-error'></td>
68473    </tr>
68474    <tr><td class='code'>@link libsbml#QualFuncTermResultMustBeInteger QualFuncTermResultMustBeInteger@endlink</td>
68475    <td class='meaning'>Attribute 'resultLevel' on <code>&lt;functionTerm&gt;</code> must be non negative integer.</td>
68476    <td class='s-na'></td>
68477    <td class='s-na'></td>
68478    <td class='s-na'></td>
68479    <td class='s-na'></td>
68480    <td class='s-na'></td>
68481    <td class='s-na'></td>
68482    <td class='s-error'></td>
68483    <td class='s-error'></td>
68484    </tr>
68485    <tr><td class='code'>@link libsbml#QualFuncTermResultMustBeNonNeg QualFuncTermResultMustBeNonNeg@endlink</td>
68486    <td class='meaning'>Attribute 'resultLevel' on <code>&lt;functionTerm&gt;</code> must be non negative integer.</td>
68487    <td class='s-na'></td>
68488    <td class='s-na'></td>
68489    <td class='s-na'></td>
68490    <td class='s-na'></td>
68491    <td class='s-na'></td>
68492    <td class='s-na'></td>
68493    <td class='s-error'></td>
68494    <td class='s-error'></td>
68495    </tr>
68496    <tr><td class='code'>@link libsbml#GroupsUnknown GroupsUnknown@endlink</td>
68497    <td class='meaning'></td>
68498    <td class='s-na'></td>
68499    <td class='s-na'></td>
68500    <td class='s-na'></td>
68501    <td class='s-na'></td>
68502    <td class='s-na'></td>
68503    <td class='s-na'></td>
68504    <td class='s-na'></td>
68505    <td class='s-na'></td>
68506    </tr>
68507    <tr><td class='code'>@link libsbml#GroupsNSUndeclared GroupsNSUndeclared@endlink</td>
68508    <td class='meaning'>The Groups namespace is not correctly declared.</td>
68509    <td class='s-na'></td>
68510    <td class='s-na'></td>
68511    <td class='s-na'></td>
68512    <td class='s-na'></td>
68513    <td class='s-na'></td>
68514    <td class='s-na'></td>
68515    <td class='s-error'></td>
68516    <td class='s-error'></td>
68517    </tr>
68518    <tr><td class='code'>@link libsbml#GroupsElementNotInNs GroupsElementNotInNs@endlink</td>
68519    <td class='meaning'>Element not in Groups namespace</td>
68520    <td class='s-na'></td>
68521    <td class='s-na'></td>
68522    <td class='s-na'></td>
68523    <td class='s-na'></td>
68524    <td class='s-na'></td>
68525    <td class='s-na'></td>
68526    <td class='s-error'></td>
68527    <td class='s-error'></td>
68528    </tr>
68529    <tr><td class='code'>@link libsbml#GroupsDuplicateComponentId GroupsDuplicateComponentId@endlink</td>
68530    <td class='meaning'>Duplicate 'id' attribute value</td>
68531    <td class='s-na'></td>
68532    <td class='s-na'></td>
68533    <td class='s-na'></td>
68534    <td class='s-na'></td>
68535    <td class='s-na'></td>
68536    <td class='s-na'></td>
68537    <td class='s-error'></td>
68538    <td class='s-error'></td>
68539    </tr>
68540    <tr><td class='code'>@link libsbml#GroupsIdSyntaxRule GroupsIdSyntaxRule@endlink</td>
68541    <td class='meaning'>Invalid SId syntax</td>
68542    <td class='s-na'></td>
68543    <td class='s-na'></td>
68544    <td class='s-na'></td>
68545    <td class='s-na'></td>
68546    <td class='s-na'></td>
68547    <td class='s-na'></td>
68548    <td class='s-error'></td>
68549    <td class='s-error'></td>
68550    </tr>
68551    <tr><td class='code'>@link libsbml#GroupsAttributeRequiredMissing GroupsAttributeRequiredMissing@endlink</td>
68552    <td class='meaning'>Required groups:required attribute on <code>&lt;sbml&gt;</code></td>
68553    <td class='s-na'></td>
68554    <td class='s-na'></td>
68555    <td class='s-na'></td>
68556    <td class='s-na'></td>
68557    <td class='s-na'></td>
68558    <td class='s-na'></td>
68559    <td class='s-error'></td>
68560    <td class='s-error'></td>
68561    </tr>
68562    <tr><td class='code'>@link libsbml#GroupsAttributeRequiredMustBeBoolean GroupsAttributeRequiredMustBeBoolean@endlink</td>
68563    <td class='meaning'>The groups:required attribute must be Boolean</td>
68564    <td class='s-na'></td>
68565    <td class='s-na'></td>
68566    <td class='s-na'></td>
68567    <td class='s-na'></td>
68568    <td class='s-na'></td>
68569    <td class='s-na'></td>
68570    <td class='s-error'></td>
68571    <td class='s-error'></td>
68572    </tr>
68573    <tr><td class='code'>@link libsbml#GroupsAttributeRequiredMustHaveValue GroupsAttributeRequiredMustHaveValue@endlink</td>
68574    <td class='meaning'>The groups:required attribute must be 'false'</td>
68575    <td class='s-na'></td>
68576    <td class='s-na'></td>
68577    <td class='s-na'></td>
68578    <td class='s-na'></td>
68579    <td class='s-na'></td>
68580    <td class='s-na'></td>
68581    <td class='s-error'></td>
68582    <td class='s-error'></td>
68583    </tr>
68584    <tr><td class='code'>@link libsbml#GroupsModelAllowedElements GroupsModelAllowedElements@endlink</td>
68585    <td class='meaning'>Elements allowed on <code>&lt;model&gt;</code>.</td>
68586    <td class='s-na'></td>
68587    <td class='s-na'></td>
68588    <td class='s-na'></td>
68589    <td class='s-na'></td>
68590    <td class='s-na'></td>
68591    <td class='s-na'></td>
68592    <td class='s-error'></td>
68593    <td class='s-error'></td>
68594    </tr>
68595    <tr><td class='code'>@link libsbml#GroupsModelEmptyLOElements GroupsModelEmptyLOElements@endlink</td>
68596    <td class='meaning'>No Empty ListOf elements allowed on <code>&lt;Modelgt;</code>.</td>
68597    <td class='s-na'></td>
68598    <td class='s-na'></td>
68599    <td class='s-na'></td>
68600    <td class='s-na'></td>
68601    <td class='s-na'></td>
68602    <td class='s-na'></td>
68603    <td class='s-error'></td>
68604    <td class='s-error'></td>
68605    </tr>
68606    <tr><td class='code'>@link libsbml#GroupsModelLOGroupsAllowedCoreElements GroupsModelLOGroupsAllowedCoreElements@endlink</td>
68607    <td class='meaning'>Core elements allowed on <code>&lt;model&gt;</code>.</td>
68608    <td class='s-na'></td>
68609    <td class='s-na'></td>
68610    <td class='s-na'></td>
68611    <td class='s-na'></td>
68612    <td class='s-na'></td>
68613    <td class='s-na'></td>
68614    <td class='s-error'></td>
68615    <td class='s-error'></td>
68616    </tr>
68617    <tr><td class='code'>@link libsbml#GroupsModelLOGroupsAllowedCoreAttributes GroupsModelLOGroupsAllowedCoreAttributes@endlink</td>
68618    <td class='meaning'>Core attributes allowed on <code>&lt;model&gt;</code>.</td>
68619    <td class='s-na'></td>
68620    <td class='s-na'></td>
68621    <td class='s-na'></td>
68622    <td class='s-na'></td>
68623    <td class='s-na'></td>
68624    <td class='s-na'></td>
68625    <td class='s-error'></td>
68626    <td class='s-error'></td>
68627    </tr>
68628    <tr><td class='code'>@link libsbml#GroupsGroupAllowedCoreAttributes GroupsGroupAllowedCoreAttributes@endlink</td>
68629    <td class='meaning'>Core attributes allowed on <code>&lt;group&gt;</code>.</td>
68630    <td class='s-na'></td>
68631    <td class='s-na'></td>
68632    <td class='s-na'></td>
68633    <td class='s-na'></td>
68634    <td class='s-na'></td>
68635    <td class='s-na'></td>
68636    <td class='s-error'></td>
68637    <td class='s-error'></td>
68638    </tr>
68639    <tr><td class='code'>@link libsbml#GroupsGroupAllowedCoreElements GroupsGroupAllowedCoreElements@endlink</td>
68640    <td class='meaning'>Core elements allowed on <code>&lt;group&gt;</code>.</td>
68641    <td class='s-na'></td>
68642    <td class='s-na'></td>
68643    <td class='s-na'></td>
68644    <td class='s-na'></td>
68645    <td class='s-na'></td>
68646    <td class='s-na'></td>
68647    <td class='s-error'></td>
68648    <td class='s-error'></td>
68649    </tr>
68650    <tr><td class='code'>@link libsbml#GroupsGroupAllowedAttributes GroupsGroupAllowedAttributes@endlink</td>
68651    <td class='meaning'>Attributes allowed on <code>&lt;group&gt;</code>.</td>
68652    <td class='s-na'></td>
68653    <td class='s-na'></td>
68654    <td class='s-na'></td>
68655    <td class='s-na'></td>
68656    <td class='s-na'></td>
68657    <td class='s-na'></td>
68658    <td class='s-error'></td>
68659    <td class='s-error'></td>
68660    </tr>
68661    <tr><td class='code'>@link libsbml#GroupsGroupAllowedElements GroupsGroupAllowedElements@endlink</td>
68662    <td class='meaning'>Elements allowed on <code>&lt;group&gt;</code>.</td>
68663    <td class='s-na'></td>
68664    <td class='s-na'></td>
68665    <td class='s-na'></td>
68666    <td class='s-na'></td>
68667    <td class='s-na'></td>
68668    <td class='s-na'></td>
68669    <td class='s-error'></td>
68670    <td class='s-error'></td>
68671    </tr>
68672    <tr><td class='code'>@link libsbml#GroupsGroupKindMustBeGroupKindEnum GroupsGroupKindMustBeGroupKindEnum@endlink</td>
68673    <td class='meaning'>Kind attribute must be GroupKind.</td>
68674    <td class='s-na'></td>
68675    <td class='s-na'></td>
68676    <td class='s-na'></td>
68677    <td class='s-na'></td>
68678    <td class='s-na'></td>
68679    <td class='s-na'></td>
68680    <td class='s-error'></td>
68681    <td class='s-error'></td>
68682    </tr>
68683    <tr><td class='code'>@link libsbml#GroupsGroupNameMustBeString GroupsGroupNameMustBeString@endlink</td>
68684    <td class='meaning'>Name attribute must be String.</td>
68685    <td class='s-na'></td>
68686    <td class='s-na'></td>
68687    <td class='s-na'></td>
68688    <td class='s-na'></td>
68689    <td class='s-na'></td>
68690    <td class='s-na'></td>
68691    <td class='s-error'></td>
68692    <td class='s-error'></td>
68693    </tr>
68694    <tr><td class='code'>@link libsbml#GroupsGroupEmptyLOElements GroupsGroupEmptyLOElements@endlink</td>
68695    <td class='meaning'>No Empty ListOf elements allowed on <code>&lt;group&gt;</code>.</td>
68696    <td class='s-na'></td>
68697    <td class='s-na'></td>
68698    <td class='s-na'></td>
68699    <td class='s-na'></td>
68700    <td class='s-na'></td>
68701    <td class='s-na'></td>
68702    <td class='s-error'></td>
68703    <td class='s-error'></td>
68704    </tr>
68705    <tr><td class='code'>@link libsbml#GroupsGroupLOMembersAllowedCoreElements GroupsGroupLOMembersAllowedCoreElements@endlink</td>
68706    <td class='meaning'>Core elements allowed on <code>&lt;listOfMembers&gt;</code>.</td>
68707    <td class='s-na'></td>
68708    <td class='s-na'></td>
68709    <td class='s-na'></td>
68710    <td class='s-na'></td>
68711    <td class='s-na'></td>
68712    <td class='s-na'></td>
68713    <td class='s-error'></td>
68714    <td class='s-error'></td>
68715    </tr>
68716    <tr><td class='code'>@link libsbml#GroupsGroupLOMembersAllowedCoreAttributes GroupsGroupLOMembersAllowedCoreAttributes@endlink</td>
68717    <td class='meaning'>Core attributes allowed on <code>&lt;listOfMembers&gt;</code>.</td>
68718    <td class='s-na'></td>
68719    <td class='s-na'></td>
68720    <td class='s-na'></td>
68721    <td class='s-na'></td>
68722    <td class='s-na'></td>
68723    <td class='s-na'></td>
68724    <td class='s-error'></td>
68725    <td class='s-error'></td>
68726    </tr>
68727    <tr><td class='code'>@link libsbml#GroupsGroupLOMembersAllowedAttributes GroupsGroupLOMembersAllowedAttributes@endlink</td>
68728    <td class='meaning'>Attributes allowed on <code>&lt;listOfMembers&gt;</code>.</td>
68729    <td class='s-na'></td>
68730    <td class='s-na'></td>
68731    <td class='s-na'></td>
68732    <td class='s-na'></td>
68733    <td class='s-na'></td>
68734    <td class='s-na'></td>
68735    <td class='s-error'></td>
68736    <td class='s-error'></td>
68737    </tr>
68738    <tr><td class='code'>@link libsbml#GroupsLOMembersNameMustBeString GroupsLOMembersNameMustBeString@endlink</td>
68739    <td class='meaning'>Name attribute must be String.</td>
68740    <td class='s-na'></td>
68741    <td class='s-na'></td>
68742    <td class='s-na'></td>
68743    <td class='s-na'></td>
68744    <td class='s-na'></td>
68745    <td class='s-na'></td>
68746    <td class='s-error'></td>
68747    <td class='s-error'></td>
68748    </tr>
68749    <tr><td class='code'>@link libsbml#GroupsLOMembersConsistentReferences GroupsLOMembersConsistentReferences@endlink</td>
68750    <td class='meaning'>Consistent references by multiple <code>&lt;member&gt;</code> objects.</td>
68751    <td class='s-na'></td>
68752    <td class='s-na'></td>
68753    <td class='s-na'></td>
68754    <td class='s-na'></td>
68755    <td class='s-na'></td>
68756    <td class='s-na'></td>
68757    <td class='s-warning'></td>
68758    <td class='s-warning'></td>
68759    </tr>
68760    <tr><td class='code'>@link libsbml#GroupsNotCircularReferences GroupsNotCircularReferences@endlink</td>
68761    <td class='meaning'>Circular references by multiple <code>&lt;member&gt;</code> objects.</td>
68762    <td class='s-na'></td>
68763    <td class='s-na'></td>
68764    <td class='s-na'></td>
68765    <td class='s-na'></td>
68766    <td class='s-na'></td>
68767    <td class='s-na'></td>
68768    <td class='s-error'></td>
68769    <td class='s-error'></td>
68770    </tr>
68771    <tr><td class='code'>@link libsbml#GroupsMemberAllowedCoreAttributes GroupsMemberAllowedCoreAttributes@endlink</td>
68772    <td class='meaning'>Core attributes allowed on <code>&lt;member&gt;</code>.</td>
68773    <td class='s-na'></td>
68774    <td class='s-na'></td>
68775    <td class='s-na'></td>
68776    <td class='s-na'></td>
68777    <td class='s-na'></td>
68778    <td class='s-na'></td>
68779    <td class='s-error'></td>
68780    <td class='s-error'></td>
68781    </tr>
68782    <tr><td class='code'>@link libsbml#GroupsMemberAllowedCoreElements GroupsMemberAllowedCoreElements@endlink</td>
68783    <td class='meaning'>Core elements allowed on <code>&lt;member&gt;</code>.</td>
68784    <td class='s-na'></td>
68785    <td class='s-na'></td>
68786    <td class='s-na'></td>
68787    <td class='s-na'></td>
68788    <td class='s-na'></td>
68789    <td class='s-na'></td>
68790    <td class='s-error'></td>
68791    <td class='s-error'></td>
68792    </tr>
68793    <tr><td class='code'>@link libsbml#GroupsMemberAllowedAttributes GroupsMemberAllowedAttributes@endlink</td>
68794    <td class='meaning'>Attributes allowed on <code>&lt;member&gt;</code>.</td>
68795    <td class='s-na'></td>
68796    <td class='s-na'></td>
68797    <td class='s-na'></td>
68798    <td class='s-na'></td>
68799    <td class='s-na'></td>
68800    <td class='s-na'></td>
68801    <td class='s-error'></td>
68802    <td class='s-error'></td>
68803    </tr>
68804    <tr><td class='code'>@link libsbml#GroupsMemberNameMustBeString GroupsMemberNameMustBeString@endlink</td>
68805    <td class='meaning'>Name attribute must be String.</td>
68806    <td class='s-na'></td>
68807    <td class='s-na'></td>
68808    <td class='s-na'></td>
68809    <td class='s-na'></td>
68810    <td class='s-na'></td>
68811    <td class='s-na'></td>
68812    <td class='s-error'></td>
68813    <td class='s-error'></td>
68814    </tr>
68815    <tr><td class='code'>@link libsbml#GroupsMemberIdRefMustBeSBase GroupsMemberIdRefMustBeSBase@endlink</td>
68816    <td class='meaning'>Attribute 'idRef' must point to SBase object.</td>
68817    <td class='s-na'></td>
68818    <td class='s-na'></td>
68819    <td class='s-na'></td>
68820    <td class='s-na'></td>
68821    <td class='s-na'></td>
68822    <td class='s-na'></td>
68823    <td class='s-error'></td>
68824    <td class='s-error'></td>
68825    </tr>
68826    <tr><td class='code'>@link libsbml#GroupsMemberMetaIdRefMustBeSBase GroupsMemberMetaIdRefMustBeSBase@endlink</td>
68827    <td class='meaning'>Attribute 'metaIdRef' must point to SBase object.</td>
68828    <td class='s-na'></td>
68829    <td class='s-na'></td>
68830    <td class='s-na'></td>
68831    <td class='s-na'></td>
68832    <td class='s-na'></td>
68833    <td class='s-na'></td>
68834    <td class='s-error'></td>
68835    <td class='s-error'></td>
68836    </tr>
68837    <tr><td class='code'>@link libsbml#GroupsMemberIdRefMustBeSId GroupsMemberIdRefMustBeSId@endlink</td>
68838    <td class='meaning'>Attribute 'idRef' must be type 'SId'.</td>
68839    <td class='s-na'></td>
68840    <td class='s-na'></td>
68841    <td class='s-na'></td>
68842    <td class='s-na'></td>
68843    <td class='s-na'></td>
68844    <td class='s-na'></td>
68845    <td class='s-error'></td>
68846    <td class='s-error'></td>
68847    </tr>
68848    <tr><td class='code'>@link libsbml#GroupsMemberMetaIdRefMustBeID GroupsMemberMetaIdRefMustBeID@endlink</td>
68849    <td class='meaning'>Attribute 'metaIdRef' must be type 'ID'.</td>
68850    <td class='s-na'></td>
68851    <td class='s-na'></td>
68852    <td class='s-na'></td>
68853    <td class='s-na'></td>
68854    <td class='s-na'></td>
68855    <td class='s-na'></td>
68856    <td class='s-error'></td>
68857    <td class='s-error'></td>
68858    </tr>
68859    <tr><td class='code'>@link libsbml#LayoutUnknownError LayoutUnknownError@endlink</td>
68860    <td class='meaning'></td>
68861    <td class='s-na'></td>
68862    <td class='s-na'></td>
68863    <td class='s-na'></td>
68864    <td class='s-na'></td>
68865    <td class='s-na'></td>
68866    <td class='s-na'></td>
68867    <td class='s-na'></td>
68868    <td class='s-na'></td>
68869    </tr>
68870    <tr><td class='code'>@link libsbml#LayoutNSUndeclared LayoutNSUndeclared@endlink</td>
68871    <td class='meaning'>The layout ns is not correctly declared</td>
68872    <td class='s-na'></td>
68873    <td class='s-na'></td>
68874    <td class='s-na'></td>
68875    <td class='s-na'></td>
68876    <td class='s-na'></td>
68877    <td class='s-na'></td>
68878    <td class='s-error'></td>
68879    <td class='s-error'></td>
68880    </tr>
68881    <tr><td class='code'>@link libsbml#LayoutElementNotInNs LayoutElementNotInNs@endlink</td>
68882    <td class='meaning'>Element not in layout namespace</td>
68883    <td class='s-na'></td>
68884    <td class='s-na'></td>
68885    <td class='s-na'></td>
68886    <td class='s-na'></td>
68887    <td class='s-na'></td>
68888    <td class='s-na'></td>
68889    <td class='s-error'></td>
68890    <td class='s-error'></td>
68891    </tr>
68892    <tr><td class='code'>@link libsbml#LayoutDuplicateComponentId LayoutDuplicateComponentId@endlink</td>
68893    <td class='meaning'>Duplicate 'id' attribute value</td>
68894    <td class='s-na'></td>
68895    <td class='s-na'></td>
68896    <td class='s-na'></td>
68897    <td class='s-na'></td>
68898    <td class='s-na'></td>
68899    <td class='s-na'></td>
68900    <td class='s-error'></td>
68901    <td class='s-error'></td>
68902    </tr>
68903    <tr><td class='code'>@link libsbml#LayoutSIdSyntax LayoutSIdSyntax@endlink</td>
68904    <td class='meaning'>'id' attribute incorrect syntax</td>
68905    <td class='s-na'></td>
68906    <td class='s-na'></td>
68907    <td class='s-na'></td>
68908    <td class='s-na'></td>
68909    <td class='s-na'></td>
68910    <td class='s-na'></td>
68911    <td class='s-error'></td>
68912    <td class='s-error'></td>
68913    </tr>
68914    <tr><td class='code'>@link libsbml#LayoutXsiTypeAllowedLocations LayoutXsiTypeAllowedLocations@endlink</td>
68915    <td class='meaning'>'xsi:type' allowed locations</td>
68916    <td class='s-na'></td>
68917    <td class='s-na'></td>
68918    <td class='s-na'></td>
68919    <td class='s-na'></td>
68920    <td class='s-na'></td>
68921    <td class='s-na'></td>
68922    <td class='s-error'></td>
68923    <td class='s-error'></td>
68924    </tr>
68925    <tr><td class='code'>@link libsbml#LayoutXsiTypeSyntax LayoutXsiTypeSyntax@endlink</td>
68926    <td class='meaning'>'xsi:type' attribute incorrect syntax</td>
68927    <td class='s-na'></td>
68928    <td class='s-na'></td>
68929    <td class='s-na'></td>
68930    <td class='s-na'></td>
68931    <td class='s-na'></td>
68932    <td class='s-na'></td>
68933    <td class='s-error'></td>
68934    <td class='s-error'></td>
68935    </tr>
68936    <tr><td class='code'>@link libsbml#LayoutAttributeRequiredMissing LayoutAttributeRequiredMissing@endlink</td>
68937    <td class='meaning'>Required layout:required attribute on <code>&lt;sbml&gt;</code></td>
68938    <td class='s-na'></td>
68939    <td class='s-na'></td>
68940    <td class='s-na'></td>
68941    <td class='s-na'></td>
68942    <td class='s-na'></td>
68943    <td class='s-na'></td>
68944    <td class='s-error'></td>
68945    <td class='s-error'></td>
68946    </tr>
68947    <tr><td class='code'>@link libsbml#LayoutAttributeRequiredMustBeBoolean LayoutAttributeRequiredMustBeBoolean@endlink</td>
68948    <td class='meaning'>The layout:required attribute must be Boolean</td>
68949    <td class='s-na'></td>
68950    <td class='s-na'></td>
68951    <td class='s-na'></td>
68952    <td class='s-na'></td>
68953    <td class='s-na'></td>
68954    <td class='s-na'></td>
68955    <td class='s-error'></td>
68956    <td class='s-error'></td>
68957    </tr>
68958    <tr><td class='code'>@link libsbml#LayoutRequiredFalse LayoutRequiredFalse@endlink</td>
68959    <td class='meaning'>The layout:required attribute must be 'false'</td>
68960    <td class='s-na'></td>
68961    <td class='s-na'></td>
68962    <td class='s-na'></td>
68963    <td class='s-na'></td>
68964    <td class='s-na'></td>
68965    <td class='s-na'></td>
68966    <td class='s-error'></td>
68967    <td class='s-error'></td>
68968    </tr>
68969    <tr><td class='code'>@link libsbml#LayoutOnlyOneLOLayouts LayoutOnlyOneLOLayouts@endlink</td>
68970    <td class='meaning'>Only one listOfLayouts on <code>&lt;model&gt;</code></td>
68971    <td class='s-na'></td>
68972    <td class='s-na'></td>
68973    <td class='s-na'></td>
68974    <td class='s-na'></td>
68975    <td class='s-na'></td>
68976    <td class='s-na'></td>
68977    <td class='s-error'></td>
68978    <td class='s-error'></td>
68979    </tr>
68980    <tr><td class='code'>@link libsbml#LayoutLOLayoutsNotEmpty LayoutLOLayoutsNotEmpty@endlink</td>
68981    <td class='meaning'>ListOf elements cannot be empty</td>
68982    <td class='s-na'></td>
68983    <td class='s-na'></td>
68984    <td class='s-na'></td>
68985    <td class='s-na'></td>
68986    <td class='s-na'></td>
68987    <td class='s-na'></td>
68988    <td class='s-error'></td>
68989    <td class='s-error'></td>
68990    </tr>
68991    <tr><td class='code'>@link libsbml#LayoutLOLayoutsAllowedElements LayoutLOLayoutsAllowedElements@endlink</td>
68992    <td class='meaning'>Allowed elements on ListOfLayouts</td>
68993    <td class='s-na'></td>
68994    <td class='s-na'></td>
68995    <td class='s-na'></td>
68996    <td class='s-na'></td>
68997    <td class='s-na'></td>
68998    <td class='s-na'></td>
68999    <td class='s-error'></td>
69000    <td class='s-error'></td>
69001    </tr>
69002    <tr><td class='code'>@link libsbml#LayoutLOLayoutsAllowedAttributes LayoutLOLayoutsAllowedAttributes@endlink</td>
69003    <td class='meaning'>Allowed attributes on ListOfLayouts</td>
69004    <td class='s-na'></td>
69005    <td class='s-na'></td>
69006    <td class='s-na'></td>
69007    <td class='s-na'></td>
69008    <td class='s-na'></td>
69009    <td class='s-na'></td>
69010    <td class='s-error'></td>
69011    <td class='s-error'></td>
69012    </tr>
69013    <tr><td class='code'>@link libsbml#LayoutLayoutAllowedElements LayoutLayoutAllowedElements@endlink</td>
69014    <td class='meaning'>Allowed elements on Layout</td>
69015    <td class='s-na'></td>
69016    <td class='s-na'></td>
69017    <td class='s-na'></td>
69018    <td class='s-na'></td>
69019    <td class='s-na'></td>
69020    <td class='s-na'></td>
69021    <td class='s-error'></td>
69022    <td class='s-error'></td>
69023    </tr>
69024    <tr><td class='code'>@link libsbml#LayoutLayoutAllowedCoreAttributes LayoutLayoutAllowedCoreAttributes@endlink</td>
69025    <td class='meaning'>Allowed core attributes on Layout</td>
69026    <td class='s-na'></td>
69027    <td class='s-na'></td>
69028    <td class='s-na'></td>
69029    <td class='s-na'></td>
69030    <td class='s-na'></td>
69031    <td class='s-na'></td>
69032    <td class='s-error'></td>
69033    <td class='s-error'></td>
69034    </tr>
69035    <tr><td class='code'>@link libsbml#LayoutOnlyOneEachListOf LayoutOnlyOneEachListOf@endlink</td>
69036    <td class='meaning'>Only one each listOf on <code>&lt;layout&gt;</code></td>
69037    <td class='s-na'></td>
69038    <td class='s-na'></td>
69039    <td class='s-na'></td>
69040    <td class='s-na'></td>
69041    <td class='s-na'></td>
69042    <td class='s-na'></td>
69043    <td class='s-error'></td>
69044    <td class='s-error'></td>
69045    </tr>
69046    <tr><td class='code'>@link libsbml#LayoutNoEmptyListOfs LayoutNoEmptyListOfs@endlink</td>
69047    <td class='meaning'>ListOf elements cannot be empty</td>
69048    <td class='s-na'></td>
69049    <td class='s-na'></td>
69050    <td class='s-na'></td>
69051    <td class='s-na'></td>
69052    <td class='s-na'></td>
69053    <td class='s-na'></td>
69054    <td class='s-error'></td>
69055    <td class='s-error'></td>
69056    </tr>
69057    <tr><td class='code'>@link libsbml#LayoutLayoutAllowedAttributes LayoutLayoutAllowedAttributes@endlink</td>
69058    <td class='meaning'><code>&lt;layout&gt;</code> must have 'id' and may have 'name'</td>
69059    <td class='s-na'></td>
69060    <td class='s-na'></td>
69061    <td class='s-na'></td>
69062    <td class='s-na'></td>
69063    <td class='s-na'></td>
69064    <td class='s-na'></td>
69065    <td class='s-error'></td>
69066    <td class='s-error'></td>
69067    </tr>
69068    <tr><td class='code'>@link libsbml#LayoutLayoutNameMustBeString LayoutLayoutNameMustBeString@endlink</td>
69069    <td class='meaning'>'name' must be string</td>
69070    <td class='s-na'></td>
69071    <td class='s-na'></td>
69072    <td class='s-na'></td>
69073    <td class='s-na'></td>
69074    <td class='s-na'></td>
69075    <td class='s-na'></td>
69076    <td class='s-error'></td>
69077    <td class='s-error'></td>
69078    </tr>
69079    <tr><td class='code'>@link libsbml#LayoutLOCompGlyphAllowedAttributes LayoutLOCompGlyphAllowedAttributes@endlink</td>
69080    <td class='meaning'>Attributes allowed on <code>&lt;listOfCompartmentGlyphs&gt;</code>.</td>
69081    <td class='s-na'></td>
69082    <td class='s-na'></td>
69083    <td class='s-na'></td>
69084    <td class='s-na'></td>
69085    <td class='s-na'></td>
69086    <td class='s-na'></td>
69087    <td class='s-error'></td>
69088    <td class='s-error'></td>
69089    </tr>
69090    <tr><td class='code'>@link libsbml#LayoutLOCompGlyphAllowedElements LayoutLOCompGlyphAllowedElements@endlink</td>
69091    <td class='meaning'>Elements allowed on <code>&lt;listOfCompartmentGlyphs&gt;</code>.</td>
69092    <td class='s-na'></td>
69093    <td class='s-na'></td>
69094    <td class='s-na'></td>
69095    <td class='s-na'></td>
69096    <td class='s-na'></td>
69097    <td class='s-na'></td>
69098    <td class='s-error'></td>
69099    <td class='s-error'></td>
69100    </tr>
69101    <tr><td class='code'>@link libsbml#LayoutLOSpeciesGlyphAllowedAttributes LayoutLOSpeciesGlyphAllowedAttributes@endlink</td>
69102    <td class='meaning'>Attributes allowed on <code>&lt;listOfSpeciesGlyphs&gt;</code>.</td>
69103    <td class='s-na'></td>
69104    <td class='s-na'></td>
69105    <td class='s-na'></td>
69106    <td class='s-na'></td>
69107    <td class='s-na'></td>
69108    <td class='s-na'></td>
69109    <td class='s-error'></td>
69110    <td class='s-error'></td>
69111    </tr>
69112    <tr><td class='code'>@link libsbml#LayoutLOSpeciesGlyphAllowedElements LayoutLOSpeciesGlyphAllowedElements@endlink</td>
69113    <td class='meaning'>Elements allowed on <code>&lt;listOfSpeciesGlyphs&gt;</code>.</td>
69114    <td class='s-na'></td>
69115    <td class='s-na'></td>
69116    <td class='s-na'></td>
69117    <td class='s-na'></td>
69118    <td class='s-na'></td>
69119    <td class='s-na'></td>
69120    <td class='s-error'></td>
69121    <td class='s-error'></td>
69122    </tr>
69123    <tr><td class='code'>@link libsbml#LayoutLORnGlyphAllowedAttributes LayoutLORnGlyphAllowedAttributes@endlink</td>
69124    <td class='meaning'>Attributes allowed on <code>&lt;listOfReactionGlyphs&gt;</code>.</td>
69125    <td class='s-na'></td>
69126    <td class='s-na'></td>
69127    <td class='s-na'></td>
69128    <td class='s-na'></td>
69129    <td class='s-na'></td>
69130    <td class='s-na'></td>
69131    <td class='s-error'></td>
69132    <td class='s-error'></td>
69133    </tr>
69134    <tr><td class='code'>@link libsbml#LayoutLORnGlyphAllowedElements LayoutLORnGlyphAllowedElements@endlink</td>
69135    <td class='meaning'>Elements allowed on <code>&lt;listOfReactionGlyphs&gt;</code>.</td>
69136    <td class='s-na'></td>
69137    <td class='s-na'></td>
69138    <td class='s-na'></td>
69139    <td class='s-na'></td>
69140    <td class='s-na'></td>
69141    <td class='s-na'></td>
69142    <td class='s-error'></td>
69143    <td class='s-error'></td>
69144    </tr>
69145    <tr><td class='code'>@link libsbml#LayoutLOAddGOAllowedAttribut LayoutLOAddGOAllowedAttribut@endlink</td>
69146    <td class='meaning'>Attributes allowed on <code>&lt;listOfAdditionalGraphicalObjectGlyphs&gt;</code>.</td>
69147    <td class='s-na'></td>
69148    <td class='s-na'></td>
69149    <td class='s-na'></td>
69150    <td class='s-na'></td>
69151    <td class='s-na'></td>
69152    <td class='s-na'></td>
69153    <td class='s-error'></td>
69154    <td class='s-error'></td>
69155    </tr>
69156    <tr><td class='code'>@link libsbml#LayoutLOAddGOAllowedElements LayoutLOAddGOAllowedElements@endlink</td>
69157    <td class='meaning'>Elements allowed on <code>&lt;listOfAdditionalGraphicalObjectGlyphs&gt;</code>.</td>
69158    <td class='s-na'></td>
69159    <td class='s-na'></td>
69160    <td class='s-na'></td>
69161    <td class='s-na'></td>
69162    <td class='s-na'></td>
69163    <td class='s-na'></td>
69164    <td class='s-error'></td>
69165    <td class='s-error'></td>
69166    </tr>
69167    <tr><td class='code'>@link libsbml#LayoutLayoutMustHaveDimensions LayoutLayoutMustHaveDimensions@endlink</td>
69168    <td class='meaning'>Layout must have <code>&lt;dimensions&gt;</code>.</td>
69169    <td class='s-na'></td>
69170    <td class='s-na'></td>
69171    <td class='s-na'></td>
69172    <td class='s-na'></td>
69173    <td class='s-na'></td>
69174    <td class='s-na'></td>
69175    <td class='s-error'></td>
69176    <td class='s-error'></td>
69177    </tr>
69178    <tr><td class='code'>@link libsbml#LayoutLOTextGlyphAllowedAttributes LayoutLOTextGlyphAllowedAttributes@endlink</td>
69179    <td class='meaning'>Attributes allowed on <code>&lt;listOfTextGlyphs&gt;</code>.</td>
69180    <td class='s-na'></td>
69181    <td class='s-na'></td>
69182    <td class='s-na'></td>
69183    <td class='s-na'></td>
69184    <td class='s-na'></td>
69185    <td class='s-na'></td>
69186    <td class='s-error'></td>
69187    <td class='s-error'></td>
69188    </tr>
69189    <tr><td class='code'>@link libsbml#LayoutLOTextGlyphAllowedElements LayoutLOTextGlyphAllowedElements@endlink</td>
69190    <td class='meaning'>Elements allowed on <code>&lt;listOfTextGlyphs&gt;</code>.</td>
69191    <td class='s-na'></td>
69192    <td class='s-na'></td>
69193    <td class='s-na'></td>
69194    <td class='s-na'></td>
69195    <td class='s-na'></td>
69196    <td class='s-na'></td>
69197    <td class='s-error'></td>
69198    <td class='s-error'></td>
69199    </tr>
69200    <tr><td class='code'>@link libsbml#LayoutGOAllowedCoreElements LayoutGOAllowedCoreElements@endlink</td>
69201    <td class='meaning'>Core elements allowed on <code>&lt;graphicalObject&gt;</code>.</td>
69202    <td class='s-na'></td>
69203    <td class='s-na'></td>
69204    <td class='s-na'></td>
69205    <td class='s-na'></td>
69206    <td class='s-na'></td>
69207    <td class='s-na'></td>
69208    <td class='s-error'></td>
69209    <td class='s-error'></td>
69210    </tr>
69211    <tr><td class='code'>@link libsbml#LayoutGOAllowedCoreAttributes LayoutGOAllowedCoreAttributes@endlink</td>
69212    <td class='meaning'>Core attributes allowed on <code>&lt;graphicalObject&gt;</code>.</td>
69213    <td class='s-na'></td>
69214    <td class='s-na'></td>
69215    <td class='s-na'></td>
69216    <td class='s-na'></td>
69217    <td class='s-na'></td>
69218    <td class='s-na'></td>
69219    <td class='s-error'></td>
69220    <td class='s-error'></td>
69221    </tr>
69222    <tr><td class='code'>@link libsbml#LayoutGOAllowedElements LayoutGOAllowedElements@endlink</td>
69223    <td class='meaning'>Layout elements allowed on <code>&lt;graphicalObject&gt;</code>.</td>
69224    <td class='s-na'></td>
69225    <td class='s-na'></td>
69226    <td class='s-na'></td>
69227    <td class='s-na'></td>
69228    <td class='s-na'></td>
69229    <td class='s-na'></td>
69230    <td class='s-error'></td>
69231    <td class='s-error'></td>
69232    </tr>
69233    <tr><td class='code'>@link libsbml#LayoutGOAllowedAttributes LayoutGOAllowedAttributes@endlink</td>
69234    <td class='meaning'>Layout attributes allowed on <code>&lt;graphicalObject&gt;</code>.</td>
69235    <td class='s-na'></td>
69236    <td class='s-na'></td>
69237    <td class='s-na'></td>
69238    <td class='s-na'></td>
69239    <td class='s-na'></td>
69240    <td class='s-na'></td>
69241    <td class='s-error'></td>
69242    <td class='s-error'></td>
69243    </tr>
69244    <tr><td class='code'>@link libsbml#LayoutGOMetaIdRefMustBeIDREF LayoutGOMetaIdRefMustBeIDREF@endlink</td>
69245    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
69246    <td class='s-na'></td>
69247    <td class='s-na'></td>
69248    <td class='s-na'></td>
69249    <td class='s-na'></td>
69250    <td class='s-na'></td>
69251    <td class='s-na'></td>
69252    <td class='s-error'></td>
69253    <td class='s-error'></td>
69254    </tr>
69255    <tr><td class='code'>@link libsbml#LayoutGOMetaIdRefMustReferenceObject LayoutGOMetaIdRefMustReferenceObject@endlink</td>
69256    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
69257    <td class='s-na'></td>
69258    <td class='s-na'></td>
69259    <td class='s-na'></td>
69260    <td class='s-na'></td>
69261    <td class='s-na'></td>
69262    <td class='s-na'></td>
69263    <td class='s-error'></td>
69264    <td class='s-error'></td>
69265    </tr>
69266    <tr><td class='code'>@link libsbml#LayoutGOMustContainBoundingBox LayoutGOMustContainBoundingBox@endlink</td>
69267    <td class='meaning'>A <code>&lt;graphicalObject&gt;</code> must contain a <code>&lt;boundingBox&gt;</code>.</td>
69268    <td class='s-na'></td>
69269    <td class='s-na'></td>
69270    <td class='s-na'></td>
69271    <td class='s-na'></td>
69272    <td class='s-na'></td>
69273    <td class='s-na'></td>
69274    <td class='s-error'></td>
69275    <td class='s-error'></td>
69276    </tr>
69277    <tr><td class='code'>@link libsbml#LayoutCGAllowedCoreElements LayoutCGAllowedCoreElements@endlink</td>
69278    <td class='meaning'>Core elements allowed on <code>&lt;compartmentGlyph&gt;</code>.</td>
69279    <td class='s-na'></td>
69280    <td class='s-na'></td>
69281    <td class='s-na'></td>
69282    <td class='s-na'></td>
69283    <td class='s-na'></td>
69284    <td class='s-na'></td>
69285    <td class='s-error'></td>
69286    <td class='s-error'></td>
69287    </tr>
69288    <tr><td class='code'>@link libsbml#LayoutCGAllowedCoreAttributes LayoutCGAllowedCoreAttributes@endlink</td>
69289    <td class='meaning'>Core attributes allowed on <code>&lt;compartmentGlyph&gt;</code>.</td>
69290    <td class='s-na'></td>
69291    <td class='s-na'></td>
69292    <td class='s-na'></td>
69293    <td class='s-na'></td>
69294    <td class='s-na'></td>
69295    <td class='s-na'></td>
69296    <td class='s-error'></td>
69297    <td class='s-error'></td>
69298    </tr>
69299    <tr><td class='code'>@link libsbml#LayoutCGAllowedElements LayoutCGAllowedElements@endlink</td>
69300    <td class='meaning'>Layout elements allowed on <code>&lt;compartmentGlyph&gt;</code>.</td>
69301    <td class='s-na'></td>
69302    <td class='s-na'></td>
69303    <td class='s-na'></td>
69304    <td class='s-na'></td>
69305    <td class='s-na'></td>
69306    <td class='s-na'></td>
69307    <td class='s-error'></td>
69308    <td class='s-error'></td>
69309    </tr>
69310    <tr><td class='code'>@link libsbml#LayoutCGAllowedAttributes LayoutCGAllowedAttributes@endlink</td>
69311    <td class='meaning'>Layout attributes allowed on <code>&lt;compartmentGlyph&gt;</code>.</td>
69312    <td class='s-na'></td>
69313    <td class='s-na'></td>
69314    <td class='s-na'></td>
69315    <td class='s-na'></td>
69316    <td class='s-na'></td>
69317    <td class='s-na'></td>
69318    <td class='s-error'></td>
69319    <td class='s-error'></td>
69320    </tr>
69321    <tr><td class='code'>@link libsbml#LayoutCGMetaIdRefMustBeIDREF LayoutCGMetaIdRefMustBeIDREF@endlink</td>
69322    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
69323    <td class='s-na'></td>
69324    <td class='s-na'></td>
69325    <td class='s-na'></td>
69326    <td class='s-na'></td>
69327    <td class='s-na'></td>
69328    <td class='s-na'></td>
69329    <td class='s-error'></td>
69330    <td class='s-error'></td>
69331    </tr>
69332    <tr><td class='code'>@link libsbml#LayoutCGMetaIdRefMustReferenceObject LayoutCGMetaIdRefMustReferenceObject@endlink</td>
69333    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
69334    <td class='s-na'></td>
69335    <td class='s-na'></td>
69336    <td class='s-na'></td>
69337    <td class='s-na'></td>
69338    <td class='s-na'></td>
69339    <td class='s-na'></td>
69340    <td class='s-error'></td>
69341    <td class='s-error'></td>
69342    </tr>
69343    <tr><td class='code'>@link libsbml#LayoutCGCompartmentSyntax LayoutCGCompartmentSyntax@endlink</td>
69344    <td class='meaning'>CompartmentGlyph 'compartment' must have SIdRef syntax.</td>
69345    <td class='s-na'></td>
69346    <td class='s-na'></td>
69347    <td class='s-na'></td>
69348    <td class='s-na'></td>
69349    <td class='s-na'></td>
69350    <td class='s-na'></td>
69351    <td class='s-error'></td>
69352    <td class='s-error'></td>
69353    </tr>
69354    <tr><td class='code'>@link libsbml#LayoutCGCompartmentMustRefComp LayoutCGCompartmentMustRefComp@endlink</td>
69355    <td class='meaning'>CompartmentGlyph compartment must reference existing compartment.</td>
69356    <td class='s-na'></td>
69357    <td class='s-na'></td>
69358    <td class='s-na'></td>
69359    <td class='s-na'></td>
69360    <td class='s-na'></td>
69361    <td class='s-na'></td>
69362    <td class='s-error'></td>
69363    <td class='s-error'></td>
69364    </tr>
69365    <tr><td class='code'>@link libsbml#LayoutCGNoDuplicateReferences LayoutCGNoDuplicateReferences@endlink</td>
69366    <td class='meaning'>CompartmentGlyph cannot reference two objects.</td>
69367    <td class='s-na'></td>
69368    <td class='s-na'></td>
69369    <td class='s-na'></td>
69370    <td class='s-na'></td>
69371    <td class='s-na'></td>
69372    <td class='s-na'></td>
69373    <td class='s-error'></td>
69374    <td class='s-error'></td>
69375    </tr>
69376    <tr><td class='code'>@link libsbml#LayoutCGOrderMustBeDouble LayoutCGOrderMustBeDouble@endlink</td>
69377    <td class='meaning'>CompartmentGlyph order must be double.</td>
69378    <td class='s-na'></td>
69379    <td class='s-na'></td>
69380    <td class='s-na'></td>
69381    <td class='s-na'></td>
69382    <td class='s-na'></td>
69383    <td class='s-na'></td>
69384    <td class='s-error'></td>
69385    <td class='s-error'></td>
69386    </tr>
69387    <tr><td class='code'>@link libsbml#LayoutSGAllowedCoreElements LayoutSGAllowedCoreElements@endlink</td>
69388    <td class='meaning'>Core elements allowed on <code>&lt;speciesGlyph&gt;</code>.</td>
69389    <td class='s-na'></td>
69390    <td class='s-na'></td>
69391    <td class='s-na'></td>
69392    <td class='s-na'></td>
69393    <td class='s-na'></td>
69394    <td class='s-na'></td>
69395    <td class='s-error'></td>
69396    <td class='s-error'></td>
69397    </tr>
69398    <tr><td class='code'>@link libsbml#LayoutSGAllowedCoreAttributes LayoutSGAllowedCoreAttributes@endlink</td>
69399    <td class='meaning'>Core attributes allowed on <code>&lt;speciesGlyph&gt;</code>.</td>
69400    <td class='s-na'></td>
69401    <td class='s-na'></td>
69402    <td class='s-na'></td>
69403    <td class='s-na'></td>
69404    <td class='s-na'></td>
69405    <td class='s-na'></td>
69406    <td class='s-error'></td>
69407    <td class='s-error'></td>
69408    </tr>
69409    <tr><td class='code'>@link libsbml#LayoutSGAllowedElements LayoutSGAllowedElements@endlink</td>
69410    <td class='meaning'>Layout elements allowed on <code>&lt;speciesGlyph&gt;</code>.</td>
69411    <td class='s-na'></td>
69412    <td class='s-na'></td>
69413    <td class='s-na'></td>
69414    <td class='s-na'></td>
69415    <td class='s-na'></td>
69416    <td class='s-na'></td>
69417    <td class='s-error'></td>
69418    <td class='s-error'></td>
69419    </tr>
69420    <tr><td class='code'>@link libsbml#LayoutSGAllowedAttributes LayoutSGAllowedAttributes@endlink</td>
69421    <td class='meaning'>Layout attributes allowed on <code>&lt;speciesGlyph&gt;</code>.</td>
69422    <td class='s-na'></td>
69423    <td class='s-na'></td>
69424    <td class='s-na'></td>
69425    <td class='s-na'></td>
69426    <td class='s-na'></td>
69427    <td class='s-na'></td>
69428    <td class='s-error'></td>
69429    <td class='s-error'></td>
69430    </tr>
69431    <tr><td class='code'>@link libsbml#LayoutSGMetaIdRefMustBeIDREF LayoutSGMetaIdRefMustBeIDREF@endlink</td>
69432    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
69433    <td class='s-na'></td>
69434    <td class='s-na'></td>
69435    <td class='s-na'></td>
69436    <td class='s-na'></td>
69437    <td class='s-na'></td>
69438    <td class='s-na'></td>
69439    <td class='s-error'></td>
69440    <td class='s-error'></td>
69441    </tr>
69442    <tr><td class='code'>@link libsbml#LayoutSGMetaIdRefMustReferenceObject LayoutSGMetaIdRefMustReferenceObject@endlink</td>
69443    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
69444    <td class='s-na'></td>
69445    <td class='s-na'></td>
69446    <td class='s-na'></td>
69447    <td class='s-na'></td>
69448    <td class='s-na'></td>
69449    <td class='s-na'></td>
69450    <td class='s-error'></td>
69451    <td class='s-error'></td>
69452    </tr>
69453    <tr><td class='code'>@link libsbml#LayoutSGSpeciesSyntax LayoutSGSpeciesSyntax@endlink</td>
69454    <td class='meaning'>SpeciesGlyph 'species' must have SIdRef syntax.</td>
69455    <td class='s-na'></td>
69456    <td class='s-na'></td>
69457    <td class='s-na'></td>
69458    <td class='s-na'></td>
69459    <td class='s-na'></td>
69460    <td class='s-na'></td>
69461    <td class='s-error'></td>
69462    <td class='s-error'></td>
69463    </tr>
69464    <tr><td class='code'>@link libsbml#LayoutSGSpeciesMustRefSpecies LayoutSGSpeciesMustRefSpecies@endlink</td>
69465    <td class='meaning'>SpeciesGlyph species must reference existing species.</td>
69466    <td class='s-na'></td>
69467    <td class='s-na'></td>
69468    <td class='s-na'></td>
69469    <td class='s-na'></td>
69470    <td class='s-na'></td>
69471    <td class='s-na'></td>
69472    <td class='s-error'></td>
69473    <td class='s-error'></td>
69474    </tr>
69475    <tr><td class='code'>@link libsbml#LayoutSGNoDuplicateReferences LayoutSGNoDuplicateReferences@endlink</td>
69476    <td class='meaning'>SpeciesGlyph cannot reference two objects.</td>
69477    <td class='s-na'></td>
69478    <td class='s-na'></td>
69479    <td class='s-na'></td>
69480    <td class='s-na'></td>
69481    <td class='s-na'></td>
69482    <td class='s-na'></td>
69483    <td class='s-error'></td>
69484    <td class='s-error'></td>
69485    </tr>
69486    <tr><td class='code'>@link libsbml#LayoutRGAllowedCoreElements LayoutRGAllowedCoreElements@endlink</td>
69487    <td class='meaning'>Core elements allowed on <code>&lt;reactionGlyph&gt;</code>.</td>
69488    <td class='s-na'></td>
69489    <td class='s-na'></td>
69490    <td class='s-na'></td>
69491    <td class='s-na'></td>
69492    <td class='s-na'></td>
69493    <td class='s-na'></td>
69494    <td class='s-error'></td>
69495    <td class='s-error'></td>
69496    </tr>
69497    <tr><td class='code'>@link libsbml#LayoutRGAllowedCoreAttributes LayoutRGAllowedCoreAttributes@endlink</td>
69498    <td class='meaning'>Core attributes allowed on <code>&lt;reactionGlyph&gt;</code>.</td>
69499    <td class='s-na'></td>
69500    <td class='s-na'></td>
69501    <td class='s-na'></td>
69502    <td class='s-na'></td>
69503    <td class='s-na'></td>
69504    <td class='s-na'></td>
69505    <td class='s-error'></td>
69506    <td class='s-error'></td>
69507    </tr>
69508    <tr><td class='code'>@link libsbml#LayoutRGAllowedElements LayoutRGAllowedElements@endlink</td>
69509    <td class='meaning'>Layout elements allowed on <code>&lt;reactionGlyph&gt;</code>.</td>
69510    <td class='s-na'></td>
69511    <td class='s-na'></td>
69512    <td class='s-na'></td>
69513    <td class='s-na'></td>
69514    <td class='s-na'></td>
69515    <td class='s-na'></td>
69516    <td class='s-error'></td>
69517    <td class='s-error'></td>
69518    </tr>
69519    <tr><td class='code'>@link libsbml#LayoutRGAllowedAttributes LayoutRGAllowedAttributes@endlink</td>
69520    <td class='meaning'>Layout attributes allowed on <code>&lt;reactionGlyph&gt;</code>.</td>
69521    <td class='s-na'></td>
69522    <td class='s-na'></td>
69523    <td class='s-na'></td>
69524    <td class='s-na'></td>
69525    <td class='s-na'></td>
69526    <td class='s-na'></td>
69527    <td class='s-error'></td>
69528    <td class='s-error'></td>
69529    </tr>
69530    <tr><td class='code'>@link libsbml#LayoutRGMetaIdRefMustBeIDREF LayoutRGMetaIdRefMustBeIDREF@endlink</td>
69531    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
69532    <td class='s-na'></td>
69533    <td class='s-na'></td>
69534    <td class='s-na'></td>
69535    <td class='s-na'></td>
69536    <td class='s-na'></td>
69537    <td class='s-na'></td>
69538    <td class='s-error'></td>
69539    <td class='s-error'></td>
69540    </tr>
69541    <tr><td class='code'>@link libsbml#LayoutRGMetaIdRefMustReferenceObject LayoutRGMetaIdRefMustReferenceObject@endlink</td>
69542    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
69543    <td class='s-na'></td>
69544    <td class='s-na'></td>
69545    <td class='s-na'></td>
69546    <td class='s-na'></td>
69547    <td class='s-na'></td>
69548    <td class='s-na'></td>
69549    <td class='s-error'></td>
69550    <td class='s-error'></td>
69551    </tr>
69552    <tr><td class='code'>@link libsbml#LayoutRGReactionSyntax LayoutRGReactionSyntax@endlink</td>
69553    <td class='meaning'>ReactionGlyph 'reaction' must have SIdRef syntax.</td>
69554    <td class='s-na'></td>
69555    <td class='s-na'></td>
69556    <td class='s-na'></td>
69557    <td class='s-na'></td>
69558    <td class='s-na'></td>
69559    <td class='s-na'></td>
69560    <td class='s-error'></td>
69561    <td class='s-error'></td>
69562    </tr>
69563    <tr><td class='code'>@link libsbml#LayoutRGReactionMustRefReaction LayoutRGReactionMustRefReaction@endlink</td>
69564    <td class='meaning'>ReactionGlyph reaction must reference existing reaction.</td>
69565    <td class='s-na'></td>
69566    <td class='s-na'></td>
69567    <td class='s-na'></td>
69568    <td class='s-na'></td>
69569    <td class='s-na'></td>
69570    <td class='s-na'></td>
69571    <td class='s-error'></td>
69572    <td class='s-error'></td>
69573    </tr>
69574    <tr><td class='code'>@link libsbml#LayoutRGNoDuplicateReferences LayoutRGNoDuplicateReferences@endlink</td>
69575    <td class='meaning'>ReactionGlyph cannot reference two objects.</td>
69576    <td class='s-na'></td>
69577    <td class='s-na'></td>
69578    <td class='s-na'></td>
69579    <td class='s-na'></td>
69580    <td class='s-na'></td>
69581    <td class='s-na'></td>
69582    <td class='s-error'></td>
69583    <td class='s-error'></td>
69584    </tr>
69585    <tr><td class='code'>@link libsbml#LayoutLOSpeciesRefGlyphAllowedElements LayoutLOSpeciesRefGlyphAllowedElements@endlink</td>
69586    <td class='meaning'>Allowed elements on ListOfSpeciesReferenceGlyphs</td>
69587    <td class='s-na'></td>
69588    <td class='s-na'></td>
69589    <td class='s-na'></td>
69590    <td class='s-na'></td>
69591    <td class='s-na'></td>
69592    <td class='s-na'></td>
69593    <td class='s-error'></td>
69594    <td class='s-error'></td>
69595    </tr>
69596    <tr><td class='code'>@link libsbml#LayoutLOSpeciesRefGlyphAllowedAttribs LayoutLOSpeciesRefGlyphAllowedAttribs@endlink</td>
69597    <td class='meaning'>Allowed attributes on ListOfSpeciesReferenceGlyphs</td>
69598    <td class='s-na'></td>
69599    <td class='s-na'></td>
69600    <td class='s-na'></td>
69601    <td class='s-na'></td>
69602    <td class='s-na'></td>
69603    <td class='s-na'></td>
69604    <td class='s-error'></td>
69605    <td class='s-error'></td>
69606    </tr>
69607    <tr><td class='code'>@link libsbml#LayoutLOSpeciesRefGlyphNotEmpty LayoutLOSpeciesRefGlyphNotEmpty@endlink</td>
69608    <td class='meaning'>ListOfSpeciesReferenceGlyphs not empty</td>
69609    <td class='s-na'></td>
69610    <td class='s-na'></td>
69611    <td class='s-na'></td>
69612    <td class='s-na'></td>
69613    <td class='s-na'></td>
69614    <td class='s-na'></td>
69615    <td class='s-error'></td>
69616    <td class='s-error'></td>
69617    </tr>
69618    <tr><td class='code'>@link libsbml#LayoutGGAllowedCoreElements LayoutGGAllowedCoreElements@endlink</td>
69619    <td class='meaning'>Core elements allowed on <code>&lt;generalGlyph&gt;</code>.</td>
69620    <td class='s-na'></td>
69621    <td class='s-na'></td>
69622    <td class='s-na'></td>
69623    <td class='s-na'></td>
69624    <td class='s-na'></td>
69625    <td class='s-na'></td>
69626    <td class='s-error'></td>
69627    <td class='s-error'></td>
69628    </tr>
69629    <tr><td class='code'>@link libsbml#LayoutGGAllowedCoreAttributes LayoutGGAllowedCoreAttributes@endlink</td>
69630    <td class='meaning'>Core attributes allowed on <code>&lt;generalGlyph&gt;</code>.</td>
69631    <td class='s-na'></td>
69632    <td class='s-na'></td>
69633    <td class='s-na'></td>
69634    <td class='s-na'></td>
69635    <td class='s-na'></td>
69636    <td class='s-na'></td>
69637    <td class='s-error'></td>
69638    <td class='s-error'></td>
69639    </tr>
69640    <tr><td class='code'>@link libsbml#LayoutGGAllowedElements LayoutGGAllowedElements@endlink</td>
69641    <td class='meaning'>Layout elements allowed on <code>&lt;generalGlyph&gt;</code>.</td>
69642    <td class='s-na'></td>
69643    <td class='s-na'></td>
69644    <td class='s-na'></td>
69645    <td class='s-na'></td>
69646    <td class='s-na'></td>
69647    <td class='s-na'></td>
69648    <td class='s-error'></td>
69649    <td class='s-error'></td>
69650    </tr>
69651    <tr><td class='code'>@link libsbml#LayoutGGAllowedAttributes LayoutGGAllowedAttributes@endlink</td>
69652    <td class='meaning'>Layout attributes allowed on <code>&lt;generalGlyph&gt;</code>.</td>
69653    <td class='s-na'></td>
69654    <td class='s-na'></td>
69655    <td class='s-na'></td>
69656    <td class='s-na'></td>
69657    <td class='s-na'></td>
69658    <td class='s-na'></td>
69659    <td class='s-error'></td>
69660    <td class='s-error'></td>
69661    </tr>
69662    <tr><td class='code'>@link libsbml#LayoutGGMetaIdRefMustBeIDREF LayoutGGMetaIdRefMustBeIDREF@endlink</td>
69663    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
69664    <td class='s-na'></td>
69665    <td class='s-na'></td>
69666    <td class='s-na'></td>
69667    <td class='s-na'></td>
69668    <td class='s-na'></td>
69669    <td class='s-na'></td>
69670    <td class='s-error'></td>
69671    <td class='s-error'></td>
69672    </tr>
69673    <tr><td class='code'>@link libsbml#LayoutGGMetaIdRefMustReferenceObject LayoutGGMetaIdRefMustReferenceObject@endlink</td>
69674    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
69675    <td class='s-na'></td>
69676    <td class='s-na'></td>
69677    <td class='s-na'></td>
69678    <td class='s-na'></td>
69679    <td class='s-na'></td>
69680    <td class='s-na'></td>
69681    <td class='s-error'></td>
69682    <td class='s-error'></td>
69683    </tr>
69684    <tr><td class='code'>@link libsbml#LayoutGGReferenceSyntax LayoutGGReferenceSyntax@endlink</td>
69685    <td class='meaning'>GeneralGlyph 'reference' must have SIdRef syntax.</td>
69686    <td class='s-na'></td>
69687    <td class='s-na'></td>
69688    <td class='s-na'></td>
69689    <td class='s-na'></td>
69690    <td class='s-na'></td>
69691    <td class='s-na'></td>
69692    <td class='s-error'></td>
69693    <td class='s-error'></td>
69694    </tr>
69695    <tr><td class='code'>@link libsbml#LayoutGGReferenceMustRefObject LayoutGGReferenceMustRefObject@endlink</td>
69696    <td class='meaning'>GeneralGlyph 'reference' must reference existing element.</td>
69697    <td class='s-na'></td>
69698    <td class='s-na'></td>
69699    <td class='s-na'></td>
69700    <td class='s-na'></td>
69701    <td class='s-na'></td>
69702    <td class='s-na'></td>
69703    <td class='s-error'></td>
69704    <td class='s-error'></td>
69705    </tr>
69706    <tr><td class='code'>@link libsbml#LayoutGGNoDuplicateReferences LayoutGGNoDuplicateReferences@endlink</td>
69707    <td class='meaning'>GeneralGlyph cannot reference two objects.</td>
69708    <td class='s-na'></td>
69709    <td class='s-na'></td>
69710    <td class='s-na'></td>
69711    <td class='s-na'></td>
69712    <td class='s-na'></td>
69713    <td class='s-na'></td>
69714    <td class='s-error'></td>
69715    <td class='s-error'></td>
69716    </tr>
69717    <tr><td class='code'>@link libsbml#LayoutLOReferenceGlyphAllowedElements LayoutLOReferenceGlyphAllowedElements@endlink</td>
69718    <td class='meaning'>Allowed elements on ListOfReferenceGlyphs</td>
69719    <td class='s-na'></td>
69720    <td class='s-na'></td>
69721    <td class='s-na'></td>
69722    <td class='s-na'></td>
69723    <td class='s-na'></td>
69724    <td class='s-na'></td>
69725    <td class='s-error'></td>
69726    <td class='s-error'></td>
69727    </tr>
69728    <tr><td class='code'>@link libsbml#LayoutLOReferenceGlyphAllowedAttribs LayoutLOReferenceGlyphAllowedAttribs@endlink</td>
69729    <td class='meaning'>Allowed attributes on ListOfReferenceGlyphs</td>
69730    <td class='s-na'></td>
69731    <td class='s-na'></td>
69732    <td class='s-na'></td>
69733    <td class='s-na'></td>
69734    <td class='s-na'></td>
69735    <td class='s-na'></td>
69736    <td class='s-error'></td>
69737    <td class='s-error'></td>
69738    </tr>
69739    <tr><td class='code'>@link libsbml#LayoutLOSubGlyphAllowedElements LayoutLOSubGlyphAllowedElements@endlink</td>
69740    <td class='meaning'></td>
69741    <td class='s-na'></td>
69742    <td class='s-na'></td>
69743    <td class='s-na'></td>
69744    <td class='s-na'></td>
69745    <td class='s-na'></td>
69746    <td class='s-na'></td>
69747    <td class='s-na'></td>
69748    <td class='s-na'></td>
69749    </tr>
69750    <tr><td class='code'>@link libsbml#LayoutLOSubGlyphAllowedAttribs LayoutLOSubGlyphAllowedAttribs@endlink</td>
69751    <td class='meaning'>Allowed attributes on ListOfSubGlyphs</td>
69752    <td class='s-na'></td>
69753    <td class='s-na'></td>
69754    <td class='s-na'></td>
69755    <td class='s-na'></td>
69756    <td class='s-na'></td>
69757    <td class='s-na'></td>
69758    <td class='s-error'></td>
69759    <td class='s-error'></td>
69760    </tr>
69761    <tr><td class='code'>@link libsbml#LayoutTGAllowedCoreElements LayoutTGAllowedCoreElements@endlink</td>
69762    <td class='meaning'>Core elements allowed on <code>&lt;textGlyph&gt;</code>.</td>
69763    <td class='s-na'></td>
69764    <td class='s-na'></td>
69765    <td class='s-na'></td>
69766    <td class='s-na'></td>
69767    <td class='s-na'></td>
69768    <td class='s-na'></td>
69769    <td class='s-error'></td>
69770    <td class='s-error'></td>
69771    </tr>
69772    <tr><td class='code'>@link libsbml#LayoutTGAllowedCoreAttributes LayoutTGAllowedCoreAttributes@endlink</td>
69773    <td class='meaning'>Core attributes allowed on <code>&lt;textGlyph&gt;</code>.</td>
69774    <td class='s-na'></td>
69775    <td class='s-na'></td>
69776    <td class='s-na'></td>
69777    <td class='s-na'></td>
69778    <td class='s-na'></td>
69779    <td class='s-na'></td>
69780    <td class='s-error'></td>
69781    <td class='s-error'></td>
69782    </tr>
69783    <tr><td class='code'>@link libsbml#LayoutTGAllowedElements LayoutTGAllowedElements@endlink</td>
69784    <td class='meaning'>Layout elements allowed on <code>&lt;textGlyph&gt;</code>.</td>
69785    <td class='s-na'></td>
69786    <td class='s-na'></td>
69787    <td class='s-na'></td>
69788    <td class='s-na'></td>
69789    <td class='s-na'></td>
69790    <td class='s-na'></td>
69791    <td class='s-error'></td>
69792    <td class='s-error'></td>
69793    </tr>
69794    <tr><td class='code'>@link libsbml#LayoutTGAllowedAttributes LayoutTGAllowedAttributes@endlink</td>
69795    <td class='meaning'>Layout attributes allowed on <code>&lt;textGlyph&gt;</code>.</td>
69796    <td class='s-na'></td>
69797    <td class='s-na'></td>
69798    <td class='s-na'></td>
69799    <td class='s-na'></td>
69800    <td class='s-na'></td>
69801    <td class='s-na'></td>
69802    <td class='s-error'></td>
69803    <td class='s-error'></td>
69804    </tr>
69805    <tr><td class='code'>@link libsbml#LayoutTGMetaIdRefMustBeIDREF LayoutTGMetaIdRefMustBeIDREF@endlink</td>
69806    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
69807    <td class='s-na'></td>
69808    <td class='s-na'></td>
69809    <td class='s-na'></td>
69810    <td class='s-na'></td>
69811    <td class='s-na'></td>
69812    <td class='s-na'></td>
69813    <td class='s-error'></td>
69814    <td class='s-error'></td>
69815    </tr>
69816    <tr><td class='code'>@link libsbml#LayoutTGMetaIdRefMustReferenceObject LayoutTGMetaIdRefMustReferenceObject@endlink</td>
69817    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
69818    <td class='s-na'></td>
69819    <td class='s-na'></td>
69820    <td class='s-na'></td>
69821    <td class='s-na'></td>
69822    <td class='s-na'></td>
69823    <td class='s-na'></td>
69824    <td class='s-error'></td>
69825    <td class='s-error'></td>
69826    </tr>
69827    <tr><td class='code'>@link libsbml#LayoutTGOriginOfTextSyntax LayoutTGOriginOfTextSyntax@endlink</td>
69828    <td class='meaning'>TextGlyph 'originOfText' must have SIdRef syntax.</td>
69829    <td class='s-na'></td>
69830    <td class='s-na'></td>
69831    <td class='s-na'></td>
69832    <td class='s-na'></td>
69833    <td class='s-na'></td>
69834    <td class='s-na'></td>
69835    <td class='s-error'></td>
69836    <td class='s-error'></td>
69837    </tr>
69838    <tr><td class='code'>@link libsbml#LayoutTGOriginOfTextMustRefObject LayoutTGOriginOfTextMustRefObject@endlink</td>
69839    <td class='meaning'>TextGlyph 'originOfText' must reference existing element.</td>
69840    <td class='s-na'></td>
69841    <td class='s-na'></td>
69842    <td class='s-na'></td>
69843    <td class='s-na'></td>
69844    <td class='s-na'></td>
69845    <td class='s-na'></td>
69846    <td class='s-error'></td>
69847    <td class='s-error'></td>
69848    </tr>
69849    <tr><td class='code'>@link libsbml#LayoutTGNoDuplicateReferences LayoutTGNoDuplicateReferences@endlink</td>
69850    <td class='meaning'>TextGlyph cannot reference two objects.</td>
69851    <td class='s-na'></td>
69852    <td class='s-na'></td>
69853    <td class='s-na'></td>
69854    <td class='s-na'></td>
69855    <td class='s-na'></td>
69856    <td class='s-na'></td>
69857    <td class='s-error'></td>
69858    <td class='s-error'></td>
69859    </tr>
69860    <tr><td class='code'>@link libsbml#LayoutTGGraphicalObjectSyntax LayoutTGGraphicalObjectSyntax@endlink</td>
69861    <td class='meaning'>TextGlyph 'graphicalObject' must have SIdRef syntax.</td>
69862    <td class='s-na'></td>
69863    <td class='s-na'></td>
69864    <td class='s-na'></td>
69865    <td class='s-na'></td>
69866    <td class='s-na'></td>
69867    <td class='s-na'></td>
69868    <td class='s-error'></td>
69869    <td class='s-error'></td>
69870    </tr>
69871    <tr><td class='code'>@link libsbml#LayoutTGGraphicalObjectMustRefObject LayoutTGGraphicalObjectMustRefObject@endlink</td>
69872    <td class='meaning'>TextGlyph 'graphicalObject' must reference existing element.</td>
69873    <td class='s-na'></td>
69874    <td class='s-na'></td>
69875    <td class='s-na'></td>
69876    <td class='s-na'></td>
69877    <td class='s-na'></td>
69878    <td class='s-na'></td>
69879    <td class='s-error'></td>
69880    <td class='s-error'></td>
69881    </tr>
69882    <tr><td class='code'>@link libsbml#LayoutTGTextMustBeString LayoutTGTextMustBeString@endlink</td>
69883    <td class='meaning'>TextGlyph 'text' must be string.</td>
69884    <td class='s-na'></td>
69885    <td class='s-na'></td>
69886    <td class='s-na'></td>
69887    <td class='s-na'></td>
69888    <td class='s-na'></td>
69889    <td class='s-na'></td>
69890    <td class='s-error'></td>
69891    <td class='s-error'></td>
69892    </tr>
69893    <tr><td class='code'>@link libsbml#LayoutSRGAllowedCoreElements LayoutSRGAllowedCoreElements@endlink</td>
69894    <td class='meaning'>Core elements allowed on <code>&lt;speciesReferenceGlyph&gt;</code>.</td>
69895    <td class='s-na'></td>
69896    <td class='s-na'></td>
69897    <td class='s-na'></td>
69898    <td class='s-na'></td>
69899    <td class='s-na'></td>
69900    <td class='s-na'></td>
69901    <td class='s-error'></td>
69902    <td class='s-error'></td>
69903    </tr>
69904    <tr><td class='code'>@link libsbml#LayoutSRGAllowedCoreAttributes LayoutSRGAllowedCoreAttributes@endlink</td>
69905    <td class='meaning'>Core attributes allowed on <code>&lt;speciesReferenceGlyph&gt;</code>.</td>
69906    <td class='s-na'></td>
69907    <td class='s-na'></td>
69908    <td class='s-na'></td>
69909    <td class='s-na'></td>
69910    <td class='s-na'></td>
69911    <td class='s-na'></td>
69912    <td class='s-error'></td>
69913    <td class='s-error'></td>
69914    </tr>
69915    <tr><td class='code'>@link libsbml#LayoutSRGAllowedElements LayoutSRGAllowedElements@endlink</td>
69916    <td class='meaning'>Layout elements allowed on <code>&lt;speciesReferenceGlyph&gt;</code>.</td>
69917    <td class='s-na'></td>
69918    <td class='s-na'></td>
69919    <td class='s-na'></td>
69920    <td class='s-na'></td>
69921    <td class='s-na'></td>
69922    <td class='s-na'></td>
69923    <td class='s-error'></td>
69924    <td class='s-error'></td>
69925    </tr>
69926    <tr><td class='code'>@link libsbml#LayoutSRGAllowedAttributes LayoutSRGAllowedAttributes@endlink</td>
69927    <td class='meaning'>Layout attributes allowed on <code>&lt;speciesReferenceGlyph&gt;</code>.</td>
69928    <td class='s-na'></td>
69929    <td class='s-na'></td>
69930    <td class='s-na'></td>
69931    <td class='s-na'></td>
69932    <td class='s-na'></td>
69933    <td class='s-na'></td>
69934    <td class='s-error'></td>
69935    <td class='s-error'></td>
69936    </tr>
69937    <tr><td class='code'>@link libsbml#LayoutSRGMetaIdRefMustBeIDREF LayoutSRGMetaIdRefMustBeIDREF@endlink</td>
69938    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
69939    <td class='s-na'></td>
69940    <td class='s-na'></td>
69941    <td class='s-na'></td>
69942    <td class='s-na'></td>
69943    <td class='s-na'></td>
69944    <td class='s-na'></td>
69945    <td class='s-error'></td>
69946    <td class='s-error'></td>
69947    </tr>
69948    <tr><td class='code'>@link libsbml#LayoutSRGMetaIdRefMustReferenceObject LayoutSRGMetaIdRefMustReferenceObject@endlink</td>
69949    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
69950    <td class='s-na'></td>
69951    <td class='s-na'></td>
69952    <td class='s-na'></td>
69953    <td class='s-na'></td>
69954    <td class='s-na'></td>
69955    <td class='s-na'></td>
69956    <td class='s-error'></td>
69957    <td class='s-error'></td>
69958    </tr>
69959    <tr><td class='code'>@link libsbml#LayoutSRGSpeciesReferenceSyntax LayoutSRGSpeciesReferenceSyntax@endlink</td>
69960    <td class='meaning'>SpeciesReferenceGlyph 'speciesReference' must have SIdRef syntax.</td>
69961    <td class='s-na'></td>
69962    <td class='s-na'></td>
69963    <td class='s-na'></td>
69964    <td class='s-na'></td>
69965    <td class='s-na'></td>
69966    <td class='s-na'></td>
69967    <td class='s-error'></td>
69968    <td class='s-error'></td>
69969    </tr>
69970    <tr><td class='code'>@link libsbml#LayoutSRGSpeciesRefMustRefObject LayoutSRGSpeciesRefMustRefObject@endlink</td>
69971    <td class='meaning'>SpeciesReferenceGlyph 'speciesReference' must reference existing element.</td>
69972    <td class='s-na'></td>
69973    <td class='s-na'></td>
69974    <td class='s-na'></td>
69975    <td class='s-na'></td>
69976    <td class='s-na'></td>
69977    <td class='s-na'></td>
69978    <td class='s-error'></td>
69979    <td class='s-error'></td>
69980    </tr>
69981    <tr><td class='code'>@link libsbml#LayoutSRGNoDuplicateReferences LayoutSRGNoDuplicateReferences@endlink</td>
69982    <td class='meaning'>SpeciesReferenceGlyph cannot reference two objects.</td>
69983    <td class='s-na'></td>
69984    <td class='s-na'></td>
69985    <td class='s-na'></td>
69986    <td class='s-na'></td>
69987    <td class='s-na'></td>
69988    <td class='s-na'></td>
69989    <td class='s-error'></td>
69990    <td class='s-error'></td>
69991    </tr>
69992    <tr><td class='code'>@link libsbml#LayoutSRGSpeciesGlyphSyntax LayoutSRGSpeciesGlyphSyntax@endlink</td>
69993    <td class='meaning'>SpeciesReferenceGlyph 'speciesGlyph' must have SIdRef syntax.</td>
69994    <td class='s-na'></td>
69995    <td class='s-na'></td>
69996    <td class='s-na'></td>
69997    <td class='s-na'></td>
69998    <td class='s-na'></td>
69999    <td class='s-na'></td>
70000    <td class='s-error'></td>
70001    <td class='s-error'></td>
70002    </tr>
70003    <tr><td class='code'>@link libsbml#LayoutSRGSpeciesGlyphMustRefObject LayoutSRGSpeciesGlyphMustRefObject@endlink</td>
70004    <td class='meaning'>SpeciesReferenceGlyph 'speciesGlyph' must reference existing element.</td>
70005    <td class='s-na'></td>
70006    <td class='s-na'></td>
70007    <td class='s-na'></td>
70008    <td class='s-na'></td>
70009    <td class='s-na'></td>
70010    <td class='s-na'></td>
70011    <td class='s-error'></td>
70012    <td class='s-error'></td>
70013    </tr>
70014    <tr><td class='code'>@link libsbml#LayoutSRGRoleSyntax LayoutSRGRoleSyntax@endlink</td>
70015    <td class='meaning'>SpeciesReferenceGlyph 'role' must be string from enumeration.</td>
70016    <td class='s-na'></td>
70017    <td class='s-na'></td>
70018    <td class='s-na'></td>
70019    <td class='s-na'></td>
70020    <td class='s-na'></td>
70021    <td class='s-na'></td>
70022    <td class='s-error'></td>
70023    <td class='s-error'></td>
70024    </tr>
70025    <tr><td class='code'>@link libsbml#LayoutREFGAllowedCoreElements LayoutREFGAllowedCoreElements@endlink</td>
70026    <td class='meaning'>Core elements allowed on <code>&lt;referenceGlyph&gt;</code>.</td>
70027    <td class='s-na'></td>
70028    <td class='s-na'></td>
70029    <td class='s-na'></td>
70030    <td class='s-na'></td>
70031    <td class='s-na'></td>
70032    <td class='s-na'></td>
70033    <td class='s-error'></td>
70034    <td class='s-error'></td>
70035    </tr>
70036    <tr><td class='code'>@link libsbml#LayoutREFGAllowedCoreAttributes LayoutREFGAllowedCoreAttributes@endlink</td>
70037    <td class='meaning'>Core attributes allowed on <code>&lt;referenceGlyph&gt;</code>.</td>
70038    <td class='s-na'></td>
70039    <td class='s-na'></td>
70040    <td class='s-na'></td>
70041    <td class='s-na'></td>
70042    <td class='s-na'></td>
70043    <td class='s-na'></td>
70044    <td class='s-error'></td>
70045    <td class='s-error'></td>
70046    </tr>
70047    <tr><td class='code'>@link libsbml#LayoutREFGAllowedElements LayoutREFGAllowedElements@endlink</td>
70048    <td class='meaning'>Layout elements allowed on <code>&lt;referenceGlyph&gt;</code>.</td>
70049    <td class='s-na'></td>
70050    <td class='s-na'></td>
70051    <td class='s-na'></td>
70052    <td class='s-na'></td>
70053    <td class='s-na'></td>
70054    <td class='s-na'></td>
70055    <td class='s-error'></td>
70056    <td class='s-error'></td>
70057    </tr>
70058    <tr><td class='code'>@link libsbml#LayoutREFGAllowedAttributes LayoutREFGAllowedAttributes@endlink</td>
70059    <td class='meaning'>Layout attributes allowed on <code>&lt;referenceGlyph&gt;</code>.</td>
70060    <td class='s-na'></td>
70061    <td class='s-na'></td>
70062    <td class='s-na'></td>
70063    <td class='s-na'></td>
70064    <td class='s-na'></td>
70065    <td class='s-na'></td>
70066    <td class='s-error'></td>
70067    <td class='s-error'></td>
70068    </tr>
70069    <tr><td class='code'>@link libsbml#LayoutREFGMetaIdRefMustBeIDREF LayoutREFGMetaIdRefMustBeIDREF@endlink</td>
70070    <td class='meaning'>Layout 'metaidRef' must be IDREF.</td>
70071    <td class='s-na'></td>
70072    <td class='s-na'></td>
70073    <td class='s-na'></td>
70074    <td class='s-na'></td>
70075    <td class='s-na'></td>
70076    <td class='s-na'></td>
70077    <td class='s-error'></td>
70078    <td class='s-error'></td>
70079    </tr>
70080    <tr><td class='code'>@link libsbml#LayoutREFGMetaIdRefMustReferenceObject LayoutREFGMetaIdRefMustReferenceObject@endlink</td>
70081    <td class='meaning'>Layout 'metaidRef' must reference existing object.</td>
70082    <td class='s-na'></td>
70083    <td class='s-na'></td>
70084    <td class='s-na'></td>
70085    <td class='s-na'></td>
70086    <td class='s-na'></td>
70087    <td class='s-na'></td>
70088    <td class='s-error'></td>
70089    <td class='s-error'></td>
70090    </tr>
70091    <tr><td class='code'>@link libsbml#LayoutREFGReferenceSyntax LayoutREFGReferenceSyntax@endlink</td>
70092    <td class='meaning'>ReferenceGlyph 'reference' must have SIdRef syntax.</td>
70093    <td class='s-na'></td>
70094    <td class='s-na'></td>
70095    <td class='s-na'></td>
70096    <td class='s-na'></td>
70097    <td class='s-na'></td>
70098    <td class='s-na'></td>
70099    <td class='s-error'></td>
70100    <td class='s-error'></td>
70101    </tr>
70102    <tr><td class='code'>@link libsbml#LayoutREFGReferenceMustRefObject LayoutREFGReferenceMustRefObject@endlink</td>
70103    <td class='meaning'>ReferenceGlyph 'reference' must reference existing element.</td>
70104    <td class='s-na'></td>
70105    <td class='s-na'></td>
70106    <td class='s-na'></td>
70107    <td class='s-na'></td>
70108    <td class='s-na'></td>
70109    <td class='s-na'></td>
70110    <td class='s-error'></td>
70111    <td class='s-error'></td>
70112    </tr>
70113    <tr><td class='code'>@link libsbml#LayoutREFGNoDuplicateReferences LayoutREFGNoDuplicateReferences@endlink</td>
70114    <td class='meaning'>ReferenceGlyph cannot reference two objects.</td>
70115    <td class='s-na'></td>
70116    <td class='s-na'></td>
70117    <td class='s-na'></td>
70118    <td class='s-na'></td>
70119    <td class='s-na'></td>
70120    <td class='s-na'></td>
70121    <td class='s-error'></td>
70122    <td class='s-error'></td>
70123    </tr>
70124    <tr><td class='code'>@link libsbml#LayoutREFGGlyphSyntax LayoutREFGGlyphSyntax@endlink</td>
70125    <td class='meaning'>ReferenceGlyph 'glyph' must have SIdRef syntax.</td>
70126    <td class='s-na'></td>
70127    <td class='s-na'></td>
70128    <td class='s-na'></td>
70129    <td class='s-na'></td>
70130    <td class='s-na'></td>
70131    <td class='s-na'></td>
70132    <td class='s-error'></td>
70133    <td class='s-error'></td>
70134    </tr>
70135    <tr><td class='code'>@link libsbml#LayoutREFGGlyphMustRefObject LayoutREFGGlyphMustRefObject@endlink</td>
70136    <td class='meaning'>ReferenceGlyph 'glyph' must reference existing element.</td>
70137    <td class='s-na'></td>
70138    <td class='s-na'></td>
70139    <td class='s-na'></td>
70140    <td class='s-na'></td>
70141    <td class='s-na'></td>
70142    <td class='s-na'></td>
70143    <td class='s-error'></td>
70144    <td class='s-error'></td>
70145    </tr>
70146    <tr><td class='code'>@link libsbml#LayoutREFGRoleSyntax LayoutREFGRoleSyntax@endlink</td>
70147    <td class='meaning'>ReferenceGlyph 'role' must be string.</td>
70148    <td class='s-na'></td>
70149    <td class='s-na'></td>
70150    <td class='s-na'></td>
70151    <td class='s-na'></td>
70152    <td class='s-na'></td>
70153    <td class='s-na'></td>
70154    <td class='s-error'></td>
70155    <td class='s-error'></td>
70156    </tr>
70157    <tr><td class='code'>@link libsbml#LayoutPointAllowedCoreElements LayoutPointAllowedCoreElements@endlink</td>
70158    <td class='meaning'>Core elements allowed on <code>&lt;pointgt;</code>.</td>
70159    <td class='s-na'></td>
70160    <td class='s-na'></td>
70161    <td class='s-na'></td>
70162    <td class='s-na'></td>
70163    <td class='s-na'></td>
70164    <td class='s-na'></td>
70165    <td class='s-error'></td>
70166    <td class='s-error'></td>
70167    </tr>
70168    <tr><td class='code'>@link libsbml#LayoutPointAllowedCoreAttributes LayoutPointAllowedCoreAttributes@endlink</td>
70169    <td class='meaning'>Core attributes allowed on <code>&lt;pointgt;</code>.</td>
70170    <td class='s-na'></td>
70171    <td class='s-na'></td>
70172    <td class='s-na'></td>
70173    <td class='s-na'></td>
70174    <td class='s-na'></td>
70175    <td class='s-na'></td>
70176    <td class='s-error'></td>
70177    <td class='s-error'></td>
70178    </tr>
70179    <tr><td class='code'>@link libsbml#LayoutPointAllowedAttributes LayoutPointAllowedAttributes@endlink</td>
70180    <td class='meaning'>Layout attributes allowed on <code>&lt;pointgt;</code>.</td>
70181    <td class='s-na'></td>
70182    <td class='s-na'></td>
70183    <td class='s-na'></td>
70184    <td class='s-na'></td>
70185    <td class='s-na'></td>
70186    <td class='s-na'></td>
70187    <td class='s-error'></td>
70188    <td class='s-error'></td>
70189    </tr>
70190    <tr><td class='code'>@link libsbml#LayoutPointAttributesMustBeDouble LayoutPointAttributesMustBeDouble@endlink</td>
70191    <td class='meaning'>Layout 'x', 'y' and 'z' must be double.</td>
70192    <td class='s-na'></td>
70193    <td class='s-na'></td>
70194    <td class='s-na'></td>
70195    <td class='s-na'></td>
70196    <td class='s-na'></td>
70197    <td class='s-na'></td>
70198    <td class='s-error'></td>
70199    <td class='s-error'></td>
70200    </tr>
70201    <tr><td class='code'>@link libsbml#LayoutBBoxAllowedCoreElements LayoutBBoxAllowedCoreElements@endlink</td>
70202    <td class='meaning'>Core elements allowed on <code>&lt;boundingBox&gt;</code>.</td>
70203    <td class='s-na'></td>
70204    <td class='s-na'></td>
70205    <td class='s-na'></td>
70206    <td class='s-na'></td>
70207    <td class='s-na'></td>
70208    <td class='s-na'></td>
70209    <td class='s-error'></td>
70210    <td class='s-error'></td>
70211    </tr>
70212    <tr><td class='code'>@link libsbml#LayoutBBoxAllowedCoreAttributes LayoutBBoxAllowedCoreAttributes@endlink</td>
70213    <td class='meaning'>Core attributes allowed on <code>&lt;boundingBox&gt;</code>.</td>
70214    <td class='s-na'></td>
70215    <td class='s-na'></td>
70216    <td class='s-na'></td>
70217    <td class='s-na'></td>
70218    <td class='s-na'></td>
70219    <td class='s-na'></td>
70220    <td class='s-error'></td>
70221    <td class='s-error'></td>
70222    </tr>
70223    <tr><td class='code'>@link libsbml#LayoutBBoxAllowedElements LayoutBBoxAllowedElements@endlink</td>
70224    <td class='meaning'>Layout elements allowed on <code>&lt;boundingBox&gt;</code>.</td>
70225    <td class='s-na'></td>
70226    <td class='s-na'></td>
70227    <td class='s-na'></td>
70228    <td class='s-na'></td>
70229    <td class='s-na'></td>
70230    <td class='s-na'></td>
70231    <td class='s-error'></td>
70232    <td class='s-error'></td>
70233    </tr>
70234    <tr><td class='code'>@link libsbml#LayoutBBoxAllowedAttributes LayoutBBoxAllowedAttributes@endlink</td>
70235    <td class='meaning'>Layout attributes allowed on <code>&lt;boundingBox&gt;</code>.</td>
70236    <td class='s-na'></td>
70237    <td class='s-na'></td>
70238    <td class='s-na'></td>
70239    <td class='s-na'></td>
70240    <td class='s-na'></td>
70241    <td class='s-na'></td>
70242    <td class='s-error'></td>
70243    <td class='s-error'></td>
70244    </tr>
70245    <tr><td class='code'>@link libsbml#LayoutBBoxConsistent3DDefinition LayoutBBoxConsistent3DDefinition@endlink</td>
70246    <td class='meaning'>Layout consistent dimensions on a <code>&lt;boundingBox&gt;</code></td>
70247    <td class='s-na'></td>
70248    <td class='s-na'></td>
70249    <td class='s-na'></td>
70250    <td class='s-na'></td>
70251    <td class='s-na'></td>
70252    <td class='s-na'></td>
70253    <td class='s-error'></td>
70254    <td class='s-error'></td>
70255    </tr>
70256    <tr><td class='code'>@link libsbml#LayoutCurveAllowedCoreElements LayoutCurveAllowedCoreElements@endlink</td>
70257    <td class='meaning'>Core elements allowed on <code>&lt;curve&gt;</code>.</td>
70258    <td class='s-na'></td>
70259    <td class='s-na'></td>
70260    <td class='s-na'></td>
70261    <td class='s-na'></td>
70262    <td class='s-na'></td>
70263    <td class='s-na'></td>
70264    <td class='s-error'></td>
70265    <td class='s-error'></td>
70266    </tr>
70267    <tr><td class='code'>@link libsbml#LayoutCurveAllowedCoreAttributes LayoutCurveAllowedCoreAttributes@endlink</td>
70268    <td class='meaning'>Core attributes allowed on <code>&lt;curve&gt;</code>.</td>
70269    <td class='s-na'></td>
70270    <td class='s-na'></td>
70271    <td class='s-na'></td>
70272    <td class='s-na'></td>
70273    <td class='s-na'></td>
70274    <td class='s-na'></td>
70275    <td class='s-error'></td>
70276    <td class='s-error'></td>
70277    </tr>
70278    <tr><td class='code'>@link libsbml#LayoutCurveAllowedElements LayoutCurveAllowedElements@endlink</td>
70279    <td class='meaning'>Layout elements allowed on <code>&lt;curve&gt;</code>.</td>
70280    <td class='s-na'></td>
70281    <td class='s-na'></td>
70282    <td class='s-na'></td>
70283    <td class='s-na'></td>
70284    <td class='s-na'></td>
70285    <td class='s-na'></td>
70286    <td class='s-error'></td>
70287    <td class='s-error'></td>
70288    </tr>
70289    <tr><td class='code'>@link libsbml#LayoutCurveAllowedAttributes LayoutCurveAllowedAttributes@endlink</td>
70290    <td class='meaning'>Layout attributes allowed on <code>&lt;curve&gt;</code>.</td>
70291    <td class='s-na'></td>
70292    <td class='s-na'></td>
70293    <td class='s-na'></td>
70294    <td class='s-na'></td>
70295    <td class='s-na'></td>
70296    <td class='s-na'></td>
70297    <td class='s-error'></td>
70298    <td class='s-error'></td>
70299    </tr>
70300    <tr><td class='code'>@link libsbml#LayoutLOCurveSegsAllowedAttributes LayoutLOCurveSegsAllowedAttributes@endlink</td>
70301    <td class='meaning'>Allowed attributes on ListOfCurveSegments</td>
70302    <td class='s-na'></td>
70303    <td class='s-na'></td>
70304    <td class='s-na'></td>
70305    <td class='s-na'></td>
70306    <td class='s-na'></td>
70307    <td class='s-na'></td>
70308    <td class='s-error'></td>
70309    <td class='s-error'></td>
70310    </tr>
70311    <tr><td class='code'>@link libsbml#LayoutLOCurveSegsAllowedElements LayoutLOCurveSegsAllowedElements@endlink</td>
70312    <td class='meaning'>Allowed elements on ListOfCurveSegments</td>
70313    <td class='s-na'></td>
70314    <td class='s-na'></td>
70315    <td class='s-na'></td>
70316    <td class='s-na'></td>
70317    <td class='s-na'></td>
70318    <td class='s-na'></td>
70319    <td class='s-error'></td>
70320    <td class='s-error'></td>
70321    </tr>
70322    <tr><td class='code'>@link libsbml#LayoutLOCurveSegsNotEmpty LayoutLOCurveSegsNotEmpty@endlink</td>
70323    <td class='meaning'>No empty ListOfCurveSegments</td>
70324    <td class='s-na'></td>
70325    <td class='s-na'></td>
70326    <td class='s-na'></td>
70327    <td class='s-na'></td>
70328    <td class='s-na'></td>
70329    <td class='s-na'></td>
70330    <td class='s-error'></td>
70331    <td class='s-error'></td>
70332    </tr>
70333    <tr><td class='code'>@link libsbml#LayoutLSegAllowedCoreElements LayoutLSegAllowedCoreElements@endlink</td>
70334    <td class='meaning'>Core elements allowed on <code>&lt;lineSegment&gt;</code>.</td>
70335    <td class='s-na'></td>
70336    <td class='s-na'></td>
70337    <td class='s-na'></td>
70338    <td class='s-na'></td>
70339    <td class='s-na'></td>
70340    <td class='s-na'></td>
70341    <td class='s-error'></td>
70342    <td class='s-error'></td>
70343    </tr>
70344    <tr><td class='code'>@link libsbml#LayoutLSegAllowedCoreAttributes LayoutLSegAllowedCoreAttributes@endlink</td>
70345    <td class='meaning'>Core attributes allowed on <code>&lt;lineSegment&gt;</code>.</td>
70346    <td class='s-na'></td>
70347    <td class='s-na'></td>
70348    <td class='s-na'></td>
70349    <td class='s-na'></td>
70350    <td class='s-na'></td>
70351    <td class='s-na'></td>
70352    <td class='s-error'></td>
70353    <td class='s-error'></td>
70354    </tr>
70355    <tr><td class='code'>@link libsbml#LayoutLSegAllowedElements LayoutLSegAllowedElements@endlink</td>
70356    <td class='meaning'>Layout elements allowed on <code>&lt;lineSegment&gt;</code>.</td>
70357    <td class='s-na'></td>
70358    <td class='s-na'></td>
70359    <td class='s-na'></td>
70360    <td class='s-na'></td>
70361    <td class='s-na'></td>
70362    <td class='s-na'></td>
70363    <td class='s-error'></td>
70364    <td class='s-error'></td>
70365    </tr>
70366    <tr><td class='code'>@link libsbml#LayoutLSegAllowedAttributes LayoutLSegAllowedAttributes@endlink</td>
70367    <td class='meaning'>Layout attributes allowed on <code>&lt;lineSegment&gt;</code>.</td>
70368    <td class='s-na'></td>
70369    <td class='s-na'></td>
70370    <td class='s-na'></td>
70371    <td class='s-na'></td>
70372    <td class='s-na'></td>
70373    <td class='s-na'></td>
70374    <td class='s-error'></td>
70375    <td class='s-error'></td>
70376    </tr>
70377    <tr><td class='code'>@link libsbml#LayoutCBezAllowedCoreElements LayoutCBezAllowedCoreElements@endlink</td>
70378    <td class='meaning'>Core elements allowed on <code>&lt;cubicBezier&gt;</code>.</td>
70379    <td class='s-na'></td>
70380    <td class='s-na'></td>
70381    <td class='s-na'></td>
70382    <td class='s-na'></td>
70383    <td class='s-na'></td>
70384    <td class='s-na'></td>
70385    <td class='s-error'></td>
70386    <td class='s-error'></td>
70387    </tr>
70388    <tr><td class='code'>@link libsbml#LayoutCBezAllowedCoreAttributes LayoutCBezAllowedCoreAttributes@endlink</td>
70389    <td class='meaning'>Core attributes allowed on <code>&lt;cubicBezier&gt;</code>.</td>
70390    <td class='s-na'></td>
70391    <td class='s-na'></td>
70392    <td class='s-na'></td>
70393    <td class='s-na'></td>
70394    <td class='s-na'></td>
70395    <td class='s-na'></td>
70396    <td class='s-error'></td>
70397    <td class='s-error'></td>
70398    </tr>
70399    <tr><td class='code'>@link libsbml#LayoutCBezAllowedElements LayoutCBezAllowedElements@endlink</td>
70400    <td class='meaning'>Layout elements allowed on <code>&lt;cubicBezier&gt;</code>.</td>
70401    <td class='s-na'></td>
70402    <td class='s-na'></td>
70403    <td class='s-na'></td>
70404    <td class='s-na'></td>
70405    <td class='s-na'></td>
70406    <td class='s-na'></td>
70407    <td class='s-error'></td>
70408    <td class='s-error'></td>
70409    </tr>
70410    <tr><td class='code'>@link libsbml#LayoutCBezAllowedAttributes LayoutCBezAllowedAttributes@endlink</td>
70411    <td class='meaning'>Layout attributes allowed on <code>&lt;cubicBezier&gt;</code>.</td>
70412    <td class='s-na'></td>
70413    <td class='s-na'></td>
70414    <td class='s-na'></td>
70415    <td class='s-na'></td>
70416    <td class='s-na'></td>
70417    <td class='s-na'></td>
70418    <td class='s-error'></td>
70419    <td class='s-error'></td>
70420    </tr>
70421    <tr><td class='code'>@link libsbml#LayoutDimsAllowedCoreElements LayoutDimsAllowedCoreElements@endlink</td>
70422    <td class='meaning'>Core elements allowed on <code>&lt;dimensions&gt;</code>.</td>
70423    <td class='s-na'></td>
70424    <td class='s-na'></td>
70425    <td class='s-na'></td>
70426    <td class='s-na'></td>
70427    <td class='s-na'></td>
70428    <td class='s-na'></td>
70429    <td class='s-error'></td>
70430    <td class='s-error'></td>
70431    </tr>
70432    <tr><td class='code'>@link libsbml#LayoutDimsAllowedCoreAttributes LayoutDimsAllowedCoreAttributes@endlink</td>
70433    <td class='meaning'>Core attributes allowed on <code>&lt;dimensions&gt;</code>.</td>
70434    <td class='s-na'></td>
70435    <td class='s-na'></td>
70436    <td class='s-na'></td>
70437    <td class='s-na'></td>
70438    <td class='s-na'></td>
70439    <td class='s-na'></td>
70440    <td class='s-error'></td>
70441    <td class='s-error'></td>
70442    </tr>
70443    <tr><td class='code'>@link libsbml#LayoutDimsAllowedAttributes LayoutDimsAllowedAttributes@endlink</td>
70444    <td class='meaning'>Layout attributes allowed on <code>&lt;dimensions&gt;</code>.</td>
70445    <td class='s-na'></td>
70446    <td class='s-na'></td>
70447    <td class='s-na'></td>
70448    <td class='s-na'></td>
70449    <td class='s-na'></td>
70450    <td class='s-na'></td>
70451    <td class='s-error'></td>
70452    <td class='s-error'></td>
70453    </tr>
70454    <tr><td class='code'>@link libsbml#LayoutDimsAttributesMustBeDouble LayoutDimsAttributesMustBeDouble@endlink</td>
70455    <td class='meaning'>Layout 'width', 'height' and 'depth' must be double.</td>
70456    <td class='s-na'></td>
70457    <td class='s-na'></td>
70458    <td class='s-na'></td>
70459    <td class='s-na'></td>
70460    <td class='s-na'></td>
70461    <td class='s-na'></td>
70462    <td class='s-error'></td>
70463    <td class='s-error'></td>
70464    </tr>
70465    </table>
70466
70467    @if clike <h3><a class='anchor' name='SBMLErrorCategory_t'>SBMLErrorCategory_t</a></h3>
70468
70469    #SBMLErrorCategory_t is an enumeration of category codes for SBMLError
70470    diagnostics.  The category can be retrieved from an SBMLError object
70471    using the method SBMLError.getCategory().  These enumeration values are
70472    distinct from (and in addition to) the
70473    #XMLErrorCategory_t codes used by
70474    the parent XMLError object.  User programs receiving an SBMLError object
70475    can use this distinction to check whether the error represents a
70476    low-level XML problem or an SBML problem.
70477
70478    The following table lists each possible value and a brief description of
70479    its meaning.
70480
70481    @endif@if python <h3><a class='anchor' name='SBMLErrorCategory_t'>Category codes associated with SBMLError objects</a></h3>
70482
70483    As discussed above, each SBMLError object contains a value for a
70484    category identifier, describing the type of issue that the SBMLError
70485    object represents.  The category can be retrieved from an SBMLError
70486    object using the method SBMLError.getCategory().  The following table
70487    lists each possible value and a brief description of its meaning.
70488
70489    As is the case with the error codes, in the libSBML Python language
70490    interface, the category identifiers are currently implemented as static
70491    integer constants defined in the interface class
70492    @link libsbml libsbml@endlink.
70493
70494    The following table lists each possible value and a brief description of
70495    its meaning.
70496
70497    @endif@if java <h3><a class='anchor'
70498    name='SBMLErrorCategory_t'>Category codes associated with SBMLError objects</a></h3>
70499
70500    As discussed above, each SBMLError object contains a value for a
70501    category identifier, describing the type of issue that the SBMLError
70502    object represents.  The category can be retrieved from an SBMLError
70503    object using the method SBMLError.getCategory().  The following table
70504    lists each possible value and a brief description of its meaning.
70505
70506    As is the case with the error codes, in the libSBML Java language
70507    interface, the category identifiers are currently implemented as static
70508    integer constants defined in the interface class
70509    {@link libsbmlConstants}.
70510
70511    The following table lists each possible value and a brief description of
70512    its meaning.
70513
70514    @endif@if csharp <h3><a class='anchor'
70515    name='SBMLErrorCategory_t'>Category codes associated with SBMLError objects</a></h3>
70516
70517    As discussed above, each SBMLError object contains a value for a
70518    category identifier, describing the type of issue that the SBMLError
70519    object represents.  The category can be retrieved from an SBMLError
70520    object using the method SBMLError.getCategory().  The following table
70521    lists each possible value and a brief description of its meaning.
70522
70523    As is the case with the error codes, in the libSBML C# language
70524    interface, the category identifiers are currently implemented as static
70525    integer constants defined in the interface class
70526    {@link libsbmlcs.libsbml}.
70527
70528    The following table lists each possible value and a brief description of
70529    its meaning.
70530
70531    @endif@~
70532
70533    <center>
70534    <table width='90%' cellspacing='1' cellpadding='4' border='0'  class='text-table normal-font alt-row-colors'>
70535    <tr style='background: lightgray' class='normal-font'>
70536    <th>Enumerator</td>
70537    <th>Meaning</td>
70538    </tr>
70539    <tr><td>@link libsbml#LIBSBML_CAT_SBML LIBSBML_CAT_SBML@endlink</td><td>General error not falling into
70540    another category below.</td></tr>
70541    <tr><td>@link libsbml#LIBSBML_CAT_SBML_L1_COMPAT LIBSBML_CAT_SBML_L1_COMPAT@endlink</td><td>Category of errors
70542    that can only occur during attempted translation from one Level/Version
70543    of SBML to another.  This particular category applies to errors
70544    encountered while trying to convert a model from SBML Level&nbsp;2 to SBML
70545    Level&nbsp;1.</td></tr>
70546    <tr><td>@link libsbml#LIBSBML_CAT_SBML_L2V1_COMPAT LIBSBML_CAT_SBML_L2V1_COMPAT@endlink</td><td>Category of errors
70547    that can only occur during attempted translation from one Level/Version
70548    of SBML to another.  This particular category applies to errors
70549    encountered while trying to convert a model to SBML Level&nbsp;2
70550    Version&nbsp;1.</td></tr>
70551    <tr><td>@link libsbml#LIBSBML_CAT_SBML_L2V2_COMPAT LIBSBML_CAT_SBML_L2V2_COMPAT@endlink</td><td>Category of errors
70552    that can only occur during attempted translation from one Level/Version
70553    of SBML to another.  This particular category applies to errors
70554    encountered while trying to convert a model to SBML Level&nbsp;2
70555    Version&nbsp;2.</td></tr>
70556    <tr><td>@link libsbml#LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink</td><td>Category of
70557    errors that can occur while validating general SBML constructs.  With
70558    respect to the SBML specification, these concern failures in applying
70559    the validation rules numbered 2xxxx in the Level&nbsp;2 Versions&nbsp;2&ndash;4
70560    and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.</td></tr>
70561    <tr><td>@link libsbml#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink</td><td>Category of
70562    errors that can occur while validating symbol identifiers in a model.
70563    With respect to the SBML specification, these concern failures in
70564    applying the validation rules numbered 103xx in the Level&nbsp;2 Versions&nbsp;2&ndash;4
70565    and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.</td></tr>
70566    <tr><td>@link libsbml#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink</td><td>Category of
70567    errors that can occur while validating the units of measurement on
70568    quantities in a model.  With respect to the SBML specification, these
70569    concern failures in applying the validation rules numbered 105xx in the
70570    Level&nbsp;2 Versions&nbsp;2&ndash;4
70571    and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.</td></tr>
70572    <tr><td>@link libsbml#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink</td><td>Category of
70573    errors that can occur while validating MathML formulas in a model.  With
70574    respect to the SBML specification, these concern failures in applying
70575    the validation rules numbered 102xx in the Level&nbsp;2 Versions&nbsp;2&ndash;4
70576    and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.</td></tr>
70577    <tr><td>@link libsbml#LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink</td><td>Category of errors
70578    that can occur while validating SBO identifiers in a model.  With
70579    respect to the SBML specification, these concern failures in applying
70580    the validation rules numbered 107xx in the Level&nbsp;2 Versions&nbsp;2&ndash;4
70581    and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.</td></tr>
70582    <tr><td>@link libsbml#LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink</td><td>Error in the
70583    system of equations in the model: the system is overdetermined,
70584    therefore violating a tenet of proper SBML.  With respect to the SBML
70585    specification, this is validation rule #10601 in the SBML Level&nbsp;2 Versions&nbsp;2&ndash;4
70586    and Level&nbsp;3 Versions&nbsp;1&ndash;2 specifications.</td></tr>
70587    <tr><td>@link libsbml#LIBSBML_CAT_SBML_L2V3_COMPAT LIBSBML_CAT_SBML_L2V3_COMPAT@endlink</td><td>Category of errors
70588    that can only occur during attempted translation from one Level/Version
70589    of SBML to another.  This particular category applies to errors
70590    encountered while trying to convert a model to SBML Level&nbsp;2
70591    Version&nbsp;3.</td></tr>
70592    <tr><td>@link libsbml#LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink</td><td>Category of
70593    warnings about recommended good practices involving SBML and
70594    computational modeling.  (These are tests performed by libSBML and do
70595    not have equivalent SBML validation rules.)</td></tr>
70596    <tr><td>@link libsbml#LIBSBML_CAT_INTERNAL_CONSISTENCY LIBSBML_CAT_INTERNAL_CONSISTENCY@endlink</td><td>Category of
70597    errors that can occur while validating libSBML's internal representation
70598    of SBML constructs. (These are tests performed by libSBML and do
70599    not have equivalent SBML validation rules.)</td></tr>
70600    <tr><td>@link libsbml#LIBSBML_CAT_SBML_L2V4_COMPAT LIBSBML_CAT_SBML_L2V4_COMPAT@endlink</td><td>Category of errors
70601    that can only occur during attempted translation from one Level/Version
70602    of SBML to another.  This particular category applies to errors
70603    encountered while trying to convert a model to SBML Level&nbsp;2
70604    Version&nbsp;4.</td></tr>
70605    <tr><td>@link libsbml#LIBSBML_CAT_SBML_L3V1_COMPAT LIBSBML_CAT_SBML_L3V1_COMPAT@endlink</td><td>Category of errors
70606    that can only occur during attempted translation from one Level/Version
70607    of SBML to another.  This particular category applies to errors
70608    encountered while trying to convert a model to SBML Level&nbsp;3
70609    Version&nbsp;1.</td></tr>
70610
70611    </table>
70612    </center>
70613
70614    @if clike
70615    <h3><a class='anchor' name='SBMLErrorSeverity_t'>SBMLErrorSeverity_t</a></h3>
70616
70617    This is an enumeration of severity codes for SBMLError diagnostics.
70618    User programs receiving an SBMLError object can use this distinction to
70619    check whether the error represents a low-level XML problem or an SBML
70620    problem.
70621
70622    In libSBML version @htmlinclude libsbml-version.html
70623    there are no additional severity codes in
70624    #SBMLErrorSeverity_t beyond those defined in #XMLErrorSeverity_t.
70625
70626    <hr>
70627    @endif@if java <h3><a class='anchor'
70628    name='SBMLErrorSeverity_t'>Severity codes associated with SBMLError
70629    objects</h3>
70630
70631    In libSBML version @htmlinclude libsbml-version.html
70632    there are no additional severity codes beyond those defined by XMLError.
70633    They are implemented as static integer constants defined in the interface
70634    class <code><a href='libsbmlConstants.html'>libsbmlConstants</a></code>,
70635    and have names beginning with <code>LIBSBML_SEV_</code>.
70636    @endif@if python <h3><a class='anchor'
70637    name='SBMLErrorSeverity_t'>Severity codes associated with SBMLError
70638    objects</h3>
70639
70640    In libSBML version @htmlinclude libsbml-version.html
70641    there are no additional severity codes beyond those defined by XMLError.
70642    They are implemented as static integer constants defined in the
70643    interface class @link libsbml libsbml@endlink, and have names beginning
70644    with <code>LIBSBML_SEV_</code>.
70645    @endif@~
70646
70647    """
70648
70649    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
70650    __repr__ = _swig_repr
70651
70652    def __init__(self, *args):
70653        r"""
70654        __init__(SBMLError self, unsigned int const errorId=0, unsigned int const level=SBML_DEFAULT_LEVEL, unsigned int const version=SBML_DEFAULT_VERSION, string details="", unsigned int const line=0, unsigned int const column=0, unsigned int const severity=LIBSBML_SEV_UNKNOWN, unsigned int const category=LIBSBML_CAT_SBML, string package="core", unsigned int const pkgVersion=1) -> SBMLError
70655        __init__(SBMLError self, SBMLError orig) -> SBMLError
70656
70657        This method has multiple variants; they differ in the arguments
70658         they accept.  Each variant is described separately below.
70659
70660        @par
70661        <hr>
70662        <span class='variant-sig-heading'>Method variant with the following signature</span>:
70663         <pre class='signature'>SBMLError(SBMLError orig)</pre>
70664
70665        Copy constructor; creates a copy of this SBMLError.
70666
70667        @param orig the instance to copy.
70668
70669
70670        @par
70671        <hr>
70672        <span class='variant-sig-heading'>Method variant with the following signature</span>:
70673         <pre class='signature'>SBMLError(  long errorId  = 0 ,  long level    = SBML_DEFAULT_LEVEL ,  long version  = SBML_DEFAULT_VERSION , string details  = '' ,  long line     = 0 ,  long column   = 0 ,  long severity = LIBSBML_SEV_UNKNOWN ,  long category = LIBSBML_CAT_SBML , string package  = 'core' ,  long pkgVersion = 1 )</pre>
70674
70675        Creates a new SBMLError to report that something occurred during SBML
70676        processing.
70677
70678        When a libSBML operation on SBML content results in a warning, error
70679        or other diagnostic, the issue is reported as an SBMLError object.
70680        SBMLError objects have identification numbers to indicate the nature
70681        of the exception.  @if clike These numbers are drawn from
70682        the enumeration <a class='el'
70683        href='#SBMLErrorCode_t'>
70684        SBMLErrorCode_t</a>.  @endif@if java These numbers are
70685        defined as longeger constants in the file
70686        'libsbmlConstants.html'.  See the <a class='el'
70687        href='#SBMLErrorCode_t'>top of this documentation page</a> for a table
70688        listing the possible values and their meanings. @endif@if python These
70689        numbers are defined as longeger constants in the interface
70690        class @link libsbml libsbml@endlink.  See the <a class='el'
70691        href='#SBMLErrorCode_t'>top of this documentation page</a> for a table
70692        listing the possible values and their meanings. @endif@~ The argument
70693        @p errorId to this constructor @em can be (but does not have to be) a
70694        value from this @if clike enumeration. If it @em is a value
70695        from <a class='el' href='#SBMLErrorCode_t'>SBMLErrorCode_t</a>, the
70696        SBMLError class assumes the error is a low-level system or SBML layer
70697        error and <em>prepends</em> a built-in, predefined error message to
70698        any string passed in the argument @p details to this constructor.  In
70699        addition, all <a class='el'
70700        href='#SBMLErrorCode_t'>SBMLErrorCode_t</a> errors have associated
70701        values for the @p severity and @p category codes, and these fields are
70702        filled-in as well from the enumerations <a class='el'
70703        href='#SBMLErrorSeverity_t'>SBMLErrorSeverity_t</a> and <a class='el'
70704        href='#SBMLErrorCategory_t'>SBMLErrorCategory_t</a>,
70705        respectively. @else set of constants.  If it @em
70706        is one of the predefined error identifiers, the SBMLError class
70707        assumes the error is a low-level system or SBML layer error and
70708        <em>prepends</em> a built-in, predefined error message to any string
70709        passed in the argument @p details to this constructor.  In addition,
70710        all the predefined error identifiers have associated values for the
70711        @p severity and @p category codes, and these fields are filled-in using
70712        the libSBML defaults for each different error identifier. @endif@~
70713
70714        If the error identifier @p errorId is a number greater than 99999, the
70715        SBMLError class assumes the error was generated from another part of
70716        the software and does not do additional filling in of values beyond
70717        the default in the constructor itself.  This allows SBMLError to serve
70718        as a base class for other errors, such as for user-defined validation
70719        rules (see Validator).  Callers should fill in all the parameters with
70720        suitable values if generating errors with codes greater than 99999 to
70721        make maximum use of the SBMLError facilities.
70722
70723        @if clike As mentioned above, there are two other
70724        enumerations, <a class='el'
70725        href='#SBMLErrorSeverity_t'>SBMLErrorSeverity_t</a> and <a class='el'
70726        href='#SBMLErrorCategory_t'>SBMLErrorCategory_t</a>, used for indicating
70727        the severity and category of error for the predefined SBMLError codes.
70728        The values passed in @p severity and @p category override the defaults
70729        assigned based on the error code.  If the value of @p errorId is a
70730        value from <a class='el' href='#SBMLErrorCode_t'>SBMLErrorCode_t</a>,
70731        callers do not need to fill in @p severity and @p category.
70732        Conversely, if @p errorId is not a value from <a class='el'
70733        href='#SBMLErrorCode_t'>SBMLErrorCode_t</a>, callers can use other
70734        values (not just those from <a class='el'
70735        href='#SBMLErrorSeverity_t'>SBMLErrorSeverity_t</a> and <a class='el'
70736        href='#SBMLErrorCategory_t'>SBMLErrorCategory_t</a>, but their own
70737        special values) for @p severity and
70738        @p category. @else As mentioned above,
70739        there are additional constants defined for <a class='el'
70740        href='#SBMLErrorSeverity_t'>standard severity</a> and <a class='el'
70741        href='#SBMLErrorCategory_t'>standard category</a> codes, and every predefined
70742        error in libSBML has an associated value for severity and category taken
70743        from these predefined sets.  These constants have symbol names
70744        prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
70745        respectively.  If the value of @p errorId is one of the standard error
70746        codes, callers do not need to fill in @p severity and @p category in a
70747        call to this constructor.  Conversely, if @p errorId is not an existing
70748        SBML-level error code, callers can use other values for @p severity and
70749        @p category. @endif@~
70750
70751        Please see the top of the documentation for SBMLError for a longer
70752        discussion of the possible error codes, their meanings, and their
70753        applicability to different combinations of Level+Version of SBML.
70754
70755        @param errorId a long integer, the identification number of the error.
70756
70757        @param level the SBML Level of the SBML model.
70758
70759        @param version the SBML Version within the Level of the SBML model.
70760
70761        @param details a string containing additional details about the error.
70762        If the error code in @p errorId is one that is recognized by SBMLError,
70763        the given message is @em appended to a predefined message associated
70764        with the given code.  If the error code is not recognized, the message
70765        is stored as-is as the text of the error.
70766
70767        @param line a long integer, the line number at which the error occured.
70768
70769        @param column a long integer, the column number at which the error occured.
70770
70771        @param severity an integer indicating severity of the error.
70772
70773        @param category an integer indicating the category to which the error
70774        belongs.
70775
70776        @param package the SBML Level package involved.
70777
70778        @param pkgVersion the version of the @p package.
70779
70780        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
70781
70782
70783
70784        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
70785
70786        """
70787        _libsbml.SBMLError_swiginit(self, _libsbml.new_SBMLError(*args))
70788    __swig_destroy__ = _libsbml.delete_SBMLError
70789
70790# Register SBMLError in _libsbml:
70791_libsbml.SBMLError_swigregister(SBMLError)
70792
70793MODEL_QUALIFIER = _libsbml.MODEL_QUALIFIER
70794
70795BIOLOGICAL_QUALIFIER = _libsbml.BIOLOGICAL_QUALIFIER
70796
70797UNKNOWN_QUALIFIER = _libsbml.UNKNOWN_QUALIFIER
70798
70799BQM_IS = _libsbml.BQM_IS
70800
70801BQM_IS_DESCRIBED_BY = _libsbml.BQM_IS_DESCRIBED_BY
70802
70803BQM_IS_DERIVED_FROM = _libsbml.BQM_IS_DERIVED_FROM
70804
70805BQM_IS_INSTANCE_OF = _libsbml.BQM_IS_INSTANCE_OF
70806
70807BQM_HAS_INSTANCE = _libsbml.BQM_HAS_INSTANCE
70808
70809BQM_UNKNOWN = _libsbml.BQM_UNKNOWN
70810
70811BQB_IS = _libsbml.BQB_IS
70812
70813BQB_HAS_PART = _libsbml.BQB_HAS_PART
70814
70815BQB_IS_PART_OF = _libsbml.BQB_IS_PART_OF
70816
70817BQB_IS_VERSION_OF = _libsbml.BQB_IS_VERSION_OF
70818
70819BQB_HAS_VERSION = _libsbml.BQB_HAS_VERSION
70820
70821BQB_IS_HOMOLOG_TO = _libsbml.BQB_IS_HOMOLOG_TO
70822
70823BQB_IS_DESCRIBED_BY = _libsbml.BQB_IS_DESCRIBED_BY
70824
70825BQB_IS_ENCODED_BY = _libsbml.BQB_IS_ENCODED_BY
70826
70827BQB_ENCODES = _libsbml.BQB_ENCODES
70828
70829BQB_OCCURS_IN = _libsbml.BQB_OCCURS_IN
70830
70831BQB_HAS_PROPERTY = _libsbml.BQB_HAS_PROPERTY
70832
70833BQB_IS_PROPERTY_OF = _libsbml.BQB_IS_PROPERTY_OF
70834
70835BQB_HAS_TAXON = _libsbml.BQB_HAS_TAXON
70836
70837BQB_UNKNOWN = _libsbml.BQB_UNKNOWN
70838
70839class CVTerm(object):
70840    r"""
70841
70842    @sbmlpackage{core}
70843
70844    @htmlinclude pkg-marker-core.html A MIRIAM-compliant controlled vocabulary term.
70845
70846    @htmlinclude not-sbml-warning.html
70847
70848    The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
70849    format for annotating models when (a) referring to controlled vocabulary
70850    terms and database identifiers that define and describe biological and
70851    biochemical entities, and (b) describing the creator of a model and the
70852    model's modification history.  This SBML format is a concrete syntax that
70853    conforms to the guidelines of MIRIAM (<a target='_blank'
70854    href='http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html'>'Minimum
70855    Information Requested in the Annotation of biochemical Models'</a>,
70856    <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005).  The format uses
70857    a subset of W3C RDF (<a target='_blank'
70858    href='http://www.w3.org/RDF/'>Resource Description Format</a>).  In order
70859    to help application developers work with annotations in this format,
70860    libSBML provides several helper classes that provide higher-level
70861    interfaces to the data elements; these classes include CVTerm,
70862    ModelCreator, ModelHistory, RDFAnnotationParser, and Date.
70863
70864    @section annotation-parts Components of an SBML annotation
70865
70866    The SBML annotation format consists of RDF-based content placed inside an
70867    <code>&lt;annotation&gt;</code> element attached to an SBML component such
70868    as Species, Compartment, etc.  A small change was introduced in SBML
70869    Level&nbsp;2 Version&nbsp;5 and SBML Level&nbsp;3 Version&nbsp;2 to permit
70870    nested annotations: lower Versions of the SBML specifications did not
70871    explicitly allow this.  We first describe the different parts of SBML
70872    annotations in XML form for SBML Level&nbsp;2 below Version&nbsp;5 and
70873    SBML Level&nbsp;3 below Version&nbsp;2:
70874
70875     <pre class='fragment'>
70876     &lt;<span style='background-color: #bbb'>SBML_ELEMENT</span> <span style='background-color: #d0eed0'>+++</span> metaid=&quot;<span style='border-bottom: 1px solid black'>meta id</span>&quot; <span style='background-color: #d0eed0'>+++</span>&gt;
70877       <span style='background-color: #d0eed0'>+++</span>
70878       &lt;annotation&gt;
70879         <span style='background-color: #d0eed0'>+++</span>
70880         &lt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
70881                  xmlns:dcterm='http://purl.org/dc/terms/'
70882                  xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'
70883                  xmlns:bqbiol='http://biomodels.net/biology-qualifiers/'
70884                  xmlns:bqmodel='http://biomodels.net/model-qualifiers/' &gt;
70885           &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
70886             <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
70887             &lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
70888               &lt;rdf:Bag&gt;
70889                 &lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>URI</span>&quot; /&gt;
70890                 <span style='background-color: #edd'>...</span>
70891               &lt;/rdf:Bag&gt;
70892             &lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
70893             <span style='background-color: #edd'>...</span>
70894           &lt;/rdf:Description&gt;
70895           <span style='background-color: #d0eed0'>+++</span>
70896         &lt;/rdf:RDF&gt;
70897         <span style='background-color: #d0eed0'>+++</span>
70898       &lt;/annotation&gt;
70899       <span style='background-color: #d0eed0'>+++</span>
70900     &lt;/<span style='background-color: #bbb'>SBML_ELEMENT</span>&gt;
70901     </pre>
70902
70903    In the template above, the placeholder
70904    <span class='code' style='background-color: #bbb'>SBML_ELEMENT</span> stands for
70905    the XML tag name of an SBML model component (e.g., <code>model</code>,
70906    <code>reaction</code>, etc.) and the placeholder
70907    <span class='code' style='border-bottom: 1px solid black'>meta id</span>
70908    stands for the element's meta identifier, which is a field available
70909    on all SBML components derived from the SBase base object class.
70910    The <span style='border-bottom: 2px dotted #888'>dotted</span>
70911    portions are optional, the symbol
70912    <span class='code' style='background-color: #d0eed0'>+++</span> is a placeholder
70913    for either no content or valid XML content that is not defined by
70914    this annotation scheme, and the ellipses
70915    <span class='code' style='background-color: #edd'>...</span>
70916    are placeholders for zero or more elements of the same form as the
70917    immediately preceding element.  The optional content
70918    <span class='code' style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
70919    is a creation and modification history; in libSBML, this is stored
70920    using ModelHistory objects.
70921
70922    The placeholder <span class='code' style='background-color:
70923    #bbb'>RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
70924    name.  This is an element in either the XML namespace
70925    <code>'http://biomodels.net/model-qualifiers'</code> (for model
70926    qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code> (for
70927    biological qualifier).  Note that these namespace URIs are only labels,
70928    and not actual Web locations, which means you cannot visit an address such
70929    as <code>'http://biomodels.net/model-qualifiers'</code> in your browser or
70930    try to have your application access it.  @if clike Refer instead to the enumerations
70931    #ModelQualifierType_t and #BiolQualifierType_t for a list of the available
70932    relationship elements that can be used for <span class='code'
70933    style='background-color: #bbb'>RELATION_ELEMENT</span>.@endif@~
70934
70935    The <span class='code' style='background-color: #d0d0ee'>URI</span> is a
70936    required data value that uniquely identifies a resource and data within
70937    that resource to which the annotation refers.  Again, being URIs, these do
70938    not refer to physical Web locations; nevertheless, applications will often
70939    want a means of finding the resource to which a given <span class='code'
70940    style='background-color: #d0d0ee'>URI</span> refers.  Providing the
70941    facilities for this task is the purpose of MIRIAM Resources, described in
70942    detail online at <a target='_blank'
70943    href='http://biomodels.net/miriam'>http://biomodels.net/miriam</a>) and
70944    also in the paper <a target='_blank'
70945    href='http://www.biomedcentral.com/1752-0509/1/58'>'MIRIAM Resources: tools to generate and
70946    resolve robust cross-references in Systems Biology'</a>, <i>BMC Systems
70947    Biology</i>, 58(1), 2007.
70948
70949    Finally, the following is the same template as above, but this time
70950    showing the nested content permitted by the most recent SBML
70951    specifications (SBML Level&nbsp;2 Version&nbsp;5 and Level&nbsp;3
70952    Version&nbsp;2):
70953     <pre class='fragment'>
70954     &lt;<span style='background-color: #bbb'>SBML_ELEMENT</span> <span style='background-color: #d0eed0'>+++</span> metaid=&quot;<span style='border-bottom: 1px solid black'>meta id</span>&quot; <span style='background-color: #d0eed0'>+++</span>&gt;
70955       <span style='background-color: #d0eed0'>+++</span>
70956       &lt;annotation&gt;
70957         <span style='background-color: #d0eed0'>+++</span>
70958         &lt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
70959                  xmlns:dcterm='http://purl.org/dc/terms/'
70960                  xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'
70961                  xmlns:bqbiol='http://biomodels.net/biology-qualifiers/'
70962                  xmlns:bqmodel='http://biomodels.net/model-qualifiers/' &gt;
70963           &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
70964             <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
70965             &lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
70966               &lt;rdf:Bag&gt;
70967                 &lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>URI</span>&quot; /&gt;
70968                 <span style='background-color: #fef'>NESTED_CONTENT</span>
70969                 <span style='background-color: #edd'>...</span>
70970               &lt;/rdf:Bag&gt;
70971             &lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
70972             <span style='background-color: #edd'>...</span>
70973           &lt;/rdf:Description&gt;
70974           <span style='background-color: #d0eed0'>+++</span>
70975         &lt;/rdf:RDF&gt;
70976         <span style='background-color: #d0eed0'>+++</span>
70977       &lt;/annotation&gt;
70978       <span style='background-color: #d0eed0'>+++</span>
70979     &lt;/<span style='background-color: #bbb'>SBML_ELEMENT</span>&gt;
70980     </pre>
70981
70982    The placeholder
70983    <span class='code' style='background-color: #fef'>NESTED_CONTENT</span>
70984    refers to other optional RDF elements such as
70985    <code>'bqbiol:isDescribedBy'</code> that describe a clarification or
70986    another annotation about the
70987    <span class='code' style='background-color: #bbb'>RELATION_ELEMENT</span>
70988    in which it appears.  Nested content allows one to, for example, describe
70989    protein modifications on species, or to add evidence codes for an
70990    annotation.  Nested content relates to its containing
70991    <span class='code' style='background-color: #bbb'>RELATION_ELEMENT</span>,
70992    not the other way around.  It qualifies it, but does not change its
70993    meaning.  As such, ignoring a
70994    <span class='code' style='background-color: #fef'>NESTED_CONTENT</span>
70995    does not affect the information provided by the containing
70996    <span class='code' style='background-color: #bbb'>RELATION_ELEMENT</span>.
70997
70998    For more information about SBML annotations in general, please refer to
70999    Section&nbsp;6 in the SBML Level&nbsp;2 (Versions 2&ndash;4) or
71000    Level&nbsp;3 specification documents.
71001
71002    @section cvterm-parts The parts of a CVTerm
71003
71004    Annotations that refer to controlled vocabularies are managed in libSBML
71005    using CVTerm objects.  The relation-resource pairs discussed in the
71006    previous section are the 'controlled vocabulary' terms that CVTerm is
71007    designed to store and manipulate.  A set of RDF-based annotations attached
71008    to a given SBML <code>&lt;annotation&gt;</code> element are read by
71009    RDFAnnotationParser and converted into a list of these CVTerm objects.
71010    Each CVTerm object instance stores the following components of an
71011    annotation:
71012
71013    <ul>
71014
71015    <li>The @em qualifier, which can be a BioModels.net 'biological
71016    qualifier', a BioModels.net 'model qualifier', or an unknown qualifier
71017    (as far as the CVTerm class is concerned).  Qualifiers are used in
71018    MIRIAM to indicate the nature of the relationship between the object
71019    being annotated and the resource.  In CVTerm, the qualifiers can be
71020    manipulated using the methods CVTerm.getQualifierType(),
71021    CVTerm.setQualifierType(), and related methods.
71022
71023    <li>The @em resource, represented by a URI (which, we must remind
71024    developers, is not the same as a URL).  In the CVTerm class, the
71025    resource component can be manipulated using the methods
71026    CVTerm.addResource() and
71027    CVTerm.removeResource().
71028
71029    </ul>
71030
71031    Note that a CVTerm contains a single qualifier, but possibly more than
71032    one resource.  This corresponds to the possibility of an annotation that
71033    points to multiple resources, all of which are qualified by the same
71034    BioModels.net qualifier.  The CVTerm object class supports this by
71035    supporting a list of resources.
71036
71037    Detailed explanations of the qualifiers defined by BioModels.net can be
71038    found at <a target='_blank'
71039    href='http://co.mbine.org/standards/qualifiers'>http://co.mbine.org/standards/qualifiers</a>.
71040
71041    """
71042
71043    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
71044    __repr__ = _swig_repr
71045    __swig_destroy__ = _libsbml.delete_CVTerm
71046
71047    def __init__(self, *args):
71048        r"""
71049        __init__(CVTerm self, QualifierType_t type=UNKNOWN_QUALIFIER) -> CVTerm
71050        __init__(CVTerm self, XMLNode node) -> CVTerm
71051        __init__(CVTerm self, CVTerm orig) -> CVTerm
71052
71053        This method has multiple variants; they differ in the arguments
71054         they accept.  Each variant is described separately below.
71055
71056        @par
71057        <hr>
71058        <span class='variant-sig-heading'>Method variant with the following signature</span>:
71059         <pre class='signature'>CVTerm(CVTerm orig)</pre>
71060
71061        Copy constructor; creates a copy of a CVTerm object.
71062
71063        @param orig the CVTerm instance to copy.
71064
71065
71066        @par
71067        <hr>
71068        <span class='variant-sig-heading'>Method variant with the following signature</span>:
71069         <pre class='signature'>CVTerm( XMLNode node)</pre>
71070
71071        Creates a new CVTerm from the given XMLNode.
71072
71073        @par
71074        The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
71075        format for annotating models when (a) referring to controlled
71076        vocabulary terms and database identifiers that define and describe
71077        biological and other entities, and (b) describing the creator of a
71078        model and the model's modification history.  The annotation content is
71079        stored in <code>&lt;annotation&gt;</code> elements attached to
71080        individual SBML elements.  The format for storing the content inside
71081        SBML <code>&lt;annotation&gt;</code> elements is a subset of W3C RDF
71082        (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description
71083        Format</a>) expressed in XML.  The CVTerm class provides a programming
71084        interface for working directly with controlled vocabulary term ('CV
71085        term') objects without having to deal directly with the XML form.
71086        When libSBML reads in an SBML model containing RDF annotations, it
71087        parses those annotations into a list of CVTerm objects, and when
71088        writing a model, it parses the CVTerm objects back into the
71089        appropriate SBML <code>&lt;annotation&gt;</code> structure.
71090
71091        This method creates a CVTerm object from the given XMLNode object @p
71092        node.  XMLNode is libSBML's representation of a node in an XML tree of
71093        elements, and each such element can be placed in a namespace.  This
71094        constructor looks for the element to be in the XML namespaces
71095        <code>'http://biomodels.net/model-qualifiers'</code> (for
71096        model qualifiers) and
71097        <code>'http://biomodels.net/biology-qualifiers'</code> (for
71098        biological qualifier), and if they are, creates CVTerm objects for
71099        the result.
71100
71101        @param node an %XMLNode representing a CVTerm.
71102
71103        @note This method assumes that the given XMLNode object @p node is of
71104        the correct structural form.
71105
71106
71107        @par
71108        <hr>
71109        <span class='variant-sig-heading'>Method variant with the following signature</span>:
71110         <pre class='signature'>CVTerm(QualifierType_t type = UNKNOWN_QUALIFIER)</pre>
71111
71112        Creates an empty CVTerm, optionally with the given
71113        @if clike #QualifierType_t value@else qualifier@endif@~ @p type .
71114
71115        @par
71116        The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
71117        format for annotating models when (a) referring to controlled
71118        vocabulary terms and database identifiers that define and describe
71119        biological and other entities, and (b) describing the creator of a
71120        model and the model's modification history.  The annotation content is
71121        stored in <code>&lt;annotation&gt;</code> elements attached to
71122        individual SBML elements.  The format for storing the content inside
71123        SBML <code>&lt;annotation&gt;</code> elements is a subset of W3C RDF
71124        (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description
71125        Format</a>) expressed in XML.  The CVTerm class provides a programming
71126        interface for working directly with controlled vocabulary term ('CV
71127        term') objects without having to deal directly with the XML form.
71128        When libSBML reads in an SBML model containing RDF annotations, it
71129        parses those annotations into a list of CVTerm objects, and when
71130        writing a model, it parses the CVTerm objects back into the
71131        appropriate SBML <code>&lt;annotation&gt;</code> structure.
71132
71133        This method creates an empty CVTerm object.  The possible qualifier
71134        types usable as values of @p type are @link libsbml#MODEL_QUALIFIER MODEL_QUALIFIER@endlink and @link libsbml#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink.  If an explicit value for @p type is not given, this
71135        method defaults to using @link libsbml#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink.  The @if clike #QualifierType_t value@else qualifier
71136        type@endif@~ can be set later using the
71137        CVTerm.setQualifierType() method.
71138
71139        Different BioModels.net qualifier elements encode different types of
71140        relationships.  Please refer to the SBML specification or the <a
71141        target='_blank' href='http://co.mbine.org/standards/qualifiers/'>BioModels.net
71142        qualifiers web page</a> for an explanation of the meaning of these
71143        different qualifiers.
71144
71145        @param type a @if clike #QualifierType_t value@else qualifier type@endif@~.
71146
71147        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
71148
71149
71150
71151        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
71152
71153        """
71154        _libsbml.CVTerm_swiginit(self, _libsbml.new_CVTerm(*args))
71155
71156    def clone(self):
71157        r"""
71158        clone(CVTerm self) -> CVTerm
71159
71160        Creates and returns a deep copy of this CVTerm object.
71161
71162        @return the (deep) copy of this CVTerm object.
71163
71164        """
71165        return _libsbml.CVTerm_clone(self)
71166
71167    def getQualifierType(self, *args):
71168        r"""
71169        getQualifierType(CVTerm self) -> QualifierType_t
71170        getQualifierType(CVTerm self) -> QualifierType_t
71171
71172        Returns the qualifier type of this CVTerm object.
71173
71174        @par
71175        The RDF element used in the SBML format for referring to external entities
71176        is <code>&lt;rdf:Description&gt;</code>, with a
71177        <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
71178        <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
71179        the structure:
71180        <pre class='fragment'>
71181        &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
71182        &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
71183        &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71184        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
71185        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
71186        &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71187        &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
71188        &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71189        &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71190        &lt;/rdf:Description&gt;
71191        </pre>
71192        In the template above, the placeholder <span class='code'
71193        style='border-bottom: 1px solid black'>meta id</span> stands for the
71194        element's meta identifier, which is a field available on all SBML
71195        components derived from the SBase base object class.  The <span
71196        style='border-bottom: 2px dotted #888'>dotted</span> portions are
71197        optional, and the ellipses <span class='code' style='background-color:
71198        #edd'>...</span> are placeholders for zero or more elements of the same
71199        form as the immediately preceding element.
71200
71201        The placeholder <span class='code' style='background-color: #bbb'>
71202        RELATION_ELEMENT</span> refers to a BioModels.net qualifier
71203        element name.  This is an element in either the XML namespace
71204        <code>'http://biomodels.net/model-qualifiers'</code> (for model
71205        qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
71206        (for biological qualifier).  The present method returns a code
71207        identifying which one of these two relationship namespaces is being
71208        used; any other qualifier in libSBML is considered unknown (as far as
71209        the CVTerm class is concerned).  Consequently, this method will return
71210        one of the following values:
71211
71212        @li @link libsbml#MODEL_QUALIFIER MODEL_QUALIFIER@endlink
71213        @li @link libsbml#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink
71214        @li @link libsbml#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink
71215
71216        The specific relationship of this CVTerm to the enclosing SBML object
71217        can be determined using the CVTerm methods such as
71218        CVTerm.getModelQualifierType() and
71219        CVTerm.getBiologicalQualifierType().  Callers will typically want to
71220        use the present method to find out which one of the @em other two
71221        methods to call to find out the specific relationship.
71222
71223        @return the @if clike #QualifierType_t value@else qualifier type@endif@~
71224        of this object or @link libsbml#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink
71225        (the default).
71226
71227        @see getResources()
71228        @see getModelQualifierType()
71229        @see getBiologicalQualifierType()
71230
71231        """
71232        return _libsbml.CVTerm_getQualifierType(self, *args)
71233
71234    def getModelQualifierType(self, *args):
71235        r"""
71236        getModelQualifierType(CVTerm self) -> ModelQualifierType_t
71237        getModelQualifierType(CVTerm self) -> ModelQualifierType_t
71238
71239        Returns the model qualifier type of this CVTerm object.
71240
71241        @par
71242        The RDF element used in the SBML format for referring to external entities
71243        is <code>&lt;rdf:Description&gt;</code>, with a
71244        <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
71245        <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
71246        the structure:
71247        <pre class='fragment'>
71248        &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
71249        &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
71250        &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71251        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
71252        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
71253        &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71254        &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
71255        &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71256        &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71257        &lt;/rdf:Description&gt;
71258        </pre>
71259        In the template above, the placeholder <span class='code'
71260        style='border-bottom: 1px solid black'>meta id</span> stands for the
71261        element's meta identifier, which is a field available on all SBML
71262        components derived from the SBase base object class.  The <span
71263        style='border-bottom: 2px dotted #888'>dotted</span> portions are
71264        optional, and the ellipses <span class='code' style='background-color:
71265        #edd'>...</span> are placeholders for zero or more elements of the same
71266        form as the immediately preceding element.
71267
71268        The placeholder <span class='code' style='background-color: #bbb'>
71269        RELATION_ELEMENT</span> refers to a BioModels.net qualifier
71270        element name.  This is an element in either the XML namespace
71271        <code>'http://biomodels.net/model-qualifiers'</code> (for model
71272        qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
71273        (for biological qualifier).  Callers will typically use
71274        CVTerm.getQualifierType() to find out the type of qualifier relevant to this
71275        particular CVTerm object, then if it is a @em model qualifier, use the
71276        present method to determine the specific qualifier.
71277
71278        Annotations with model qualifiers express a relationship between an
71279        annotation resource and the <em>modeling concept</em> represented by a
71280        given object in the model.  The diagram below illustrates the
71281        relationship in this case:
71282
71283        @image html model-qualifiers.png 'Relationship expressed by model qualifiers'
71284        @image latex model-qualifiers.png 'Relationship expressed by model qualifiers'
71285
71286        <br> The set of known model qualifiers is, at the time of this libSBML
71287        release, the following:
71288
71289        @li @link libsbml#BQM_IS BQM_IS@endlink
71290        @li @link libsbml#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink
71291        @li @link libsbml#BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM@endlink
71292        @li @link libsbml#BQM_IS_INSTANCE_OF BQM_IS_INSTANCE_OF@endlink
71293        @li @link libsbml#BQM_HAS_INSTANCE BQM_HAS_INSTANCE@endlink
71294
71295        Any other BioModels.net qualifier found in the model is considered
71296        unknown by libSBML and reported as
71297        @link libsbml#BQM_UNKNOWN BQM_UNKNOWN@endlink.
71298
71299        @return the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~
71300        of this object or @link libsbml#BQM_UNKNOWN BQM_UNKNOWN@endlink
71301        (the default).
71302
71303        """
71304        return _libsbml.CVTerm_getModelQualifierType(self, *args)
71305
71306    def getBiologicalQualifierType(self, *args):
71307        r"""
71308        getBiologicalQualifierType(CVTerm self) -> BiolQualifierType_t
71309        getBiologicalQualifierType(CVTerm self) -> BiolQualifierType_t
71310
71311        Returns the biological qualifier type of this CVTerm object.
71312
71313        @par
71314        The RDF element used in the SBML format for referring to external entities
71315        is <code>&lt;rdf:Description&gt;</code>, with a
71316        <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
71317        <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
71318        the structure:
71319        <pre class='fragment'>
71320        &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
71321        &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
71322        &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71323        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
71324        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
71325        &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71326        &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
71327        &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71328        &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71329        &lt;/rdf:Description&gt;
71330        </pre>
71331        In the template above, the placeholder <span class='code'
71332        style='border-bottom: 1px solid black'>meta id</span> stands for the
71333        element's meta identifier, which is a field available on all SBML
71334        components derived from the SBase base object class.  The <span
71335        style='border-bottom: 2px dotted #888'>dotted</span> portions are
71336        optional, and the ellipses <span class='code' style='background-color:
71337        #edd'>...</span> are placeholders for zero or more elements of the same
71338        form as the immediately preceding element.
71339
71340        The placeholder <span class='code' style='background-color: #bbb'>
71341        RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
71342        name.  This is an element in either the XML namespace
71343        <code>'http://biomodels.net/model-qualifiers'</code> (for model
71344        qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
71345        (for biological qualifier).  Callers will typically use
71346        CVTerm.getQualifierType() to find out the type of qualifier relevant to
71347        this particular CVTerm object, then if it is a @em biological qualifier,
71348        use the present method to determine the specific qualifier.
71349
71350        Annotations with biological qualifiers express a relationship between an
71351        annotation resource and the <em>biological concept</em> represented by a
71352        given object in the model.    The diagram
71353        below illustrates the relationship in this case:
71354
71355        @image html biology-qualifiers.png 'Relationship expressed by biological qualifiers'
71356        @image latex biology-qualifiers.png 'Relationship expressed by biological qualifiers'
71357
71358        <br> The set of known biological qualifiers is, at the time of this
71359        libSBML release, the following:
71360
71361        @li @link libsbml#BQB_IS BQB_IS@endlink
71362        @li @link libsbml#BQB_HAS_PART BQB_HAS_PART@endlink
71363        @li @link libsbml#BQB_IS_PART_OF BQB_IS_PART_OF@endlink
71364        @li @link libsbml#BQB_IS_VERSION_OF BQB_IS_VERSION_OF@endlink
71365        @li @link libsbml#BQB_HAS_VERSION BQB_HAS_VERSION@endlink
71366        @li @link libsbml#BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO@endlink
71367        @li @link libsbml#BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY@endlink
71368        @li @link libsbml#BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY@endlink
71369        @li @link libsbml#BQB_ENCODES BQB_ENCODES@endlink
71370        @li @link libsbml#BQB_OCCURS_IN BQB_OCCURS_IN@endlink
71371        @li @link libsbml#BQB_HAS_PROPERTY BQB_HAS_PROPERTY@endlink
71372        @li @link libsbml#BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF@endlink
71373        @li @link libsbml#BQB_HAS_TAXON BQB_HAS_TAXON@endlink
71374
71375        Any other BioModels.net qualifier found in the model is considered
71376        unknown by libSBML and reported as
71377        @link libsbml#BQB_UNKNOWN BQB_UNKNOWN@endlink.
71378
71379        @return the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~
71380        of this object or @link libsbml#BQB_UNKNOWN BQB_UNKNOWN@endlink
71381        (the default).
71382
71383        """
71384        return _libsbml.CVTerm_getBiologicalQualifierType(self, *args)
71385
71386    def getResources(self, *args):
71387        r"""
71388        getResources(CVTerm self) -> XMLAttributes
71389        getResources(CVTerm self) -> XMLAttributes
71390
71391        Returns the resource references for this CVTerm object.
71392
71393        @par
71394        The RDF element used in the SBML format for referring to external entities
71395        is <code>&lt;rdf:Description&gt;</code>, with a
71396        <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
71397        <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
71398        the structure:
71399        <pre class='fragment'>
71400        &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
71401        &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
71402        &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71403        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
71404        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
71405        &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71406        &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
71407        &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71408        &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71409        &lt;/rdf:Description&gt;
71410        </pre>
71411        In the template above, the placeholder <span class='code'
71412        style='border-bottom: 1px solid black'>meta id</span> stands for the
71413        element's meta identifier, which is a field available on all SBML
71414        components derived from the SBase base object class.  The <span
71415        style='border-bottom: 2px dotted #888'>dotted</span> portions are
71416        optional, and the ellipses <span class='code' style='background-color:
71417        #edd'>...</span> are placeholders for zero or more elements of the same
71418        form as the immediately preceding element.
71419
71420        The <span class='code' style='background-color: #d0d0ee'>resource
71421        URI</span> values shown in the template above are stored internally in
71422        CVTerm objects using an XMLAttributes object.  Each attribute stored
71423        inside the XMLAttributes will have the same name (specifically,
71424        &quot;<code>rdf:resource</code>&quot;) but a different value, and the
71425        value will be a <span class='code' style='background-color: #d0d0ee'>
71426        resource URI</span> shown in the XML template above.
71427
71428        A valid CVTerm entity must always have at least one resource and
71429        a value for the relationship qualifier.
71430
71431        @return the XMLAttributes that store the resources of this CVTerm.
71432
71433        @see getQualifierType()
71434        @see addResource()
71435        @see getResourceURI()
71436
71437        """
71438        return _libsbml.CVTerm_getResources(self, *args)
71439
71440    def getNumResources(self, *args):
71441        r"""
71442        getNumResources(CVTerm self) -> unsigned int
71443        getNumResources(CVTerm self) -> unsigned int
71444
71445        Returns the number of resources for this CVTerm object.
71446
71447        @par
71448        The RDF element used in the SBML format for referring to external entities
71449        is <code>&lt;rdf:Description&gt;</code>, with a
71450        <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
71451        <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
71452        the structure:
71453        <pre class='fragment'>
71454        &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
71455        &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
71456        &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71457        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
71458        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
71459        &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71460        &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
71461        &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71462        &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71463        &lt;/rdf:Description&gt;
71464        </pre>
71465        In the template above, the placeholder <span class='code'
71466        style='border-bottom: 1px solid black'>meta id</span> stands for the
71467        element's meta identifier, which is a field available on all SBML
71468        components derived from the SBase base object class.  The <span
71469        style='border-bottom: 2px dotted #888'>dotted</span> portions are
71470        optional, and the ellipses <span class='code' style='background-color:
71471        #edd'>...</span> are placeholders for zero or more elements of the same
71472        form as the immediately preceding element.
71473
71474        The fragment above illustrates that there can be more than one
71475        resource referenced by a given relationship annotation (i.e., the
71476        <span class='code' style='background-color: #d0d0ee'>resource
71477        URI</span> values associated with a particular <span class='code'
71478        style='background-color: #bbb'>RELATION_ELEMENT</span>).  The present
71479        method returns a count of the resources stored in this CVTerm object.
71480
71481        @return the number of resources in the set of XMLAttributes
71482        of this CVTerm.
71483
71484        @see getResources()
71485        @see getResourceURI()
71486
71487        """
71488        return _libsbml.CVTerm_getNumResources(self, *args)
71489
71490    def getResourceURI(self, *args):
71491        r"""
71492        getResourceURI(CVTerm self, unsigned int n) -> string
71493        getResourceURI(CVTerm self, unsigned int n) -> string
71494
71495        Returns the value of the <em>n</em>th resource for this CVTerm object.
71496
71497        @par
71498        The RDF element used in the SBML format for referring to external entities
71499        is <code>&lt;rdf:Description&gt;</code>, with a
71500        <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
71501        <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
71502        the structure:
71503        <pre class='fragment'>
71504        &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
71505        &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
71506        &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71507        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
71508        &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
71509        &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71510        &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
71511        &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71512        &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
71513        &lt;/rdf:Description&gt;
71514        </pre>
71515        In the template above, the placeholder <span class='code'
71516        style='border-bottom: 1px solid black'>meta id</span> stands for the
71517        element's meta identifier, which is a field available on all SBML
71518        components derived from the SBase base object class.  The <span
71519        style='border-bottom: 2px dotted #888'>dotted</span> portions are
71520        optional, and the ellipses <span class='code' style='background-color:
71521        #edd'>...</span> are placeholders for zero or more elements of the same
71522        form as the immediately preceding element.
71523
71524        The fragment above illustrates that there can be more than one resource
71525        referenced by a given relationship annotation (i.e., the <span
71526        class='code' style='background-color: #d0d0ee'>resource URI</span>
71527        values associated with a particular <span class='code'
71528        style='background-color: #bbb'>RELATION_ELEMENT</span>).  LibSBML stores
71529        all resource URIs in a single CVTerm object for a given relationship.
71530        Callers can use CVTerm.getNumResources() to find out how many resources
71531        are stored in this CVTerm object, then call this method to retrieve the
71532        <em>n</em>th resource URI.
71533
71534        @param n the index of the resource to query.
71535
71536        @return string representing the value of the nth resource
71537        in the set of XMLAttributes of this CVTerm.
71538
71539        @see getNumResources()
71540        @see getQualifierType()
71541
71542        """
71543        return _libsbml.CVTerm_getResourceURI(self, *args)
71544
71545    def setQualifierType(self, type):
71546        r"""
71547        setQualifierType(CVTerm self, QualifierType_t type) -> int
71548
71549        Sets the @if clike #QualifierType_t@else qualifier code@endif@~ of this
71550        CVTerm object.
71551
71552        @param type the @if clike #QualifierType_t value@else qualifier type@endif.
71553
71554        @return integer value indicating success/failure of the
71555        function.  @if clike The value is drawn from the
71556        enumeration #OperationReturnValues_t. @endif@~ This particular
71557        function only does one thing irrespective of user input or
71558        object state, and thus will only return a single value:
71559        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71560
71561        @see getQualifierType()
71562
71563        """
71564        return _libsbml.CVTerm_setQualifierType(self, type)
71565
71566    def setModelQualifierType(self, *args):
71567        r"""
71568        setModelQualifierType(CVTerm self, ModelQualifierType_t type) -> int
71569        setModelQualifierType(CVTerm self, string qualifier) -> int
71570
71571        This method has multiple variants; they differ in the arguments
71572         they accept.  Each variant is described separately below.
71573
71574        @par
71575        <hr>
71576        <span class='variant-sig-heading'>Method variant with the following signature</span>:
71577         <pre class='signature'>setModelQualifierType(string qualifier)</pre>
71578
71579        Sets the @if clike #ModelQualifierType_t@else model qualifier
71580        type@endif@~ value of this CVTerm object.
71581
71582        @param qualifier the string representing a model qualifier.
71583
71584        @return integer value indicating success/failure of the
71585        function.  @if clike The value is drawn from the
71586        enumeration #OperationReturnValues_t. @endif@~ The possible values
71587        returned by this function are:
71588        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71589        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
71590
71591        @note If the Qualifier Type of this object is not
71592        @link libsbml#MODEL_QUALIFIER MODEL_QUALIFIER@endlink,
71593        then the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~
71594        will default to @link libsbml#BQM_UNKNOWN BQM_UNKNOWN@endlink.
71595
71596        @see getQualifierType()
71597        @see setQualifierType()
71598
71599
71600        @par
71601        <hr>
71602        <span class='variant-sig-heading'>Method variant with the following signature</span>:
71603         <pre class='signature'>setModelQualifierType(ModelQualifierType_t type)</pre>
71604
71605        Sets the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~
71606        of this CVTerm object.
71607
71608        @param type the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~.
71609
71610        @return integer value indicating success/failure of the
71611        function.  @if clike The value is drawn from the
71612        enumeration #OperationReturnValues_t. @endif@~ The possible values
71613        returned by this function are:
71614        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71615        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
71616
71617        @note If the @if clike #QualifierType_t value@else qualifier type@endif@~ of this object is not
71618        @link libsbml#MODEL_QUALIFIER MODEL_QUALIFIER@endlink, then the
71619        then the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~
71620        will default to @link libsbml#BQM_UNKNOWN BQM_UNKNOWN@endlink.
71621
71622        @see getQualifierType()
71623        @see setQualifierType()
71624
71625        """
71626        return _libsbml.CVTerm_setModelQualifierType(self, *args)
71627
71628    def setBiologicalQualifierType(self, *args):
71629        r"""
71630        setBiologicalQualifierType(CVTerm self, BiolQualifierType_t type) -> int
71631        setBiologicalQualifierType(CVTerm self, string qualifier) -> int
71632
71633        This method has multiple variants; they differ in the arguments
71634         they accept.  Each variant is described separately below.
71635
71636        @par
71637        <hr>
71638        <span class='variant-sig-heading'>Method variant with the following signature</span>:
71639         <pre class='signature'>setBiologicalQualifierType(string qualifier)</pre>
71640
71641        Sets the @if clike #BiolQualifierType_t@else biology qualifier
71642        type code@endif@~ of this CVTerm object.
71643
71644        @param qualifier the string representing a biology qualifier.
71645
71646        @return integer value indicating success/failure of the
71647        function.  @if clike The value is drawn from the
71648        enumeration #OperationReturnValues_t. @endif@~ The possible values
71649        returned by this function are:
71650        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71651        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
71652
71653        @note If the Qualifier Type of this object is not
71654        @link libsbml#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink,
71655        then the @if clike #BiolQualifierType_t@else biology qualifier type code@endif@~
71656        will default to @link libsbml#BQB_UNKNOWN BQB_UNKNOWN@endlink.
71657
71658        @see getQualifierType()
71659        @see setQualifierType()
71660
71661
71662        @par
71663        <hr>
71664        <span class='variant-sig-heading'>Method variant with the following signature</span>:
71665         <pre class='signature'>setBiologicalQualifierType(BiolQualifierType_t type)</pre>
71666
71667        Sets the @if clike #BiolQualifierType_t value@else biology qualifier
71668        type@endif@~ of this CVTerm object.
71669
71670        @param type the @if clike #BiolQualifierType_t value@else biology
71671        qualifier type@endif.
71672
71673        @return integer value indicating success/failure of the
71674        function.  @if clike The value is drawn from the
71675        enumeration #OperationReturnValues_t. @endif@~ The possible values
71676        returned by this function are:
71677        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71678        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
71679
71680        @note If the Qualifier Type of this object is not
71681        @link libsbml#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink,
71682        then the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~
71683        will default to @link libsbml#BQB_UNKNOWN BQB_UNKNOWN@endlink.
71684
71685        @see getQualifierType()
71686        @see setQualifierType()
71687
71688        """
71689        return _libsbml.CVTerm_setBiologicalQualifierType(self, *args)
71690
71691    def addResource(self, resource):
71692        r"""
71693        addResource(CVTerm self, string resource) -> int
71694
71695        Adds a resource reference to this CVTerm object.
71696
71697        @par
71698        The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
71699        format for annotating models when (a) referring to controlled
71700        vocabulary terms and database identifiers that define and describe
71701        biological and other entities, and (b) describing the creator of a
71702        model and the model's modification history.  The annotation content is
71703        stored in <code>&lt;annotation&gt;</code> elements attached to
71704        individual SBML elements.  The format for storing the content inside
71705        SBML <code>&lt;annotation&gt;</code> elements is a subset of W3C RDF
71706        (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description
71707        Format</a>) expressed in XML.  The CVTerm class provides a programming
71708        interface for working directly with controlled vocabulary term ('CV
71709        term') objects without having to deal directly with the XML form.
71710        When libSBML reads in an SBML model containing RDF annotations, it
71711        parses those annotations into a list of CVTerm objects, and when
71712        writing a model, it parses the CVTerm objects back into the
71713        appropriate SBML <code>&lt;annotation&gt;</code> structure.
71714
71715        The specific RDF element used in this SBML format for referring to
71716        external entities is <code>&lt;rdf:Description&gt;</code>, with a
71717        <code>&lt;rdf:Bag&gt;</code> element containing one or more
71718        <code>&lt;rdf:li&gt;</code> elements.  Each such element refers to a
71719        data item in an external resource; the resource and data item are
71720        together identified uniquely using a URI.  The following template
71721        illustrates the structure:
71722
71723           <pre class='fragment'>
71724           &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
71725             <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
71726             &lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71727               &lt;rdf:Bag&gt;
71728                 &lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
71729                 <span style='background-color: #edd'>...</span>
71730               &lt;/rdf:Bag&gt;
71731             &lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
71732             <span style='background-color: #edd'>...</span>
71733           &lt;/rdf:Description&gt;
71734           </pre>
71735
71736        In the template above, the placeholder <span class='code'
71737        style='border-bottom: 1px solid black'>meta id</span> stands for the
71738        element's meta identifier, which is a field available on all SBML
71739        components derived from the SBase base object class.  The <span
71740        style='border-bottom: 2px dotted #888'>dotted</span> portions are
71741        optional, and the ellipses <span class='code'
71742        style='background-color: #edd'>...</span> are placeholders for zero or
71743        more elements of the same form as the immediately preceding element.
71744        The placeholder <span class='code' style='background-color: #bbb'>
71745        RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
71746        name.  This is an element in either the XML namespace
71747        <code>'http://biomodels.net/model-qualifiers'</code> (for model
71748        qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
71749        (for biological qualifier).
71750
71751        The <span class='code' style='background-color: #d0d0ee'>resource
71752        URI</span> is a required data value that uniquely identifies a
71753        resource and data within that resource to which the annotation refers.
71754        The present method allows callers to add a reference to a resource URI
71755        with the same relationship to the enclosing SBML object.  (In other
71756        words, the argument to this method is a <span class='code'
71757        style='background-color: #d0d0ee'>resource URI</span> as shown in the
71758        XML fragment above.)  Resources are stored in this CVTerm object
71759        within an XMLAttributes object.
71760
71761        The relationship of this CVTerm to the enclosing SBML object can be
71762        determined using the CVTerm methods such as
71763        CVTerm.getModelQualifierType() and CVTerm.getBiologicalQualifierType().
71764
71765        @param resource a string representing the URI of the resource and data
71766        item being referenced; e.g.,
71767        <code>'http://www.geneontology.org/#GO:0005892'</code>.
71768
71769        @return integer value indicating success/failure of the
71770        function.  @if clike The value is drawn from the
71771        enumeration #OperationReturnValues_t. @endif@~ The possible values
71772        returned by this function are:
71773        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71774        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
71775
71776        @see getResources()
71777        @see removeResource()
71778        @see getQualifierType()
71779        @see getModelQualifierType()
71780        @see getBiologicalQualifierType()
71781
71782        """
71783        return _libsbml.CVTerm_addResource(self, resource)
71784
71785    def removeResource(self, resource):
71786        r"""
71787        removeResource(CVTerm self, string resource) -> int
71788
71789        Removes a resource URI from the set of resources stored in this CVTerm
71790        object.
71791
71792        @param resource a string representing the resource URI to remove;
71793        e.g., <code>'http://www.geneontology.org/#GO:0005892'</code>.
71794
71795        @return integer value indicating success/failure of the
71796        function.  @if clike The value is drawn from the
71797        enumeration #OperationReturnValues_t. @endif@~ The possible values
71798        returned by this function are:
71799        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71800        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
71801        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
71802
71803        @see addResource()
71804
71805        """
71806        return _libsbml.CVTerm_removeResource(self, resource)
71807
71808    def hasBeenModified(self):
71809        r"""
71810        hasBeenModified(CVTerm self) -> bool
71811
71812        @internal
71813
71814        @internal
71815
71816        """
71817        return _libsbml.CVTerm_hasBeenModified(self)
71818
71819    def resetModifiedFlags(self):
71820        r"""
71821        resetModifiedFlags(CVTerm self)
71822
71823        @internal
71824
71825        @internal
71826
71827        """
71828        return _libsbml.CVTerm_resetModifiedFlags(self)
71829
71830    def hasRequiredAttributes(self, *args):
71831        r"""
71832        hasRequiredAttributes(CVTerm self) -> bool
71833        hasRequiredAttributes(CVTerm self) -> bool
71834
71835        Predicate returning @c True if all the required elements for this
71836        CVTerm object have been set.
71837
71838        @note The required attributes for a CVTerm are:
71839        @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier
71840        @li at least one resource
71841
71842        """
71843        return _libsbml.CVTerm_hasRequiredAttributes(self, *args)
71844
71845    def getNumNestedCVTerms(self):
71846        r"""
71847        getNumNestedCVTerms(CVTerm self) -> unsigned int
71848
71849        Returns the number of CVTerm objects nested within this CVTerm
71850        object.
71851
71852        @return the number of CVTerms nested within this CVTerm object.
71853
71854        @note this does not recurse through potentially nested CVTerm objects
71855        within a given nested CVTerm. It returns the number of terms immediately
71856        nested within this CVTerm.
71857
71858        """
71859        return _libsbml.CVTerm_getNumNestedCVTerms(self)
71860
71861    def getNestedCVTerm(self, *args):
71862        r"""
71863        getNestedCVTerm(CVTerm self, unsigned int n) -> CVTerm
71864        getNestedCVTerm(CVTerm self, unsigned int n) -> CVTerm
71865
71866        Returns the nth CVTerm in the list of CVTerms of this CVTerm
71867        object.
71868
71869        @param n long the index of the CVTerm to retrieve.
71870
71871        @return the nth CVTerm in the list of CVTerms for this CVTerm object
71872        or @c None if no such object exists.
71873
71874        """
71875        return _libsbml.CVTerm_getNestedCVTerm(self, *args)
71876
71877    def getListNestedCVTerms(self, *args):
71878        r"""
71879        getListNestedCVTerms(CVTerm self) -> List
71880        getListNestedCVTerms(CVTerm self) -> List const *
71881
71882        Returns a list of CVTerm objects contained within this CVTerm
71883        object.
71884
71885        @return the list of CVTerms for this CVTerm object.
71886
71887        """
71888        return _libsbml.CVTerm_getListNestedCVTerms(self, *args)
71889
71890    def addNestedCVTerm(self, term):
71891        r"""
71892        addNestedCVTerm(CVTerm self, CVTerm term) -> int
71893
71894        Adds a copy of the given CVTerm object to the list of nested CVTerm
71895        objects within this CVTerm object.
71896
71897        @param term the CVTerm to assign.
71898
71899        @return integer value indicating success/failure of the
71900        function.  @if clike The value is drawn from the
71901        enumeration #OperationReturnValues_t. @endif@~ The possible values
71902        returned by this function are:
71903        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
71904        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
71905        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
71906
71907        """
71908        return _libsbml.CVTerm_addNestedCVTerm(self, term)
71909
71910    def removeNestedCVTerm(self, n):
71911        r"""
71912        removeNestedCVTerm(CVTerm self, unsigned int n) -> CVTerm
71913
71914        Removes the nth CVTerm in the list of CVTerms of this CVTerm
71915        object and returns a pointer to it.
71916
71917        @param n long the index of the CVTerm to retrieve.
71918
71919        @return a pointer to the nth CVTerm in the list of CVTerms for this
71920        CVTerm object.
71921
71922        """
71923        return _libsbml.CVTerm_removeNestedCVTerm(self, n)
71924
71925    __metaclass__ = AutoProperty
71926
71927
71928    def __eq__(self, rhs):
71929      if ((self is None) and (rhs is None)): return True
71930      if ((self is None) or  (rhs is None)): return False
71931      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
71932        if (self.this == rhs.this): return True
71933      return False
71934
71935    def __ne__(self, rhs):
71936      if ((self is None) and (rhs is None)): return False
71937      if ((self is None) or  (rhs is None)): return True
71938      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
71939        if (self.this == rhs.this): return False
71940      return True
71941
71942
71943# Register CVTerm in _libsbml:
71944_libsbml.CVTerm_swigregister(CVTerm)
71945
71946
71947def ModelQualifierType_toString(type):
71948    r"""
71949    ModelQualifierType_toString(ModelQualifierType_t type) -> char const *
71950
71951    This method takes a model qualifier type code and returns a string
71952    representing the code.
71953
71954    This method takes a model qualifier type as argument
71955    and returns a string name corresponding to that code.  For example,
71956    passing it the qualifier @link libsbml#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink will return
71957    the string <code>'isDescribedBy'</code>.
71958
71959    @param type the @if clike ModelQualifierType_t@endif@~ value to
71960    translate. @ifnot clike The value should be a libSBML constant whose
71961    name begins with @c BQM_, such as (for example)
71962    @link libsbml#BQM_IS BQM_IS@endlink.@endif@~
71963
71964    @return a human readable qualifier name for the given qualifier type.
71965
71966    @note The caller does not own the returned string and is therefore not
71967    allowed to modify it.
71968
71969    @if conly
71970    @memberof CVTerm_t
71971    @endif
71972
71973    """
71974    return _libsbml.ModelQualifierType_toString(type)
71975
71976def BiolQualifierType_toString(type):
71977    r"""
71978    BiolQualifierType_toString(BiolQualifierType_t type) -> char const *
71979
71980    This method takes a biol qualifier type code and returns a string
71981    representing the code.
71982
71983    This method takes a biol qualifier type as argument
71984    and returns a string name corresponding to that code.  For example,
71985    passing it the qualifier @link libsbml#BQB_HAS_VERSION BQB_HAS_VERSION@endlink will return
71986    the string <code>'hasVersion'</code>.
71987
71988    @param type the @if clike #BiolQualifierType_t@endif@~ value to
71989    translate. @ifnot clike The value should be a constant whose name
71990    begins with @c BQB_, such as (for example)
71991    @link libsbml#BQB_IS BQB_IS@endlink.@endif@~
71992
71993    @return a human readable qualifier name for the given type.
71994
71995    @note The caller does not own the returned string and is therefore not
71996    allowed to modify it.
71997
71998    @if conly
71999    @memberof CVTerm_t
72000    @endif
72001
72002    """
72003    return _libsbml.BiolQualifierType_toString(type)
72004
72005def ModelQualifierType_fromString(s):
72006    r"""
72007    ModelQualifierType_fromString(char const * s) -> ModelQualifierType_t
72008
72009    This method takes a string and returns a model qualifier
72010    representing the string.
72011
72012    This method takes a string as argument and returns a model qualifier type
72013    corresponding to that string.  For example, passing it the string
72014    <code>'isDescribedBy'</code> will return the qualifier
72015    @link libsbml#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink.
72016
72017    @param s the string to translate to a @if clike #ModelQualifierType_t
72018    value@else libSBML constant value representing a model qualifier@endif.
72019
72020    @return a libSBML qualifier enumeration value for the given human readable
72021    qualifier name.
72022
72023    @if conly
72024    @memberof CVTerm_t
72025    @endif
72026
72027    """
72028    return _libsbml.ModelQualifierType_fromString(s)
72029
72030def BiolQualifierType_fromString(s):
72031    r"""
72032    BiolQualifierType_fromString(char const * s) -> BiolQualifierType_t
72033
72034    This method takes a string and returns a biol qualifier
72035    representing the string.
72036
72037    This method takes a string as argument and returns a biol qualifier type
72038    corresponding to that string.  For example, passing it the string
72039    <code>'hasVersion'</code> will return the qualifier
72040    @link libsbml#BQB_HAS_VERSION BQB_HAS_VERSION@endlink.
72041
72042    @param s the string to translate to a @if clike #BiolQualifierType_t
72043    value@else libSBML constant value representing a biological qualifier@endif.
72044
72045    @return a libSBML qualifier enumeration value for the given human readable
72046    qualifier name.
72047
72048    @if conly
72049    @memberof CVTerm_t
72050    @endif
72051
72052    """
72053    return _libsbml.BiolQualifierType_fromString(s)
72054class Date(object):
72055    r"""
72056
72057    @sbmlpackage{core}
72058
72059    @htmlinclude pkg-marker-core.html A MIRIAM-compliant date representation.
72060
72061    @htmlinclude not-sbml-warning.html
72062
72063    A Date object stores a reasonably complete representation of date and
72064    time.  Its purpose is to serve as a way to store dates to be read and
72065    written in the <a target='_blank'
72066    href='http://www.w3.org/TR/NOTE-datetime'>W3C date format</a> used in
72067    RDF Dublin Core annotations within SBML.  The W3C date format is a
72068    restricted form of <a target='_blank'
72069    href='http://en.wikipedia.org/wiki/ISO_8601'>ISO 8601</a>, the
72070    international standard for the representation of dates and times.  A
72071    time and date value in this W3C format takes the form
72072    YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., <code>1997-07-16T19:20:30+01:00</code>)
72073    where XHH:ZZ is the time zone offset.  The libSBML Date object contains
72074    the following fields to represent these values:
72075
72076    @li @em year: a long integer representing the year.  This should be a
72077    four-digit number such as @c 2011.
72078
72079    @li @em month: a long integer representing the month, with a range of
72080    values of 1&ndash;12.  The value @c 1 represents January, and so on.
72081
72082    @li @em day: a long integer representing the day of the month, with a
72083    range of values of 1&ndash;31.
72084
72085    @li @em hour: a long integer representing the hour on a 24-hour clock,
72086    with a range of values of 0&ndash;23.
72087
72088    @li @em minute: a long integer representing the minute, with a range
72089    of 0&ndash;59.
72090
72091    @li @em second: a long integer representing the second, with a range
72092    of 0&ndash;59.
72093
72094    @li @em sign: a long integer representing the sign of the offset (@c 0
72095    signifying @c + and @c 1 signifying @c -).  See the paragraph below for
72096    further explanations.
72097
72098    @li @em hours @em offset: a long integer representing the time zone's hour
72099    offset from GMT, with a range of 0&ndash;12.
72100
72101    @li @em minute @em offset: a long integer representing the time zone's
72102    minute offset from GMT, with a range of 0&ndash;59.
72103
72104    To illustrate the time zone offset, a value of <code>-05:00</code> would
72105    correspond to USA Eastern Standard Time.  In the Date object, this would
72106    require a value of @c 1 for the sign field, @c 5 for the hour offset and
72107    @c 0 for the minutes offset.
72108
72109    In the restricted RDF annotations used in SBML, described in
72110    Section&nbsp;6 of the SBML Level&nbsp;2 and Level&nbsp;3 specification
72111    documents, date/time stamps can be used to indicate the time of
72112    creation and modification of a model.  The following SBML model fragment
72113    illustrates this:
72114    @verbatim
72115    <model metaid='_180340' id='GMO' name='Goldbeter1991_MinMitOscil'>
72116        <annotation>
72117            <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
72118                     xmlns:dc='http://purl.org/dc/elements/1.1/'
72119                     xmlns:dcterms='http://purl.org/dc/terms/'
72120                     xmlns:vCard='http://www.w3.org/2001/vcard-rdf/3.0#' >
72121                <rdf:Description rdf:about='#_180340'>
72122                    <dc:creator>
72123                        <rdf:Bag>
72124                            <rdf:li rdf:parseType='Resource'>
72125                                <vCard:N rdf:parseType='Resource'>
72126                                    <vCard:Family>Shapiro</vCard:Family>
72127                                    <vCard:Given>Bruce</vCard:Given>
72128                                </vCard:N>
72129                                <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL>
72130                                <vCard:ORG rdf:parseType='Resource'>
72131                                    <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname>
72132                                </vCard:ORG>
72133                            </rdf:li>
72134                        </rdf:Bag>
72135                    </dc:creator>
72136                    <dcterms:created rdf:parseType='Resource'>
72137                        <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF>
72138                    </dcterms:created>
72139                    <dcterms:modified rdf:parseType='Resource'>
72140                        <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF>
72141                    </dcterms:modified>
72142                </rdf:Description>
72143            </rdf:RDF>
72144        </annotation>
72145    </model>
72146    @endverbatim
72147
72148    """
72149
72150    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
72151    __repr__ = _swig_repr
72152    __swig_destroy__ = _libsbml.delete_Date
72153
72154    def __init__(self, *args):
72155        r"""
72156        __init__(Date self, unsigned int year=2000, unsigned int month=1, unsigned int day=1, unsigned int hour=0, unsigned int minute=0, unsigned int second=0, unsigned int sign=0, unsigned int hoursOffset=0, unsigned int minutesOffset=0) -> Date
72157        __init__(Date self, string date) -> Date
72158        __init__(Date self, Date orig) -> Date
72159
72160        This method has multiple variants; they differ in the arguments
72161         they accept.  Each variant is described separately below.
72162
72163        @par
72164        <hr>
72165        <span class='variant-sig-heading'>Method variant with the following signature</span>:
72166         <pre class='signature'>Date(string date)</pre>
72167
72168        Creates a Date object from a string expressing a date and time value.
72169
72170        This constructor expects its argument to be in the <a target='_blank'
72171        href='http://www.w3.org/TR/NOTE-datetime'>W3C date format with time
72172        zone offset</a>, used in RDF Dublin Core annotations within SBML.
72173
72174        @par
72175        The date format expresses a date and time value as a string of the form
72176        YYYY-MM-DDThh:mm:ssXHH:ZZ, where
72177
72178        @li @em YYYY is a four-digit integer representing the year.  This
72179        should be a four-digit number such as @c 2011.
72180
72181        @li @em MM is a two-digit integer representing the month, with a range
72182        of values of 01&ndash;12.  The value @c 1 represents January, and so
72183        on.
72184
72185        @li @em DD is a two-digit integer representing the day of the month,
72186        with a range of values of 01&ndash;31.
72187
72188        @li @em T is the literal character @c T.
72189
72190        @li @em hh is a two-digit integer representing the hour on a 24-hour
72191        clock, with a range of values of 00&ndash;23.
72192
72193        @li @em mm is a two-digit integer representing the minute, with a
72194        range of 00&ndash;59.
72195
72196        @li @em ss is a two-digit integer representing the second, with a
72197        range of 0&ndash;59.
72198
72199        @li @em X is the the sign of the time zone offset, either @c + or
72200        <code>-</code>.
72201
72202        @li @em HH is a two-digit integer representing the hour of the time
72203        zone offset, with a range of 00&ndash;23.
72204
72205        @li @em ZZ is a two-digit integer representing the minutes of the time
72206        zone offset, with a range of 00&ndash;59.
72207
72208        In the string format above, it is important not to forget the literal
72209        character @c T in the string.  Here is an example date/time string:
72210        <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16,
72211        1997, at 19:20:30 in Central European Time (which is UTC +1:00).
72212
72213        If this constructor is given a @c None argument or a string of length
72214        zero, it constructs a Date object with the value of January 1, 2000,
72215        at time 00:00 UTC.  Otherwise, the argument @em must be in the
72216        complete format described above, or unpredictable results will happen.
72217
72218        @param date a string representing the date.
72219
72220
72221        @par
72222        <hr>
72223        <span class='variant-sig-heading'>Method variant with the following signature</span>:
72224         <pre class='signature'>Date(long year = 2000, long month = 1, long day = 1, long hour = 0, long minute = 0, long second = 0, long sign = 0, long hoursOffset = 0, long minutesOffset = 0)</pre>
72225
72226        Creates a time and date representation for use in model annotations
72227        and elsewhere.
72228
72229        The following is the complete set of possible arguments to this
72230        constructor, with default values as indicated:
72231
72232        @param year a long integereger representing the year.  This should be
72233        a four-digit number such as @c 2011.  (Default value used if this
72234        argument is not given: @c 2000.)
72235
72236        @param month a long integereger representing the month, with a range
72237        of values of 1&ndash;12.  The value @c 1 represents January, and so
72238        on.  (Default value used if this argument is not given: @c 1.)
72239
72240        @param day a long integereger representing the day of the month, with
72241        a range of values of 1&ndash;31.  (Default value used if this argument
72242        is not given: @c 1.)
72243
72244        @param hour a long integereger representing the hour on a 24-hour
72245        clock, with a range of values of 0&ndash;23.  (Default value used if
72246        this argument is not given: @c 0.)
72247
72248        @param minute a long integereger representing the minute, with a
72249        range of 0&ndash;59.  (Default value used if this argument is not
72250        given: @c 0.)
72251
72252        @param second a long integereger representing the second, with a
72253        range of 0&ndash;59.  (Default value used if this argument is not
72254        given: @c 0.)
72255
72256        @param sign a long integereger representing the sign of the offset
72257        (@c 0 signifying @c + and @c 1 signifying @c -).  See the paragraph
72258        below for further explanations.  (Default value used if this argument
72259        is not given: @c 0.)
72260
72261        @param hoursOffset a long integereger representing the time zone's
72262        hour offset from GMT.  (Default value used if this argument is not
72263        given: @c 0.)
72264
72265        @param minutesOffset a long integereger representing the time zone's
72266        minute offset from GMT.  (Default value used if this argument is not
72267        given: @c 0.)
72268
72269        To illustrate the time zone offset, a value of <code>-05:00</code>
72270        would correspond to USA Eastern Standard Time.  In the Date object,
72271        this would require a value of @c 1 for the sign field, @c 5 for the
72272        hour offset and @c 0 for the minutes offset.
72273
72274        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
72275
72276
72277
72278        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
72279
72280
72281        @par
72282        <hr>
72283        <span class='variant-sig-heading'>Method variant with the following signature</span>:
72284         <pre class='signature'>Date(Date orig)</pre>
72285
72286        Copy constructor; creates a copy of this Date.
72287
72288        @param orig the object to copy.
72289
72290        """
72291        _libsbml.Date_swiginit(self, _libsbml.new_Date(*args))
72292
72293    def clone(self):
72294        r"""
72295        clone(Date self) -> Date
72296
72297        Creates and returns a deep copy of this Date object.
72298
72299        @return the (deep) copy of this Date object.
72300
72301        """
72302        return _libsbml.Date_clone(self)
72303
72304    def getYear(self):
72305        r"""
72306        getYear(Date self) -> unsigned int
72307
72308        Returns the year from this Date.
72309
72310        @return the year from this Date.
72311
72312        """
72313        return _libsbml.Date_getYear(self)
72314
72315    def getMonth(self):
72316        r"""
72317        getMonth(Date self) -> unsigned int
72318
72319        Returns the month from this Date.
72320
72321        @return the month from this Date.
72322
72323        """
72324        return _libsbml.Date_getMonth(self)
72325
72326    def getDay(self):
72327        r"""
72328        getDay(Date self) -> unsigned int
72329
72330        Returns the day from this Date.
72331
72332        @return the day from this Date.
72333
72334        """
72335        return _libsbml.Date_getDay(self)
72336
72337    def getHour(self):
72338        r"""
72339        getHour(Date self) -> unsigned int
72340
72341        Returns the hour from this Date.
72342
72343        @return the hour from this Date.
72344
72345        """
72346        return _libsbml.Date_getHour(self)
72347
72348    def getMinute(self):
72349        r"""
72350        getMinute(Date self) -> unsigned int
72351
72352        Returns the minute from this Date.
72353
72354        @return the minute from this Date.
72355
72356        """
72357        return _libsbml.Date_getMinute(self)
72358
72359    def getSecond(self):
72360        r"""
72361        getSecond(Date self) -> unsigned int
72362
72363        Returns the seconds from this Date.
72364
72365        @return the seconds from this Date.
72366
72367        """
72368        return _libsbml.Date_getSecond(self)
72369
72370    def getSignOffset(self):
72371        r"""
72372        getSignOffset(Date self) -> unsigned int
72373
72374        Returns the sign of the time zone offset from this Date.
72375
72376        @return the sign of the offset from this Date.
72377
72378        """
72379        return _libsbml.Date_getSignOffset(self)
72380
72381    def getHoursOffset(self):
72382        r"""
72383        getHoursOffset(Date self) -> unsigned int
72384
72385        Returns the hours of the time zone offset from this Date.
72386
72387        @return the hours of the offset from this Date.
72388
72389        """
72390        return _libsbml.Date_getHoursOffset(self)
72391
72392    def getMinutesOffset(self):
72393        r"""
72394        getMinutesOffset(Date self) -> unsigned int
72395
72396        Returns the minutes of the time zone offset from this Date.
72397
72398        @return the minutes of the offset from this Date.
72399
72400        """
72401        return _libsbml.Date_getMinutesOffset(self)
72402
72403    def getDateAsString(self):
72404        r"""
72405        getDateAsString(Date self) -> string
72406
72407        Returns the current Date value in text-string form.
72408
72409        The string returned will be in the <a target='_blank'
72410        href='http://www.w3.org/TR/NOTE-datetime'>W3C date format with time
72411        zone offset</a>, used in RDF Dublin Core annotations within SBML.
72412
72413        @par
72414        The date format expresses a date and time value as a string of the form
72415        YYYY-MM-DDThh:mm:ssXHH:ZZ, where
72416
72417        @li @em YYYY is a four-digit integer representing the year.  This
72418        should be a four-digit number such as @c 2011.
72419
72420        @li @em MM is a two-digit integer representing the month, with a range
72421        of values of 01&ndash;12.  The value @c 1 represents January, and so
72422        on.
72423
72424        @li @em DD is a two-digit integer representing the day of the month,
72425        with a range of values of 01&ndash;31.
72426
72427        @li @em T is the literal character @c T.
72428
72429        @li @em hh is a two-digit integer representing the hour on a 24-hour
72430        clock, with a range of values of 00&ndash;23.
72431
72432        @li @em mm is a two-digit integer representing the minute, with a
72433        range of 00&ndash;59.
72434
72435        @li @em ss is a two-digit integer representing the second, with a
72436        range of 0&ndash;59.
72437
72438        @li @em X is the the sign of the time zone offset, either @c + or
72439        <code>-</code>.
72440
72441        @li @em HH is a two-digit integer representing the hour of the time
72442        zone offset, with a range of 00&ndash;23.
72443
72444        @li @em ZZ is a two-digit integer representing the minutes of the time
72445        zone offset, with a range of 00&ndash;59.
72446
72447        In the string format above, it is important not to forget the literal
72448        character @c T in the string.  Here is an example date/time string:
72449        <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16,
72450        1997, at 19:20:30 in Central European Time (which is UTC +1:00).
72451
72452        @return the date as a string.
72453
72454        """
72455        return _libsbml.Date_getDateAsString(self)
72456
72457    def setYear(self, year):
72458        r"""
72459        setYear(Date self, unsigned int year) -> int
72460
72461        Sets the value of the year of this Date object.
72462
72463        The value given as argument must be between 1000 and 9999 inclusive.
72464        (In the millennium during which this libSBML documentation is being
72465        written, a typical value is @c 2011, but we hope that SBML will
72466        continue to be used for a long time.)
72467
72468        @param year a long integer representing the year.
72469
72470        @return integer value indicating success/failure of the
72471        function.  @if clike The value is drawn from the
72472        enumeration #OperationReturnValues_t. @endif@~ The possible values
72473        returned by this function are:
72474        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72475        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72476
72477        """
72478        return _libsbml.Date_setYear(self, year)
72479
72480    def setMonth(self, month):
72481        r"""
72482        setMonth(Date self, unsigned int month) -> int
72483
72484        Sets the value of the month of this Date object.
72485
72486        @param month a long integer representing the month; it must be in the
72487        range 1&ndash;12 or an error will be signaled.
72488
72489        @return integer value indicating success/failure of the
72490        function.  @if clike The value is drawn from the
72491        enumeration #OperationReturnValues_t. @endif@~ The possible values
72492        returned by this function are:
72493        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72494        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72495
72496        """
72497        return _libsbml.Date_setMonth(self, month)
72498
72499    def setDay(self, day):
72500        r"""
72501        setDay(Date self, unsigned int day) -> int
72502
72503        Sets the value of the day of this Date object.
72504
72505        @param day a long integer representing the day; it must be in the
72506        range 0&ndash;31 or an error will be signaled.
72507
72508        @return integer value indicating success/failure of the
72509        function.  @if clike The value is drawn from the
72510        enumeration #OperationReturnValues_t. @endif@~ The possible values
72511        returned by this function are:
72512        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72513        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72514
72515        """
72516        return _libsbml.Date_setDay(self, day)
72517
72518    def setHour(self, hour):
72519        r"""
72520        setHour(Date self, unsigned int hour) -> int
72521
72522        Sets the value of the hour of this Date object.
72523
72524        @param hour a long integer representing the hour to set; it must be
72525        in the range 0&ndash;23 or an error will be signaled.
72526
72527        @return integer value indicating success/failure of the
72528        function.  @if clike The value is drawn from the
72529        enumeration #OperationReturnValues_t. @endif@~ The possible values
72530        returned by this function are:
72531        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72532        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72533
72534        """
72535        return _libsbml.Date_setHour(self, hour)
72536
72537    def setMinute(self, minute):
72538        r"""
72539        setMinute(Date self, unsigned int minute) -> int
72540
72541        Sets the value of the minute of this Date object.
72542
72543        @param minute a long integer representing the minute to set; it must
72544        be in the range 0&ndash;59 or an error will be signaled.
72545
72546        @return integer value indicating success/failure of the
72547        function.  @if clike The value is drawn from the
72548        enumeration #OperationReturnValues_t. @endif@~ The possible values
72549        returned by this function are:
72550        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72551        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72552
72553        """
72554        return _libsbml.Date_setMinute(self, minute)
72555
72556    def setSecond(self, second):
72557        r"""
72558        setSecond(Date self, unsigned int second) -> int
72559
72560        Sets the value of the second of the Date object.
72561
72562        @param second a long integer representing the seconds; it must
72563        be in the range 0&ndash;59 or an error will be signaled.
72564
72565        @return integer value indicating success/failure of the
72566        function.  @if clike The value is drawn from the
72567        enumeration #OperationReturnValues_t. @endif@~ The possible values
72568        returned by this function are:
72569        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72570        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72571
72572        """
72573        return _libsbml.Date_setSecond(self, second)
72574
72575    def setSignOffset(self, sign):
72576        r"""
72577        setSignOffset(Date self, unsigned int sign) -> int
72578
72579        Sets the value of the sign of the time zone offset of this Date object.
72580
72581        The only permissible values are @c 0 and @c 1.
72582
72583        @param sign a long integer representing the sign of the offset, with
72584        @c 0 signifying @c + and @c 1 signifying @c -.
72585
72586        @return integer value indicating success/failure of the
72587        function.  @if clike The value is drawn from the
72588        enumeration #OperationReturnValues_t. @endif@~ The possible values
72589        returned by this function are:
72590        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72591        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72592
72593        """
72594        return _libsbml.Date_setSignOffset(self, sign)
72595
72596    def setHoursOffset(self, hoursOffset):
72597        r"""
72598        setHoursOffset(Date self, unsigned int hoursOffset) -> int
72599
72600        Sets the value of this Date object's time zone hour offset.
72601
72602        @param hoursOffset a long integer representing the hours of the
72603        offset; it must be in the range 0&ndash;12 or an error will be
72604        signaled.
72605
72606        @return integer value indicating success/failure of the
72607        function.  @if clike The value is drawn from the
72608        enumeration #OperationReturnValues_t. @endif@~ The possible values
72609        returned by this function are:
72610        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72611        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72612
72613        """
72614        return _libsbml.Date_setHoursOffset(self, hoursOffset)
72615
72616    def setMinutesOffset(self, minutesOffset):
72617        r"""
72618        setMinutesOffset(Date self, unsigned int minutesOffset) -> int
72619
72620        Sets the value of this Date object's time zone minutes offset.
72621
72622        @param minutesOffset a long integer representing the minutes of the
72623        offset; it must be in the range 0&ndash;59 or an error will be
72624        signaled.
72625
72626        @return integer value indicating success/failure of the
72627        function.  @if clike The value is drawn from the
72628        enumeration #OperationReturnValues_t. @endif@~ The possible values
72629        returned by this function are:
72630        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72631        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72632
72633        """
72634        return _libsbml.Date_setMinutesOffset(self, minutesOffset)
72635
72636    def setDateAsString(self, date):
72637        r"""
72638        setDateAsString(Date self, string date) -> int
72639
72640        Sets the value of this Date object using a date and time value
72641        expressed as a text string.
72642
72643        This method expects its argument to be in the <a target='_blank'
72644        href='http://www.w3.org/TR/NOTE-datetime'>W3C date format with time
72645        zone offset</a>, used in RDF Dublin Core annotations within SBML.
72646
72647        @par
72648        The date format expresses a date and time value as a string of the form
72649        YYYY-MM-DDThh:mm:ssXHH:ZZ, where
72650
72651        @li @em YYYY is a four-digit integer representing the year.  This
72652        should be a four-digit number such as @c 2011.
72653
72654        @li @em MM is a two-digit integer representing the month, with a range
72655        of values of 01&ndash;12.  The value @c 1 represents January, and so
72656        on.
72657
72658        @li @em DD is a two-digit integer representing the day of the month,
72659        with a range of values of 01&ndash;31.
72660
72661        @li @em T is the literal character @c T.
72662
72663        @li @em hh is a two-digit integer representing the hour on a 24-hour
72664        clock, with a range of values of 00&ndash;23.
72665
72666        @li @em mm is a two-digit integer representing the minute, with a
72667        range of 00&ndash;59.
72668
72669        @li @em ss is a two-digit integer representing the second, with a
72670        range of 0&ndash;59.
72671
72672        @li @em X is the the sign of the time zone offset, either @c + or
72673        <code>-</code>.
72674
72675        @li @em HH is a two-digit integer representing the hour of the time
72676        zone offset, with a range of 00&ndash;23.
72677
72678        @li @em ZZ is a two-digit integer representing the minutes of the time
72679        zone offset, with a range of 00&ndash;59.
72680
72681        In the string format above, it is important not to forget the literal
72682        character @c T in the string.  Here is an example date/time string:
72683        <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16,
72684        1997, at 19:20:30 in Central European Time (which is UTC +1:00).
72685
72686        If this method is given a @c None argument or a string of length zero,
72687        it constructs a Date object with the value of January 1, 2000, at time
72688        00:00 UTC.  Otherwise, the argument @em must be in the complete format
72689        described above, or unpredictable results will happen.
72690
72691        @param date a string representing the date.
72692
72693        @return integer value indicating success/failure of the
72694        function.  @if clike The value is drawn from the
72695        enumeration #OperationReturnValues_t. @endif@~ The possible values
72696        returned by this function are:
72697        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
72698        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
72699
72700        """
72701        return _libsbml.Date_setDateAsString(self, date)
72702
72703    def representsValidDate(self):
72704        r"""
72705        representsValidDate(Date self) -> bool
72706
72707        Returns @c True or @c False depending on whether this date object represents
72708        a valid date and time value.
72709
72710        This method verifies that the date/time value stored in this object is
72711        well-formed and represents plausible values.  A time and date value in
72712        the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g.,
72713        <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone
72714        offset.  This method checks such things as whether the value of the
72715        month number is less than or equal to 12, whether the value of the
72716        minutes number is less than or equal to 59, whether a time zone offset
72717        is set, etc.
72718
72719        @return @c True if the date is valid, @c False otherwise.
72720
72721        """
72722        return _libsbml.Date_representsValidDate(self)
72723
72724    def hasBeenModified(self):
72725        r"""
72726        hasBeenModified(Date self) -> bool
72727
72728        @internal
72729
72730        @internal
72731
72732        """
72733        return _libsbml.Date_hasBeenModified(self)
72734
72735    def resetModifiedFlags(self):
72736        r"""
72737        resetModifiedFlags(Date self)
72738
72739        @internal
72740
72741        @internal
72742
72743        """
72744        return _libsbml.Date_resetModifiedFlags(self)
72745
72746    __metaclass__ = AutoProperty
72747
72748
72749    def __eq__(self, rhs):
72750      if ((self is None) and (rhs is None)): return True
72751      if ((self is None) or  (rhs is None)): return False
72752      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
72753        if (self.this == rhs.this): return True
72754      return False
72755
72756    def __ne__(self, rhs):
72757      if ((self is None) and (rhs is None)): return False
72758      if ((self is None) or  (rhs is None)): return True
72759      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
72760        if (self.this == rhs.this): return False
72761      return True
72762
72763
72764# Register Date in _libsbml:
72765_libsbml.Date_swigregister(Date)
72766
72767class ModelCreator(object):
72768    r"""
72769
72770    @sbmlpackage{core}
72771
72772    @htmlinclude pkg-marker-core.html MIRIAM-compliant data about a model's creator.
72773
72774    @htmlinclude not-sbml-warning.html
72775
72776    The SBML specification beginning with Level&nbsp;2 Version&nbsp;2
72777    defines a standard approach to recording model history and model creator
72778    information in a form that complies with MIRIAM ('Minimum Information
72779    Requested in the Annotation of biochemical Models', <i>Nature
72780    Biotechnology</i>, vol. 23, no. 12, Dec. 2005).  For the model creator,
72781    this form involves the use of parts of the <a target='_blank'
72782    href='http://en.wikipedia.org/wiki/VCard'>vCard</a> representation.
72783    LibSBML provides the ModelCreator class as a convenience high-level
72784    interface for working with model creator data.  Objects of class
72785    ModelCreator can be used to store and carry around creator data within a
72786    program, and the various methods in this object class let callers
72787    manipulate the different parts of the model creator representation.
72788
72789    @section parts The different parts of a model creator definition
72790
72791    The ModelCreator class mirrors the structure of the MIRIAM model creator
72792    annotations in SBML.  The following template illustrates these different
72793    fields when they are written in XML form:
72794
72795     <pre class='fragment'>
72796     &lt;vCard:N rdf:parseType='Resource'&gt;
72797       &lt;vCard:Family&gt;<span style='background-color: #bbb'>family name</span>&lt;/vCard:Family&gt;
72798       &lt;vCard:Given&gt;<span style='background-color: #bbb'>given name</span>&lt;/vCard:Given&gt;
72799     &lt;/vCard:N&gt;
72800     ...
72801     &lt;vCard:EMAIL&gt;<span style='background-color: #bbb'>email address</span>&lt;/vCard:EMAIL&gt;
72802     ...
72803     &lt;vCard:ORG rdf:parseType='Resource'&gt;
72804       &lt;vCard:Orgname&gt;<span style='background-color: #bbb'>organization</span>&lt;/vCard:Orgname&gt;
72805     &lt;/vCard:ORG&gt;
72806     </pre>
72807
72808    Each of the separate data values
72809    <span class='code' style='background-color: #bbb'>family name</span>,
72810    <span class='code' style='background-color: #bbb'>given name</span>,
72811    <span class='code' style='background-color: #bbb'>email address</span>, and
72812    <span class='code' style='background-color: #bbb'>organization</span> can
72813    be set and retrieved via corresponding methods in the ModelCreator
72814    class.  These methods are documented in more detail below.
72815
72816    """
72817
72818    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
72819    __repr__ = _swig_repr
72820    __swig_destroy__ = _libsbml.delete_ModelCreator
72821
72822    def __init__(self, *args):
72823        r"""
72824        __init__(ModelCreator self) -> ModelCreator
72825        __init__(ModelCreator self, XMLNode creator) -> ModelCreator
72826        __init__(ModelCreator self, ModelCreator orig) -> ModelCreator
72827
72828        This method has multiple variants; they differ in the arguments
72829         they accept.  Each variant is described separately below.
72830
72831        @par
72832        <hr>
72833        <span class='variant-sig-heading'>Method variant with the following signature</span>:
72834         <pre class='signature'>ModelCreator( XMLNode creator)</pre>
72835
72836        Creates a new ModelCreator from an XMLNode.
72837
72838        @param creator the XMLNode from which to create the ModelCreator.
72839
72840
72841        @par
72842        <hr>
72843        <span class='variant-sig-heading'>Method variant with the following signature</span>:
72844         <pre class='signature'>ModelCreator()</pre>
72845
72846        Creates a new ModelCreator object.
72847
72848
72849        @par
72850        <hr>
72851        <span class='variant-sig-heading'>Method variant with the following signature</span>:
72852         <pre class='signature'>ModelCreator(ModelCreator orig)</pre>
72853
72854        Copy constructor; creates a copy of the ModelCreator.
72855
72856        @param orig the object to copy.
72857
72858        """
72859        _libsbml.ModelCreator_swiginit(self, _libsbml.new_ModelCreator(*args))
72860
72861    def clone(self):
72862        r"""
72863        clone(ModelCreator self) -> ModelCreator
72864
72865        Creates and returns a deep copy of this ModelCreator object.
72866
72867        @return the (deep) copy of this ModelCreator object.
72868
72869        """
72870        return _libsbml.ModelCreator_clone(self)
72871
72872    def getFamilyName(self):
72873        r"""
72874        getFamilyName(ModelCreator self) -> string
72875
72876        Returns the 'family name' stored in this ModelCreator object.
72877
72878        @return the 'family name' portion of the ModelCreator object.
72879
72880        """
72881        return _libsbml.ModelCreator_getFamilyName(self)
72882
72883    def getGivenName(self):
72884        r"""
72885        getGivenName(ModelCreator self) -> string
72886
72887        Returns the 'given name' stored in this ModelCreator object.
72888
72889        @return the 'given name' portion of the ModelCreator object.
72890
72891        """
72892        return _libsbml.ModelCreator_getGivenName(self)
72893
72894    def getEmail(self):
72895        r"""
72896        getEmail(ModelCreator self) -> string
72897
72898        Returns the 'email' stored in this ModelCreator object.
72899
72900        @return email from the ModelCreator.
72901
72902        """
72903        return _libsbml.ModelCreator_getEmail(self)
72904
72905    def getOrganization(self):
72906        r"""
72907        getOrganization(ModelCreator self) -> string
72908
72909        Returns the 'organization' stored in this ModelCreator object.
72910
72911        @return organization from the ModelCreator.
72912
72913        """
72914        return _libsbml.ModelCreator_getOrganization(self)
72915
72916    def getOrganisation(self):
72917        r"""
72918        getOrganisation(ModelCreator self) -> string
72919
72920        (Alternate spelling) Returns the 'organization' stored in this
72921        ModelCreator object.
72922
72923        @note This function is an alias of getOrganization().
72924
72925        @return organization from the ModelCreator.
72926
72927        @see getOrganization()
72928
72929        """
72930        return _libsbml.ModelCreator_getOrganisation(self)
72931
72932    def getName(self):
72933        r"""
72934        getName(ModelCreator self) -> string
72935
72936        Returns the 'fn' stored in this ModelCreator object when using vCard4.
72937
72938        @return the 'fn' portion of the ModelCreator object.
72939
72940        """
72941        return _libsbml.ModelCreator_getName(self)
72942
72943    def isSetFamilyName(self):
72944        r"""
72945        isSetFamilyName(ModelCreator self) -> bool
72946
72947        Predicate returning @c True or @c False depending on whether this
72948        ModelCreator's 'family name' part is set.
72949
72950        @return @c True if the familyName of this ModelCreator is set, @c False otherwise.
72951
72952        """
72953        return _libsbml.ModelCreator_isSetFamilyName(self)
72954
72955    def isSetGivenName(self):
72956        r"""
72957        isSetGivenName(ModelCreator self) -> bool
72958
72959        Predicate returning @c True or @c False depending on whether this
72960        ModelCreator's 'given name' part is set.
72961
72962        @return @c True if the givenName of this ModelCreator is set, @c False otherwise.
72963
72964        """
72965        return _libsbml.ModelCreator_isSetGivenName(self)
72966
72967    def isSetEmail(self):
72968        r"""
72969        isSetEmail(ModelCreator self) -> bool
72970
72971        Predicate returning @c True or @c False depending on whether this
72972        ModelCreator's 'email' part is set.
72973
72974        @return @c True if the email of this ModelCreator is set, @c False otherwise.
72975
72976        """
72977        return _libsbml.ModelCreator_isSetEmail(self)
72978
72979    def isSetOrganization(self):
72980        r"""
72981        isSetOrganization(ModelCreator self) -> bool
72982
72983        Predicate returning @c True or @c False depending on whether this
72984        ModelCreator's 'organization' part is set.
72985
72986        @return @c True if the organization of this ModelCreator is set, @c False otherwise.
72987
72988        """
72989        return _libsbml.ModelCreator_isSetOrganization(self)
72990
72991    def isSetOrganisation(self):
72992        r"""
72993        isSetOrganisation(ModelCreator self) -> bool
72994
72995        (Alternate spelling) Predicate returning @c True or @c False depending
72996        on whether this ModelCreator's 'organization' part is set.
72997
72998        @note This function is an alias of isSetOrganization().
72999
73000        @return @c True if the organization of this ModelCreator is set, @c False otherwise.
73001
73002        @see isSetOrganization()
73003
73004        """
73005        return _libsbml.ModelCreator_isSetOrganisation(self)
73006
73007    def isSetName(self):
73008        r"""
73009        isSetName(ModelCreator self) -> bool
73010
73011        Predicate returning @c True or @c False depending on whether this
73012        ModelCreator's 'fn' part is set (when using vCard4).
73013
73014        @return @c True if the fn of this ModelCreator is set, @c False otherwise.
73015
73016        """
73017        return _libsbml.ModelCreator_isSetName(self)
73018
73019    def setFamilyName(self, familyName):
73020        r"""
73021        setFamilyName(ModelCreator self, string familyName) -> int
73022
73023        Sets the 'family name' portion of this ModelCreator object.
73024
73025        @param familyName a string representing the familyName of the ModelCreator.
73026
73027        @return integer value indicating success/failure of the
73028        function.  @if clike The value is drawn from the
73029        enumeration #OperationReturnValues_t. @endif@~ The possible values
73030        returned by this function are:
73031        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73032        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
73033
73034        """
73035        return _libsbml.ModelCreator_setFamilyName(self, familyName)
73036
73037    def setGivenName(self, givenName):
73038        r"""
73039        setGivenName(ModelCreator self, string givenName) -> int
73040
73041        Sets the 'given name' portion of this ModelCreator object.
73042
73043        @param givenName a string representing the givenName of the ModelCreator.
73044
73045        @return integer value indicating success/failure of the
73046        function.  @if clike The value is drawn from the
73047        enumeration #OperationReturnValues_t. @endif@~ The possible values
73048        returned by this function are:
73049        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73050        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
73051
73052        """
73053        return _libsbml.ModelCreator_setGivenName(self, givenName)
73054
73055    def setEmail(self, email):
73056        r"""
73057        setEmail(ModelCreator self, string email) -> int
73058
73059        Sets the 'email' portion of this ModelCreator object.
73060
73061        @param email a string representing the email of the ModelCreator.
73062
73063        @return integer value indicating success/failure of the
73064        function.  @if clike The value is drawn from the
73065        enumeration #OperationReturnValues_t. @endif@~ The possible values
73066        returned by this function are:
73067        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73068        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
73069
73070        """
73071        return _libsbml.ModelCreator_setEmail(self, email)
73072
73073    def setOrganization(self, organization):
73074        r"""
73075        setOrganization(ModelCreator self, string organization) -> int
73076
73077        Sets the 'organization' portion of this ModelCreator object.
73078
73079        @param organization a string representing the organization of the
73080        ModelCreator.
73081
73082        @return integer value indicating success/failure of the
73083        function.  @if clike The value is drawn from the
73084        enumeration #OperationReturnValues_t. @endif@~ The possible values
73085        returned by this function are:
73086        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73087        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
73088
73089        """
73090        return _libsbml.ModelCreator_setOrganization(self, organization)
73091
73092    def setOrganisation(self, organization):
73093        r"""
73094        setOrganisation(ModelCreator self, string organization) -> int
73095
73096        (Alternate spelling) Sets the 'organization' portion of this
73097        ModelCreator object.
73098
73099        @param organization a string representing the organization of the
73100        ModelCreator.
73101
73102        @note This function is an alias of setOrganization(string organization).
73103
73104        @return integer value indicating success/failure of the
73105        function.  @if clike The value is drawn from the
73106        enumeration #OperationReturnValues_t. @endif@~ The possible values
73107        returned by this function are:
73108        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73109        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
73110
73111        @see setOrganization()
73112
73113        """
73114        return _libsbml.ModelCreator_setOrganisation(self, organization)
73115
73116    def setName(self, name):
73117        r"""
73118        setName(ModelCreator self, string name) -> int
73119
73120        Sets the 'fn' portion of this ModelCreator object (when using vCard4).
73121
73122        @param name a string representing the fn of the ModelCreator.
73123
73124        @return integer value indicating success/failure of the
73125        function.  @if clike The value is drawn from the
73126        enumeration #OperationReturnValues_t. @endif@~ The possible values
73127        returned by this function are:
73128        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73129        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
73130
73131        """
73132        return _libsbml.ModelCreator_setName(self, name)
73133
73134    def unsetFamilyName(self):
73135        r"""
73136        unsetFamilyName(ModelCreator self) -> int
73137
73138        Unsets the 'family name' portion of this ModelCreator object.
73139
73140        @return integer value indicating success/failure of the
73141        function.  @if clike The value is drawn from the
73142        enumeration #OperationReturnValues_t. @endif@~ The possible values
73143        returned by this function are:
73144        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73145        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73146
73147        """
73148        return _libsbml.ModelCreator_unsetFamilyName(self)
73149
73150    def unsetGivenName(self):
73151        r"""
73152        unsetGivenName(ModelCreator self) -> int
73153
73154        Unsets the 'given name' portion of this ModelCreator object.
73155
73156        @return integer value indicating success/failure of the
73157        function.  @if clike The value is drawn from the
73158        enumeration #OperationReturnValues_t. @endif@~ The possible values
73159        returned by this function are:
73160        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73161        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73162
73163        """
73164        return _libsbml.ModelCreator_unsetGivenName(self)
73165
73166    def unsetEmail(self):
73167        r"""
73168        unsetEmail(ModelCreator self) -> int
73169
73170        Unsets the 'email' portion of this ModelCreator object.
73171
73172        @return integer value indicating success/failure of the
73173        function.  @if clike The value is drawn from the
73174        enumeration #OperationReturnValues_t. @endif@~ The possible values
73175        returned by this function are:
73176        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73177        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73178
73179        """
73180        return _libsbml.ModelCreator_unsetEmail(self)
73181
73182    def unsetOrganization(self):
73183        r"""
73184        unsetOrganization(ModelCreator self) -> int
73185
73186        Unsets the 'organization' portion of this ModelCreator object.
73187
73188        @return integer value indicating success/failure of the
73189        function.  @if clike The value is drawn from the
73190        enumeration #OperationReturnValues_t. @endif@~ The possible values
73191        returned by this function are:
73192        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73193        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73194
73195        """
73196        return _libsbml.ModelCreator_unsetOrganization(self)
73197
73198    def unsetOrganisation(self):
73199        r"""
73200        unsetOrganisation(ModelCreator self) -> int
73201
73202        (Alternate spelling) Unsets the 'organization' portion of this ModelCreator object.
73203
73204        @note This function is an alias of unsetOrganization().
73205
73206        @return integer value indicating success/failure of the
73207        function.  @if clike The value is drawn from the
73208        enumeration #OperationReturnValues_t. @endif@~ The possible values
73209        returned by this function are:
73210        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73211        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73212
73213        @see unsetOrganization()
73214
73215        """
73216        return _libsbml.ModelCreator_unsetOrganisation(self)
73217
73218    def unsetName(self):
73219        r"""
73220        unsetName(ModelCreator self) -> int
73221
73222        Unsets the 'fn' portion of this ModelCreator object (when using vCard4).
73223
73224        @return integer value indicating success/failure of the
73225        function.  @if clike The value is drawn from the
73226        enumeration #OperationReturnValues_t. @endif@~ The possible values
73227        returned by this function are:
73228        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73229        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73230
73231        """
73232        return _libsbml.ModelCreator_unsetName(self)
73233
73234    def hasRequiredAttributes(self):
73235        r"""
73236        hasRequiredAttributes(ModelCreator self) -> bool
73237
73238        Predicate returning @c True if all the required elements for this
73239        ModelCreator object have been set.
73240
73241        The only required elements for a ModelCreator object are the 'family
73242        name' and 'given name'.
73243
73244        @return a boolean value indicating whether all the required
73245        elements for this object have been defined.
73246
73247        """
73248        return _libsbml.ModelCreator_hasRequiredAttributes(self)
73249
73250    def hasBeenModified(self):
73251        r"""
73252        hasBeenModified(ModelCreator self) -> bool
73253
73254        @internal
73255
73256        @internal
73257
73258        """
73259        return _libsbml.ModelCreator_hasBeenModified(self)
73260
73261    def resetModifiedFlags(self):
73262        r"""
73263        resetModifiedFlags(ModelCreator self)
73264
73265        @internal
73266
73267        @internal
73268
73269        """
73270        return _libsbml.ModelCreator_resetModifiedFlags(self)
73271
73272    def usingFNVcard4(self):
73273        r"""
73274        usingFNVcard4(ModelCreator self) -> bool
73275
73276        @internal
73277
73278        @internal
73279
73280        """
73281        return _libsbml.ModelCreator_usingFNVcard4(self)
73282
73283    def usingSingleName(self):
73284        r"""
73285        usingSingleName(ModelCreator self) -> bool
73286
73287        @internal
73288
73289        @internal
73290
73291        """
73292        return _libsbml.ModelCreator_usingSingleName(self)
73293
73294    def setUseSingleName(self, flag):
73295        r"""
73296        setUseSingleName(ModelCreator self, bool flag)
73297
73298        @internal
73299
73300        @internal
73301
73302        """
73303        return _libsbml.ModelCreator_setUseSingleName(self, flag)
73304
73305    __metaclass__ = AutoProperty
73306
73307
73308    def __eq__(self, rhs):
73309      if ((self is None) and (rhs is None)): return True
73310      if ((self is None) or  (rhs is None)): return False
73311      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
73312        if (self.this == rhs.this): return True
73313      return False
73314
73315    def __ne__(self, rhs):
73316      if ((self is None) and (rhs is None)): return False
73317      if ((self is None) or  (rhs is None)): return True
73318      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
73319        if (self.this == rhs.this): return False
73320      return True
73321
73322
73323# Register ModelCreator in _libsbml:
73324_libsbml.ModelCreator_swigregister(ModelCreator)
73325
73326class ModelHistory(object):
73327    r"""
73328
73329    @sbmlpackage{core}
73330
73331    @htmlinclude pkg-marker-core.html MIRIAM-compliant data about a model's history.
73332
73333    @htmlinclude not-sbml-warning.html
73334
73335    The SBML specification beginning with Level&nbsp;2 Version&nbsp;2 defines
73336    a standard approach to recording optional model history and model creator
73337    information in a form that complies with MIRIAM (<a target='_blank'
73338    href='http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html'>'Minimum
73339    Information Requested in the Annotation of biochemical Models'</a>,
73340    <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005).  LibSBML
73341    provides the ModelHistory class as a convenient high-level interface for
73342    working with model history data.
73343
73344    Model histories in SBML consist of one or more <em>model creators</em>,
73345    a single date of @em creation, and one or more @em modification dates.
73346    The overall XML form of this data takes the following form:
73347
73348     <pre class='fragment'>
73349     &lt;dc:creator&gt;
73350       &lt;rdf:Bag&gt;
73351         &lt;rdf:li rdf:parseType='Resource'&gt;
73352           <span style='background-color: #d0eed0'>+++</span>
73353           &lt;vCard:N rdf:parseType='Resource'&gt;
73354             &lt;vCard:Family&gt;<span style='background-color: #bbb'>family name</span>&lt;/vCard:Family&gt;
73355             &lt;vCard:Given&gt;<span style='background-color: #bbb'>given name</span>&lt;/vCard:Given&gt;
73356           &lt;/vCard:N&gt;
73357           <span style='background-color: #d0eed0'>+++</span>
73358           <span style='border-bottom: 2px dotted #888'>&lt;vCard:EMAIL&gt;<span style='background-color: #bbb'>email address</span>&lt;/vCard:EMAIL&gt;</span>
73359           <span style='background-color: #d0eed0'>+++</span>
73360           <span style='border-bottom: 2px dotted #888'>&lt;vCard:ORG rdf:parseType='Resource'&gt;</span>
73361            <span style='border-bottom: 2px dotted #888'>&lt;vCard:Orgname&gt;<span style='background-color: #bbb'>organization name</span>&lt;/vCard:Orgname&gt;</span>
73362           <span style='border-bottom: 2px dotted #888'>&lt;/vCard:ORG&gt;</span>
73363           <span style='background-color: #d0eed0'>+++</span>
73364         &lt;/rdf:li&gt;
73365         <span style='background-color: #edd'>...</span>
73366       &lt;/rdf:Bag&gt;
73367     &lt;/dc:creator&gt;
73368     &lt;dcterms:created rdf:parseType='Resource'&gt;
73369       &lt;dcterms:W3CDTF&gt;<span style='background-color: #bbb'>creation date</span>&lt;/dcterms:W3CDTF&gt;
73370     &lt;/dcterms:created&gt;
73371     &lt;dcterms:modified rdf:parseType='Resource'&gt;
73372       &lt;dcterms:W3CDTF&gt;<span style='background-color: #bbb'>modification date</span>&lt;/dcterms:W3CDTF&gt;
73373     &lt;/dcterms:modified&gt;
73374     <span style='background-color: #edd'>...</span>
73375     </pre>
73376
73377    In the template above, the <span style='border-bottom: 2px dotted #888'>underlined</span>
73378    portions are optional, the symbol
73379    <span class='code' style='background-color: #d0eed0'>+++</span> is a placeholder
73380    for either no content or valid XML content that is not defined by
73381    the annotation scheme, and the ellipses
73382    <span class='code' style='background-color: #edd'>...</span>
73383    are placeholders for zero or more elements of the same form as the
73384    immediately preceding element.  The various placeholders for content, namely
73385    <span class='code' style='background-color: #bbb'>family name</span>,
73386    <span class='code' style='background-color: #bbb'>given name</span>,
73387    <span class='code' style='background-color: #bbb'>email address</span>,
73388    <span class='code' style='background-color: #bbb'>organization</span>,
73389    <span class='code' style='background-color: #bbb'>creation date</span>, and
73390    <span class='code' style='background-color: #bbb'>modification date</span>
73391    are data that can be filled in using the various methods on
73392    the ModelHistory class described below.
73393
73394    @see ModelCreator
73395    @see Date
73396
73397    """
73398
73399    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
73400    __repr__ = _swig_repr
73401    __swig_destroy__ = _libsbml.delete_ModelHistory
73402
73403    def __init__(self, *args):
73404        r"""
73405        __init__(ModelHistory self) -> ModelHistory
73406        __init__(ModelHistory self, ModelHistory orig) -> ModelHistory
73407
73408        This method has multiple variants; they differ in the arguments
73409         they accept.  Each variant is described separately below.
73410
73411        @par
73412        <hr>
73413        <span class='variant-sig-heading'>Method variant with the following signature</span>:
73414         <pre class='signature'>ModelHistory(ModelHistory orig)</pre>
73415
73416        Copy constructor; creates a copy of this ModelHistory object.
73417
73418        @param orig the object to copy.
73419
73420
73421        @par
73422        <hr>
73423        <span class='variant-sig-heading'>Method variant with the following signature</span>:
73424         <pre class='signature'>ModelHistory()</pre>
73425
73426        Creates a new ModelHistory object.
73427
73428        """
73429        _libsbml.ModelHistory_swiginit(self, _libsbml.new_ModelHistory(*args))
73430
73431    def clone(self):
73432        r"""
73433        clone(ModelHistory self) -> ModelHistory
73434
73435        Creates and returns a deep copy of this ModelHistory object.
73436
73437        @return the (deep) copy of this ModelHistory object.
73438
73439        """
73440        return _libsbml.ModelHistory_clone(self)
73441
73442    def getCreatedDate(self):
73443        r"""
73444        getCreatedDate(ModelHistory self) -> Date
73445
73446        Returns the 'creation date' portion of this ModelHistory object.
73447
73448        @return a Date object representing the creation date stored in
73449        this ModelHistory object.
73450
73451        """
73452        return _libsbml.ModelHistory_getCreatedDate(self)
73453
73454    def isSetCreatedDate(self):
73455        r"""
73456        isSetCreatedDate(ModelHistory self) -> bool
73457
73458        Predicate returning @c True or @c False depending on whether this
73459        ModelHistory's 'creation date' is set.
73460
73461        @return @c True if the creation date value of this ModelHistory is
73462        set, @c False otherwise.
73463
73464        """
73465        return _libsbml.ModelHistory_isSetCreatedDate(self)
73466
73467    def isSetModifiedDate(self):
73468        r"""
73469        isSetModifiedDate(ModelHistory self) -> bool
73470
73471        Predicate returning @c True or @c False depending on whether this
73472        ModelHistory's 'modified date' is set.
73473
73474        @return @c True if the modification date value of this ModelHistory
73475        object is set, @c False otherwise.
73476
73477        """
73478        return _libsbml.ModelHistory_isSetModifiedDate(self)
73479
73480    def setCreatedDate(self, date):
73481        r"""
73482        setCreatedDate(ModelHistory self, Date date) -> int
73483
73484        Sets the creation date of this ModelHistory object.
73485
73486        @param date a Date object representing the date to which the 'created
73487        date' portion of this ModelHistory should be set.
73488
73489        @return integer value indicating success/failure of the
73490        function.  @if clike The value is drawn from the
73491        enumeration #OperationReturnValues_t. @endif@~ The possible values
73492        returned by this function are:
73493        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73494        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
73495
73496        """
73497        return _libsbml.ModelHistory_setCreatedDate(self, date)
73498
73499    def setModifiedDate(self, date):
73500        r"""
73501        setModifiedDate(ModelHistory self, Date date) -> int
73502
73503        Sets the modification date of this ModelHistory object.
73504
73505        @param date a Date object representing the date to which the 'modified
73506        date' portion of this ModelHistory should be set.
73507
73508        @return integer value indicating success/failure of the
73509        function.  @if clike The value is drawn from the
73510        enumeration #OperationReturnValues_t. @endif@~ The possible values
73511        returned by this function are:
73512        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73513        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73514        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
73515
73516        """
73517        return _libsbml.ModelHistory_setModifiedDate(self, date)
73518
73519    def addModifiedDate(self, date):
73520        r"""
73521        addModifiedDate(ModelHistory self, Date date) -> int
73522
73523        Adds a copy of a Date object to the list of 'modified date' values
73524        stored in this ModelHistory object.
73525
73526        In the MIRIAM format for annotations, there can be multiple
73527        modification dates.  The libSBML ModelHistory class supports this by
73528        storing a list of 'modified date' values.
73529
73530        @param date a Date object representing the 'modified date' that should
73531        be added to this ModelHistory object.
73532
73533        @return integer value indicating success/failure of the
73534        function.  @if clike The value is drawn from the
73535        enumeration #OperationReturnValues_t. @endif@~ The possible values
73536        returned by this function are:
73537        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73538        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73539        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
73540
73541        """
73542        return _libsbml.ModelHistory_addModifiedDate(self, date)
73543
73544    def getListModifiedDates(self):
73545        r"""
73546        getListModifiedDates(ModelHistory self) -> List *
73547
73548        Returns the list of 'modified date' values (as Date objects) stored in
73549        this ModelHistory object.
73550
73551        In the MIRIAM format for annotations, there can be multiple
73552        modification dates.  The libSBML ModelHistory class supports this by
73553        storing a list of 'modified date' values.
73554
73555        @return the list of modification dates for this ModelHistory object.
73556
73557        """
73558        return _libsbml.ModelHistory_getListModifiedDates(self)
73559
73560    def getModifiedDate(self, *args):
73561        r"""
73562        getModifiedDate(ModelHistory self) -> Date
73563        getModifiedDate(ModelHistory self, unsigned int n) -> Date
73564
73565        This method has multiple variants; they differ in the arguments
73566         they accept.  Each variant is described separately below.
73567
73568        @par
73569        <hr>
73570        <span class='variant-sig-heading'>Method variant with the following signature</span>:
73571         <pre class='signature'>getModifiedDate()</pre>
73572
73573        Returns the 'modified date' portion of this ModelHistory object.
73574
73575        Note that in the MIRIAM format for annotations, there can be multiple
73576        modification dates.  The libSBML ModelHistory class supports this by
73577        storing a list of 'modified date' values.  If this ModelHistory object
73578        contains more than one 'modified date' value in the list, this method
73579        will return the first one in the list.
73580
73581        @return a Date object representing the date of modification
73582        stored in this ModelHistory object.
73583
73584
73585        @par
73586        <hr>
73587        <span class='variant-sig-heading'>Method variant with the following signature</span>:
73588         <pre class='signature'>getModifiedDate(long n)</pre>
73589
73590        Get the nth Date object in the list of 'modified date' values stored
73591        in this ModelHistory object.
73592
73593        In the MIRIAM format for annotations, there can be multiple
73594        modification dates.  The libSBML ModelHistory class supports this by
73595        storing a list of 'modified date' values.
73596
73597        @return the nth Date in the list of ModifiedDates of this
73598        ModelHistory or @c None if no such object exists.
73599
73600        """
73601        return _libsbml.ModelHistory_getModifiedDate(self, *args)
73602
73603    def getNumModifiedDates(self):
73604        r"""
73605        getNumModifiedDates(ModelHistory self) -> unsigned int
73606
73607        Get the number of Date objects in this ModelHistory object's list of
73608        'modified dates'.
73609
73610        In the MIRIAM format for annotations, there can be multiple
73611        modification dates.  The libSBML ModelHistory class supports this by
73612        storing a list of 'modified date' values.
73613
73614        @return the number of ModifiedDates in this ModelHistory.
73615
73616        """
73617        return _libsbml.ModelHistory_getNumModifiedDates(self)
73618
73619    def addCreator(self, mc):
73620        r"""
73621        addCreator(ModelHistory self, ModelCreator mc) -> int
73622
73623        Adds a copy of a ModelCreator object to the list of 'model creator'
73624        values stored in this ModelHistory object.
73625
73626        In the MIRIAM format for annotations, there can be multiple model
73627        creators.  The libSBML ModelHistory class supports this by storing a
73628        list of 'model creator' values.
73629
73630        @param mc the ModelCreator to add.
73631
73632        @return integer value indicating success/failure of the
73633        function.  @if clike The value is drawn from the
73634        enumeration #OperationReturnValues_t. @endif@~ The possible values
73635        returned by this function are:
73636        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
73637        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
73638        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
73639
73640        """
73641        return _libsbml.ModelHistory_addCreator(self, mc)
73642
73643    def getListCreators(self):
73644        r"""
73645        getListCreators(ModelHistory self) -> List *
73646
73647        Returns the list of ModelCreator objects stored in this ModelHistory
73648        object.
73649
73650        In the MIRIAM format for annotations, there can be multiple model
73651        creators.  The libSBML ModelHistory class supports this by storing a
73652        list of 'model creator' values.
73653
73654        @return the list of ModelCreator objects.
73655
73656        """
73657        return _libsbml.ModelHistory_getListCreators(self)
73658
73659    def getCreator(self, n):
73660        r"""
73661        getCreator(ModelHistory self, unsigned int n) -> ModelCreator
73662
73663        Get the nth ModelCreator object stored in this ModelHistory object.
73664
73665        In the MIRIAM format for annotations, there can be multiple model
73666        creators.  The libSBML ModelHistory class supports this by storing a
73667        list of 'model creator' values.
73668
73669        @return the nth ModelCreator object or @c None if no such object exists.
73670
73671        """
73672        return _libsbml.ModelHistory_getCreator(self, n)
73673
73674    def getNumCreators(self):
73675        r"""
73676        getNumCreators(ModelHistory self) -> unsigned int
73677
73678        Get the number of ModelCreator objects stored in this ModelHistory
73679        object.
73680
73681        In the MIRIAM format for annotations, there can be multiple model
73682        creators.  The libSBML ModelHistory class supports this by storing a
73683        list of 'model creator' values.
73684
73685        @return the number of ModelCreators objects.
73686
73687        """
73688        return _libsbml.ModelHistory_getNumCreators(self)
73689
73690    def hasRequiredAttributes(self):
73691        r"""
73692        hasRequiredAttributes(ModelHistory self) -> bool
73693
73694        Predicate returning @c True if all the required elements for this
73695        ModelHistory object have been set.
73696
73697        The required elements for a ModelHistory object are 'created
73698        name', 'modified date', and at least one 'model creator'.
73699
73700        @return a boolean value indicating whether all the required
73701        elements for this object have been defined.
73702
73703        """
73704        return _libsbml.ModelHistory_hasRequiredAttributes(self)
73705
73706    def hasBeenModified(self):
73707        r"""
73708        hasBeenModified(ModelHistory self) -> bool
73709
73710        @internal
73711
73712        @internal
73713
73714        """
73715        return _libsbml.ModelHistory_hasBeenModified(self)
73716
73717    def resetModifiedFlags(self):
73718        r"""
73719        resetModifiedFlags(ModelHistory self)
73720
73721        @internal
73722
73723        @internal
73724
73725        """
73726        return _libsbml.ModelHistory_resetModifiedFlags(self)
73727
73728    __metaclass__ = AutoProperty
73729
73730
73731    def __eq__(self, rhs):
73732      if ((self is None) and (rhs is None)): return True
73733      if ((self is None) or  (rhs is None)): return False
73734      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
73735        if (self.this == rhs.this): return True
73736      return False
73737
73738    def __ne__(self, rhs):
73739      if ((self is None) and (rhs is None)): return False
73740      if ((self is None) or  (rhs is None)): return True
73741      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
73742        if (self.this == rhs.this): return False
73743      return True
73744
73745
73746# Register ModelHistory in _libsbml:
73747_libsbml.ModelHistory_swigregister(ModelHistory)
73748
73749class RDFAnnotationParser(object):
73750    r"""
73751
73752    @sbmlpackage{core}
73753
73754    @htmlinclude pkg-marker-core.html MIRIAM-compliant RDF annotation reader/writer.
73755
73756    @htmlinclude not-sbml-warning.html
73757
73758    RDFAnnotationParser is a libSBML construct used as part of the libSBML
73759    support for annotations conforming to the guidelines specified by MIRIAM
73760    (<a target='_blank'
73761    href='http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html'>'Minimum
73762    Information Requested in the Annotation of biochemical Models'</a>,
73763    <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005).  Section 6 of
73764    the SBML Level&nbsp;2 and Level&nbsp;3 specification documents defines a
73765    recommended way of encoding MIRIAM information using a subset of RDF (<a
73766    target='_blank' href='http://www.w3.org/RDF/'>Resource Description
73767    Format</a>).  The general scheme is as follows.  A set of RDF-based
73768    annotations attached to a given SBML <code>&lt;annotation&gt;</code>
73769    element are read by RDFAnnotationParser and converted into a list of
73770    CVTerm objects.  There are different versions of the main method, @if clike RDFAnnotationParser.parseRDFAnnotation() @endif@if java RDFAnnotationParser.parseRDFAnnotation() @endif@~ and
73771    RDFAnnotationParser.parseRDFAnnotation(), used
73772    depending on whether the annotation in question concerns the MIRIAM model
73773    history or other MIRIAM resource annotations.  A special object class,
73774    ModelHistory, is used to make it easier to manipulate model history
73775    annotations.
73776
73777    All of the methods on RDFAnnotationParser are static; the class exists
73778    only to encapsulate the annotation and CVTerm parsing and manipulation
73779    functionality.
73780
73781    """
73782
73783    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
73784    __repr__ = _swig_repr
73785
73786    @staticmethod
73787    def createAnnotation():
73788        r"""
73789        createAnnotation() -> XMLNode
73790
73791        Creates a blank annotation and returns its root XMLNode object.
73792
73793        This creates a completely empty SBML <code>&lt;annotation&gt;</code>
73794        element.  It is not attached to any SBML element.  An example of how
73795        this might be used is illustrated in the following code fragment.  In
73796        this example, suppose that @c content is an XMLNode object previously
73797        created, containing MIRIAM-style annotations, and that @c sbmlObject
73798        is an SBML object derived from SBase (e.g., a Model, or a Species, or
73799        a Compartment, etc.).  Then:@if clike
73800        @code{.cpp}
73801        int success;                              // Status code variable.
73802
73803        XMLNode RDF = createRDFAnnotation();     // Create XML structure.
73804        success = RDF->addChild(...content...);   // Put some content into it.
73805        ...                                       // Check return code value.
73806
73807        XMLNode ann = createAnnotation();        // Create <annotation>.
73808        success = ann->addChild(RDF);             // Put the annotation into it.
73809        ...                                       // Check return code value.
73810
73811        success = sbmlObject->setAnnotation(ann); // Set object's annotation.
73812        ...                                       // Check return code value.
73813        @endcode
73814        @endif@if java
73815        @code{.java}
73816        int success;                                   // Status code variable.
73817
73818        XMLNode RDF = createRDFAnnotation();          // Create XML structure.
73819        success      = RDF.addChild(...content...);    // Put some content into it.
73820        ...                                            // Check return code value.
73821
73822        XMLNode ann = createAnnotation();             // Create <annotation>.
73823        success      = ann.addChild(RDF);              // Put the annotation into it.
73824        ...                                            // Check return code value.
73825
73826        success      = sbmlObject.setAnnotation(ann); // Set object's annotation.
73827        ...                                            // Check return code value.
73828        @endcode
73829        @endif@if python
73830        @code{.py}
73831        RDF     = RDFAnnotationParser.createRDFAnnotation() # Create XML structure.
73832        success = RDF.addChild(...content...)               # Put some content into it.
73833        ...                                                 # Check return code value.
73834
73835        annot   = RDFAnnotationParser.createAnnotation()    # Create <annotation>.
73836        success = annot.addChild(RDF)                       # Put the annotation into it.
73837        ...                                                 # Check return code value.
73838
73839        success = sbmlObject.setAnnotation(annot)           # Set object's annotation.
73840        ...                                                 # Check return code value.
73841        @endcode
73842        @endif@~
73843        The SBML specification contains more information about the format of
73844        annotations.  We urge readers to consult Section&nbsp;6 of the SBML
73845        Level&nbsp;2 (Versions 2&ndash;4) and SBML Level&nbsp;3 specification
73846        documents.
73847
73848        @return a pointer to an XMLNode for the annotation.
73849
73850        @if python @note Because this is a static method on a class, the Python
73851        language interface for libSBML will contain two variants.  One will be the
73852        expected, normal static method on the class (i.e., a regular
73853        <em>methodName</em>), and the other will be a standalone top-level
73854        function with the name <em>ClassName_methodName()</em>. This is merely an
73855        artifact of how the language interfaces are created in libSBML.  The
73856        methods are functionally identical. @endif@~
73857
73858        @see @if clike createRDFAnnotation() @else RDFAnnotationParser.createRDFAnnotation() @endif@~
73859
73860        """
73861        return _libsbml.RDFAnnotationParser_createAnnotation()
73862
73863    @staticmethod
73864    def createRDFAnnotation(level=3, version=1):
73865        r"""
73866        createRDFAnnotation(unsigned int level=3, unsigned int version=1) -> XMLNode
73867
73868        Creates a blank RDF element suitable for use in SBML annotations.
73869
73870        The annotation created by this method has namespace declarations for
73871        all the relevant XML namespaces used in RDF annotations and also has
73872        an empty RDF element.  The result is the following XML:
73873        @verbatim
73874        <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
73875                 xmlns:dc='http://purl.org/dc/elements/1.1/'
73876                 xmlns:dcterms='http://purl.org/dc/terms/'
73877                 xmlns:vCard='http://www.w3.org/2001/vcard-rdf/3.0#'
73878                 xmlns:bqbiol='http://biomodels.net/biology-qualifiers/'
73879                 xmlns:bqmodel='http://biomodels.net/model-qualifiers/' >
73880
73881        </rdf:RDF>
73882        @endverbatim
73883
73884        Note that this does not create the containing SBML
73885        <code>&lt;annotation&gt;</code> element; the method
73886        @if clike createAnnotation()@else RDFAnnotationParser.createAnnotation()@endif@~
73887        is available for creating the container.
73888
73889        @return a pointer to an XMLNode.
73890
73891        @if python @note Because this is a static method on a class, the Python
73892        language interface for libSBML will contain two variants.  One will be the
73893        expected, normal static method on the class (i.e., a regular
73894        <em>methodName</em>), and the other will be a standalone top-level
73895        function with the name <em>ClassName_methodName()</em>. This is merely an
73896        artifact of how the language interfaces are created in libSBML.  The
73897        methods are functionally identical. @endif@~
73898
73899        @see @if clike createAnnotation() @else RDFAnnotationParser.createAnnotation() @endif@~
73900
73901
73902
73903        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
73904
73905        """
73906        return _libsbml.RDFAnnotationParser_createRDFAnnotation(level, version)
73907
73908    @staticmethod
73909    def createCVTerms(obj):
73910        r"""
73911        createCVTerms(SBase obj) -> XMLNode
73912
73913        Takes a list of CVTerm objects and creates a the RDF 'Description'
73914        element.
73915
73916        This essentially takes the given SBML object, reads out the CVTerm
73917        objects attached to it, creates an RDF 'Description' element to hold
73918        the terms, and adds each term with appropriate qualifiers.
73919
73920        @param obj the SBML object to start from.
73921
73922        @return the XMLNode tree corresponding to the Description element of
73923        an RDF annotation.
73924
73925        @if python @note Because this is a static method on a class, the Python
73926        language interface for libSBML will contain two variants.  One will be the
73927        expected, normal static method on the class (i.e., a regular
73928        <em>methodName</em>), and the other will be a standalone top-level
73929        function with the name <em>ClassName_methodName()</em>. This is merely an
73930        artifact of how the language interfaces are created in libSBML.  The
73931        methods are functionally identical. @endif@~
73932
73933        """
73934        return _libsbml.RDFAnnotationParser_createCVTerms(obj)
73935
73936    @staticmethod
73937    def parseCVTerms(obj):
73938        r"""
73939        parseCVTerms(SBase obj) -> XMLNode
73940
73941        Takes a list of CVTerm objects and creates a complete SBML annotation
73942        around it.
73943
73944        This essentially takes the given SBML object, reads out the CVTerm
73945        objects attached to it, calls @if clike createRDFAnnotation()@else
73946        RDFAnnotationParser.createRDFAnnotation()@endif@~ to create an RDF
73947        annotation to hold the terms, and finally calls @if clike
73948        createAnnotation()@else
73949        RDFAnnotationParser.createAnnotation()@endif@~ to wrap the result as
73950        an SBML <code>&lt;annotation&gt;</code> element.
73951
73952        @param obj the SBML object to start from.
73953
73954        @return the XMLNode tree corresponding to the annotation.
73955
73956        @if python @note Because this is a static method on a class, the Python
73957        language interface for libSBML will contain two variants.  One will be the
73958        expected, normal static method on the class (i.e., a regular
73959        <em>methodName</em>), and the other will be a standalone top-level
73960        function with the name <em>ClassName_methodName()</em>. This is merely an
73961        artifact of how the language interfaces are created in libSBML.  The
73962        methods are functionally identical. @endif@~
73963
73964        """
73965        return _libsbml.RDFAnnotationParser_parseCVTerms(obj)
73966
73967    @staticmethod
73968    def parseModelHistory(obj):
73969        r"""
73970        parseModelHistory(SBase obj) -> XMLNode
73971
73972        Reads the model history and cvTerms stored in @p obj and creates the
73973        XML structure for an SBML annotation representing that metadata if
73974        there is a model history stored in @p obj.
73975
73976        @param obj any SBase object.
73977
73978        @return the XMLNode corresponding to an annotation containing
73979        MIRIAM-compliant model history and CV term information in RDF format.
73980
73981        @note If the object does not have a history element stored then
73982        @c None is returned even if CVTerms are present.
73983
73984        @if python @note Because this is a static method on a class, the Python
73985        language interface for libSBML will contain two variants.  One will be the
73986        expected, normal static method on the class (i.e., a regular
73987        <em>methodName</em>), and the other will be a standalone top-level
73988        function with the name <em>ClassName_methodName()</em>. This is merely an
73989        artifact of how the language interfaces are created in libSBML.  The
73990        methods are functionally identical. @endif@~
73991
73992        """
73993        return _libsbml.RDFAnnotationParser_parseModelHistory(obj)
73994
73995    @staticmethod
73996    def parseOnlyModelHistory(obj):
73997        r"""
73998        parseOnlyModelHistory(SBase obj) -> XMLNode
73999
74000        Reads the model history stored in @p obj and creates the
74001        XML structure for an SBML annotation representing that history.
74002
74003        @param obj any SBase object.
74004
74005        @return the XMLNode corresponding to an annotation containing
74006        MIRIAM-compliant model history information in RDF format.
74007
74008        @if python @note Because this is a static method on a class, the Python
74009        language interface for libSBML will contain two variants.  One will be the
74010        expected, normal static method on the class (i.e., a regular
74011        <em>methodName</em>), and the other will be a standalone top-level
74012        function with the name <em>ClassName_methodName()</em>. This is merely an
74013        artifact of how the language interfaces are created in libSBML.  The
74014        methods are functionally identical. @endif@~
74015
74016        """
74017        return _libsbml.RDFAnnotationParser_parseOnlyModelHistory(obj)
74018
74019    @staticmethod
74020    def deleteRDFAnnotation(annotation):
74021        r"""
74022        deleteRDFAnnotation(XMLNode annotation) -> XMLNode
74023
74024        Deletes any SBML MIRIAM RDF annotation found in the given XMLNode
74025        tree and returns
74026        any remaining annotation content.
74027
74028        The name of the XMLNode given as parameter @p annotation must be
74029        'annotation', or else this method returns @c None.  The method will
74030        walk down the XML structure looking for elements that are in the
74031        RDF XML namespace, and remove them if they conform to the syntax
74032        of a History or CVTerm element.
74033
74034        @param annotation the XMLNode tree within which the RDF annotation is
74035        to be found and deleted.
74036
74037        @return the XMLNode structure that is left after RDF annotations are
74038        deleted.
74039
74040        @if python @note Because this is a static method on a class, the Python
74041        language interface for libSBML will contain two variants.  One will be the
74042        expected, normal static method on the class (i.e., a regular
74043        <em>methodName</em>), and the other will be a standalone top-level
74044        function with the name <em>ClassName_methodName()</em>. This is merely an
74045        artifact of how the language interfaces are created in libSBML.  The
74046        methods are functionally identical. @endif@~
74047
74048        """
74049        return _libsbml.RDFAnnotationParser_deleteRDFAnnotation(annotation)
74050
74051    @staticmethod
74052    def deleteRDFHistoryAnnotation(annotation):
74053        r"""
74054        deleteRDFHistoryAnnotation(XMLNode annotation) -> XMLNode
74055
74056        Deletes any SBML MIRIAM RDF 'History' annotation found in the given
74057        XMLNode tree and returns
74058        any remaining annotation content.
74059
74060        The name of the XMLNode given as parameter @p annotation must be
74061        'annotation', or else this method returns @c None.  The method will
74062        walk down the XML structure looking for elements that are in the
74063        RDF XML namespace, and remove any that conform to the syntax of a
74064        History element.
74065
74066        @param annotation the XMLNode tree within which the RDF annotation is
74067        to be found and deleted.
74068
74069        @return the XMLNode structure that is left after RDF annotations are
74070        deleted.
74071
74072        @if python @note Because this is a static method on a class, the Python
74073        language interface for libSBML will contain two variants.  One will be the
74074        expected, normal static method on the class (i.e., a regular
74075        <em>methodName</em>), and the other will be a standalone top-level
74076        function with the name <em>ClassName_methodName()</em>. This is merely an
74077        artifact of how the language interfaces are created in libSBML.  The
74078        methods are functionally identical. @endif@~
74079
74080        """
74081        return _libsbml.RDFAnnotationParser_deleteRDFHistoryAnnotation(annotation)
74082
74083    @staticmethod
74084    def deleteRDFCVTermAnnotation(annotation):
74085        r"""
74086        deleteRDFCVTermAnnotation(XMLNode annotation) -> XMLNode
74087
74088        Deletes any SBML MIRIAM RDF 'CVTerm' annotation found in the given
74089        XMLNode tree and returns
74090        any remaining annotation content.
74091
74092        The name of the XMLNode given as parameter @p annotation must be
74093        'annotation', or else this method returns @c None.  The method will
74094        walk down the XML structure looking for elements that are in the
74095        RDF XML namespace, and remove any that conform to the syntax of a
74096        CVTerm element.
74097
74098        @param annotation the XMLNode tree within which the RDF annotation is
74099        to be found and deleted.
74100
74101        @return the XMLNode structure that is left after RDF annotations are
74102        deleted.
74103
74104        @if python @note Because this is a static method on a class, the Python
74105        language interface for libSBML will contain two variants.  One will be the
74106        expected, normal static method on the class (i.e., a regular
74107        <em>methodName</em>), and the other will be a standalone top-level
74108        function with the name <em>ClassName_methodName()</em>. This is merely an
74109        artifact of how the language interfaces are created in libSBML.  The
74110        methods are functionally identical. @endif@~
74111
74112        """
74113        return _libsbml.RDFAnnotationParser_deleteRDFCVTermAnnotation(annotation)
74114
74115    @staticmethod
74116    def parseRDFAnnotation(*args):
74117        r"""
74118        parseRDFAnnotation(XMLNode annotation, char const * metaId=None, XMLInputStream stream=None) -> ModelHistory
74119        parseRDFAnnotation(XMLNode annotation, CVTermList CVTerms)
74120        parseRDFAnnotation(XMLNode annotation, CVTermList CVTerms, char const * metaId=None, XMLInputStream stream=None)
74121
74122        Parses an annotation (given as an XMLNode tree) into a list of
74123        CVTerm objects.
74124
74125        This is used to take an annotation that has been read into an SBML
74126        model, identify the RDF elements within it, and create a list of
74127        corresponding CVTerm (controlled vocabulary term) objects.
74128
74129        @param annotation XMLNode containing the annotation.
74130        @param CVTerms list of CVTerm objects to be created.
74131        @param metaId optional metaId, if set only the RDF annotation for this metaId will be returned.
74132        @param stream optional XMLInputStream that facilitates error logging.
74133
74134        @copydetails doc_note_static_methods
74135
74136        @htmlinclude warn-default-args-in-docs.html
74137
74138        """
74139        return _libsbml.RDFAnnotationParser_parseRDFAnnotation(*args)
74140
74141    def __init__(self):
74142        r"""
74143        __init__(RDFAnnotationParser self) -> RDFAnnotationParser
74144
74145        @internal
74146
74147        """
74148        _libsbml.RDFAnnotationParser_swiginit(self, _libsbml.new_RDFAnnotationParser())
74149    __swig_destroy__ = _libsbml.delete_RDFAnnotationParser
74150
74151# Register RDFAnnotationParser in _libsbml:
74152_libsbml.RDFAnnotationParser_swigregister(RDFAnnotationParser)
74153
74154def RDFAnnotationParser_createAnnotation():
74155    r"""
74156    RDFAnnotationParser_createAnnotation() -> XMLNode
74157
74158    Creates a blank annotation and returns its root XMLNode object.
74159
74160    This creates a completely empty SBML <code>&lt;annotation&gt;</code>
74161    element.  It is not attached to any SBML element.  An example of how
74162    this might be used is illustrated in the following code fragment.  In
74163    this example, suppose that @c content is an XMLNode object previously
74164    created, containing MIRIAM-style annotations, and that @c sbmlObject
74165    is an SBML object derived from SBase (e.g., a Model, or a Species, or
74166    a Compartment, etc.).  Then:@if clike
74167    @code{.cpp}
74168    int success;                              // Status code variable.
74169
74170    XMLNode RDF = createRDFAnnotation();     // Create XML structure.
74171    success = RDF->addChild(...content...);   // Put some content into it.
74172    ...                                       // Check return code value.
74173
74174    XMLNode ann = createAnnotation();        // Create <annotation>.
74175    success = ann->addChild(RDF);             // Put the annotation into it.
74176    ...                                       // Check return code value.
74177
74178    success = sbmlObject->setAnnotation(ann); // Set object's annotation.
74179    ...                                       // Check return code value.
74180    @endcode
74181    @endif@if java
74182    @code{.java}
74183    int success;                                   // Status code variable.
74184
74185    XMLNode RDF = createRDFAnnotation();          // Create XML structure.
74186    success      = RDF.addChild(...content...);    // Put some content into it.
74187    ...                                            // Check return code value.
74188
74189    XMLNode ann = createAnnotation();             // Create <annotation>.
74190    success      = ann.addChild(RDF);              // Put the annotation into it.
74191    ...                                            // Check return code value.
74192
74193    success      = sbmlObject.setAnnotation(ann); // Set object's annotation.
74194    ...                                            // Check return code value.
74195    @endcode
74196    @endif@if python
74197    @code{.py}
74198    RDF     = RDFAnnotationParser.createRDFAnnotation() # Create XML structure.
74199    success = RDF.addChild(...content...)               # Put some content into it.
74200    ...                                                 # Check return code value.
74201
74202    annot   = RDFAnnotationParser.createAnnotation()    # Create <annotation>.
74203    success = annot.addChild(RDF)                       # Put the annotation into it.
74204    ...                                                 # Check return code value.
74205
74206    success = sbmlObject.setAnnotation(annot)           # Set object's annotation.
74207    ...                                                 # Check return code value.
74208    @endcode
74209    @endif@~
74210    The SBML specification contains more information about the format of
74211    annotations.  We urge readers to consult Section&nbsp;6 of the SBML
74212    Level&nbsp;2 (Versions 2&ndash;4) and SBML Level&nbsp;3 specification
74213    documents.
74214
74215    @return a pointer to an XMLNode for the annotation.
74216
74217    @if python @note Because this is a static method on a class, the Python
74218    language interface for libSBML will contain two variants.  One will be the
74219    expected, normal static method on the class (i.e., a regular
74220    <em>methodName</em>), and the other will be a standalone top-level
74221    function with the name <em>ClassName_methodName()</em>. This is merely an
74222    artifact of how the language interfaces are created in libSBML.  The
74223    methods are functionally identical. @endif@~
74224
74225    @see @if clike createRDFAnnotation() @else RDFAnnotationParser.createRDFAnnotation() @endif@~
74226
74227    """
74228    return _libsbml.RDFAnnotationParser_createAnnotation()
74229
74230def RDFAnnotationParser_createRDFAnnotation(level=3, version=1):
74231    r"""
74232    RDFAnnotationParser_createRDFAnnotation(unsigned int level=3, unsigned int version=1) -> XMLNode
74233
74234    Creates a blank RDF element suitable for use in SBML annotations.
74235
74236    The annotation created by this method has namespace declarations for
74237    all the relevant XML namespaces used in RDF annotations and also has
74238    an empty RDF element.  The result is the following XML:
74239    @verbatim
74240    <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
74241             xmlns:dc='http://purl.org/dc/elements/1.1/'
74242             xmlns:dcterms='http://purl.org/dc/terms/'
74243             xmlns:vCard='http://www.w3.org/2001/vcard-rdf/3.0#'
74244             xmlns:bqbiol='http://biomodels.net/biology-qualifiers/'
74245             xmlns:bqmodel='http://biomodels.net/model-qualifiers/' >
74246
74247    </rdf:RDF>
74248    @endverbatim
74249
74250    Note that this does not create the containing SBML
74251    <code>&lt;annotation&gt;</code> element; the method
74252    @if clike createAnnotation()@else RDFAnnotationParser.createAnnotation()@endif@~
74253    is available for creating the container.
74254
74255    @return a pointer to an XMLNode.
74256
74257    @if python @note Because this is a static method on a class, the Python
74258    language interface for libSBML will contain two variants.  One will be the
74259    expected, normal static method on the class (i.e., a regular
74260    <em>methodName</em>), and the other will be a standalone top-level
74261    function with the name <em>ClassName_methodName()</em>. This is merely an
74262    artifact of how the language interfaces are created in libSBML.  The
74263    methods are functionally identical. @endif@~
74264
74265    @see @if clike createAnnotation() @else RDFAnnotationParser.createAnnotation() @endif@~
74266
74267
74268
74269    @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
74270
74271    """
74272    return _libsbml.RDFAnnotationParser_createRDFAnnotation(level, version)
74273
74274def RDFAnnotationParser_createCVTerms(obj):
74275    r"""
74276    RDFAnnotationParser_createCVTerms(SBase obj) -> XMLNode
74277
74278    Takes a list of CVTerm objects and creates a the RDF 'Description'
74279    element.
74280
74281    This essentially takes the given SBML object, reads out the CVTerm
74282    objects attached to it, creates an RDF 'Description' element to hold
74283    the terms, and adds each term with appropriate qualifiers.
74284
74285    @param obj the SBML object to start from.
74286
74287    @return the XMLNode tree corresponding to the Description element of
74288    an RDF annotation.
74289
74290    @if python @note Because this is a static method on a class, the Python
74291    language interface for libSBML will contain two variants.  One will be the
74292    expected, normal static method on the class (i.e., a regular
74293    <em>methodName</em>), and the other will be a standalone top-level
74294    function with the name <em>ClassName_methodName()</em>. This is merely an
74295    artifact of how the language interfaces are created in libSBML.  The
74296    methods are functionally identical. @endif@~
74297
74298    """
74299    return _libsbml.RDFAnnotationParser_createCVTerms(obj)
74300
74301def RDFAnnotationParser_parseCVTerms(obj):
74302    r"""
74303    RDFAnnotationParser_parseCVTerms(SBase obj) -> XMLNode
74304
74305    Takes a list of CVTerm objects and creates a complete SBML annotation
74306    around it.
74307
74308    This essentially takes the given SBML object, reads out the CVTerm
74309    objects attached to it, calls @if clike createRDFAnnotation()@else
74310    RDFAnnotationParser.createRDFAnnotation()@endif@~ to create an RDF
74311    annotation to hold the terms, and finally calls @if clike
74312    createAnnotation()@else
74313    RDFAnnotationParser.createAnnotation()@endif@~ to wrap the result as
74314    an SBML <code>&lt;annotation&gt;</code> element.
74315
74316    @param obj the SBML object to start from.
74317
74318    @return the XMLNode tree corresponding to the annotation.
74319
74320    @if python @note Because this is a static method on a class, the Python
74321    language interface for libSBML will contain two variants.  One will be the
74322    expected, normal static method on the class (i.e., a regular
74323    <em>methodName</em>), and the other will be a standalone top-level
74324    function with the name <em>ClassName_methodName()</em>. This is merely an
74325    artifact of how the language interfaces are created in libSBML.  The
74326    methods are functionally identical. @endif@~
74327
74328    """
74329    return _libsbml.RDFAnnotationParser_parseCVTerms(obj)
74330
74331def RDFAnnotationParser_parseModelHistory(obj):
74332    r"""
74333    RDFAnnotationParser_parseModelHistory(SBase obj) -> XMLNode
74334
74335    Reads the model history and cvTerms stored in @p obj and creates the
74336    XML structure for an SBML annotation representing that metadata if
74337    there is a model history stored in @p obj.
74338
74339    @param obj any SBase object.
74340
74341    @return the XMLNode corresponding to an annotation containing
74342    MIRIAM-compliant model history and CV term information in RDF format.
74343
74344    @note If the object does not have a history element stored then
74345    @c None is returned even if CVTerms are present.
74346
74347    @if python @note Because this is a static method on a class, the Python
74348    language interface for libSBML will contain two variants.  One will be the
74349    expected, normal static method on the class (i.e., a regular
74350    <em>methodName</em>), and the other will be a standalone top-level
74351    function with the name <em>ClassName_methodName()</em>. This is merely an
74352    artifact of how the language interfaces are created in libSBML.  The
74353    methods are functionally identical. @endif@~
74354
74355    """
74356    return _libsbml.RDFAnnotationParser_parseModelHistory(obj)
74357
74358def RDFAnnotationParser_parseOnlyModelHistory(obj):
74359    r"""
74360    RDFAnnotationParser_parseOnlyModelHistory(SBase obj) -> XMLNode
74361
74362    Reads the model history stored in @p obj and creates the
74363    XML structure for an SBML annotation representing that history.
74364
74365    @param obj any SBase object.
74366
74367    @return the XMLNode corresponding to an annotation containing
74368    MIRIAM-compliant model history information in RDF format.
74369
74370    @if python @note Because this is a static method on a class, the Python
74371    language interface for libSBML will contain two variants.  One will be the
74372    expected, normal static method on the class (i.e., a regular
74373    <em>methodName</em>), and the other will be a standalone top-level
74374    function with the name <em>ClassName_methodName()</em>. This is merely an
74375    artifact of how the language interfaces are created in libSBML.  The
74376    methods are functionally identical. @endif@~
74377
74378    """
74379    return _libsbml.RDFAnnotationParser_parseOnlyModelHistory(obj)
74380
74381def RDFAnnotationParser_deleteRDFAnnotation(annotation):
74382    r"""
74383    RDFAnnotationParser_deleteRDFAnnotation(XMLNode annotation) -> XMLNode
74384
74385    Deletes any SBML MIRIAM RDF annotation found in the given XMLNode
74386    tree and returns
74387    any remaining annotation content.
74388
74389    The name of the XMLNode given as parameter @p annotation must be
74390    'annotation', or else this method returns @c None.  The method will
74391    walk down the XML structure looking for elements that are in the
74392    RDF XML namespace, and remove them if they conform to the syntax
74393    of a History or CVTerm element.
74394
74395    @param annotation the XMLNode tree within which the RDF annotation is
74396    to be found and deleted.
74397
74398    @return the XMLNode structure that is left after RDF annotations are
74399    deleted.
74400
74401    @if python @note Because this is a static method on a class, the Python
74402    language interface for libSBML will contain two variants.  One will be the
74403    expected, normal static method on the class (i.e., a regular
74404    <em>methodName</em>), and the other will be a standalone top-level
74405    function with the name <em>ClassName_methodName()</em>. This is merely an
74406    artifact of how the language interfaces are created in libSBML.  The
74407    methods are functionally identical. @endif@~
74408
74409    """
74410    return _libsbml.RDFAnnotationParser_deleteRDFAnnotation(annotation)
74411
74412def RDFAnnotationParser_deleteRDFHistoryAnnotation(annotation):
74413    r"""
74414    RDFAnnotationParser_deleteRDFHistoryAnnotation(XMLNode annotation) -> XMLNode
74415
74416    Deletes any SBML MIRIAM RDF 'History' annotation found in the given
74417    XMLNode tree and returns
74418    any remaining annotation content.
74419
74420    The name of the XMLNode given as parameter @p annotation must be
74421    'annotation', or else this method returns @c None.  The method will
74422    walk down the XML structure looking for elements that are in the
74423    RDF XML namespace, and remove any that conform to the syntax of a
74424    History element.
74425
74426    @param annotation the XMLNode tree within which the RDF annotation is
74427    to be found and deleted.
74428
74429    @return the XMLNode structure that is left after RDF annotations are
74430    deleted.
74431
74432    @if python @note Because this is a static method on a class, the Python
74433    language interface for libSBML will contain two variants.  One will be the
74434    expected, normal static method on the class (i.e., a regular
74435    <em>methodName</em>), and the other will be a standalone top-level
74436    function with the name <em>ClassName_methodName()</em>. This is merely an
74437    artifact of how the language interfaces are created in libSBML.  The
74438    methods are functionally identical. @endif@~
74439
74440    """
74441    return _libsbml.RDFAnnotationParser_deleteRDFHistoryAnnotation(annotation)
74442
74443def RDFAnnotationParser_deleteRDFCVTermAnnotation(annotation):
74444    r"""
74445    RDFAnnotationParser_deleteRDFCVTermAnnotation(XMLNode annotation) -> XMLNode
74446
74447    Deletes any SBML MIRIAM RDF 'CVTerm' annotation found in the given
74448    XMLNode tree and returns
74449    any remaining annotation content.
74450
74451    The name of the XMLNode given as parameter @p annotation must be
74452    'annotation', or else this method returns @c None.  The method will
74453    walk down the XML structure looking for elements that are in the
74454    RDF XML namespace, and remove any that conform to the syntax of a
74455    CVTerm element.
74456
74457    @param annotation the XMLNode tree within which the RDF annotation is
74458    to be found and deleted.
74459
74460    @return the XMLNode structure that is left after RDF annotations are
74461    deleted.
74462
74463    @if python @note Because this is a static method on a class, the Python
74464    language interface for libSBML will contain two variants.  One will be the
74465    expected, normal static method on the class (i.e., a regular
74466    <em>methodName</em>), and the other will be a standalone top-level
74467    function with the name <em>ClassName_methodName()</em>. This is merely an
74468    artifact of how the language interfaces are created in libSBML.  The
74469    methods are functionally identical. @endif@~
74470
74471    """
74472    return _libsbml.RDFAnnotationParser_deleteRDFCVTermAnnotation(annotation)
74473
74474def RDFAnnotationParser_parseRDFAnnotation(*args):
74475    r"""
74476    RDFAnnotationParser_parseRDFAnnotation(XMLNode annotation, char const * metaId=None, XMLInputStream stream=None) -> ModelHistory
74477    RDFAnnotationParser_parseRDFAnnotation(XMLNode annotation, CVTermList CVTerms)
74478    RDFAnnotationParser_parseRDFAnnotation(XMLNode annotation, CVTermList CVTerms, char const * metaId=None, XMLInputStream stream=None)
74479
74480    Parses an annotation (given as an XMLNode tree) into a list of
74481    CVTerm objects.
74482
74483    This is used to take an annotation that has been read into an SBML
74484    model, identify the RDF elements within it, and create a list of
74485    corresponding CVTerm (controlled vocabulary term) objects.
74486
74487    @param annotation XMLNode containing the annotation.
74488    @param CVTerms list of CVTerm objects to be created.
74489    @param metaId optional metaId, if set only the RDF annotation for this metaId will be returned.
74490    @param stream optional XMLInputStream that facilitates error logging.
74491
74492    @copydetails doc_note_static_methods
74493
74494    @htmlinclude warn-default-args-in-docs.html
74495
74496    """
74497    return _libsbml.RDFAnnotationParser_parseRDFAnnotation(*args)
74498
74499class ISBMLExtensionNamespaces(SBMLNamespaces):
74500    r"""
74501
74502    @sbmlpackage{core}
74503
74504    @htmlinclude pkg-marker-core.html
74505
74506    @htmlinclude not-sbml-warning.html
74507    @internal
74508
74509    """
74510
74511    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
74512
74513    def __init__(self, *args, **kwargs):
74514        raise AttributeError("No constructor defined - class is abstract")
74515    __repr__ = _swig_repr
74516    __swig_destroy__ = _libsbml.delete_ISBMLExtensionNamespaces
74517
74518    def getURI(self):
74519        r"""
74520        getURI(ISBMLExtensionNamespaces self) -> string
74521
74522        Returns a string representing the SBML XML namespace of this
74523        object.
74524
74525        @return a string representing the SBML namespace that reflects the
74526        SBML Level and Version of this object.
74527
74528        """
74529        return _libsbml.ISBMLExtensionNamespaces_getURI(self)
74530
74531    def getPackageVersion(self):
74532        r"""getPackageVersion(ISBMLExtensionNamespaces self) -> unsigned int"""
74533        return _libsbml.ISBMLExtensionNamespaces_getPackageVersion(self)
74534
74535    def getPackageName(self):
74536        r"""
74537        getPackageName(ISBMLExtensionNamespaces self) -> string
74538
74539        Returns the name of the main package for this namespace.
74540
74541        @return the name of the main package for this namespace.
74542        'core' will be returned if this namespace is defined in the SBML
74543        core.
74544
74545        """
74546        return _libsbml.ISBMLExtensionNamespaces_getPackageName(self)
74547
74548    def setPackageVersion(self, pkgVersion):
74549        r"""setPackageVersion(ISBMLExtensionNamespaces self, unsigned int pkgVersion)"""
74550        return _libsbml.ISBMLExtensionNamespaces_setPackageVersion(self, pkgVersion)
74551
74552# Register ISBMLExtensionNamespaces in _libsbml:
74553_libsbml.ISBMLExtensionNamespaces_swigregister(ISBMLExtensionNamespaces)
74554
74555class SBaseExtensionPoint(object):
74556    r"""
74557
74558    @sbmlpackage{core}
74559
74560    @htmlinclude pkg-marker-core.html Base class for extending SBML components
74561
74562    @htmlinclude not-sbml-warning.html
74563
74564    @ifnot clike @internal @endif@~
74565
74566    @par
74567    This class is used as part of the mechanism that connects plugin objects
74568    (implemented using SBasePlugin or SBMLDocumentPlugin) to a given package
74569    extension.  For instance, an implementation of an extended version of
74570    Model (e.g., LayoutModelPlugin in the %Layout package) would involve the
74571    creation of an extension point using SBaseExtensionPoint and a mediator
74572    object created using SBasePluginCreator, to 'plug' the extended Model
74573    object (LayoutModelPlugin) into the overall LayoutExtension object.
74574
74575    The use of SBaseExtensionPoint is relatively straightforward.  The
74576    class needs to be used for each extended SBML object implemented using
74577    SBMLDocumentPlugin or SBasePlugin.  Doing so requires knowing just two
74578    things:
74579
74580    @li The short-form name of the @em parent package being extended.  The
74581    parent package is often simply core SBML, identified in libSBML by the
74582    nickname <code>'core'</code>, but a SBML Level&nbsp;3 package could
74583    conceivably extend another Level&nbsp;3 package.
74584
74585    @li The libSBML type code assigned to the object being extended.  For
74586    example, if an extension of Model is implemented, the relevant type code
74587    is #SBML_MODEL, found in #SBMLTypeCode_t.
74588
74589    The typical use of SBaseExtensionPoint is illustrated by the following
74590    code fragment:
74591
74592    @code{.cpp}
74593    SBaseExtensionPoint docExtPoint('core', SBML_DOCUMENT);
74594    SBaseExtensionPoint modelExtPoint('core', SBML_MODEL);
74595
74596    SBasePluginCreator<GroupsSBMLDocumentPlugin, GroupsExtension> docPluginCreator(docExtPoint, pkgURIs);
74597    SBasePluginCreator<GroupsModelPlugin, GroupsExtension> modelPluginCreator(modelExtPoint, pkgURIs);
74598    @endcode
74599
74600    The code above shows two core SBML components being extended: the
74601    document object, and the Model object.  These extended objects are
74602    created elsewhere (not shown) as the
74603    <code>GroupsSBMLDocumentPlugin</code> and <code>GroupsModelPlugin</code>
74604    objects.  The corresponding SBaseExtensionPoint objects are handed as
74605    arguments to the constructor for SBasePluginCreator to create the
74606    connection between the extended core components and the overall package
74607    extension (here, for the Groups package, with the
74608    <code>GroupsExtension</code> object).
74609
74610    The code above is typically placed in the implementation of the
74611    <code>init()</code> method of the package class derived from
74612    SBMLExtension.  (For the example above, it would be in the
74613    <code>GroupsExtension.cpp</code> file.)
74614
74615    """
74616
74617    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
74618    __repr__ = _swig_repr
74619    __swig_destroy__ = _libsbml.delete_SBaseExtensionPoint
74620
74621    def __init__(self, *args):
74622        r"""
74623        __init__(SBaseExtensionPoint self, string pkgName, int typeCode) -> SBaseExtensionPoint
74624        __init__(SBaseExtensionPoint self, string pkgName, int typeCode, string elementName, bool elementOnly=False) -> SBaseExtensionPoint
74625        __init__(SBaseExtensionPoint self, SBaseExtensionPoint rhs) -> SBaseExtensionPoint
74626
74627        This method has multiple variants; they differ in the arguments
74628         they accept.  Each variant is described separately below.
74629
74630        @par
74631        <hr>
74632        <span class='variant-sig-heading'>Method variant with the following signature</span>:
74633         <pre class='signature'>SBaseExtensionPoint(string pkgName, int typeCode, string elementName, bool elementOnly = false)</pre>
74634
74635        Constructor for SBaseExtensionPoint.
74636
74637        The use of SBaseExtensionPoint is relatively straightforward.  The
74638        class needs to be used for each extended SBML object implemented
74639        using SBMLDocumentPlugin or SBasePlugin.  Doing so requires knowing
74640        just two things:
74641
74642        @li The short-form name of the @em parent package being extended.
74643        The parent package is often simply core SBML, identified in libSBML
74644        by the nickname <code>'core'</code>, but a SBML Level&nbsp;3
74645        package could conceivably extend another Level&nbsp;3 package and
74646        the mechanism supports this.
74647
74648        @li The libSBML type code assigned to the object being extended.
74649        For example, if an extension of Model is implemented, the relevant
74650        type code is SBML_MODEL, found in #SBMLTypeCode_t.
74651
74652        @param pkgName the short-form name of the parent package where
74653        that this package extension is extending.
74654
74655        @param typeCode the type code of the object being extended.
74656
74657        @param elementName element name for the target element, in case
74658        multiple elements match the same type code (as will be the case
74659        for ListOf classes).
74660
74661        @param elementOnly flag to be used during the registration
74662        of the package, when set then the plugin is only applied to
74663        elements whose elementName match.
74664
74665
74666
74667        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
74668
74669
74670        @par
74671        <hr>
74672        <span class='variant-sig-heading'>Method variant with the following signature</span>:
74673         <pre class='signature'>SBaseExtensionPoint( SBaseExtensionPoint rhs)</pre>
74674
74675        Copy constructor.
74676
74677        This creates a copy of an SBaseExtensionPoint instance.
74678
74679        @param rhs the object to copy.
74680
74681
74682        @par
74683        <hr>
74684        <span class='variant-sig-heading'>Method variant with the following signature</span>:
74685         <pre class='signature'>SBaseExtensionPoint(string pkgName, int typeCode)</pre>
74686
74687        Constructor for SBaseExtensionPoint.
74688
74689        The use of SBaseExtensionPoint is relatively straightforward.  The
74690        class needs to be used for each extended SBML object implemented
74691        using SBMLDocumentPlugin or SBasePlugin.  Doing so requires knowing
74692        just two things:
74693
74694        @li The short-form name of the @em parent package being extended.
74695        The parent package is often simply core SBML, identified in libSBML
74696        by the nickname <code>'core'</code>, but a SBML Level&nbsp;3
74697        package could conceivably extend another Level&nbsp;3 package and
74698        the mechanism supports this.
74699
74700        @li The libSBML type code assigned to the object being extended.
74701        For example, if an extension of Model is implemented, the relevant
74702        type code is SBML_MODEL, found in #SBMLTypeCode_t.
74703
74704        @param pkgName the short-form name of the parent package where
74705        that this package extension is extending.
74706
74707        @param typeCode the type code of the object being extended.
74708
74709        """
74710        _libsbml.SBaseExtensionPoint_swiginit(self, _libsbml.new_SBaseExtensionPoint(*args))
74711
74712    def clone(self):
74713        r"""
74714        clone(SBaseExtensionPoint self) -> SBaseExtensionPoint
74715
74716        Creates and returns a deep copy of this SBaseExtensionPoint object.
74717
74718        @return the (deep) copy of this SBaseExtensionPoint object.
74719
74720        """
74721        return _libsbml.SBaseExtensionPoint_clone(self)
74722
74723    def getPackageName(self):
74724        r"""
74725        getPackageName(SBaseExtensionPoint self) -> string
74726
74727        Returns the package name of this extension point.
74728
74729        """
74730        return _libsbml.SBaseExtensionPoint_getPackageName(self)
74731
74732    def getTypeCode(self):
74733        r"""
74734        getTypeCode(SBaseExtensionPoint self) -> int
74735
74736        Returns the libSBML type code of this extension point.
74737
74738        """
74739        return _libsbml.SBaseExtensionPoint_getTypeCode(self)
74740
74741    def getElementName(self):
74742        r"""
74743        getElementName(SBaseExtensionPoint self) -> string
74744
74745        the target element name
74746
74747        """
74748        return _libsbml.SBaseExtensionPoint_getElementName(self)
74749
74750    def isElementOnly(self):
74751        r"""
74752        isElementOnly(SBaseExtensionPoint self) -> bool
74753
74754
74755
74756        """
74757        return _libsbml.SBaseExtensionPoint_isElementOnly(self)
74758
74759# Register SBaseExtensionPoint in _libsbml:
74760_libsbml.SBaseExtensionPoint_swigregister(SBaseExtensionPoint)
74761
74762class SBasePlugin(object):
74763    r"""
74764
74765    @sbmlpackage{core}
74766
74767    @htmlinclude pkg-marker-core.html Base class for extending SBML objects in packages.
74768
74769    @htmlinclude not-sbml-warning.html
74770
74771    The SBasePlugin class is libSBML's base class for extensions of core SBML
74772    component objects.  SBasePlugin defines basic virtual methods for
74773    reading/writing/checking additional attributes and/or subobjects; these
74774    methods should be overridden by subclasses to implement the necessary
74775    features of an extended SBML object.
74776
74777    @if clike
74778    @section sbaseplugin-howto How to extend SBasePlugin for a package implementation
74779    @par
74780    LibSBML package extensions can extend existing libSBML objects such as Model
74781    using SBasePlugin as a base class, to hold attributes and/or subcomponents
74782    necessary for the SBML package being implemented.  Package developers must
74783    implement an SBasePlugin extended class for each element to be extended
74784    (e.g., Model, Reaction, and others) where additional attributes and/or
74785    top-level objects of the package extension are directly contained.  The
74786    following subsections detail the basic steps necessary to use SBasePlugin
74787    for the implementation of a class extension.
74788
74789    @subsection sbp-identify 1. Identify the SBML components that need to be extended
74790
74791    The specification for a SBML Level&nbsp;3 package will define the
74792    attributes and subojects that make up the package constructs.  Those
74793    constructs that modify existing SBML components such as Model,
74794    Reaction, etc., will be the ones that need to be extended using SBasePlugin.
74795
74796    For example, the Layout package makes additions to Model,
74797    SpeciesReference, and the <code>&lt;sbml&gt;</code> element (which is
74798    represented in libSBML by SBMLDocument).  This means that the Layout
74799    package extension in libSBML needs to define extended versions of Model,
74800    SpeciesReference and SBMLDocument.  Elements @em other than the SBML
74801    document need to be implemented using SBasePlugin; the document component
74802    must be implemented using SBMLDocumentPlugin instead.
74803
74804
74805    @subsection sbp-implement 2. Create a SBasePlugin subclass for each extended SBML component
74806
74807    A new class definition that subclasses SBasePlugin needs to be created for
74808    each SBML component to be extended by the package.  For instance, the
74809    Layout package needs LayoutModelPlugin and LayoutSpeciesReferencePlugin.
74810    (As mentioned above, the Layout class also needs LayoutSBMLDocumentPlugin,
74811    but this one is implemented using SBMLDocumentPlugin instead of
74812    SBasePlugin.)  Below, we describe in detail the different parts of an
74813    SBasePlugin subclass definition.
74814
74815    @subsubsection sbp-protected 2.1 Define protected data members
74816
74817    Data attributes on each extended class in an SBML package will have one of
74818    the data types <code>string</code>, <code>double</code>,
74819    <code>int</code>, or <code>bool</code>.  Subelements/subobjects will normally
74820    be derived from the ListOf class or from SBase.
74821
74822    The additional data members must be properly initialized in the class
74823    constructor, and must be properly copied in the copy constructor and
74824    assignment operator.  For example, the following data member is defined in
74825    the <code>GroupsModelPlugin</code> class (in the file
74826    <code>GroupsModelPlugin.h</code>):
74827    @code{.cpp}
74828    ListOfGroups mGroups;
74829    @endcode
74830
74831    @subsubsection sbp-class-methods 2.2 Override SBasePlugin class-related methods
74832
74833    The derived class must override the constructor, copy constructor, assignment
74834    operator (<code>operator=</code>) and <code>clone()</code> methods from
74835    SBasePlugin.
74836
74837
74838    @subsubsection sbp-methods-attribs 2.3 Override SBasePlugin virtual methods for attributes
74839
74840    If the extended component is defined by the SBML Level&nbsp;3 package to have
74841    attributes, then the extended class definition needs to override the
74842    following internal methods on SBasePlugin and provide appropriate
74843    implementations:
74844
74845    @li <code>addExpectedAttributes(ExpectedAttributes& attributes)</code>: This
74846    method should add the attributes that are expected to be found on this kind
74847    of extended component in an SBML file or data stream.
74848
74849    @li <code>readAttributes(XMLAttributes attributes, ExpectedAttributes&
74850    expectedAttributes)</code>: This method should read the attributes
74851    expected to be found on this kind of extended component in an SBML file or
74852    data stream.
74853
74854    @li <code>hasRequiredAttributes()</code>: This method should return @c True
74855    if all of the required attribute for this extended component are present on
74856    instance of the object.
74857
74858    @li <code>writeAttributes(XMLOutputStream stream)</code>: This method should
74859    write out the attributes of an extended component.  The implementation should
74860    use the different kinds of <code>writeAttribute</code> methods defined by
74861    XMLOutputStream to achieve this.
74862
74863
74864    @subsubsection sbp-methods-elem 2.4 Override SBasePlugin virtual methods for subcomponents
74865
74866    If the extended component is defined by the Level&nbsp;3 package to have
74867    subcomponents (i.e., full XML elements rather than mere attributes), then the
74868    extended class definition needs to override the following internal
74869    SBasePlugin methods and provide appropriate implementations:
74870
74871    @li <code>createObject(XMLInputStream stream)</code>: Subclasses must
74872    override this method to create, store, and then return an SBML object
74873    corresponding to the next XMLToken in the XMLInputStream.  To do this,
74874    implementations can use methods like <code>peek()</code> on XMLInputStream to
74875    test if the next object in the stream is something expected for the package.
74876    For example, LayoutModelPlugin uses <code>peek()</code> to examine the next
74877    element in the input stream, then tests that element against the Layout
74878    namespace and the element name <code>'listOfLayouts'</code> to see if it's
74879    the single subcomponent (ListOfLayouts) permitted on a Model object using the
74880    Layout package.  If it is, it returns the appropriate object.
74881
74882    @li <code>connectToParent(SBase sbase)</code>: This creates a parent-child
74883    relationship between a given extended component and its subcomponent(s).
74884
74885    @li <code>setSBMLDocument(SBMLDocument d)</code>: This method should set the
74886    parent SBMLDocument object on the subcomponent object instances, so that the
74887    subcomponent instances know which SBMLDocument contains them.
74888
74889    @li <code>enablePackageInternal(string& pkgURI, string& pkgPrefix,
74890    bool flag)</code>: This method should enable or disable the subcomponent
74891    based on whether a given XML namespace is active.
74892
74893    @li <code>writeElements(XMLOutputStream stream)</code>: This method must be
74894    overridden to provide an implementation that will write out the expected
74895    subcomponents/subelements to the XML output stream.
74896
74897    @li <code>readOtherXML(SBase parentObject, XMLInputStream stream)</code>:
74898    This function should be overridden if elements of annotation, notes, MathML
74899    content, etc., need to be directly parsed from the given XMLInputStream
74900    object.
74901
74902    @li <code>hasRequiredElements()</code>: This method should return @c True if
74903    a given object contains all the required subcomponents defined by the
74904    specification for that SBML Level&nbsp;3 package.
74905
74906
74907    @subsubsection sbp-methods-xmlns 2.5 Override SBasePlugin virtual methods for XML namespaces
74908
74909    If the package needs to add additional <code>xmlns</code> attributes to
74910    declare additional XML namespace URIs, the extended class should override the
74911    following method:
74912
74913    @li <code>writeXMLNS(XMLOutputStream stream)</code>: This method should
74914    write out any additional XML namespaces that might be needed by a package
74915    implementation.
74916
74917
74918    @subsubsection sbp-methods-hooks 2.6 Implement additional methods as needed
74919
74920    Extended component implementations can add whatever additional utility
74921    methods are useful for their implementation.
74922    @else
74923    @section ext-basics Basic principles of SBML package extensions in libSBML
74924
74925    @par
74926    SBML Level&nbsp;3's package structure permits modular extensions to the
74927    core SBML format.  In libSBML, support for SBML Level&nbsp;3 packages is
74928    provided through optional <em>package extensions</em> that can be plugged
74929    into libSBML at the time it is built/compiled.  Users of libSBML can thus
74930    choose which extensions are enabled in their software applications.
74931
74932    LibSBML defines a number of classes that developers of package extensions
74933    can use to implement support for an SBML Level&nbsp;3 package.  These
74934    classes make it easier to extend libSBML objects with new attributes
74935    and/or subobjects as needed by a particular Level&nbsp;3 package.
74936    Three overall categories of classes make up libSBML's facilities for
74937    implementing package extensions.  There are (1) classes that serve as base
74938    classes meant to be subclassed, (2) template classes meant to be
74939    instantiated rather than subclassed, and (3) support classes that provide
74940    utility features. A given package implementation for libSBML will take
74941    the form of code using these and other libSBML classes, placed in a
74942    subdirectory of <code>src/sbml/packages/</code>.
74943
74944    The basic libSBML distribution includes a number of package extensions
74945    implementing support for officially-endorsed SBML Level&nbsp;3 packages;
74946    among these are <em>Flux Balance Constraints</em> ('fbc'),
74947    <em>Hierarchical %Model Composition</em> ('comp'), <em>%Layout</em>
74948    ('layout'), and <em>Qualitative Models</em> ('qual').  They can serve as
74949    working examples for developers working to implement other packages.
74950
74951    Extensions in libSBML can currently only be implemented in C++ or C;
74952    there is no mechanism to implement them first in languages such as
74953    Java or Python.  However, once implemented in C++ or C, language
74954    interfaces can be generated semi-automatically using the framework in
74955    place in libSBML.  (The approach is based on using <a target='_blank'
74956    href='http://www.swig.org'>SWIG</a> and facilities in libSBML's build
74957    system.)
74958    @endif@~
74959
74960    """
74961
74962    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
74963
74964    def __init__(self, *args, **kwargs):
74965        raise AttributeError("No constructor defined")
74966    __repr__ = _swig_repr
74967    __swig_destroy__ = _libsbml.delete_SBasePlugin
74968
74969    def getElementNamespace(self):
74970        r"""
74971        getElementNamespace(SBasePlugin self) -> string
74972
74973        Returns the namespace URI of the package to which this plugin object
74974        belongs.
74975
74976        @return the XML namespace URI of the SBML Level&nbsp;3 package
74977        implemented by this libSBML package extension.
74978
74979        """
74980        return _libsbml.SBasePlugin_getElementNamespace(self)
74981
74982    def getPrefix(self):
74983        r"""
74984        getPrefix(SBasePlugin self) -> string
74985
74986        Returns the XML namespace prefix of the package to which this plugin
74987        object belongs.
74988
74989        @return the XML namespace prefix of the SBML Level&nbsp;3 package
74990        implemented by this libSBML package extension.
74991
74992        """
74993        return _libsbml.SBasePlugin_getPrefix(self)
74994
74995    def getPackageName(self):
74996        r"""
74997        getPackageName(SBasePlugin self) -> string
74998
74999        Returns the short-form name of the package to which this plugin
75000        object belongs.
75001
75002        @return the short-form package name (or nickname) of the SBML package
75003        implemented by this package extension.
75004
75005        """
75006        return _libsbml.SBasePlugin_getPackageName(self)
75007
75008    def clone(self):
75009        r"""
75010        clone(SBasePlugin self) -> SBasePlugin
75011
75012        Creates and returns a deep copy of this SBasePlugin object.
75013
75014        @return the (deep) copy of this SBasePlugin object.
75015
75016        """
75017        return _libsbml.SBasePlugin_clone(self)
75018
75019    def getElementBySId(self, id):
75020        r"""
75021        getElementBySId(SBasePlugin self, string id) -> SBase
75022
75023        Return the first child object found with a given identifier.
75024
75025        This method searches all the subobjects under this one, compares their
75026        identifiers to @p id, and returns the first one that machines.
75027        @if clike It uses SBasePlugin.getAllElements() to
75028        get the list of identifiers, so the order in which identifiers are
75029        searched is the order in which they appear in the results returned by
75030        that method.@endif@~
75031
75032        Normally, <code>SId</code> type identifier values are unique across
75033        a model in SBML.  However, in some circumstances they may not be, such
75034        as if a model is invalid because of multiple objects having the same
75035        identifier.
75036
75037        @param id string representing the identifier of the object to find.
75038
75039        @return pointer to the first object with the given @p id.
75040
75041        """
75042        return _libsbml.SBasePlugin_getElementBySId(self, id)
75043
75044    def getElementByMetaId(self, metaid):
75045        r"""
75046        getElementByMetaId(SBasePlugin self, string metaid) -> SBase
75047
75048        Return the first child object found with a given meta identifier.
75049
75050        This method searches all the subobjects under this one, compares their
75051        meta identifiers to @p metaid, and returns the first one that machines.
75052
75053        @param metaid string, the metaid of the object to find.
75054
75055        @return pointer to the first object found with the given @p metaid.
75056
75057        """
75058        return _libsbml.SBasePlugin_getElementByMetaId(self, metaid)
75059
75060    def connectToParent(self, sbase):
75061        r"""
75062        connectToParent(SBasePlugin self, SBase sbase)
75063
75064        @internal
75065
75066        @internal
75067
75068        """
75069        return _libsbml.SBasePlugin_connectToParent(self, sbase)
75070
75071    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
75072        r"""
75073        enablePackageInternal(SBasePlugin self, string pkgURI, string pkgPrefix, bool flag)
75074
75075        @internal
75076
75077        @internal
75078
75079        """
75080        return _libsbml.SBasePlugin_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
75081
75082    def stripPackage(self, pkgPrefix, flag):
75083        r"""
75084        stripPackage(SBasePlugin self, string pkgPrefix, bool flag) -> bool
75085
75086        @internal
75087
75088        @internal
75089
75090        """
75091        return _libsbml.SBasePlugin_stripPackage(self, pkgPrefix, flag)
75092
75093    def getSBMLDocument(self, *args):
75094        r"""
75095        getSBMLDocument(SBasePlugin self) -> SBMLDocument
75096        getSBMLDocument(SBasePlugin self) -> SBMLDocument
75097
75098        Returns the SBMLDocument object containing this object instance.
75099
75100        @par
75101        LibSBML uses the class SBMLDocument as a top-level container for
75102        storing SBML content and data associated with it (such as warnings and
75103        error messages).  An SBML model in libSBML is contained inside an
75104        SBMLDocument object.  SBMLDocument corresponds roughly to the class
75105        <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
75106        specifications, but it does not have a direct correspondence in SBML
75107        Level&nbsp;1.  (But, it is created by libSBML no matter whether the
75108        model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
75109
75110        This method allows the caller to obtain the SBMLDocument for the
75111        current object.
75112
75113        @return the parent SBMLDocument object of this plugin object.
75114
75115        @see getParentSBMLObject()
75116
75117        """
75118        return _libsbml.SBasePlugin_getSBMLDocument(self, *args)
75119
75120    def getURI(self):
75121        r"""
75122        getURI(SBasePlugin self) -> string
75123
75124        Returns the XML namespace URI for the package to which this object belongs.
75125
75126        @par
75127        In the XML representation of an SBML document, XML namespaces are used to
75128        identify the origin of each XML construct used.  XML namespaces are
75129        identified by their unique resource identifiers (URIs).  The core SBML
75130        specifications stipulate the namespaces that must be used for core SBML
75131        constructs; for example, all XML elements that belong to SBML Level&nbsp;3
75132        Version&nbsp;1 Core must be placed in the XML namespace identified by the URI
75133        <code>'http://www.sbml.org/sbml/level3/version1/core'</code>.  Individual
75134        SBML Level&nbsp;3 packages define their own XML namespaces; for example,
75135        all elements belonging to the SBML Level&nbsp;3 %Layout Version&nbsp;1
75136        package must be placed in the XML namespace
75137        <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>.
75138
75139        This method first looks into the SBMLNamespaces object possessed by the
75140        parent SBMLDocument object of the current object.  If this cannot be
75141        found, this method returns the result of getElementNamespace().
75142
75143        @return a string, the URI of the XML namespace to which this object belongs.
75144
75145        @see getPackageName()
75146        @see getElementNamespace()
75147        @see getSBMLDocument()
75148
75149        """
75150        return _libsbml.SBasePlugin_getURI(self)
75151
75152    def getParentSBMLObject(self, *args):
75153        r"""
75154        getParentSBMLObject(SBasePlugin self) -> SBase
75155        getParentSBMLObject(SBasePlugin self) -> SBase
75156
75157        Returns the parent object to which this plugin object is connected.
75158
75159        @return the parent object of this object.
75160
75161        """
75162        return _libsbml.SBasePlugin_getParentSBMLObject(self, *args)
75163
75164    def setElementNamespace(self, uri):
75165        r"""
75166        setElementNamespace(SBasePlugin self, string uri) -> int
75167
75168        Sets the XML namespace to which this object belongs.
75169
75170        @par
75171        In the XML representation of an SBML document, XML namespaces are used to
75172        identify the origin of each XML construct used.  XML namespaces are
75173        identified by their unique resource identifiers (URIs).  The core SBML
75174        specifications stipulate the namespaces that must be used for core SBML
75175        constructs; for example, all XML elements that belong to SBML Level&nbsp;3
75176        Version&nbsp;1 Core must be placed in the XML namespace identified by the URI
75177        <code>'http://www.sbml.org/sbml/level3/version1/core'</code>.  Individual
75178        SBML Level&nbsp;3 packages define their own XML namespaces; for example,
75179        all elements belonging to the SBML Level&nbsp;3 %Layout Version&nbsp;1
75180        package must be placed in the XML namespace
75181        <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>.
75182
75183        @param uri the URI to assign to this object.
75184
75185        @return integer value indicating success/failure of the
75186        function.  @if clike The value is drawn from the
75187        enumeration #OperationReturnValues_t. @endif@~ This particular
75188        function only does one thing irrespective of user input or
75189        object state, and thus will only return a single value:
75190        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
75191
75192        @see getElementNamespace()
75193
75194        """
75195        return _libsbml.SBasePlugin_setElementNamespace(self, uri)
75196
75197    def getLevel(self):
75198        r"""
75199        getLevel(SBasePlugin self) -> unsigned int
75200
75201        Returns the SBML Level of the package extension of this plugin object.
75202
75203        @return the SBML Level.
75204
75205        @see getVersion()
75206
75207        """
75208        return _libsbml.SBasePlugin_getLevel(self)
75209
75210    def getVersion(self):
75211        r"""
75212        getVersion(SBasePlugin self) -> unsigned int
75213
75214        Returns the Version within the SBML Level of the package extension of
75215        this plugin object.
75216
75217        @return the SBML Version.
75218
75219        @see getLevel()
75220
75221        """
75222        return _libsbml.SBasePlugin_getVersion(self)
75223
75224    def getPackageVersion(self):
75225        r"""
75226        getPackageVersion(SBasePlugin self) -> unsigned int
75227
75228        Returns the package version of the package extension of this plugin
75229        object.
75230
75231        @return the package version of the package extension of this plugin
75232        object.
75233
75234        @see getLevel()
75235        @see getVersion()
75236
75237        """
75238        return _libsbml.SBasePlugin_getPackageVersion(self)
75239
75240    def replaceSIDWithFunction(self, id, function):
75241        r"""
75242        replaceSIDWithFunction(SBasePlugin self, string id, ASTNode function)
75243
75244        @internal
75245
75246        @internal
75247
75248        """
75249        return _libsbml.SBasePlugin_replaceSIDWithFunction(self, id, function)
75250
75251    def divideAssignmentsToSIdByFunction(self, id, function):
75252        r"""
75253        divideAssignmentsToSIdByFunction(SBasePlugin self, string id, ASTNode function)
75254
75255        @internal
75256
75257        @internal
75258
75259        """
75260        return _libsbml.SBasePlugin_divideAssignmentsToSIdByFunction(self, id, function)
75261
75262    def multiplyAssignmentsToSIdByFunction(self, id, function):
75263        r"""
75264        multiplyAssignmentsToSIdByFunction(SBasePlugin self, string id, ASTNode function)
75265
75266        @internal
75267
75268        @internal
75269
75270        """
75271        return _libsbml.SBasePlugin_multiplyAssignmentsToSIdByFunction(self, id, function)
75272
75273    def hasIdentifierBeginningWith(self, prefix):
75274        r"""
75275        hasIdentifierBeginningWith(SBasePlugin self, string prefix) -> bool
75276
75277        @internal
75278
75279        @internal
75280
75281        """
75282        return _libsbml.SBasePlugin_hasIdentifierBeginningWith(self, prefix)
75283
75284    def prependStringToAllIdentifiers(self, prefix):
75285        r"""
75286        prependStringToAllIdentifiers(SBasePlugin self, string prefix) -> int
75287
75288        @internal
75289
75290        @internal
75291
75292        """
75293        return _libsbml.SBasePlugin_prependStringToAllIdentifiers(self, prefix)
75294
75295    def renameSIdRefs(self, oldid, newid):
75296        r"""
75297        renameSIdRefs(SBasePlugin self, string oldid, string newid)
75298
75299        Replaces all uses of a given @c SIdRef type attribute value with another
75300        value.
75301
75302        @par
75303        In SBML, object identifiers are of a data type called <code>SId</code>.
75304        In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
75305        introduced for attribute values that refer to <code>SId</code> values; in
75306        previous Levels of SBML, this data type did not exist and attributes were
75307        simply described to as 'referring to an identifier', but the effective
75308        data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
75309        other methods of libSBML refer to the type <code>SIdRef</code> for all
75310        Levels of SBML, even if the corresponding SBML specification did not
75311        explicitly name the data type.
75312
75313        This method works by looking at all attributes and (if appropriate)
75314        mathematical formulas in MathML content, comparing the referenced
75315        identifiers to the value of @p oldid.  If any matches are found, the
75316        matching values are replaced with @p newid.  The method does @em not
75317        descend into child elements.
75318
75319        @param oldid the old identifier.
75320        @param newid the new identifier.
75321
75322        """
75323        return _libsbml.SBasePlugin_renameSIdRefs(self, oldid, newid)
75324
75325    def renameMetaIdRefs(self, oldid, newid):
75326        r"""
75327        renameMetaIdRefs(SBasePlugin self, string oldid, string newid)
75328
75329        Replaces all uses of a given meta identifier attribute value with
75330        another value.
75331
75332        @par
75333        In SBML, object 'meta' identifiers are of the XML data type <code>ID</code>;
75334        the SBML object attribute itself is typically named <code>metaid</code>.  All
75335        attributes that hold values <em>referring</em> to values of type
75336        <code>ID</code> are of the XML data type <code>IDREF</code>.  They are also
75337        sometimes informally referred to as 'metaid refs', in analogy to the
75338        SBML-defined type <code>SIdRef</code>.
75339
75340        This method works by looking at all meta-identifier attribute values,
75341        comparing the identifiers to the value of @p oldid.  If any matches are
75342        found, the matching identifiers are replaced with @p newid.  The method
75343        does @em not descend into child elements.
75344
75345        @param oldid the old identifier.
75346        @param newid the new identifier.
75347
75348        """
75349        return _libsbml.SBasePlugin_renameMetaIdRefs(self, oldid, newid)
75350
75351    def renameUnitSIdRefs(self, oldid, newid):
75352        r"""
75353        renameUnitSIdRefs(SBasePlugin self, string oldid, string newid)
75354
75355        Replaces all uses of a given @c UnitSIdRef type attribute value with
75356        another value.
75357
75358        @par
75359        In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
75360        SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
75361        introduced for attribute values that refer to <code>UnitSId</code> values; in
75362        previous Levels of SBML, this data type did not exist and attributes were
75363        simply described to as 'referring to a unit identifier', but the effective
75364        data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
75365        other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
75366        Levels of SBML, even if the corresponding SBML specification did not
75367        explicitly name the data type.
75368
75369        This method works by looking at all unit identifier attribute values
75370        (including, if appropriate, inside mathematical formulas), comparing the
75371        referenced unit identifiers to the value of @p oldid.  If any matches
75372        are found, the matching values are replaced with @p newid.  The method
75373        does @em not descend into child elements.
75374
75375        @param oldid the old identifier.
75376        @param newid the new identifier.
75377
75378        """
75379        return _libsbml.SBasePlugin_renameUnitSIdRefs(self, oldid, newid)
75380
75381    def transformIdentifiers(self, sidTransformer):
75382        r"""
75383        transformIdentifiers(SBasePlugin self, IdentifierTransformer sidTransformer) -> int
75384
75385        @internal
75386
75387        @internal
75388
75389        """
75390        return _libsbml.SBasePlugin_transformIdentifiers(self, sidTransformer)
75391
75392    def getLine(self):
75393        r"""
75394        getLine(SBasePlugin self) -> unsigned int
75395
75396        @internal
75397
75398        @internal
75399
75400        """
75401        return _libsbml.SBasePlugin_getLine(self)
75402
75403    def getColumn(self):
75404        r"""
75405        getColumn(SBasePlugin self) -> unsigned int
75406
75407        @internal
75408
75409        @internal
75410
75411        """
75412        return _libsbml.SBasePlugin_getColumn(self)
75413
75414    def getSBMLNamespaces(self):
75415        r"""
75416        getSBMLNamespaces(SBasePlugin self) -> SBMLNamespaces
75417
75418        @internal
75419
75420        @internal
75421
75422        """
75423        return _libsbml.SBasePlugin_getSBMLNamespaces(self)
75424
75425    def logUnknownElement(self, element, sbmlLevel, sbmlVersion, pkgVersion):
75426        r"""
75427        logUnknownElement(SBasePlugin self, string element, unsigned int const sbmlLevel, unsigned int const sbmlVersion, unsigned int const pkgVersion)
75428
75429        @internal
75430
75431        @internal
75432
75433        """
75434        return _libsbml.SBasePlugin_logUnknownElement(self, element, sbmlLevel, sbmlVersion, pkgVersion)
75435
75436    def isValidTypeForList(self, item):
75437        r"""
75438        isValidTypeForList(SBasePlugin self, SBase item) -> bool
75439
75440
75441
75442        """
75443        return _libsbml.SBasePlugin_isValidTypeForList(self, item)
75444
75445    def getSBMLExtension(self):
75446        r"""
75447        getSBMLExtension(SBasePlugin self) -> SBMLExtension
75448
75449        @internal
75450
75451        @internal
75452
75453        """
75454        return _libsbml.SBasePlugin_getSBMLExtension(self)
75455
75456    def updateSBMLNamespace(self, package, level, version):
75457        r"""
75458        updateSBMLNamespace(SBasePlugin self, string package, unsigned int level, unsigned int version)
75459
75460        @internal
75461
75462        @internal
75463
75464        """
75465        return _libsbml.SBasePlugin_updateSBMLNamespace(self, package, level, version)
75466
75467    __metaclass__ = AutoProperty
75468
75469
75470    def __eq__(self, rhs):
75471      if ((self is None) and (rhs is None)): return True
75472      if ((self is None) or  (rhs is None)): return False
75473      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
75474        if (self.this == rhs.this): return True
75475      return False
75476
75477    def __ne__(self, rhs):
75478      if ((self is None) and (rhs is None)): return False
75479      if ((self is None) or  (rhs is None)): return True
75480      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
75481        if (self.this == rhs.this): return False
75482      return True
75483
75484
75485    def getListOfAllElements(self, filter=None):
75486        r"""
75487        getListOfAllElements(SBasePlugin self, ElementFilter filter=None) -> SBaseList
75488
75489        Returns an SBaseList of all child SBase objects, including those
75490        nested to an arbitrary depth.
75491
75492        @return a list of all objects that are children of this object.
75493
75494        """
75495        return _libsbml.SBasePlugin_getListOfAllElements(self, filter)
75496
75497# Register SBasePlugin in _libsbml:
75498_libsbml.SBasePlugin_swigregister(SBasePlugin)
75499
75500class SBMLDocumentPlugin(SBasePlugin):
75501    r"""
75502
75503    @sbmlpackage{core}
75504
75505    @htmlinclude pkg-marker-core.html Base class for extending SBMLDocument in packages.
75506
75507    @htmlinclude not-sbml-warning.html
75508
75509    The SBMLDocumentPlugin class is a specialization of SBasePlugin
75510    designed specifically for extending SBMLDocument.  All package
75511    extensions must extend SBMLDocument to implement support for SBML
75512    Level&nbsp;3 packages; these extensions can be subclasses of this
75513    class or from a derived class of this class.
75514
75515    All packages must additionally define a
75516    required flag named <code>required</code>, which indicates whether
75517    that package's constructs can be used to change the core mathematics of the
75518    <code>&lt;model&gt;</code> child of the <code>&lt;sbml&gt;</code> element.
75519    If they can, this attribute must be set @c True, and if they cannot, this
75520    attribute must be set @c False.
75521
75522    @if clike
75523    @section sbmldocumentplugin-howto How to extend SBMLDocumentPlugin for a package implementation
75524    @par
75525    The following subsections detail the basic steps necessary to use
75526    SBMLDocumentPlugin to extend SBMLDocument for a given package extension.
75527
75528
75529    @subsection sdp-identify 1. Identify the changes necessary to SBMLDocument
75530
75531    The specification for a SBML Level&nbsp;3 package will define the
75532    changes to the SBML <code>&lt;sbml&gt;</code> element.  Packages
75533    typically do not make any changes beyond adding an attribute named
75534    'required' (discussed below), so in most cases, the extension of
75535    SBMLDocument is very simple.  However, some packages do more.  For
75536    instance, the Hierarchical %Model Composition package adds subobjects
75537    for lists of model definitions.  SBMLDocumentPlugin supports all these
75538    cases.
75539
75540
75541    @subsection sdp-implement 2. Create the SBMLDocumentPlugin subclass
75542
75543    A package extension will only define one subclass of SBMLDocumentPlugin.
75544    Below, we describe in detail the different parts of a subclass
75545    definition.
75546
75547
75548    @subsubsection sdp-class  2.1 Override SBasePlugin class-related methods
75549
75550    The derived class must override the constructor, copy constructor, assignment
75551    operator (<code>operator=</code>) and <code>clone()</code> methods from
75552    SBasePlugin.
75553
75554
75555    @subsubsection sdp-required 2.2 Determine the necessary value of the 'required' attribute
75556
75557    At minimum, it is necessary for a package implementation to add the
75558    'required' attribute to the SBML <code>&lt;sbml&gt;</code> element
75559    mandated by SBML for all Level&nbsp;3 packages, and this is done using
75560    this class as a base.  If the 'required' attribute is the @em only
75561    addition necessary for a particular SBML Level&nbsp;3 package, then the
75562    subclass of SBMLDocumentPlugin for the package can have a very simple
75563    implementation.  Some Level&nbsp;3 packages add additional attributes or
75564    elements to <code>&lt;sbml&gt;</code>, and their implementations would
75565    go into the subclassed SBMLDocumentPlugin.
75566
75567    SBMLDocumentPlugin provides methods with default implementations that
75568    support managing the 'required' attribute, so package extension code
75569    does not need to provide implementations&mdash;they only need to set the
75570    correct value for the SBML Level&nbsp;3 package based on its
75571    specification.  The following are the virtual methods for working with
75572    the 'required' attribute.  Package extensions would only need to
75573    override them in special circumstances:
75574
75575    @li <code>setRequired(bool value)</code>: This method sets the value
75576    of the flag.
75577
75578    @li <code>getRequired()</code>: This method gets the value of the
75579    'required' flag.
75580
75581    @li <code>isSetRequired()</code>: This method tests if the value has
75582    been set.
75583
75584    @li <code>unsetRequired()</code>: This method unsets the value of the
75585    'required' flag.
75586
75587
75588    @subsubsection sdp-protected 2.3 Define protected data members
75589
75590    An extended SBMLDocument object may need more than just the 'required'
75591    attribute, depending on what is defined in the specification for the
75592    package being implemented.  Data attributes on the extended
75593    <code>&lt;sbml&gt;</code> object in an SBML package will have one of the
75594    data types <code>string</code>, <code>double</code>,
75595    <code>int</code>, or <code>bool</code>.  Subelements/subobjects will
75596    normally be derived from the ListOf class or from SBase.
75597
75598    The additional data members must be properly initialized in the class
75599    constructor, and must be properly copied in the copy constructor and
75600    assignment operator.
75601
75602
75603    @subsubsection sdp-methods-attribs 2.4 Override virtual methods for attributes
75604
75605    If the extended component is defined by the SBML Level&nbsp;3 package to
75606    have attributes, then the extended SBMLDocumentPlugin class definition
75607    needs to override the following internal methods that come from
75608    SBasePlugin (the base class of SBMLDocumentPlugin) and provide
75609    appropriate implementations:
75610
75611    @li <code>addExpectedAttributes(ExpectedAttributes& attributes)</code>: This
75612    method should add the attributes that are expected to be found on this kind
75613    of extended component in an SBML file or data stream.
75614
75615    @li <code>readAttributes(XMLAttributes attributes, ExpectedAttributes&
75616    expectedAttributes)</code>: This method should read the attributes
75617    expected to be found on this kind of extended component in an SBML file or
75618    data stream.
75619
75620    @li <code>hasRequiredAttributes()</code>: This method should return @c True
75621    if all of the required attribute for this extended component are present on
75622    instance of the object.
75623
75624    @li <code>writeAttributes(XMLOutputStream stream)</code>: This method should
75625    write out the attributes of an extended component.  The implementation should
75626    use the different kinds of <code>writeAttribute</code> methods defined by
75627    XMLOutputStream to achieve this.
75628
75629
75630    @subsubsection sdp-methods-elem 2.5 Override virtual methods for subcomponents
75631
75632    If the extended component is defined by the Level&nbsp;3 package to have
75633    subcomponents (i.e., full XML elements rather than mere attributes),
75634    then the extended class definition needs to override the following
75635    internal methods on SBasePlugin (the base class of SBMLDocumentPlugin)
75636    and provide appropriate implementations:
75637
75638    @li <code>createObject(XMLInputStream stream)</code>: Subclasses must
75639    override this method to create, store, and then return an SBML object
75640    corresponding to the next XMLToken in the XMLInputStream.  To do this,
75641    implementations can use methods like <code>peek()</code> on XMLInputStream to
75642    test if the next object in the stream is something expected for the package.
75643    For example, LayoutModelPlugin uses <code>peek()</code> to examine the next
75644    element in the input stream, then tests that element against the Layout
75645    namespace and the element name <code>'listOfLayouts'</code> to see if it's
75646    the single subcomponent (ListOfLayouts) permitted on a Model object using the
75647    Layout package.  If it is, it returns the appropriate object.
75648
75649    @li <code>connectToParent(SBase sbase)</code>: This creates a parent-child
75650    relationship between a given extended component and its subcomponent(s).
75651
75652    @li <code>setSBMLDocument(SBMLDocument d)</code>: This method should set the
75653    parent SBMLDocument object on the subcomponent object instances, so that the
75654    subcomponent instances know which SBMLDocument contains them.
75655
75656    @li <code>enablePackageInternal(string& pkgURI, string& pkgPrefix,
75657    bool flag)</code>: This method should enable or disable the subcomponent
75658    based on whether a given XML namespace is active.
75659
75660    @li <code>writeElements(XMLOutputStream stream)</code>: This method must be
75661    overridden to provide an implementation that will write out the expected
75662    subcomponents/subelements to the XML output stream.
75663
75664    @li <code>readOtherXML(SBase parentObject, XMLInputStream stream)</code>:
75665    This function should be overridden if elements of annotation, notes, MathML
75666    content, etc., need to be directly parsed from the given XMLInputStream
75667    object.
75668
75669    @li <code>hasRequiredElements()</code>: This method should return @c True if
75670    a given object contains all the required subcomponents defined by the
75671    specification for that SBML Level&nbsp;3 package.
75672
75673
75674    @subsubsection sdp-methods-xmlns 2.6 Override virtual methods for XML namespaces
75675
75676    If the package needs to add additional <code>xmlns</code> attributes to
75677    declare additional XML namespace URIs, the extended class should
75678    override the following method coming from SBasePlugin (the parent class
75679    of SBMLDocumentPlugin):
75680
75681    @li <code>writeXMLNS(XMLOutputStream stream)</code>: This method should
75682    write out any additional XML namespaces that might be needed by a package
75683    implementation.
75684
75685
75686    @subsubsection sdp-methods-hooks 2.7 Implement additional methods as needed
75687
75688    Extended SBMLDocumentPlugin implementations can add whatever additional
75689    utility methods are useful for their implementation.
75690    @else
75691    @section ext-basics Basic principles of SBML package extensions in libSBML
75692
75693    @par
75694    SBML Level&nbsp;3's package structure permits modular extensions to the
75695    core SBML format.  In libSBML, support for SBML Level&nbsp;3 packages is
75696    provided through optional <em>package extensions</em> that can be plugged
75697    into libSBML at the time it is built/compiled.  Users of libSBML can thus
75698    choose which extensions are enabled in their software applications.
75699
75700    LibSBML defines a number of classes that developers of package extensions
75701    can use to implement support for an SBML Level&nbsp;3 package.  These
75702    classes make it easier to extend libSBML objects with new attributes
75703    and/or subobjects as needed by a particular Level&nbsp;3 package.
75704    Three overall categories of classes make up libSBML's facilities for
75705    implementing package extensions.  There are (1) classes that serve as base
75706    classes meant to be subclassed, (2) template classes meant to be
75707    instantiated rather than subclassed, and (3) support classes that provide
75708    utility features. A given package implementation for libSBML will take
75709    the form of code using these and other libSBML classes, placed in a
75710    subdirectory of <code>src/sbml/packages/</code>.
75711
75712    The basic libSBML distribution includes a number of package extensions
75713    implementing support for officially-endorsed SBML Level&nbsp;3 packages;
75714    among these are <em>Flux Balance Constraints</em> ('fbc'),
75715    <em>Hierarchical %Model Composition</em> ('comp'), <em>%Layout</em>
75716    ('layout'), and <em>Qualitative Models</em> ('qual').  They can serve as
75717    working examples for developers working to implement other packages.
75718
75719    Extensions in libSBML can currently only be implemented in C++ or C;
75720    there is no mechanism to implement them first in languages such as
75721    Java or Python.  However, once implemented in C++ or C, language
75722    interfaces can be generated semi-automatically using the framework in
75723    place in libSBML.  (The approach is based on using <a target='_blank'
75724    href='http://www.swig.org'>SWIG</a> and facilities in libSBML's build
75725    system.)
75726    @endif@~
75727
75728    """
75729
75730    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
75731    __repr__ = _swig_repr
75732
75733    def __init__(self, *args):
75734        r"""
75735        __init__(SBMLDocumentPlugin self, string uri, string prefix, SBMLNamespaces sbmlns) -> SBMLDocumentPlugin
75736        __init__(SBMLDocumentPlugin self, SBMLDocumentPlugin orig) -> SBMLDocumentPlugin
75737
75738        This method has multiple variants; they differ in the arguments
75739         they accept.  Each variant is described separately below.
75740
75741        @par
75742        <hr>
75743        <span class='variant-sig-heading'>Method variant with the following signature</span>:
75744         <pre class='signature'>SBMLDocumentPlugin(string &uri, string &prefix, SBMLNamespaces sbmlns)</pre>
75745
75746        Creates a new SBMLDocumentPlugin object using the given parameters.
75747
75748        @par
75749        In the XML representation of an SBML document, XML namespaces are used to
75750        identify the origin of each XML construct used.  XML namespaces are
75751        identified by their unique resource identifiers (URIs).  The core SBML
75752        specifications stipulate the namespaces that must be used for core SBML
75753        constructs; for example, all XML elements that belong to SBML Level&nbsp;3
75754        Version&nbsp;1 Core must be placed in the XML namespace identified by the URI
75755        <code>'http://www.sbml.org/sbml/level3/version1/core'</code>.  Individual
75756        SBML Level&nbsp;3 packages define their own XML namespaces; for example,
75757        all elements belonging to the SBML Level&nbsp;3 %Layout Version&nbsp;1
75758        package must be placed in the XML namespace
75759        <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>.
75760
75761        @par
75762        The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
75763        information.  It is used to communicate the SBML Level, Version, and (in
75764        Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
75765        common approach to using libSBML's SBMLNamespaces facilities is to create an
75766        SBMLNamespaces object somewhere in a program once, then hand that object
75767        as needed to object constructors that accept SBMLNamespaces as arguments.
75768
75769        @param uri the URI of the SBML Level&nbsp;3 package implemented by
75770        this libSBML package extension.
75771
75772        @param prefix the XML namespace prefix being used for the package.
75773
75774        @param sbmlns the SBMLNamespaces object for the package.
75775
75776
75777        @par
75778        <hr>
75779        <span class='variant-sig-heading'>Method variant with the following signature</span>:
75780         <pre class='signature'>SBMLDocumentPlugin(SBMLDocumentPlugin orig)</pre>
75781
75782        Copy constructor.
75783
75784        This creates a copy of this object.
75785
75786        @param orig the SBMLDocumentPlugin instance to copy.
75787
75788        """
75789        _libsbml.SBMLDocumentPlugin_swiginit(self, _libsbml.new_SBMLDocumentPlugin(*args))
75790    __swig_destroy__ = _libsbml.delete_SBMLDocumentPlugin
75791
75792    def clone(self):
75793        r"""
75794        clone(SBMLDocumentPlugin self) -> SBMLDocumentPlugin
75795
75796        Creates and returns a deep copy of this SBMLDocumentPlugin object.
75797
75798        @return the (deep) copy of this SBMLDocumentPlugin object.
75799
75800        """
75801        return _libsbml.SBMLDocumentPlugin_clone(self)
75802
75803    def setRequired(self, value):
75804        r"""
75805        setRequired(SBMLDocumentPlugin self, bool value) -> int
75806
75807        Sets the SBML 'required' attribute value.
75808
75809        @par
75810        SBML Level&nbsp;3 requires that every package defines an attribute named
75811        'required' on the root <code>&lt;sbml&gt;</code> element in an SBML file
75812        or data stream.  The attribute, being in the namespace of the Level&nbsp;3
75813        package in question, must be prefixed by the XML namespace prefix
75814        associated with the package.  The value of the 'required' attribute
75815        indicates whether constructs in that package may change the mathematical
75816        interpretation of constructs defined in SBML Level&nbsp;3 Core.  A
75817        'required' value of @c True indicates that the package may do so.  The
75818        value of the attribute is set by the Level&nbsp;3 package specification,
75819        and does @em not depend on the actual presence or absence of particular
75820        package constructs in a given SBML document: in other words, if the
75821        package specification defines any construct that can change the model's
75822        meaning, the value of the 'required' attribute must always be set to
75823        @c True in any SBML document that uses the package.
75824
75825        The XML namespace declaration for an SBML Level&nbsp;3 package is an
75826        indication that a model makes use of features defined by that package,
75827        while the 'required' attribute indicates whether the features may be
75828        ignored without compromising the mathematical meaning of the model.  Both
75829        are necessary for a complete reference to an SBML Level&nbsp;3 package.
75830
75831        @param value the value to be assigned to the 'required' attribute.
75832        The 'required' attribute takes a Boolean value, either @c True or
75833        @c False.
75834
75835        @return integer value indicating success/failure of the
75836        function.  @if clike The value is drawn from the
75837        enumeration #OperationReturnValues_t. @endif@~ The possible values
75838        returned by this function are:
75839        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
75840        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
75841
75842        @see getRequired()
75843        @see isSetRequired()
75844        @see unsetRequired()
75845
75846        """
75847        return _libsbml.SBMLDocumentPlugin_setRequired(self, value)
75848
75849    def getRequired(self):
75850        r"""
75851        getRequired(SBMLDocumentPlugin self) -> bool
75852
75853        Returns the value of the 'required' attribute.
75854
75855        @par
75856        SBML Level&nbsp;3 requires that every package defines an attribute named
75857        'required' on the root <code>&lt;sbml&gt;</code> element in an SBML file
75858        or data stream.  The attribute, being in the namespace of the Level&nbsp;3
75859        package in question, must be prefixed by the XML namespace prefix
75860        associated with the package.  The value of the 'required' attribute
75861        indicates whether constructs in that package may change the mathematical
75862        interpretation of constructs defined in SBML Level&nbsp;3 Core.  A
75863        'required' value of @c True indicates that the package may do so.  The
75864        value of the attribute is set by the Level&nbsp;3 package specification,
75865        and does @em not depend on the actual presence or absence of particular
75866        package constructs in a given SBML document: in other words, if the
75867        package specification defines any construct that can change the model's
75868        meaning, the value of the 'required' attribute must always be set to
75869        @c True in any SBML document that uses the package.
75870
75871        The XML namespace declaration for an SBML Level&nbsp;3 package is an
75872        indication that a model makes use of features defined by that package,
75873        while the 'required' attribute indicates whether the features may be
75874        ignored without compromising the mathematical meaning of the model.  Both
75875        are necessary for a complete reference to an SBML Level&nbsp;3 package.
75876
75877        @return the bool value of 'required' attribute for the SBML package.
75878
75879        @see setRequired()
75880        @see isSetRequired()
75881        @see unsetRequired()
75882
75883        """
75884        return _libsbml.SBMLDocumentPlugin_getRequired(self)
75885
75886    def isSetRequired(self):
75887        r"""
75888        isSetRequired(SBMLDocumentPlugin self) -> bool
75889
75890        Returns the value of the 'required' attribute.
75891
75892        @par
75893        SBML Level&nbsp;3 requires that every package defines an attribute named
75894        'required' on the root <code>&lt;sbml&gt;</code> element in an SBML file
75895        or data stream.  The attribute, being in the namespace of the Level&nbsp;3
75896        package in question, must be prefixed by the XML namespace prefix
75897        associated with the package.  The value of the 'required' attribute
75898        indicates whether constructs in that package may change the mathematical
75899        interpretation of constructs defined in SBML Level&nbsp;3 Core.  A
75900        'required' value of @c True indicates that the package may do so.  The
75901        value of the attribute is set by the Level&nbsp;3 package specification,
75902        and does @em not depend on the actual presence or absence of particular
75903        package constructs in a given SBML document: in other words, if the
75904        package specification defines any construct that can change the model's
75905        meaning, the value of the 'required' attribute must always be set to
75906        @c True in any SBML document that uses the package.
75907
75908        The XML namespace declaration for an SBML Level&nbsp;3 package is an
75909        indication that a model makes use of features defined by that package,
75910        while the 'required' attribute indicates whether the features may be
75911        ignored without compromising the mathematical meaning of the model.  Both
75912        are necessary for a complete reference to an SBML Level&nbsp;3 package.
75913
75914        @return @c True if the 'required' attribute of this SBMLDocument
75915        has been set to @c True, @c False otherwise.
75916
75917        """
75918        return _libsbml.SBMLDocumentPlugin_isSetRequired(self)
75919
75920    def unsetRequired(self):
75921        r"""
75922        unsetRequired(SBMLDocumentPlugin self) -> int
75923
75924        Unsets the value of the 'required' attribute of this SBMLDocumentPlugin.
75925
75926        @return integer value indicating success/failure of the
75927        function.  @if clike The value is drawn from the
75928        enumeration #OperationReturnValues_t. @endif@~ The possible values
75929        returned by this function are:
75930        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
75931
75932        """
75933        return _libsbml.SBMLDocumentPlugin_unsetRequired(self)
75934
75935    def isCompFlatteningImplemented(self):
75936        r"""
75937        isCompFlatteningImplemented(SBMLDocumentPlugin self) -> bool
75938
75939        @internal
75940
75941        @internal
75942
75943        """
75944        return _libsbml.SBMLDocumentPlugin_isCompFlatteningImplemented(self)
75945
75946    def checkConsistency(self):
75947        r"""
75948        checkConsistency(SBMLDocumentPlugin self) -> unsigned int
75949
75950        @internal
75951
75952        @internal
75953
75954        """
75955        return _libsbml.SBMLDocumentPlugin_checkConsistency(self)
75956
75957# Register SBMLDocumentPlugin in _libsbml:
75958_libsbml.SBMLDocumentPlugin_swigregister(SBMLDocumentPlugin)
75959
75960class SBMLExtension(object):
75961    r"""
75962
75963    @sbmlpackage{core}
75964
75965    @htmlinclude pkg-marker-core.html Base class for SBML Level 3 package plug-ins.
75966
75967    @htmlinclude not-sbml-warning.html
75968
75969    The SBMLExtension class is a component of the libSBML package extension
75970    mechanism.  It is an abstract class that is extended by each package
75971    extension implementation. @if clike The SBMLExtension class provides
75972    methods for managing common attributes of package extensions (e.g.,
75973    package name, package version), registration of instantiated
75974    SBasePluginCreator objects, and initialization/registration of package
75975    extensions when the library code for the package is loaded. @endif@~
75976
75977    @if clike
75978    @section sbmlextension-howto How to extend SBMLExtension for a package implementation
75979    @par
75980    Each package implementation must contain a class that extends
75981    SBMLExtension.  For example, the class <code>GroupsExtension</code> serves
75982    this purpose for the SBML Level&nbsp;3 @em Groups package extension in
75983    libSBML. The following subsections detail the basic steps involved in
75984    implementing such an extended class.
75985
75986    @subsection ext-getpackagename 1. Define the getPackageName() method
75987
75988    Define a method named <code>getPackageName()</code> that returns the
75989    name of the package as a string.  The following is an example from the
75990    implementation of the Groups package extension:
75991    @code{.cpp}
75992    string GroupsExtension.getPackageName ()
75993    {
75994          static string pkgName = 'groups';
75995          return pkgName;
75996    }
75997    @endcode
75998
75999
76000    @subsection ext-version-methods 2. Define methods returning package version information
76001
76002    Define a set of methods that return the default SBML Level, SBML
76003    Version and version of the package.  These methods must be named
76004    <code>getDefaultLevel()</code>, <code>getDefaultVersion()</code> and
76005    <code>getDefaultPackageVersion()</code>, respectively.  The following
76006    are examples drawn from the Groups package implementation:
76007    @code{.cpp}
76008    long GroupsExtension.getDefaultLevel()
76009    {
76010          return 3;
76011    }
76012    long GroupsExtension.getDefaultVersion()
76013    {
76014          return 1;
76015    }
76016    long GroupsExtension.getDefaultPackageVersion()
76017    {
76018          return 1;
76019    }
76020    @endcode
76021
76022
76023    @subsection ext-ns 3. Define methods returning the package namespace URIs
76024
76025    Define methods that return strings representing the XML namespace URI
76026    for the package.  One method should be defined for each SBML Level/Version
76027    combination for which the package can be used.  For instance, if a package
76028    is only usable in SBML Level&nbsp;3 Version&nbsp;1, and the libSBML
76029    extension for the package implements version&nbsp;1 of the package, the
76030    necessary method is <code>getXmlnsL3V1V1()</code>.
76031    @code{.cpp}
76032    string GroupsExtension.getXmlnsL3V1V1 ()
76033    {
76034          static string xmlns = 'http://www.sbml.org/sbml/level3/version1/groups/version1';
76035          return xmlns;
76036    }
76037    @endcode
76038
76039    Define other similar methods to return additional namespace URIs if the
76040    package extension implements other package versions or supports other SBML
76041    Level/Version combinations.
76042
76043
76044    @subsection ext-virtual 4. Override basic pure virtual methods
76045
76046    Override the following pure virtual methods on SBMLExtension:
76047
76048    @li <code>virtual string getName()  =0</code>. This
76049    method returns the nickname of the package (e.g., 'layout',
76050    'groups').
76051
76052    @li <code>virtual long getLevel(string &uri)
76053    =0</code>. This method returns the SBML Level with the given URI of
76054    this package.
76055
76056    @li <code>virtual long getVersion(string &uri)
76057     =0</code>. This method returns the SBML Version with the given
76058    URI of this package.
76059
76060    @li <code>virtual long getPackageVersion(string
76061    &uri)  =0</code>. This method returns the package version with
76062    the given URI of this package.
76063
76064    @li <code>virtual long getURI(long sbmlLevel,
76065    long sbmlVersion, long pkgVersion)  =0</code>.
76066    This method returns the URI (namespace) of the package corresponding
76067    to the combination of the given SBML Level, SBML Version, and package
76068    version
76069
76070    @li <code>virtual SBMLExtension clone()  = 0</code>. This
76071    method creates and returns a deep copy of this derived object.
76072
76073    As an example, the following are the versions of these methods for
76074    the Groups package:
76075    @code{.cpp}
76076    string GroupsExtension.getName()
76077    {
76078      return getPackageName();
76079    }
76080
76081    long GroupsExtension.getLevel()
76082    {
76083      if (uri == getXmlnsL3V1V1())
76084        return 3;
76085      else
76086        return 0;
76087    }
76088
76089    long GroupsExtension.getVersion()
76090    {
76091      if (uri == getXmlnsL3V1V1())
76092        return 1;
76093      else
76094        return 0;
76095    }
76096
76097    long GroupsExtension.getPackageVersion()
76098    {
76099      if (uri == getXmlnsL3V1V1())
76100        return 1;
76101      else
76102        return 0;
76103    }
76104
76105    string GroupsExtension.getURI()
76106    {
76107      if (sbmlLevel == 3 && sbmlVersion == 1 && pkgVersion == 1)
76108        return getXmlnsL3V1V1();
76109
76110      static string empty = '';
76111      return empty;
76112    }
76113
76114    GroupsExtension* GroupsExtension.clone()
76115    {
76116      return new GroupsExtension(*this);
76117    }
76118    @endcode
76119
76120    Constructor, copy constructor, and destructor methods also must be
76121    overridden if additional data members are defined in the derived class.
76122
76123
76124    @subsection ext-typedef 5. Create SBMLExtensionNamespaces-related definitions
76125
76126    Define typedef and template instantiation code for a package-specific
76127    subclass of the SBMLExtensionNamespaces template class.  The
76128    SBMLExtensionNamespaces template class is a derived class of
76129    SBMLNamespaces and can be used as an argument of constructors of
76130    SBase-derived classes defined in the package extensions.
76131
76132    <ol>
76133
76134    <li> Define a typedef.  For example, the typedef for
76135    <code>GroupsExtension</code> is implemented in the file
76136    <code>GroupsExtension.h</code> as follows:
76137    @code{.cpp}
76138    // GroupsPkgNamespaces is derived from the SBMLNamespaces class.
76139    // It is used when creating a Groups package object of a class
76140    // derived from SBase.
76141    typedef SBMLExtensionNamespaces<GroupsExtension> GroupsPkgNamespaces;
76142    @endcode
76143    </li>
76144
76145    <li> Define a template instantiation for the typedef.  For example, the
76146    template instantiation code for <code>GroupsExtension is</code> implemented
76147    in the file <code>GroupsExtension.cpp</code> as follows:
76148    @code{.cpp}
76149    template class LIBSBML_EXTERN SBMLExtensionNamespaces<GroupsExtension>;
76150    @endcode
76151    </li>
76152
76153    </ol>
76154
76155    Here is example of how the resulting class is used.  The definitions above
76156    allow a <code>GroupsPkgNamespaces</code> object to be used when creating a
76157    new <code>Group</code> object.  The <code>GroupsPkgNamespaces</code> is
76158    handed to the constructor as an argument, as shown below:
76159    @code{.cpp}
76160    GroupPkgNamespaces gpns(3, 1, 1);  // SBML Level, Version, & pkg version.
76161    Group g = new Group(&gpns);        // Creates a Group object.
76162    @endcode
76163
76164    The <code>GroupsPkgNamespaces</code> object can also be used when creating
76165    an SBMLDocument object with the Groups package.  The code fragment
76166    below shows an example of this:
76167    @code{.cpp}
76168       GroupsPkgNamespaces gpns(3, 1, 1);
76169       SBMLDocument doc;
76170       doc  = new SBMLDocument(&gnps);
76171    @endcode
76172
76173
76174    @subsection ext-virtual-ns 6. Override the method getSBMLExtensionNamespaces()
76175
76176    Override the pure virtual method <code>getSBMLExtensionNamespaces()</code>,
76177    which returns an SBMLNamespaces derived object.  For example, the method
76178    is overridden in the class <code>GroupsExtension</code> as follows:
76179    @code{.cpp}
76180    SBMLNamespaces
76181    GroupsExtension.getSBMLExtensionNamespaces()
76182    {
76183      GroupsPkgNamespaces* pkgns = None;
76184      if ( uri == getXmlnsL3V1V1())
76185      {
76186        pkgns = new GroupsPkgNamespaces(3, 1, 1);
76187      }
76188      return pkgns;
76189    }
76190    @endcode
76191
76192
76193    @subsection ext-enum 7. Define an enumeration for the package object type codes
76194
76195    Define an enum type for representing the type code of the objects defined
76196    in the package extension.  For example, the enumeration
76197    <code>SBMLGroupsTypeCode_t</code> for the Groups package is defined in
76198    <code>GroupsExtension.h</code> as follows:
76199    @code{.cpp}
76200    typedef enum
76201    {
76202       SBML_GROUPS_GROUP  = 500
76203     , SBML_GROUPS_MEMBER = 501
76204    } SBMLGroupsTypeCode_t;
76205    @endcode
76206
76207    In the enumeration above, <code>SBML_GROUPS_GROUP</code> corresponds to
76208    the <code>Group</code> class (for the <code>&lt;group&gt;</code> element
76209    defined by the SBML Level&nbsp;3 Groups package) and
76210    <code>SBML_GROUPS_MEMBER</code> corresponds to the <code>Member</code>
76211    class (for the <code>&lt;member&gt;</code> element defined by the
76212    Level&nbsp;3 Groups package), respectively.
76213
76214    Similarly, #SBMLLayoutTypeCode_t for the Layout package is defined in
76215    the file <code>LayoutExtension.h</code> as follows:
76216
76217    @code{.cpp}
76218    typedef enum
76219    {
76220       SBML_LAYOUT_BOUNDINGBOX           = 100
76221     , SBML_LAYOUT_COMPARTMENTGLYPH      = 101
76222     , SBML_LAYOUT_CUBICBEZIER           = 102
76223     , SBML_LAYOUT_CURVE                 = 103
76224     , SBML_LAYOUT_DIMENSIONS            = 104
76225     , SBML_LAYOUT_GRAPHICALOBJECT       = 105
76226     , SBML_LAYOUT_LAYOUT                = 106
76227     , SBML_LAYOUT_LINESEGMENT           = 107
76228     , SBML_LAYOUT_POINT                 = 108
76229     , SBML_LAYOUT_REACTIONGLYPH         = 109
76230     , SBML_LAYOUT_SPECIESGLYPH          = 110
76231     , SBML_LAYOUT_SPECIESREFERENCEGLYPH = 111
76232     , SBML_LAYOUT_TEXTGLYPH             = 112
76233    } SBMLLayoutTypeCode_t;
76234    @endcode
76235
76236    These enum values are returned by corresponding <code>getTypeCode()</code>
76237    methods.  (E.g., <code>SBML_GROUPS_GROUP</code> is returned in
76238    <code>Group.getTypeCode()</code>.)
76239
76240    Note that libSBML does not require that type codes are unique across all
76241    packages&mdash;the same type codes may be used within individual package
76242    extensions.  LibSBML development must permit this because package
76243    implementations are developed by separate groups at different times;
76244    coordinating the type codes used is impractical.  It does mean that
76245    callers must check two things when identifying objects: to distinguish the
76246    type codes of different packages, callers much check not only the return
76247    value of the method <code>getTypeCode()</code> method but also that of the
76248    method <code>getPackageName()</code>.  Here is an example of doing that:
76249    @code{.cpp}
76250    void example (SBase sb)
76251    {
76252      string pkgName = sb->getPackageName();
76253      if (pkgName == 'core') {
76254        switch (sb->getTypeCode()) {
76255          case SBML_MODEL:
76256             ....
76257             break;
76258          case SBML_REACTION:
76259             ....
76260        }
76261      }
76262      else if (pkgName == 'layout') {
76263        switch (sb->getTypeCode()) {
76264          case SBML_LAYOUT_LAYOUT:
76265             ....
76266             break;
76267          case SBML_LAYOUT_REACTIONGLYPH:
76268             ....
76269        }
76270      }
76271      else if (pkgName == 'groups') {
76272        switch (sb->getTypeCode()) {
76273          case SBML_GROUPS_GROUP:
76274             ....
76275             break;
76276          case SBML_GROUPS_MEMBER:
76277             ....
76278        }
76279      }
76280      ...
76281    }
76282    @endcode
76283
76284    Readers may have noticed that in the #SBMLLayoutTypeCode_t and
76285    <code>SBMLGroupsTypeCode_t</code> enumerations above, unique values
76286    are in fact assigned to the enumeration values.  This can be convenient
76287    when it can be arranged, but it is not required by libSBML.
76288
76289
76290    @subsection ext-virtual-typecodes 8. Override the method getStringFromTypeCode()
76291
76292    Override the pure virtual method <code>getStringFromTypeCode()</code>,
76293    which returns a string corresponding to the given type code.  Here is an
76294    example, again drawn from the implementation of the Groups package:
76295    @code{.cpp}
76296    virtual string SBMLExtension::(int typeCode) ;
76297    @endcode
76298
76299    For example, the method for the Groups extension is implemented as
76300    shown below:
76301    @code{.cpp}
76302    static string SBML_GROUPS_TYPECODE_STRINGS[] =
76303    {
76304        'Group'
76305      , 'Member'
76306    };
76307
76308    string GroupsExtension.getStringFromTypeCode()
76309    {
76310      int min = SBML_GROUPS_GROUP;
76311      int max = SBML_GROUPS_MEMBER;
76312
76313      if (typeCode < min || typeCode > max)
76314      {
76315        return '(Unknown SBML Groups Type)';
76316      }
76317
76318      return SBML_GROUPS_TYPECODE_STRINGS[typeCode - min];
76319    }
76320    @endcode
76321
76322
76323    @subsection ext-init 9. Implement an init() method
76324
76325    Implement a <code>static void init()</code> method in the derived class.
76326    This method serves to encapsulate initialization code that creates an
76327    instance of the derived class and registration code that registers the
76328    instance with the SBMLExtensionRegistry class.
76329
76330    For example, the <code>init()</code> method for the Groups package is
76331    implemented as follows:
76332    @code{.cpp}
76333    void GroupsExtension.init()
76334    {
76335      // 1. Check if the Groups package has already been registered.
76336
76337      if ( SBMLExtensionRegistry.getInstance().isRegistered(getPackageName()) )
76338      {
76339        // do nothing;
76340        return;
76341      }
76342
76343      // 2. Create an SBMLExtension derived object.
76344
76345      GroupsExtension gext;
76346
76347      // 3. Create SBasePluginCreator-derived objects. The derived classes
76348      // can be instantiated by using the following template class:
76349      //
76350      //   template<class SBasePluginType> class SBasePluginCreator
76351      //
76352      // The constructor of the creator class takes two arguments:
76353      //
76354      // 1) SBaseExtensionPoint: extension point to which the plugin connects
76355      // 2) std::vector<string>: a vector that contains a list of URI
76356      // (package versions) supported by the plugin object.
76357      //
76358      // For example, two plugin objects are required as part of the Groups
76359      // implementation: one plugged into SBMLDocument and one into Model.
76360      // For the former, since the specification for the SBML Groups package
76361      // mandates that the 'required' flag is always 'false', the existing
76362      // SBMLDocumentPluginNotRequired class can be used as-is as part of
76363      // the implementation.  For Model, since the lists of supported
76364      // package versions (currently only SBML L3V1 Groups V1) are equal
76365      // in the both plugin objects, the same vector can be handed to each
76366      // constructor.
76367
76368      std::vector<string> pkgURIs;
76369      pkgURIs.push_back(getXmlnsL3V1V1());
76370
76371      SBaseExtensionPoint docExtPoint('core', SBML_DOCUMENT);
76372      SBaseExtensionPoint modelExtPoint('core', SBML_MODEL);
76373
76374      SBasePluginCreator<GroupsSBMLDocumentPlugin, GroupsExtension> docPluginCreator(docExtPoint, pkgURIs);
76375      SBasePluginCreator<GroupsModelPlugin, GroupsExtension> modelPluginCreator(modelExtPoint, pkgURIs);
76376
76377      // 4. Add the above objects to the SBMLExtension-derived object.
76378
76379      gext.addSBasePluginCreator(&docPluginCreator);
76380      gext.addSBasePluginCreator(&modelPluginCreator);
76381
76382      // 5. Register the SBMLExtension-derived object with the extension
76383      // registry, SBMLExtensionRegistry.
76384
76385      int result = SBMLExtensionRegistry.getInstance().addExtension(&gext);
76386      if (result != LIBSBML_OPERATION_SUCCESS)
76387      {
76388        std::cerr << '[Error] GroupsExtension.init() failed.' << std::endl;
76389      }
76390    }
76391    @endcode
76392
76393
76394    @subsection ext-extensionregister 10. Instantiate a SBMLExtensionRegister object
76395
76396    Instantiate a global SBMLExtensionRegister object using the
76397    class derived from SBMLExtension (discussed above).  Here is an example for
76398    the Groups package extension, for the object <code>GroupsExtension</code>.
76399    This could is placed in the <code>GroupsExtension.cpp</code>:
76400    @code{.cpp}
76401    static SBMLExtensionRegister<GroupsExtension> groupsExtensionRegister;
76402    @endcode
76403
76404    The <code>init()</code> method on <code>GroupsExtension</code> is
76405    automatically invoked when the 'register' object is instantiated.  This
76406    results in initialization and registration of the package extension
76407    with libSBML.
76408    @else
76409    @section ext-basics Basic principles of SBML package extensions in libSBML
76410
76411    @par
76412    SBML Level&nbsp;3's package structure permits modular extensions to the
76413    core SBML format.  In libSBML, support for SBML Level&nbsp;3 packages is
76414    provided through optional <em>package extensions</em> that can be plugged
76415    into libSBML at the time it is built/compiled.  Users of libSBML can thus
76416    choose which extensions are enabled in their software applications.
76417
76418    LibSBML defines a number of classes that developers of package extensions
76419    can use to implement support for an SBML Level&nbsp;3 package.  These
76420    classes make it easier to extend libSBML objects with new attributes
76421    and/or subobjects as needed by a particular Level&nbsp;3 package.
76422    Three overall categories of classes make up libSBML's facilities for
76423    implementing package extensions.  There are (1) classes that serve as base
76424    classes meant to be subclassed, (2) template classes meant to be
76425    instantiated rather than subclassed, and (3) support classes that provide
76426    utility features. A given package implementation for libSBML will take
76427    the form of code using these and other libSBML classes, placed in a
76428    subdirectory of <code>src/sbml/packages/</code>.
76429
76430    The basic libSBML distribution includes a number of package extensions
76431    implementing support for officially-endorsed SBML Level&nbsp;3 packages;
76432    among these are <em>Flux Balance Constraints</em> ('fbc'),
76433    <em>Hierarchical %Model Composition</em> ('comp'), <em>%Layout</em>
76434    ('layout'), and <em>Qualitative Models</em> ('qual').  They can serve as
76435    working examples for developers working to implement other packages.
76436
76437    Extensions in libSBML can currently only be implemented in C++ or C;
76438    there is no mechanism to implement them first in languages such as
76439    Java or Python.  However, once implemented in C++ or C, language
76440    interfaces can be generated semi-automatically using the framework in
76441    place in libSBML.  (The approach is based on using <a target='_blank'
76442    href='http://www.swig.org'>SWIG</a> and facilities in libSBML's build
76443    system.)
76444    @endif@~
76445
76446    @section sbmlextension-l2-special Special handling for SBML Level&nbsp;2
76447    @par
76448    Due to the historical background of the SBML %Layout package, libSBML
76449    implements special behavior for that package: it @em always creates a
76450    %Layout plugin object for any SBML Level&nbsp;2 document it reads in,
76451    regardless of whether that document actually uses %Layout constructs.  This
76452    is unlike the case for SBML Level&nbsp;3 documents that use %Layout; for
76453    them, libSBML will @em not create a plugin object unless the document
76454    actually declares the use of the %Layout package (via the usual Level&nbsp;3
76455    namespace declaration for Level&nbsp;3 packages).
76456
76457    This has the following consequence.  If an application queries for the
76458    presence of %Layout in an SBML Level&nbsp;2 document by testing only for
76459    the existence of the plugin object, <strong>it will always get a positive
76460    result</strong>; in other words, the presence of a %Layout extension
76461    object is not an indication of whether a read-in Level&nbsp;2 document
76462    does or does not use SBML %Layout.  Instead, callers have to query
76463    explicitly for the existence of layout information.  An example of such a
76464    query is the following code:
76465    @if cpp
76466    @code{.cpp}
76467    // Assume 'm' below is a Model object.
76468    LayoutModelPlugin* lmp = static_cast<LayoutModelPlugin*>(m->getPlugin('layout'));
76469    if (lmp != None)
76470    {
76471      long numLayouts = lmp->getNumLayouts();
76472      // If numLayouts is greater than zero, then the model uses Layout.
76473    }
76474    @endcode
76475    @endif
76476    @if python
76477    @code{.py}
76478    # Assume 'doc' below is an SBMLDocument object.
76479    m = doc.getModel()
76480    if m != None:
76481        layoutPlugin = m.getPlugin('layout')
76482        if layoutPlugin != None:
76483            numLayouts = layoutPlugin.getNumLayouts()
76484            # If numLayouts is greater than zero, then the model uses Layout.
76485    @endcode
76486    @endif
76487    @if java
76488    @code{.java}
76489    // Assume 'doc' below is an SBMLDocument object.
76490    Model m = doc.getModel();
76491    LayoutModelPlugin lmp = (LayoutModelPlugin) m.getPlugin('layout');
76492    if (lmp != null)
76493    {
76494      int numLayouts = lmp.getNumLayouts();
76495      // If numLayouts is greater than zero, then the model uses Layout.
76496    }
76497    @endcode
76498    @endif
76499    @if csharp
76500    @code{.cs}
76501    // Assume 'doc' below is an SBMLDocument object.
76502    Model m = doc.getModel();
76503    LayoutModelPlugin lmp = (LayoutModelPlugin) m.getPlugin('layout');
76504    if (lmp != null)
76505    {
76506      int numLayouts = lmp.getNumLayouts();
76507      // If numLayouts is greater than zero, then the model uses Layout.
76508    }
76509    @endcode
76510    @endif
76511
76512    The special, always-available Level&nbsp;2 %Layout behavior was motivated
76513    by a desire to support legacy applications.  In SBML Level&nbsp;3, the
76514    %Layout package uses the normal SBML Level&nbsp;3 scheme of requiring
76515    declarations on the SBML document element.  This means that upon reading a
76516    model, libSBML knows right away whether it contains layout information.
76517    In SBML Level&nbsp;2, there is no top-level declaration because layout is
76518    stored as annotations in the body of the model.  Detecting the presence of
76519    layout information when reading a Level&nbsp;2 model requires parsing the
76520    annotations.  For efficiency reasons, libSBML normally does not parse
76521    annotations automatically when reading a model.  However, applications
76522    that predated the introduction of Level&nbsp;3 %Layout and the updated
76523    version of libSBML never had to do anything special to enable parsing
76524    layout; the facilities were always available for every Level&nbsp;2 model
76525    as long as libSBML was compiled with %Layout support.  To avoid burdening
76526    developers of legacy applications with the need to modify their software,
76527    libSBML provides backward compatibility by always preloading the %Layout
76528    package extension when reading Level&nbsp;2 models.  The same applies to
76529    the creation of Level&nbsp;2 models: with the plugin-oriented libSBML,
76530    applications normally would have to take deliberate steps to activate
76531    package code, instantiate objects, manage namespaces, and so on.  LibSBML
76532    again loads the %Layout package plugin automatically when creating a
76533    Level&nbsp;2 model, thereby making the APIs available to legacy
76534    applications without further work on their part.
76535
76536    @if clike
76537    The mechanisms for triggering this Level&nbsp;2-specific behavior
76538    involves a set of virtual methods on the SBMLExtension class that must
76539    be implemented by individual package extensions.  These methods are
76540    SBMLExtension.addL2Namespaces(),
76541    SBMLExtension.removeL2Namespaces(), and
76542    SBMLExtension.enableL2NamespaceForDocument().
76543    @endif
76544
76545    """
76546
76547    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
76548
76549    def __init__(self, *args, **kwargs):
76550        raise AttributeError("No constructor defined - class is abstract")
76551    __repr__ = _swig_repr
76552    __swig_destroy__ = _libsbml.delete_SBMLExtension
76553
76554    def getNumOfSBasePlugins(self):
76555        r"""
76556        getNumOfSBasePlugins(SBMLExtension self) -> int
76557
76558        Returns the number of SBasePluginCreatorBase objects stored in this
76559        object.
76560
76561        @return the total number of SBasePluginCreatorBase objects stored in
76562        this SBMLExtension-derived object.
76563
76564        """
76565        return _libsbml.SBMLExtension_getNumOfSBasePlugins(self)
76566
76567    def getNumOfSupportedPackageURI(self):
76568        r"""
76569        getNumOfSupportedPackageURI(SBMLExtension self) -> unsigned int
76570
76571        Returns the number of supported package namespace URIs.
76572
76573        @return the number of supported package XML namespace URIs of this
76574        package extension.
76575
76576        """
76577        return _libsbml.SBMLExtension_getNumOfSupportedPackageURI(self)
76578
76579    def isSupported(self, uri):
76580        r"""
76581        isSupported(SBMLExtension self, string uri) -> bool
76582
76583        Returns @c True if the given XML namespace URI is supported by this
76584        package extension.
76585
76586        @return @c True if the given XML namespace URI (equivalent to a package
76587        version) is supported by this package extension, @c False otherwise.
76588
76589        """
76590        return _libsbml.SBMLExtension_isSupported(self, uri)
76591
76592    def getSupportedPackageURI(self, n):
76593        r"""
76594        getSupportedPackageURI(SBMLExtension self, unsigned int n) -> string
76595
76596        Returns the nth XML namespace URI.
76597
76598        @param n the index number of the namespace URI being sought.
76599        @return a string representing the XML namespace URI understood to be
76600        supported by this package.  An empty string will be returned if there is
76601        no nth URI.
76602
76603        """
76604        return _libsbml.SBMLExtension_getSupportedPackageURI(self, n)
76605
76606    def clone(self):
76607        r"""
76608        clone(SBMLExtension self) -> SBMLExtension
76609
76610        Creates and returns a deep copy of this SBMLExtension object.
76611
76612        @return a (deep) copy of this SBMLExtension object.
76613
76614        @note
76615        This is a method that package extension implementations must override.
76616        See the libSBML documentation on extending libSBML to support SBML
76617        packages for more information on this topic.
76618
76619        """
76620        return _libsbml.SBMLExtension_clone(self)
76621
76622    def getName(self):
76623        r"""
76624        getName(SBMLExtension self) -> string
76625
76626        Returns the nickname of this package.
76627
76628        This returns the short-form name of an SBML Level&nbsp;3 package
76629        implemented by a given SBMLExtension-derived class.  Examples of
76630        such names are 'layout', 'fbc', etc.
76631
76632        @return a string, the nickname of SBML package.
76633
76634        @note
76635        This is a method that package extension implementations must override.
76636        See the libSBML documentation on extending libSBML to support SBML
76637        packages for more information on this topic.
76638
76639        """
76640        return _libsbml.SBMLExtension_getName(self)
76641
76642    def getURI(self, sbmlLevel, sbmlVersion, pkgVersion):
76643        r"""
76644        getURI(SBMLExtension self, unsigned int sbmlLevel, unsigned int sbmlVersion, unsigned int pkgVersion) -> string
76645
76646        Returns the XML namespace URI for a given Level and Version.
76647
76648        @param sbmlLevel the SBML Level.
76649        @param sbmlVersion the SBML Version.
76650        @param pkgVersion the version of the package.
76651
76652        @return a string, the XML namespace URI for the package for the given
76653        SBML Level, SBML Version, and package version.
76654
76655        @note
76656        This is a method that package extension implementations must override.
76657        See the libSBML documentation on extending libSBML to support SBML
76658        packages for more information on this topic.
76659
76660        """
76661        return _libsbml.SBMLExtension_getURI(self, sbmlLevel, sbmlVersion, pkgVersion)
76662
76663    def getLevel(self, uri):
76664        r"""
76665        getLevel(SBMLExtension self, string uri) -> unsigned int
76666
76667        Returns the SBML Level associated with the given XML namespace URI.
76668
76669        @param uri the string of URI that represents a version of the package.
76670
76671        @return the SBML Level associated with the given URI of this package.
76672
76673        @note
76674        This is a method that package extension implementations must override.
76675        See the libSBML documentation on extending libSBML to support SBML
76676        packages for more information on this topic.
76677
76678        """
76679        return _libsbml.SBMLExtension_getLevel(self, uri)
76680
76681    def getVersion(self, uri):
76682        r"""
76683        getVersion(SBMLExtension self, string uri) -> unsigned int
76684
76685        Returns the SBML Version associated with the given XML namespace URI.
76686
76687        @param uri the string of URI that represents a version of the package.
76688
76689        @return the SBML Version associated with the given URI of this package.
76690
76691        @note
76692        This is a method that package extension implementations must override.
76693        See the libSBML documentation on extending libSBML to support SBML
76694        packages for more information on this topic.
76695
76696        """
76697        return _libsbml.SBMLExtension_getVersion(self, uri)
76698
76699    def getPackageVersion(self, uri):
76700        r"""
76701        getPackageVersion(SBMLExtension self, string uri) -> unsigned int
76702
76703        Returns the package version associated with the given XML namespace URI.
76704
76705        @param uri the string of URI that represents a version of this package.
76706
76707        @return the package version associated with the given URI of this package.
76708
76709        @note
76710        This is a method that package extension implementations must override.
76711        See the libSBML documentation on extending libSBML to support SBML
76712        packages for more information on this topic.
76713
76714        """
76715        return _libsbml.SBMLExtension_getPackageVersion(self, uri)
76716
76717    def getStringFromTypeCode(self, typeCode):
76718        r"""
76719        getStringFromTypeCode(SBMLExtension self, int typeCode) -> char const *
76720
76721        Returns a string representation of a type code.
76722
76723        This method takes a numerical type code @p typeCode for a component
76724        object implemented by this package extension, and returns a string
76725        representing that type code.
76726
76727        @param typeCode the type code to turn into a string.
76728
76729        @return the string representation of @p typeCode.
76730
76731        @note
76732        This is a method that package extension implementations must override.
76733        See the libSBML documentation on extending libSBML to support SBML
76734        packages for more information on this topic.
76735
76736        """
76737        return _libsbml.SBMLExtension_getStringFromTypeCode(self, typeCode)
76738
76739    def getSBMLExtensionNamespaces(self, uri):
76740        r"""
76741        getSBMLExtensionNamespaces(SBMLExtension self, string uri) -> SBMLNamespaces
76742
76743        Returns a specialized SBMLNamespaces object corresponding to a given
76744        namespace URI.
76745
76746        LibSBML package extensions each define a subclass of
76747        @if clike SBMLExtensionNamespaces @else SBMLNamespaces@endif@~.
76748        @if clike This object has the form
76749        @verbatim
76750        SBMLExtensionNamespaces<class SBMLExtensionType>
76751        @endverbatim
76752        For example, this kind of object for the Layout package is
76753        @verbatim
76754        SBMLExtensionNamespaces<LayoutExtension>
76755        @endverbatim
76756        @endif@~
76757        The present method returns the appropriate object corresponding
76758        to the given XML namespace URI in argument @p uri.
76759
76760        @param uri the namespace URI that represents one of versions of the
76761        package implemented in this extension.
76762
76763        @return an @if clike SBMLExtensionNamespaces @else SBMLNamespaces @endif@~
76764        object, or @c None if the given @p uri is not defined in the
76765        corresponding package.
76766
76767        @note
76768        This is a method that package extension implementations must override.
76769        See the libSBML documentation on extending libSBML to support SBML
76770        packages for more information on this topic.
76771
76772        """
76773        return _libsbml.SBMLExtension_getSBMLExtensionNamespaces(self, uri)
76774
76775    def setEnabled(self, isEnabled):
76776        r"""
76777        setEnabled(SBMLExtension self, bool isEnabled) -> bool
76778
76779        Enable or disable this package.
76780
76781        @param isEnabled flag indicating whether to enable (if @c True) or
76782        disable (@c False) this package extension.
76783
76784        @return @c True if this call succeeded; @c False otherwise.
76785
76786        """
76787        return _libsbml.SBMLExtension_setEnabled(self, isEnabled)
76788
76789    def isEnabled(self):
76790        r"""
76791        isEnabled(SBMLExtension self) -> bool
76792
76793        Returns @c True if this package is enabled.
76794
76795        @return @c True if this package is enabled, @c False otherwise.
76796
76797        """
76798        return _libsbml.SBMLExtension_isEnabled(self)
76799
76800    def removeL2Namespaces(self, xmlns):
76801        r"""
76802        removeL2Namespaces(SBMLExtension self, XMLNamespaces xmlns)
76803
76804        Removes the package's Level&nbsp;2 namespace(s).
76805
76806        @ifnot clike @internal @endif@~
76807
76808        @par
76809        This method is related to special facilities designed to support
76810        legacy behaviors surrounding SBML Level&nbsp;2 models.  Due to the
76811        historical background of the SBML %Layout package, libSBML implements
76812        special behavior for that package: it @em always creates a %Layout
76813        plugin object for any SBML Level&nbsp;2 document it reads in,
76814        regardless of whether that document actually uses %Layout constructs.
76815        Since Level&nbsp;2 does not use namespaces on the top level of the
76816        SBML document object, libSBML simply keys off the fact that the model
76817        is a Level&nbsp;2 model.  To allow the extensions for the %Layout and
76818        %Render (and possibly other) packages to support this behavior, the
76819        SBMLExtension class contains special methods to allow packages to
76820        hook themselves into the Level&nbsp;2 parsing apparatus when necessary.
76821
76822        @if clike
76823        This virtual method should be overridden by all package extensions
76824        that want to serialize to an SBML Level&nbsp;2 annotation.  In
76825        Level&nbsp;2, the XML namespace declaration for the package is not
76826        placed on the top-level SBML document object but rather inside
76827        individual annotations.  addL2Namespaces() is invoked automatically
76828        for Level&nbsp;2 documents when an SBMLExtensionNamespace object is
76829        created; removeL2Namespaces() is automatically invoked by
76830        SBMLDocument to prevent the namespace(s) from being put on the
76831        top-level SBML Level&nbsp;2 element (because Level&nbsp;2 doesn't
76832        support namespaces there); and enableL2NamespaceForDocument() is
76833        called automatically when any SBML document (of any Level/Version) is
76834        read in.
76835        @endif@~
76836
76837        @param xmlns an XMLNamespaces object that will be used for the annotation.
76838        Implementations should override this method with something that removes
76839        the package's namespace(s) from the set of namespaces in @p xmlns.  For
76840        instance, here is the code from the %Layout package extension:
76841        @code{.cpp}
76842        for (int n = 0; n < xmlns->getNumNamespaces(); n++)
76843        {
76844          if (xmlns->getURI(n) == LayoutExtension.getXmlnsL2())
76845            xmlns->remove(n);
76846        }
76847        @endcode
76848
76849        """
76850        return _libsbml.SBMLExtension_removeL2Namespaces(self, xmlns)
76851
76852    def addL2Namespaces(self, xmlns):
76853        r"""
76854        addL2Namespaces(SBMLExtension self, XMLNamespaces xmlns)
76855
76856        Adds the package's Level&nbsp;2 namespace(s).
76857
76858        @ifnot clike @internal @endif@~
76859
76860        @par
76861        This method is related to special facilities designed to support
76862        legacy behaviors surrounding SBML Level&nbsp;2 models.  Due to the
76863        historical background of the SBML %Layout package, libSBML implements
76864        special behavior for that package: it @em always creates a %Layout
76865        plugin object for any SBML Level&nbsp;2 document it reads in,
76866        regardless of whether that document actually uses %Layout constructs.
76867        Since Level&nbsp;2 does not use namespaces on the top level of the
76868        SBML document object, libSBML simply keys off the fact that the model
76869        is a Level&nbsp;2 model.  To allow the extensions for the %Layout and
76870        %Render (and possibly other) packages to support this behavior, the
76871        SBMLExtension class contains special methods to allow packages to
76872        hook themselves into the Level&nbsp;2 parsing apparatus when necessary.
76873
76874        @if clike
76875        This virtual method should be overridden by all package extensions
76876        that want to serialize to an SBML Level&nbsp;2 annotation.  In
76877        Level&nbsp;2, the XML namespace declaration for the package is not
76878        placed on the top-level SBML document object but rather inside
76879        individual annotations.  addL2Namespaces() is invoked automatically
76880        for Level&nbsp;2 documents when an SBMLExtensionNamespace object is
76881        created; removeL2Namespaces() is automatically invoked by
76882        SBMLDocument to prevent the namespace(s) from being put on the
76883        top-level SBML Level&nbsp;2 element (because Level&nbsp;2 doesn't
76884        support namespaces there); and enableL2NamespaceForDocument() is
76885        called automatically when any SBML document (of any Level/Version) is
76886        read in.
76887        @endif@~
76888
76889        @param xmlns an XMLNamespaces object that will be used for the annotation.
76890        Implementation should override this method with something that adds
76891        the package's namespace(s) to the set of namespaces in @p xmlns.  For
76892        instance, here is the code from the %Layout package extension:
76893        @code{.cpp}
76894        if (!xmlns->containsUri( LayoutExtension.getXmlnsL2()))
76895          xmlns->add(LayoutExtension.getXmlnsL2(), 'layout');
76896        @endcode
76897
76898        """
76899        return _libsbml.SBMLExtension_addL2Namespaces(self, xmlns)
76900
76901    def enableL2NamespaceForDocument(self, doc):
76902        r"""
76903        enableL2NamespaceForDocument(SBMLExtension self, SBMLDocument doc)
76904
76905        Called to enable the package on the SBMLDocument object.
76906
76907        @ifnot clike @internal @endif@~
76908
76909        @par
76910        This method is related to special facilities designed to support
76911        legacy behaviors surrounding SBML Level&nbsp;2 models.  Due to the
76912        historical background of the SBML %Layout package, libSBML implements
76913        special behavior for that package: it @em always creates a %Layout
76914        plugin object for any SBML Level&nbsp;2 document it reads in,
76915        regardless of whether that document actually uses %Layout constructs.
76916        Since Level&nbsp;2 does not use namespaces on the top level of the
76917        SBML document object, libSBML simply keys off the fact that the model
76918        is a Level&nbsp;2 model.  To allow the extensions for the %Layout and
76919        %Render (and possibly other) packages to support this behavior, the
76920        SBMLExtension class contains special methods to allow packages to
76921        hook themselves into the Level&nbsp;2 parsing apparatus when necessary.
76922
76923        @if clike
76924        This virtual method should be overridden by all package extensions
76925        that want to serialize to an SBML Level&nbsp;2 annotation.  In
76926        Level&nbsp;2, the XML namespace declaration for the package is not
76927        placed on the top-level SBML document object but rather inside
76928        individual annotations.  addL2Namespaces() is invoked automatically
76929        for Level&nbsp;2 documents when an SBMLExtensionNamespace object is
76930        created; removeL2Namespaces() is automatically invoked by
76931        SBMLDocument to prevent the namespace(s) from being put on the
76932        top-level SBML Level&nbsp;2 element (because Level&nbsp;2 doesn't
76933        support namespaces there); and enableL2NamespaceForDocument() is
76934        called automatically when any SBML document (of any Level/Version) is
76935        read in.
76936        @endif@~
76937
76938        @param doc the SBMLDocument object for the model.
76939        Implementations should override this method with something that
76940        enables the package based on the package's namespace(s). For example,
76941        here is the code from the %Layout package extension:
76942        @code{.cpp}
76943        if (doc->getLevel() == 2)
76944          doc->enablePackage(LayoutExtension.getXmlnsL2(), 'layout', true);
76945        @endcode
76946
76947        """
76948        return _libsbml.SBMLExtension_enableL2NamespaceForDocument(self, doc)
76949
76950    def isInUse(self, doc):
76951        r"""
76952        isInUse(SBMLExtension self, SBMLDocument doc) -> bool
76953
76954        Indicates whether this extension is being used by the given SBMLDocument.
76955
76956        The default implementation returns @c True.  This means that when a
76957        document had this extension enabled, it will not be possible to convert
76958        it to SBML Level&nbsp;2 as we cannot make sure that the extension can be
76959        converted.
76960
76961        @param doc the SBML document to test.
76962
76963        @return a boolean indicating whether the extension is actually being
76964        used by the document.
76965
76966        """
76967        return _libsbml.SBMLExtension_isInUse(self, doc)
76968
76969    def hasMutiplePackageVersions(self):
76970        r"""
76971        hasMutiplePackageVersions(SBMLExtension self) -> bool
76972
76973        @internal
76974
76975        @internal
76976
76977        """
76978        return _libsbml.SBMLExtension_hasMutiplePackageVersions(self)
76979
76980    def getErrorTableIndex(self, errorId):
76981        r"""
76982        getErrorTableIndex(SBMLExtension self, unsigned int errorId) -> unsigned int
76983
76984        @internal
76985
76986        @internal
76987
76988        """
76989        return _libsbml.SBMLExtension_getErrorTableIndex(self, errorId)
76990
76991    def getErrorIdOffset(self):
76992        r"""
76993        getErrorIdOffset(SBMLExtension self) -> unsigned int
76994
76995        @internal
76996
76997        @internal
76998
76999        """
77000        return _libsbml.SBMLExtension_getErrorIdOffset(self)
77001
77002    def getSeverity(self, index, pkgVersion):
77003        r"""
77004        getSeverity(SBMLExtension self, unsigned int index, unsigned int pkgVersion) -> unsigned int
77005
77006        @internal
77007
77008        @internal
77009
77010        """
77011        return _libsbml.SBMLExtension_getSeverity(self, index, pkgVersion)
77012
77013    def getCategory(self, index):
77014        r"""
77015        getCategory(SBMLExtension self, unsigned int index) -> unsigned int
77016
77017        @internal
77018
77019        @internal
77020
77021        """
77022        return _libsbml.SBMLExtension_getCategory(self, index)
77023
77024    def getMessage(self, index, pkgVersion, details):
77025        r"""
77026        getMessage(SBMLExtension self, unsigned int index, unsigned int pkgVersion, string details) -> string
77027
77028        @internal
77029
77030        @internal
77031
77032        """
77033        return _libsbml.SBMLExtension_getMessage(self, index, pkgVersion, details)
77034
77035    def getShortMessage(self, index):
77036        r"""
77037        getShortMessage(SBMLExtension self, unsigned int index) -> string
77038
77039        @internal
77040
77041        @internal
77042
77043        """
77044        return _libsbml.SBMLExtension_getShortMessage(self, index)
77045
77046    def __eq__(self, rhs):
77047      if ((self is None) and (rhs is None)): return True
77048      if ((self is None) or  (rhs is None)): return False
77049      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
77050        if (self.this == rhs.this): return True
77051      return False
77052
77053    def __ne__(self, rhs):
77054      if ((self is None) and (rhs is None)): return False
77055      if ((self is None) or  (rhs is None)): return True
77056      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
77057        if (self.this == rhs.this): return False
77058      return True
77059
77060
77061# Register SBMLExtension in _libsbml:
77062_libsbml.SBMLExtension_swigregister(SBMLExtension)
77063
77064class SBMLExtensionException(Exception):
77065    r"""
77066
77067    @sbmlpackage{core}
77068
77069    @htmlinclude pkg-marker-core.html Exception used by package extensions
77070
77071    @htmlinclude not-sbml-warning.html
77072
77073    @par
77074    Certain situations can result in an exception being thrown by libSBML
77075    package extensions.  A prominent example involves the constructor for
77076    SBMLNamespaces (and its subclasses), which will throw
77077    SBMLExtensionException if the arguments it is given refer to an unknown
77078    SBML Level&nbsp;3 package.  The situation can arise for legitimate SBML
77079    files if the necessary package extension has not been registered with
77080    a given copy of libSBML.
77081
77082    @see SBMLNamespaces
77083
77084    """
77085
77086    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
77087    __repr__ = _swig_repr
77088
77089    def __init__(self, errmsg):
77090        r"""
77091        __init__(SBMLExtensionException self, string errmsg) -> SBMLExtensionException
77092
77093        Creates a new SBMLExtensionException object with a given message.
77094
77095        @param errmsg a string, the text of the error message to store
77096        with this exception.
77097
77098        """
77099        _libsbml.SBMLExtensionException_swiginit(self, _libsbml.new_SBMLExtensionException(errmsg))
77100    __swig_destroy__ = _libsbml.delete_SBMLExtensionException
77101
77102# Register SBMLExtensionException in _libsbml:
77103_libsbml.SBMLExtensionException_swigregister(SBMLExtensionException)
77104
77105class SBMLExtensionRegistry(object):
77106    r"""
77107
77108    @sbmlpackage{core}
77109
77110    @htmlinclude pkg-marker-core.html Registry where package extensions are registered.
77111
77112    @htmlinclude not-sbml-warning.html
77113
77114    This class provides a central registry of all extensions known to libSBML.
77115    Each package extension must be registered with the registry.  The registry
77116    class is accessed by various classes to retrieve information about known
77117    package extensions and to create additional attributes and/or elements by
77118    factory objects of the package extensions.
77119
77120    @par
77121    The package extension registry is implemented as a singleton instance of
77122    SBMLExtensionRegistry.  The class provides only utility functionality;
77123    implementations of SBML packages do not need to implement any subclasses or
77124    methods of this class.  SBMLExtensionRegistry is useful for its facilities
77125    to query the known packages, and to enable or disable packages selectively.
77126
77127    """
77128
77129    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
77130
77131    def __init__(self, *args, **kwargs):
77132        raise AttributeError("No constructor defined")
77133    __repr__ = _swig_repr
77134
77135    @staticmethod
77136    def getInstance():
77137        r"""
77138        getInstance() -> SBMLExtensionRegistry
77139
77140        Returns a singleton instance of the registry.
77141
77142        Callers need to obtain a copy of the package extension registry before
77143        they can invoke its methods.  The registry is implemented as a
77144        singleton, and this is the method callers can use to get a copy of it.
77145
77146        @return the instance of the SBMLExtensionRegistry object.
77147
77148        """
77149        return _libsbml.SBMLExtensionRegistry_getInstance()
77150
77151    def addExtension(self, ext):
77152        r"""
77153        addExtension(SBMLExtensionRegistry self, SBMLExtension ext) -> int
77154
77155        Add the given SBMLExtension object to this SBMLExtensionRegistry.
77156
77157        @param ext the SBMLExtension object to be added.
77158
77159        @return integer value indicating success/failure of the
77160        function.  @if clike The value is drawn from the
77161        enumeration #OperationReturnValues_t. @endif@~ The possible values
77162        returned by this function are:
77163        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
77164        @li @link libsbml#LIBSBML_PKG_CONFLICT LIBSBML_PKG_CONFLICT@endlink
77165        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
77166
77167        """
77168        return _libsbml.SBMLExtensionRegistry_addExtension(self, ext)
77169
77170    def getExtension(self, package):
77171        r"""
77172        getExtension(SBMLExtensionRegistry self, string package) -> SBMLExtension
77173
77174        Returns an SBMLExtension object with the given package URI or package
77175        name.
77176
77177        @param package a string representing the URI or name of the SBML package
77178        whose package extension is being sought.
77179
77180        @return a clone of the SBMLExtension object with the given package URI
77181        or name.
77182
77183        @note The caller is responsible for freeing the object returned.  Since
77184        the object is a clone, freeing it will not result in the deletion of the
77185        original package extension object.
77186
77187        """
77188        return _libsbml.SBMLExtensionRegistry_getExtension(self, package)
77189
77190    def removeL2Namespaces(self, xmlns):
77191        r"""
77192        removeL2Namespaces(SBMLExtensionRegistry self, XMLNamespaces xmlns)
77193
77194        Removes SBML Level&nbsp;2 namespaces from the namespace list.
77195
77196        @if clike
77197        This will call all overridden
77198        <code>SBMLExtension.removeL2Namespaces()</code> methods.
77199        @endif@~
77200
77201        @param xmlns an XMLNamespaces object listing one or more namespaces
77202        to be removed.
77203
77204        """
77205        return _libsbml.SBMLExtensionRegistry_removeL2Namespaces(self, xmlns)
77206
77207    def addL2Namespaces(self, xmlns):
77208        r"""
77209        addL2Namespaces(SBMLExtensionRegistry self, XMLNamespaces xmlns)
77210
77211        Adds SBML Level&nbsp;2 namespaces to the namespace list.
77212
77213        @if clike
77214        This will call all overridden
77215        <code>SBMLExtension.addL2Namespaces()</code> methods.
77216        @endif@~
77217
77218        @param xmlns an XMLNamespaces object providing one or more namespaces to
77219        be added.
77220
77221        """
77222        return _libsbml.SBMLExtensionRegistry_addL2Namespaces(self, xmlns)
77223
77224    def enableL2NamespaceForDocument(self, doc):
77225        r"""
77226        enableL2NamespaceForDocument(SBMLExtensionRegistry self, SBMLDocument doc)
77227
77228        Enables package extensions that support serialization to SBML annotations.
77229
77230        SBML Level&nbsp;2 does not have a package mechanism in the way that SBML
77231        Level&nbsp;3 does.  However, SBML annotations can be used to store SBML
77232        constructs.  In fact, a widely-used approach to developing SBML
77233        Level&nbsp;3 packages involves first using them as annotations.
77234
77235        @param doc the SBMLDocument object for which this should be enabled.
77236
77237        """
77238        return _libsbml.SBMLExtensionRegistry_enableL2NamespaceForDocument(self, doc)
77239
77240    def disableUnusedPackages(self, doc):
77241        r"""
77242        disableUnusedPackages(SBMLExtensionRegistry self, SBMLDocument doc)
77243
77244        Disables unused packages.
77245
77246        This method walks through all extensions in the list of plugins of the
77247        given SBML document @p doc, and disables all that are not being used.
77248
77249        @param doc the SBMLDocument object whose unused package extensions
77250        should be disabled.
77251
77252        """
77253        return _libsbml.SBMLExtensionRegistry_disableUnusedPackages(self, doc)
77254
77255    @staticmethod
77256    def disablePackage(package):
77257        r"""
77258        disablePackage(string package)
77259
77260        Disables the package with the given URI or name.
77261
77262        @param package a string representing the URI or name of the SBML package
77263        whose package extension is to be disabled.
77264
77265        """
77266        return _libsbml.SBMLExtensionRegistry_disablePackage(package)
77267
77268    @staticmethod
77269    def isPackageEnabled(package):
77270        r"""
77271        isPackageEnabled(string package) -> bool
77272
77273        Returns @c True if the named package is enabled.
77274
77275        @param package the name or URI of a package to test.
77276
77277        @return @c True if the package is enabled, @c False otherwise.
77278
77279        """
77280        return _libsbml.SBMLExtensionRegistry_isPackageEnabled(package)
77281
77282    @staticmethod
77283    def enablePackage(package):
77284        r"""
77285        enablePackage(string package)
77286
77287        Enables the package with the given URI / name.
77288
77289        @param package the name or URI of a package to enable.
77290
77291        """
77292        return _libsbml.SBMLExtensionRegistry_enablePackage(package)
77293
77294    def getNumExtension(self, extPoint):
77295        r"""
77296        getNumExtension(SBMLExtensionRegistry self, SBaseExtensionPoint extPoint) -> unsigned int
77297
77298        Returns the number of extensions that have a given extension point.
77299
77300        @param extPoint the SBaseExtensionPoint object.
77301
77302        @return the number of SBMLExtension-derived objects with the given
77303        extension point.
77304
77305        """
77306        return _libsbml.SBMLExtensionRegistry_getNumExtension(self, extPoint)
77307
77308    def setEnabled(self, uri, isEnabled):
77309        r"""
77310        setEnabled(SBMLExtensionRegistry self, string uri, bool isEnabled) -> bool
77311
77312        Enables or disable the package with the given URI.
77313
77314        @param uri the URI of the target package.
77315        @param isEnabled @c True to enable the package, @c False to disable.
77316
77317        @return @c False if @p isEnabled is @c False or the given package is not
77318        registered, otherwise this method returns @c True.
77319
77320        """
77321        return _libsbml.SBMLExtensionRegistry_setEnabled(self, uri, isEnabled)
77322
77323    def isEnabled(self, uri):
77324        r"""
77325        isEnabled(SBMLExtensionRegistry self, string uri) -> bool
77326
77327        Returns @c True if the given extension is enabled.
77328
77329        @param uri the URI of the target package.
77330
77331        @return @c False if the given package is disabled or not registered,
77332        @c True otherwise.
77333
77334        """
77335        return _libsbml.SBMLExtensionRegistry_isEnabled(self, uri)
77336
77337    def isRegistered(self, uri):
77338        r"""
77339        isRegistered(SBMLExtensionRegistry self, string uri) -> bool
77340
77341        Returns @c True if a package extension is registered for the
77342        corresponding package URI.
77343
77344        @param uri the URI of the target package.
77345
77346        @return @c True if the package with the given URI is registered,
77347        otherwise returns @c False.
77348
77349        """
77350        return _libsbml.SBMLExtensionRegistry_isRegistered(self, uri)
77351
77352    @staticmethod
77353    def getAllRegisteredPackageNames():
77354        r"""
77355        getAllRegisteredPackageNames() -> std::vector< std::string >
77356
77357        Returns a list of registered packages.
77358
77359        This method returns a vector of strings containing the nicknames of the
77360        SBML packages for which package extensions are registered with this copy
77361        of libSBML.  The vector will contain <code>string</code> objects.
77362
77363        @return a vector of strings of the registered package names.
77364
77365        """
77366        return _libsbml.SBMLExtensionRegistry_getAllRegisteredPackageNames()
77367
77368    @staticmethod
77369    def getNumRegisteredPackages():
77370        r"""
77371        getNumRegisteredPackages() -> unsigned int
77372
77373        Returns the number of registered packages.
77374
77375        @return a count of the registered package extensions.
77376
77377        @if clike
77378        @see getRegisteredPackageNames()
77379        @endif@~
77380
77381        """
77382        return _libsbml.SBMLExtensionRegistry_getNumRegisteredPackages()
77383
77384    @staticmethod
77385    def getRegisteredPackageName(index):
77386        r"""
77387        getRegisteredPackageName(unsigned int index) -> string
77388
77389        Returns the nth registered package.
77390
77391        @param index zero-based index of the package name to return.
77392
77393        @return the package name with the given index, or @c None if none
77394        such exists.
77395
77396        @see getNumRegisteredPackages()
77397
77398        """
77399        return _libsbml.SBMLExtensionRegistry_getRegisteredPackageName(index)
77400
77401    def getASTPlugins(self):
77402        r"""
77403        getASTPlugins(SBMLExtensionRegistry self) -> std::vector< ASTBasePlugin * >
77404
77405
77406
77407        """
77408        return _libsbml.SBMLExtensionRegistry_getASTPlugins(self)
77409
77410    def getNumASTPlugins(self):
77411        r"""
77412        getNumASTPlugins(SBMLExtensionRegistry self) -> unsigned int
77413
77414
77415
77416        """
77417        return _libsbml.SBMLExtensionRegistry_getNumASTPlugins(self)
77418
77419    def getASTPlugin(self, i):
77420        r"""
77421        getASTPlugin(SBMLExtensionRegistry self, unsigned int i) -> ASTBasePlugin
77422
77423
77424
77425        """
77426        return _libsbml.SBMLExtensionRegistry_getASTPlugin(self, i)
77427
77428# Register SBMLExtensionRegistry in _libsbml:
77429_libsbml.SBMLExtensionRegistry_swigregister(SBMLExtensionRegistry)
77430
77431def SBMLExtensionRegistry_getInstance():
77432    r"""
77433    SBMLExtensionRegistry_getInstance() -> SBMLExtensionRegistry
77434
77435    Returns a singleton instance of the registry.
77436
77437    Callers need to obtain a copy of the package extension registry before
77438    they can invoke its methods.  The registry is implemented as a
77439    singleton, and this is the method callers can use to get a copy of it.
77440
77441    @return the instance of the SBMLExtensionRegistry object.
77442
77443    """
77444    return _libsbml.SBMLExtensionRegistry_getInstance()
77445
77446def SBMLExtensionRegistry_disablePackage(package):
77447    r"""
77448    SBMLExtensionRegistry_disablePackage(string package)
77449
77450    Disables the package with the given URI or name.
77451
77452    @param package a string representing the URI or name of the SBML package
77453    whose package extension is to be disabled.
77454
77455    """
77456    return _libsbml.SBMLExtensionRegistry_disablePackage(package)
77457
77458def SBMLExtensionRegistry_isPackageEnabled(package):
77459    r"""
77460    SBMLExtensionRegistry_isPackageEnabled(string package) -> bool
77461
77462    Returns @c True if the named package is enabled.
77463
77464    @param package the name or URI of a package to test.
77465
77466    @return @c True if the package is enabled, @c False otherwise.
77467
77468    """
77469    return _libsbml.SBMLExtensionRegistry_isPackageEnabled(package)
77470
77471def SBMLExtensionRegistry_enablePackage(package):
77472    r"""
77473    SBMLExtensionRegistry_enablePackage(string package)
77474
77475    Enables the package with the given URI / name.
77476
77477    @param package the name or URI of a package to enable.
77478
77479    """
77480    return _libsbml.SBMLExtensionRegistry_enablePackage(package)
77481
77482def SBMLExtensionRegistry_getAllRegisteredPackageNames():
77483    r"""
77484    SBMLExtensionRegistry_getAllRegisteredPackageNames() -> std::vector< std::string >
77485
77486    Returns a list of registered packages.
77487
77488    This method returns a vector of strings containing the nicknames of the
77489    SBML packages for which package extensions are registered with this copy
77490    of libSBML.  The vector will contain <code>string</code> objects.
77491
77492    @return a vector of strings of the registered package names.
77493
77494    """
77495    return _libsbml.SBMLExtensionRegistry_getAllRegisteredPackageNames()
77496
77497def SBMLExtensionRegistry_getNumRegisteredPackages():
77498    r"""
77499    SBMLExtensionRegistry_getNumRegisteredPackages() -> unsigned int
77500
77501    Returns the number of registered packages.
77502
77503    @return a count of the registered package extensions.
77504
77505    @if clike
77506    @see getRegisteredPackageNames()
77507    @endif@~
77508
77509    """
77510    return _libsbml.SBMLExtensionRegistry_getNumRegisteredPackages()
77511
77512def SBMLExtensionRegistry_getRegisteredPackageName(index):
77513    r"""
77514    SBMLExtensionRegistry_getRegisteredPackageName(unsigned int index) -> string
77515
77516    Returns the nth registered package.
77517
77518    @param index zero-based index of the package name to return.
77519
77520    @return the package name with the given index, or @c None if none
77521    such exists.
77522
77523    @see getNumRegisteredPackages()
77524
77525    """
77526    return _libsbml.SBMLExtensionRegistry_getRegisteredPackageName(index)
77527
77528class Callback(object):
77529    r"""Proxy of C++ Callback class."""
77530
77531    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
77532    __repr__ = _swig_repr
77533    __swig_destroy__ = _libsbml.delete_Callback
77534
77535    def process(self, doc):
77536        r"""
77537        process(Callback self, SBMLDocument doc) -> int
77538
77539        The processing function to be implemented by the callback
77540
77541        In order to stop processing return a value other than
77542        LIBSBML_OPERATION_SUCCESS.
77543
77544        @return LIBSBML_OPERATION_SUCCESS to continue the operations
77545        any other value to stop
77546
77547        """
77548        return _libsbml.Callback_process(self, doc)
77549
77550    def __init__(self):
77551        r"""__init__(Callback self) -> Callback"""
77552        if self.__class__ == Callback:
77553            _self = None
77554        else:
77555            _self = self
77556        _libsbml.Callback_swiginit(self, _libsbml.new_Callback(_self, ))
77557    def __disown__(self):
77558        self.this.disown()
77559        _libsbml.disown_Callback(self)
77560        return weakref.proxy(self)
77561
77562# Register Callback in _libsbml:
77563_libsbml.Callback_swigregister(Callback)
77564
77565class CallbackRegistry(object):
77566    r"""Proxy of C++ CallbackRegistry class."""
77567
77568    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
77569
77570    def __init__(self, *args, **kwargs):
77571        raise AttributeError("No constructor defined")
77572    __repr__ = _swig_repr
77573
77574    @staticmethod
77575    def invokeCallbacks(doc):
77576        r"""
77577        invokeCallbacks(SBMLDocument doc) -> int
77578
77579        Invokes all registered callbacks on the given document. If the callbacks indicate
77580        that processing should be stopped they return a value other than operation success.
77581
77582        @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued,
77583        any other value to stop processing
77584
77585        """
77586        return _libsbml.CallbackRegistry_invokeCallbacks(doc)
77587
77588    @staticmethod
77589    def clearCallbacks():
77590        r"""
77591        clearCallbacks()
77592
77593        Clears all registered processing callbacks
77594
77595        """
77596        return _libsbml.CallbackRegistry_clearCallbacks()
77597
77598    @staticmethod
77599    def addCallback(cb):
77600        r"""
77601        addCallback(Callback cb)
77602
77603        Registers a new processing callback that will be called with a newly instantiated
77604        ModelDefinition object. This allows for all post processing on it that needs to
77605        happen before integrating it with the target document.
77606
77607        @param cb the callback.
77608
77609        """
77610        return _libsbml.CallbackRegistry_addCallback(cb)
77611
77612    @staticmethod
77613    def getNumCallbacks():
77614        r"""
77615        getNumCallbacks() -> int
77616
77617        @return the number of registered callbacks.
77618
77619        """
77620        return _libsbml.CallbackRegistry_getNumCallbacks()
77621
77622    @staticmethod
77623    def removeCallback(*args):
77624        r"""
77625        removeCallback(int index)
77626        removeCallback(Callback cb)
77627
77628        This method has multiple variants; they differ in the arguments
77629         they accept.  Each variant is described separately below.
77630
77631        @par
77632        <hr>
77633        <span class='variant-sig-heading'>Method variant with the following signature</span>:
77634         <pre class='signature'>removeCallback(Callback *cb)</pre>
77635
77636        Removes the specified callback from the list of registered callbacks
77637
77638        @param cb the callback to be removed.
77639
77640
77641        @par
77642        <hr>
77643        <span class='variant-sig-heading'>Method variant with the following signature</span>:
77644         <pre class='signature'>removeCallback(int index)</pre>
77645
77646        Removes the callback with given index.
77647
77648        @param index the index of the callback to be removed from the list.
77649
77650        """
77651        return _libsbml.CallbackRegistry_removeCallback(*args)
77652    __swig_destroy__ = _libsbml.delete_CallbackRegistry
77653
77654# Register CallbackRegistry in _libsbml:
77655_libsbml.CallbackRegistry_swigregister(CallbackRegistry)
77656
77657def CallbackRegistry_invokeCallbacks(doc):
77658    r"""
77659    CallbackRegistry_invokeCallbacks(SBMLDocument doc) -> int
77660
77661    Invokes all registered callbacks on the given document. If the callbacks indicate
77662    that processing should be stopped they return a value other than operation success.
77663
77664    @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued,
77665    any other value to stop processing
77666
77667    """
77668    return _libsbml.CallbackRegistry_invokeCallbacks(doc)
77669
77670def CallbackRegistry_clearCallbacks():
77671    r"""
77672    CallbackRegistry_clearCallbacks()
77673
77674    Clears all registered processing callbacks
77675
77676    """
77677    return _libsbml.CallbackRegistry_clearCallbacks()
77678
77679def CallbackRegistry_addCallback(cb):
77680    r"""
77681    CallbackRegistry_addCallback(Callback cb)
77682
77683    Registers a new processing callback that will be called with a newly instantiated
77684    ModelDefinition object. This allows for all post processing on it that needs to
77685    happen before integrating it with the target document.
77686
77687    @param cb the callback.
77688
77689    """
77690    return _libsbml.CallbackRegistry_addCallback(cb)
77691
77692def CallbackRegistry_getNumCallbacks():
77693    r"""
77694    CallbackRegistry_getNumCallbacks() -> int
77695
77696    @return the number of registered callbacks.
77697
77698    """
77699    return _libsbml.CallbackRegistry_getNumCallbacks()
77700
77701def CallbackRegistry_removeCallback(*args):
77702    r"""
77703    CallbackRegistry_removeCallback(int index)
77704    CallbackRegistry_removeCallback(Callback cb)
77705
77706    This method has multiple variants; they differ in the arguments
77707     they accept.  Each variant is described separately below.
77708
77709    @par
77710    <hr>
77711    <span class='variant-sig-heading'>Method variant with the following signature</span>:
77712     <pre class='signature'>removeCallback(Callback *cb)</pre>
77713
77714    Removes the specified callback from the list of registered callbacks
77715
77716    @param cb the callback to be removed.
77717
77718
77719    @par
77720    <hr>
77721    <span class='variant-sig-heading'>Method variant with the following signature</span>:
77722     <pre class='signature'>removeCallback(int index)</pre>
77723
77724    Removes the callback with given index.
77725
77726    @param index the index of the callback to be removed from the list.
77727
77728    """
77729    return _libsbml.CallbackRegistry_removeCallback(*args)
77730
77731EM_L3V2 = _libsbml.EM_L3V2
77732
77733EM_DISTRIB = _libsbml.EM_DISTRIB
77734
77735EM_ARRAYS = _libsbml.EM_ARRAYS
77736
77737EM_REMAINING = _libsbml.EM_REMAINING
77738
77739EM_UNKNOWN = _libsbml.EM_UNKNOWN
77740
77741ALLOWED_CHILDREN_ANY = _libsbml.ALLOWED_CHILDREN_ANY
77742
77743ALLOWED_CHILDREN_ATLEAST = _libsbml.ALLOWED_CHILDREN_ATLEAST
77744
77745ALLOWED_CHILDREN_EXACTLY = _libsbml.ALLOWED_CHILDREN_EXACTLY
77746
77747ALLOWED_CHILDREN_UNKNOWN = _libsbml.ALLOWED_CHILDREN_UNKNOWN
77748
77749AST_PLUS = _libsbml.AST_PLUS
77750
77751AST_MINUS = _libsbml.AST_MINUS
77752
77753AST_TIMES = _libsbml.AST_TIMES
77754
77755AST_DIVIDE = _libsbml.AST_DIVIDE
77756
77757AST_POWER = _libsbml.AST_POWER
77758
77759AST_INTEGER = _libsbml.AST_INTEGER
77760
77761AST_REAL = _libsbml.AST_REAL
77762
77763AST_REAL_E = _libsbml.AST_REAL_E
77764
77765AST_RATIONAL = _libsbml.AST_RATIONAL
77766
77767AST_NAME = _libsbml.AST_NAME
77768
77769AST_NAME_AVOGADRO = _libsbml.AST_NAME_AVOGADRO
77770
77771AST_NAME_TIME = _libsbml.AST_NAME_TIME
77772
77773AST_CONSTANT_E = _libsbml.AST_CONSTANT_E
77774
77775AST_CONSTANT_FALSE = _libsbml.AST_CONSTANT_FALSE
77776
77777AST_CONSTANT_PI = _libsbml.AST_CONSTANT_PI
77778
77779AST_CONSTANT_TRUE = _libsbml.AST_CONSTANT_TRUE
77780
77781AST_LAMBDA = _libsbml.AST_LAMBDA
77782
77783AST_FUNCTION = _libsbml.AST_FUNCTION
77784
77785AST_FUNCTION_ABS = _libsbml.AST_FUNCTION_ABS
77786
77787AST_FUNCTION_ARCCOS = _libsbml.AST_FUNCTION_ARCCOS
77788
77789AST_FUNCTION_ARCCOSH = _libsbml.AST_FUNCTION_ARCCOSH
77790
77791AST_FUNCTION_ARCCOT = _libsbml.AST_FUNCTION_ARCCOT
77792
77793AST_FUNCTION_ARCCOTH = _libsbml.AST_FUNCTION_ARCCOTH
77794
77795AST_FUNCTION_ARCCSC = _libsbml.AST_FUNCTION_ARCCSC
77796
77797AST_FUNCTION_ARCCSCH = _libsbml.AST_FUNCTION_ARCCSCH
77798
77799AST_FUNCTION_ARCSEC = _libsbml.AST_FUNCTION_ARCSEC
77800
77801AST_FUNCTION_ARCSECH = _libsbml.AST_FUNCTION_ARCSECH
77802
77803AST_FUNCTION_ARCSIN = _libsbml.AST_FUNCTION_ARCSIN
77804
77805AST_FUNCTION_ARCSINH = _libsbml.AST_FUNCTION_ARCSINH
77806
77807AST_FUNCTION_ARCTAN = _libsbml.AST_FUNCTION_ARCTAN
77808
77809AST_FUNCTION_ARCTANH = _libsbml.AST_FUNCTION_ARCTANH
77810
77811AST_FUNCTION_CEILING = _libsbml.AST_FUNCTION_CEILING
77812
77813AST_FUNCTION_COS = _libsbml.AST_FUNCTION_COS
77814
77815AST_FUNCTION_COSH = _libsbml.AST_FUNCTION_COSH
77816
77817AST_FUNCTION_COT = _libsbml.AST_FUNCTION_COT
77818
77819AST_FUNCTION_COTH = _libsbml.AST_FUNCTION_COTH
77820
77821AST_FUNCTION_CSC = _libsbml.AST_FUNCTION_CSC
77822
77823AST_FUNCTION_CSCH = _libsbml.AST_FUNCTION_CSCH
77824
77825AST_FUNCTION_DELAY = _libsbml.AST_FUNCTION_DELAY
77826
77827AST_FUNCTION_EXP = _libsbml.AST_FUNCTION_EXP
77828
77829AST_FUNCTION_FACTORIAL = _libsbml.AST_FUNCTION_FACTORIAL
77830
77831AST_FUNCTION_FLOOR = _libsbml.AST_FUNCTION_FLOOR
77832
77833AST_FUNCTION_LN = _libsbml.AST_FUNCTION_LN
77834
77835AST_FUNCTION_LOG = _libsbml.AST_FUNCTION_LOG
77836
77837AST_FUNCTION_PIECEWISE = _libsbml.AST_FUNCTION_PIECEWISE
77838
77839AST_FUNCTION_POWER = _libsbml.AST_FUNCTION_POWER
77840
77841AST_FUNCTION_ROOT = _libsbml.AST_FUNCTION_ROOT
77842
77843AST_FUNCTION_SEC = _libsbml.AST_FUNCTION_SEC
77844
77845AST_FUNCTION_SECH = _libsbml.AST_FUNCTION_SECH
77846
77847AST_FUNCTION_SIN = _libsbml.AST_FUNCTION_SIN
77848
77849AST_FUNCTION_SINH = _libsbml.AST_FUNCTION_SINH
77850
77851AST_FUNCTION_TAN = _libsbml.AST_FUNCTION_TAN
77852
77853AST_FUNCTION_TANH = _libsbml.AST_FUNCTION_TANH
77854
77855AST_LOGICAL_AND = _libsbml.AST_LOGICAL_AND
77856
77857AST_LOGICAL_NOT = _libsbml.AST_LOGICAL_NOT
77858
77859AST_LOGICAL_OR = _libsbml.AST_LOGICAL_OR
77860
77861AST_LOGICAL_XOR = _libsbml.AST_LOGICAL_XOR
77862
77863AST_RELATIONAL_EQ = _libsbml.AST_RELATIONAL_EQ
77864
77865AST_RELATIONAL_GEQ = _libsbml.AST_RELATIONAL_GEQ
77866
77867AST_RELATIONAL_GT = _libsbml.AST_RELATIONAL_GT
77868
77869AST_RELATIONAL_LEQ = _libsbml.AST_RELATIONAL_LEQ
77870
77871AST_RELATIONAL_LT = _libsbml.AST_RELATIONAL_LT
77872
77873AST_RELATIONAL_NEQ = _libsbml.AST_RELATIONAL_NEQ
77874
77875AST_END_OF_CORE = _libsbml.AST_END_OF_CORE
77876
77877AST_FUNCTION_MAX = _libsbml.AST_FUNCTION_MAX
77878
77879AST_FUNCTION_MIN = _libsbml.AST_FUNCTION_MIN
77880
77881AST_FUNCTION_QUOTIENT = _libsbml.AST_FUNCTION_QUOTIENT
77882
77883AST_FUNCTION_RATE_OF = _libsbml.AST_FUNCTION_RATE_OF
77884
77885AST_FUNCTION_REM = _libsbml.AST_FUNCTION_REM
77886
77887AST_LOGICAL_IMPLIES = _libsbml.AST_LOGICAL_IMPLIES
77888
77889AST_CSYMBOL_FUNCTION = _libsbml.AST_CSYMBOL_FUNCTION
77890
77891AST_DISTRIB_FUNCTION_NORMAL = _libsbml.AST_DISTRIB_FUNCTION_NORMAL
77892
77893AST_DISTRIB_FUNCTION_UNIFORM = _libsbml.AST_DISTRIB_FUNCTION_UNIFORM
77894
77895AST_DISTRIB_FUNCTION_BERNOULLI = _libsbml.AST_DISTRIB_FUNCTION_BERNOULLI
77896
77897AST_DISTRIB_FUNCTION_BINOMIAL = _libsbml.AST_DISTRIB_FUNCTION_BINOMIAL
77898
77899AST_DISTRIB_FUNCTION_CAUCHY = _libsbml.AST_DISTRIB_FUNCTION_CAUCHY
77900
77901AST_DISTRIB_FUNCTION_CHISQUARE = _libsbml.AST_DISTRIB_FUNCTION_CHISQUARE
77902
77903AST_DISTRIB_FUNCTION_EXPONENTIAL = _libsbml.AST_DISTRIB_FUNCTION_EXPONENTIAL
77904
77905AST_DISTRIB_FUNCTION_GAMMA = _libsbml.AST_DISTRIB_FUNCTION_GAMMA
77906
77907AST_DISTRIB_FUNCTION_LAPLACE = _libsbml.AST_DISTRIB_FUNCTION_LAPLACE
77908
77909AST_DISTRIB_FUNCTION_LOGNORMAL = _libsbml.AST_DISTRIB_FUNCTION_LOGNORMAL
77910
77911AST_DISTRIB_FUNCTION_POISSON = _libsbml.AST_DISTRIB_FUNCTION_POISSON
77912
77913AST_DISTRIB_FUNCTION_RAYLEIGH = _libsbml.AST_DISTRIB_FUNCTION_RAYLEIGH
77914
77915AST_LINEAR_ALGEBRA_VECTOR = _libsbml.AST_LINEAR_ALGEBRA_VECTOR
77916
77917AST_LINEAR_ALGEBRA_SELECTOR = _libsbml.AST_LINEAR_ALGEBRA_SELECTOR
77918
77919AST_LINEAR_ALGEBRA_MATRIX = _libsbml.AST_LINEAR_ALGEBRA_MATRIX
77920
77921AST_LINEAR_ALGEBRA_MATRIXROW = _libsbml.AST_LINEAR_ALGEBRA_MATRIXROW
77922
77923AST_LINEAR_ALGEBRA_DETERMINANT = _libsbml.AST_LINEAR_ALGEBRA_DETERMINANT
77924
77925AST_LINEAR_ALGEBRA_TRANSPOSE = _libsbml.AST_LINEAR_ALGEBRA_TRANSPOSE
77926
77927AST_LINEAR_ALGEBRA_VECTOR_PRODUCT = _libsbml.AST_LINEAR_ALGEBRA_VECTOR_PRODUCT
77928
77929AST_LINEAR_ALGEBRA_SCALAR_PRODUCT = _libsbml.AST_LINEAR_ALGEBRA_SCALAR_PRODUCT
77930
77931AST_LINEAR_ALGEBRA_OUTER_PRODUCT = _libsbml.AST_LINEAR_ALGEBRA_OUTER_PRODUCT
77932
77933AST_LOGICAL_EXISTS = _libsbml.AST_LOGICAL_EXISTS
77934
77935AST_LOGICAL_FORALL = _libsbml.AST_LOGICAL_FORALL
77936
77937AST_STATISTICS_MEAN = _libsbml.AST_STATISTICS_MEAN
77938
77939AST_STATISTICS_MEDIAN = _libsbml.AST_STATISTICS_MEDIAN
77940
77941AST_STATISTICS_MODE = _libsbml.AST_STATISTICS_MODE
77942
77943AST_STATISTICS_MOMENT = _libsbml.AST_STATISTICS_MOMENT
77944
77945AST_STATISTICS_SDEV = _libsbml.AST_STATISTICS_SDEV
77946
77947AST_STATISTICS_VARIANCE = _libsbml.AST_STATISTICS_VARIANCE
77948
77949AST_STATISTICS_MOMENTABOUT = _libsbml.AST_STATISTICS_MOMENTABOUT
77950
77951AST_SERIES_PRODUCT = _libsbml.AST_SERIES_PRODUCT
77952
77953AST_SERIES_SUM = _libsbml.AST_SERIES_SUM
77954
77955AST_SERIES_LIMIT = _libsbml.AST_SERIES_LIMIT
77956
77957AST_SERIES_TENDSTO = _libsbml.AST_SERIES_TENDSTO
77958
77959AST_ALGEBRA_GCD = _libsbml.AST_ALGEBRA_GCD
77960
77961AST_ALGEBRA_CONJUGATE = _libsbml.AST_ALGEBRA_CONJUGATE
77962
77963AST_ALGEBRA_ARG = _libsbml.AST_ALGEBRA_ARG
77964
77965AST_ALGEBRA_REAL = _libsbml.AST_ALGEBRA_REAL
77966
77967AST_ALGEBRA_IMAGINARY = _libsbml.AST_ALGEBRA_IMAGINARY
77968
77969AST_ALGEBRA_LCM = _libsbml.AST_ALGEBRA_LCM
77970
77971AST_RELATIONS_EQUIVALENT = _libsbml.AST_RELATIONS_EQUIVALENT
77972
77973AST_RELATIONS_APPROX = _libsbml.AST_RELATIONS_APPROX
77974
77975AST_RELATIONS_FACTOROF = _libsbml.AST_RELATIONS_FACTOROF
77976
77977AST_CALCULUS_INT = _libsbml.AST_CALCULUS_INT
77978
77979AST_CALCULUS_DIFF = _libsbml.AST_CALCULUS_DIFF
77980
77981AST_CALCULUS_PARTIALDIFF = _libsbml.AST_CALCULUS_PARTIALDIFF
77982
77983AST_CALCULUS_LOWLIMIT = _libsbml.AST_CALCULUS_LOWLIMIT
77984
77985AST_CALCULUS_UPLIMIT = _libsbml.AST_CALCULUS_UPLIMIT
77986
77987AST_CALCULUS_DIVERGENCE = _libsbml.AST_CALCULUS_DIVERGENCE
77988
77989AST_CALCULUS_GRAD = _libsbml.AST_CALCULUS_GRAD
77990
77991AST_CALCULUS_CURL = _libsbml.AST_CALCULUS_CURL
77992
77993AST_CALCULUS_LAPLACIAN = _libsbml.AST_CALCULUS_LAPLACIAN
77994
77995AST_SET_THEORY_SET = _libsbml.AST_SET_THEORY_SET
77996
77997AST_SET_THEORY_LIST = _libsbml.AST_SET_THEORY_LIST
77998
77999AST_SET_THEORY_UNION = _libsbml.AST_SET_THEORY_UNION
78000
78001AST_SET_THEORY_INTERSECT = _libsbml.AST_SET_THEORY_INTERSECT
78002
78003AST_SET_THEORY_IN = _libsbml.AST_SET_THEORY_IN
78004
78005AST_SET_THEORY_NOTIN = _libsbml.AST_SET_THEORY_NOTIN
78006
78007AST_SET_THEORY_SUBSET = _libsbml.AST_SET_THEORY_SUBSET
78008
78009AST_SET_THEORY_PRSUBSET = _libsbml.AST_SET_THEORY_PRSUBSET
78010
78011AST_SET_THEORY_NOTSUBSET = _libsbml.AST_SET_THEORY_NOTSUBSET
78012
78013AST_SET_THEORY_NOTPRSUBSET = _libsbml.AST_SET_THEORY_NOTPRSUBSET
78014
78015AST_SET_THEORY_SETDIFF = _libsbml.AST_SET_THEORY_SETDIFF
78016
78017AST_SET_THEORY_CARD = _libsbml.AST_SET_THEORY_CARD
78018
78019AST_SET_THEORY_CARTESIANPRODUCT = _libsbml.AST_SET_THEORY_CARTESIANPRODUCT
78020
78021AST_CONSTANT_IMAGINARYI = _libsbml.AST_CONSTANT_IMAGINARYI
78022
78023AST_CONSTANTS_INTEGERS = _libsbml.AST_CONSTANTS_INTEGERS
78024
78025AST_CONSTANTS_REALS = _libsbml.AST_CONSTANTS_REALS
78026
78027AST_CONSTANTS_RATIONALS = _libsbml.AST_CONSTANTS_RATIONALS
78028
78029AST_CONSTANTS_NATURALNUMBERS = _libsbml.AST_CONSTANTS_NATURALNUMBERS
78030
78031AST_CONSTANTS_COMPLEXES = _libsbml.AST_CONSTANTS_COMPLEXES
78032
78033AST_CONSTANTS_PRIMES = _libsbml.AST_CONSTANTS_PRIMES
78034
78035AST_CONSTANTS_EMPTYSET = _libsbml.AST_CONSTANTS_EMPTYSET
78036
78037AST_CONSTANTS_EULERGAMMA = _libsbml.AST_CONSTANTS_EULERGAMMA
78038
78039AST_BASIC_CONTENT_INTERVAL = _libsbml.AST_BASIC_CONTENT_INTERVAL
78040
78041AST_BASIC_CONTENT_INVERSE = _libsbml.AST_BASIC_CONTENT_INVERSE
78042
78043AST_BASIC_CONTENT_CONDITION = _libsbml.AST_BASIC_CONTENT_CONDITION
78044
78045AST_BASIC_CONTENT_DECLARE = _libsbml.AST_BASIC_CONTENT_DECLARE
78046
78047AST_BASIC_CONTENT_COMPOSE = _libsbml.AST_BASIC_CONTENT_COMPOSE
78048
78049AST_BASIC_CONTENT_IDENT = _libsbml.AST_BASIC_CONTENT_IDENT
78050
78051AST_BASIC_CONTENT_DOMAIN = _libsbml.AST_BASIC_CONTENT_DOMAIN
78052
78053AST_BASIC_CONTENT_CODOMAIN = _libsbml.AST_BASIC_CONTENT_CODOMAIN
78054
78055AST_BASIC_CONTENT_IMAGE = _libsbml.AST_BASIC_CONTENT_IMAGE
78056
78057AST_BASIC_CONTENT_DOMAINOFAPPLICATION = _libsbml.AST_BASIC_CONTENT_DOMAINOFAPPLICATION
78058
78059AST_UNKNOWN = _libsbml.AST_UNKNOWN
78060
78061class ASTNode(object):
78062    r"""
78063
78064    @sbmlpackage{core}
78065
78066    @htmlinclude pkg-marker-core.html Abstract Syntax Tree (AST) representation of a
78067    mathematical expression.
78068
78069    @htmlinclude not-sbml-warning.html
78070
78071    Abstract Syntax Trees (ASTs) are a simple kind of data structure used in
78072    libSBML for storing mathematical expressions.  The ASTNode is the
78073    cornerstone of libSBML's AST representation.  An AST 'node' represents the
78074    most basic, indivisible part of a mathematical formula and come in many
78075    types.  For instance, there are node types to represent numbers (with
78076    subtypes to distinguish integer, real, and rational numbers), names
78077    (e.g., constants or variables), simple mathematical operators, logical
78078    or relational operators and functions. LibSBML ASTs provide a canonical,
78079    in-memory representation for all mathematical formulas regardless of
78080    their original format (which might be MathML or might be text strings).
78081
78082    @par
78083    An AST @em node in libSBML is a recursive tree structure; each node has a
78084    type, a pointer to a value, and a list of children nodes.  Each ASTNode
78085    node may have none, one, two, or more children depending on its type.
78086    There are node types to represent numbers (with subtypes to distinguish
78087    integer, real, and rational numbers), names (e.g., constants or
78088    variables), simple mathematical operators, logical or relational operators
78089    and functions.  The following diagram illustrates an example of how the
78090    mathematical expression <code>'1 + 2'</code> is represented as an AST with
78091    one @em plus node having two @em integer children nodes for the numbers
78092    <code>1</code> and <code>2</code>.  The figure also shows the
78093    corresponding MathML representation:
78094
78095    @htmlinclude astnode-illustration.html
78096
78097    The following are other noteworthy points about the AST representation
78098    in libSBML:
78099    @li A numerical value represented in MathML as a real number with an
78100    exponent is preserved as such in the AST node representation, even if the
78101    number could be stored in a @c float data type.  This is done so that
78102    when an SBML model is read in and then written out again, the amount of
78103    change introduced by libSBML to the SBML during the round-trip activity is
78104    minimized.
78105
78106    @li Rational numbers are represented in an AST node using separate
78107    numerator and denominator values.  These can be retrieved using the
78108    methods ASTNode.getNumerator() and ASTNode.getDenominator().
78109
78110    @li The children of an ASTNode are other ASTNode objects.  The list of
78111    children is empty for nodes that are leaf elements, such as numbers.
78112    For nodes that are actually roots of expression subtrees, the list of
78113    children points to the parsed objects that make up the rest of the
78114    expression.
78115
78116    For many applications, the details of ASTs are irrelevant because libSBML
78117    provides text-string based translation functions such as
78118    @sbmlfunction{formulaToL3String, ASTNode} and
78119    @sbmlfunction{parseL3Formula, String}.  If you find the complexity
78120    of using the AST representation of expressions too high for your purposes,
78121    perhaps the string-based functions will be more suitable.
78122
78123    @if clike <h3><a class='anchor' name='ASTNodeType_t'>
78124    ASTNodeType_t</a></h3> @else <h3><a class='anchor'
78125    name='ASTNodeType_t'>The set of possible %ASTNode types</a></h3> @endif@~
78126
78127    @par
78128    Every ASTNode has an associated type code to indicate whether, for
78129    example, it holds a number or stands for an arithmetic operator.
78130    @if clike The type is recorded as a value drawn from the enumeration
78131    #ASTNodeType_t.@endif@~
78132    @if java The type is recorded as a value drawn from a
78133    set of static integer constants defined in the class @link
78134    libsbmlConstants@endlink. Their names begin with the characters @c AST_.@endif
78135    @if python The type is recorded as a value drawn from a
78136    set of static integer constants defined in the class @link
78137    libsbml@endlink. Their names begin with the characters @c AST_.@endif
78138    @if csharp The type is recorded as a value drawn from a
78139    set of static integer constants defined in the class @link
78140    libsbml@endlink. Their names begin with the characters @c AST_.@endif
78141    The list of possible types is quite long, because it covers all the
78142    mathematical functions that are permitted in SBML. The values are shown
78143    in the following table:
78144
78145    @htmlinclude astnode-types.html
78146
78147    The types have the following meanings:
78148
78149    @li If the node is basic mathematical operator (e.g., @c '+'), then the
78150    node's type will be @link libsbml#AST_PLUS AST_PLUS@endlink,
78151    @link libsbml#AST_MINUS AST_MINUS@endlink,
78152    @link libsbml#AST_TIMES AST_TIMES@endlink,
78153    @link libsbml#AST_DIVIDE AST_DIVIDE@endlink, or
78154    @link libsbml#AST_POWER AST_POWER@endlink, as appropriate.
78155
78156    @li If the node is a predefined function or operator from %SBML
78157    Level&nbsp;1 (in the string-based formula syntax used in Level&nbsp;1) or
78158    %SBML Level&nbsp;2 and&nbsp;3 (in the subset of MathML used in SBML
78159    Levels&nbsp;2 and&nbsp;3), then the node's type
78160    will be either <code style='margin-right: 0'>AST_FUNCTION_</code><span
78161    class='placeholder-nospace'>X</span>, <code style='margin-right: 0'>AST_LOGICAL_</code><span
78162    class='placeholder-nospace'>X</span>, or <code style='margin-right: 0'>AST_RELATIONAL_</code><span
78163    class='placeholder-nospace'>X</span>, as appropriate.  (Examples:
78164    @link libsbml#AST_FUNCTION_LOG AST_FUNCTION_LOG@endlink,
78165    @link libsbml#AST_RELATIONAL_LEQ AST_RELATIONAL_LEQ@endlink.)
78166
78167    @li If the node refers to a user-defined function, the node's type will
78168    be @link libsbml#AST_FUNCTION AST_FUNCTION@endlink (because it holds the
78169    name of the function).
78170
78171    @li If the node is a lambda expression, its type will be
78172    @link libsbml#AST_LAMBDA AST_LAMBDA@endlink.
78173
78174    @li If the node is a predefined constant (@c 'ExponentialE', @c 'Pi',
78175    @c 'True' or @c 'False'), then the node's type will be
78176    @link libsbml#AST_CONSTANT_E AST_CONSTANT_E@endlink,
78177    @link libsbml#AST_CONSTANT_PI AST_CONSTANT_PI@endlink,
78178    @link libsbml#AST_CONSTANT_TRUE AST_CONSTANT_TRUE@endlink, or
78179    @link libsbml#AST_CONSTANT_FALSE AST_CONSTANT_FALSE@endlink.
78180
78181    @li (Levels&nbsp;2 and&nbsp;3 only) If the node is the special MathML
78182    csymbol @c time, the value of the node will be
78183    @link libsbml#AST_NAME_TIME AST_NAME_TIME@endlink.  (Note, however, that the
78184    MathML csymbol @c delay is translated into a node of type
78185    @link libsbml#AST_FUNCTION_DELAY AST_FUNCTION_DELAY@endlink.  The difference is due to
78186    the fact that @c time is a single variable, whereas @c delay is actually a
78187    function taking arguments.)
78188
78189    @li (Level&nbsp;3 only) If the node is the special MathML csymbol
78190    @c avogadro, the value of the node will be
78191    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink.
78192
78193    @li (Level&nbsp;3 Version&nbsp;2+ only) If the node is the special MathML
78194    csymbol @c rateOf, the value of the node will be
78195    @link libsbml#AST_FUNCTION_RATE_OF AST_FUNCTION_RATE_OF@endlink.
78196
78197    @li (Level&nbsp;3 Version&nbsp;2+ only) If the node is a MathML
78198    operator that originates in a package, it is included in the
78199    ASTNodeType_t list, but may not be legally used in an SBML document
78200    that does not include that package.  This includes the node types from
78201    the 'Distributions' package (@link libsbml#AST_DISTRIB_FUNCTION_NORMAL AST_DISTRIB_FUNCTION_NORMAL@endlink, @link libsbml#AST_DISTRIB_FUNCTION_UNIFORM AST_DISTRIB_FUNCTION_UNIFORM@endlink,
78202    etc.), and elements from MathML that were not included in core.
78203
78204    @li If the node contains a numerical value, its type will be
78205    @link libsbml#AST_INTEGER AST_INTEGER@endlink,
78206    @link libsbml#AST_REAL AST_REAL@endlink,
78207    @link libsbml#AST_REAL_E AST_REAL_E@endlink, or
78208    @link libsbml#AST_RATIONAL AST_RATIONAL@endlink, as appropriate.
78209
78210    <h3><a class='anchor' name='math-convert'>Converting between ASTs and text strings</a></h3>
78211
78212    The text-string form of mathematical formulas produced by
78213    @sbmlfunction{formulaToString,ASTNode_t} and @sbmlfunction{formulaToL3String,ASTNode_t},
78214    and read by @sbmlfunction{parseFormula,String} and @sbmlfunction{parseL3Formula,String}
78215    are in a simple C-inspired infix notation.  A
78216    formula in this text-string form can be handed to a program that
78217    understands SBML mathematical expressions, or used as part
78218    of a translation system.  The libSBML distribution comes with an example
78219    program in the @c 'examples' subdirectory called @c translateMath that
78220    implements an interactive command-line demonstration of translating
78221    infix formulas into MathML and vice-versa.
78222
78223    The formula strings may contain operators, function calls, symbols, and
78224    white space characters.  The allowable white space characters are tab
78225    and space.  The following are illustrative examples of formulas
78226    expressed in the syntax:
78227
78228    @verbatim
78229    0.10 * k4^2
78230    @endverbatim
78231    @verbatim
78232    (vm * s1)/(km + s1)
78233    @endverbatim
78234
78235    The following table shows the precedence rules in this syntax.  In the
78236    Class column, @em operand implies the construct is an operand, @em
78237    prefix implies the operation is applied to the following arguments, @em
78238    unary implies there is one argument, and @em binary implies there are
78239    two arguments.  The values in the Precedence column show how the order
78240    of different types of operation are determined.  For example, the
78241    expression <em>a * b + c</em> is evaluated as <em>(a * b) + c</em>
78242    because the <code>*</code> operator has higher precedence.  The
78243    Associates column shows how the order of similar precedence operations
78244    is determined; for example, <em>a - b + c</em> is evaluated as <em>(a -
78245    b) + c</em> because the <code>+</code> and <code>-</code> operators are
78246    left-associative.  The precedence and associativity rules are taken from
78247    the C programming language, except for the symbol <code>^</code>, which
78248    is used in C for a different purpose.  (Exponentiation can be invoked
78249    using either <code>^</code> or the function @c power.)
78250
78251    @htmlinclude math-precedence-table.html
78252
78253    A program parsing a formula in an SBML model should assume that names
78254    appearing in the formula are the identifiers of Species, Parameter,
78255    Compartment, FunctionDefinition, Reaction (in SBML Levels&nbsp;2
78256    and&nbsp;3), or SpeciesReference (in SBML Level&nbsp;3 only) objects
78257    defined in a model.  When a function call is involved, the syntax
78258    consists of a function identifier, followed by optional white space,
78259    followed by an opening parenthesis, followed by a sequence of zero or
78260    more arguments separated by commas (with each comma optionally preceded
78261    and/or followed by zero or more white space characters), followed by a
78262    closing parenthesis.  There is an almost one-to-one mapping between the
78263    list of predefined functions available, and those defined in MathML.
78264    All of the MathML functions are recognized; this set is larger than the
78265    functions defined in SBML Level&nbsp;1.  In the subset of functions that
78266    overlap between MathML and SBML Level&nbsp;1, there exist a few
78267    differences.  The following table summarizes the differences between the
78268    predefined functions in SBML Level&nbsp;1 and the MathML equivalents in
78269    SBML Levels&nbsp;2 and &nbsp;3:
78270
78271    @htmlinclude math-functions.html
78272
78273    @note
78274    Callers using SBML Level&nbsp;3 are encouraged to use the facilities
78275    provided by libSBML's newer and more powerful Level&nbsp;3-oriented
78276    formula parser and formatter.  The entry points to this second system are
78277    @sbmlfunction{parseL3Formula, String} and
78278    @sbmlfunction{formulaToL3String, ASTNode}.  The Level&nbsp;1-oriented
78279    system (i.e., what is provided by @sbmlfunction{formulaToString, String}
78280    and @sbmlfunction{parseFormula, ASTNode}) is provided
78281    untouched for backwards compatibility.
78282
78283    @see @sbmlfunction{parseL3Formula, String}
78284    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
78285    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
78286    @see @sbmlfunction{parseFormula, String}
78287    @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
78288    @see @sbmlfunction{formulaToL3String, ASTNode}
78289    @see @sbmlfunction{formulaToString, ASTNode}
78290    @see @sbmlfunction{getDefaultL3ParserSettings,}
78291
78292    """
78293
78294    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
78295    __repr__ = _swig_repr
78296
78297    def __init__(self, *args):
78298        r"""
78299        __init__(ASTNode self, ASTNodeType_t type=AST_UNKNOWN) -> ASTNode
78300        __init__(ASTNode self, ASTNode orig) -> ASTNode
78301
78302        This method has multiple variants; they differ in the arguments
78303         they accept.  Each variant is described separately below.
78304
78305        @par
78306        <hr>
78307        <span class='variant-sig-heading'>Method variant with the following signature</span>:
78308         <pre class='signature'>ASTNode(ASTNode orig)</pre>
78309
78310        Copy constructor; creates a deep copy of the given ASTNode.
78311
78312        @param orig the ASTNode to be copied.
78313
78314
78315        @par
78316        <hr>
78317        <span class='variant-sig-heading'>Method variant with the following signature</span>:
78318         <pre class='signature'>ASTNode(Token_t *token)</pre>
78319
78320        Creates a new ASTNode from the given Token.  The resulting ASTNode
78321        will contain the same data as the @p token.
78322
78323        @param token the token to use as a starting point for creating the
78324        ASTNode object.
78325
78326
78327        @par
78328        <hr>
78329        <span class='variant-sig-heading'>Method variant with the following signature</span>:
78330         <pre class='signature'>ASTNode(ASTNodeType_t type = AST_UNKNOWN)</pre>
78331
78332        Creates and returns a new ASTNode.
78333
78334        Unless the argument @p type is given, the returned node will by default
78335        have a type of @link libsbml#AST_UNKNOWN AST_UNKNOWN@endlink.  If the type
78336        isn't supplied when caling this constructor, the caller should set the
78337        node type to something else as soon as possible using @if clike
78338        setType()@else ASTNode.setType()@endif.
78339
78340        @param type an optional @if clike #ASTNodeType_t@else type@endif@~
78341        code indicating the type of node to create.
78342
78343        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
78344
78345
78346
78347        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
78348
78349        """
78350        _libsbml.ASTNode_swiginit(self, _libsbml.new_ASTNode(*args))
78351    __swig_destroy__ = _libsbml.delete_ASTNode
78352
78353    def freeName(self):
78354        r"""
78355        freeName(ASTNode self) -> int
78356
78357        Frees the name of this ASTNode and sets it to @c None.
78358
78359        This operation is only applicable to ASTNode objects corresponding to
78360        operators, numbers, or @link libsbml#AST_UNKNOWN AST_UNKNOWN@endlink.  This
78361        method has no effect on other types of nodes.
78362
78363        @return integer value indicating success/failure of the
78364        function.  @if clike The value is drawn from the
78365        enumeration #OperationReturnValues_t. @endif@~ The possible values
78366        returned by this function are:
78367        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
78368        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
78369
78370        """
78371        return _libsbml.ASTNode_freeName(self)
78372
78373    def canonicalize(self):
78374        r"""
78375        canonicalize(ASTNode self) -> bool
78376
78377        Converts this ASTNode to a canonical form and returns @c True if
78378        successful, @c False otherwise.
78379
78380        The rules determining the canonical form conversion are as follows:
78381
78382        @li If the node type is @link libsbml#AST_NAME AST_NAME@endlink
78383        and the node name matches @c 'ExponentialE', @c 'Pi', @c 'True' or @c
78384        'False' the node type is converted to the corresponding
78385        <code>AST_CONSTANT_</code><em><span class='placeholder'>X</span></em> type.
78386
78387        @li If the node type is an @link libsbml#AST_FUNCTION AST_FUNCTION@endlink
78388        and the node name matches an SBML (MathML) function name, logical operator name,
78389        or relational operator name, the node is converted to the corresponding
78390        <code>AST_FUNCTION_</code><em><span class='placeholder'>X</span></em> or
78391        <code>AST_LOGICAL_</code><em><span class='placeholder'>X</span></em> type.
78392
78393        SBML Level&nbsp;1 function names are searched first; thus, for
78394        example, canonicalizing @c log will result in a node type of @link libsbml#AST_FUNCTION_LN AST_FUNCTION_LN@endlink.  (See the SBML
78395        Level&nbsp;1 Version&nbsp;2 Specification, Appendix C.)
78396
78397        Sometimes, canonicalization of a node results in a structural
78398        conversion of the node as a result of adding a child.  For example, a
78399        node with the SBML Level&nbsp;1 function name @c sqr and a single
78400        child node (the argument) will be transformed to a node of type
78401        @link libsbml#AST_FUNCTION_POWER AST_FUNCTION_POWER@endlink with
78402        two children.  The first child will remain unchanged, but the second
78403        child will be an ASTNode of type @link libsbml#AST_INTEGER AST_INTEGER@endlink and a value of 2.  The function names that result
78404        in structural changes are: @c log10, @c sqr, and @c sqrt.
78405
78406        """
78407        return _libsbml.ASTNode_canonicalize(self)
78408
78409    def addChild(self, disownedChild, inRead=False):
78410        r"""
78411        addChild(ASTNode self, ASTNode disownedChild, bool inRead=False) -> int
78412
78413        Adds the given node as a child of this ASTNode.
78414
78415        Child nodes are added in-order, from left to right.
78416
78417        @param disownedChild the ASTNode instance to add.
78418        @param inRead @c False by default; may be set to @c True when
78419        reading XML where there may be a lambda function with no
78420        bvar arguments.
78421
78422        @return integer value indicating success/failure of the
78423        function.  @if clike The value is drawn from the
78424        enumeration #OperationReturnValues_t. @endif@~ The possible values
78425        returned by this function are:
78426        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
78427        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
78428
78429        @warning Explicitly adding, removing or replacing children of an
78430        @if conly ASTNode_t structure@else ASTNode object@endif@~ may change the
78431        structure of the mathematical formula it represents, and may even render
78432        the representation invalid.  Callers need to be careful to use this method
78433        in the context of other operations to create complete and correct
78434        formulas.  The method @if conly ASTNode_isWellFormedASTNode()@else
78435        ASTNode.isWellFormedASTNode()@endif@~ may also be useful for checking the
78436        results of node modifications.
78437
78438        @see prependChild()
78439        @see replaceChild()
78440        @see insertChild()
78441        @see removeChild()
78442        @see isWellFormedASTNode()
78443
78444
78445
78446        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
78447
78448        """
78449        return _libsbml.ASTNode_addChild(self, disownedChild, inRead)
78450
78451    def prependChild(self, disownedChild):
78452        r"""
78453        prependChild(ASTNode self, ASTNode disownedChild) -> int
78454
78455        Adds the given node as a child of this ASTNode.  This method adds
78456        child nodes from right to left.
78457
78458        @param disownedChild the ASTNode instance to add.
78459        Will become a child of the parent node.
78460
78461        @return integer value indicating success/failure of the
78462        function.  @if clike The value is drawn from the
78463        enumeration #OperationReturnValues_t. @endif@~ The possible values
78464        returned by this function are:
78465        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
78466        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
78467
78468        @warning Explicitly adding, removing or replacing children of an
78469        @if conly ASTNode_t structure@else ASTNode object@endif@~ may change the
78470        structure of the mathematical formula it represents, and may even render
78471        the representation invalid.  Callers need to be careful to use this method
78472        in the context of other operations to create complete and correct
78473        formulas.  The method @if conly ASTNode_isWellFormedASTNode()@else
78474        ASTNode.isWellFormedASTNode()@endif@~ may also be useful for checking the
78475        results of node modifications.
78476
78477        @see addChild()
78478        @see replaceChild()
78479        @see insertChild()
78480        @see removeChild()
78481
78482        """
78483        return _libsbml.ASTNode_prependChild(self, disownedChild)
78484
78485    def removeChild(self, n):
78486        r"""
78487        removeChild(ASTNode self, unsigned int n) -> int
78488
78489        Removes the nth child of this ASTNode object.
78490
78491        @param n long the index of the child to remove.
78492
78493        @return integer value indicating success/failure of the
78494        function.  @if clike The value is drawn from the
78495        enumeration #OperationReturnValues_t. @endif@~ The possible values
78496        returned by this function are:
78497        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
78498        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
78499
78500        @warning Explicitly adding, removing or replacing children of an
78501        @if conly ASTNode_t structure@else ASTNode object@endif@~ may change the
78502        structure of the mathematical formula it represents, and may even render
78503        the representation invalid.  Callers need to be careful to use this method
78504        in the context of other operations to create complete and correct
78505        formulas.  The method @if conly ASTNode_isWellFormedASTNode()@else
78506        ASTNode.isWellFormedASTNode()@endif@~ may also be useful for checking the
78507        results of node modifications.
78508
78509        @see addChild()
78510        @see prependChild()
78511        @see replaceChild()
78512        @see insertChild()
78513
78514        """
78515        return _libsbml.ASTNode_removeChild(self, n)
78516
78517    def replaceChild(self, n, disownedChild, delreplaced=False):
78518        r"""
78519        replaceChild(ASTNode self, unsigned int n, ASTNode disownedChild, bool delreplaced=False) -> int
78520
78521        Replaces and optionally deletes the nth child of this ASTNode with the given ASTNode.
78522
78523        @param n long the index of the child to replace.
78524        @param disownedChild ASTNode to replace the nth child.
78525        Will become a child of the parent node.
78526        @param delreplaced Boolean indicating whether to delete the replaced child.
78527
78528        @return integer value indicating success/failure of the
78529        function.  @if clike The value is drawn from the
78530        enumeration #OperationReturnValues_t. @endif@~ The possible values
78531        returned by this function are:
78532        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
78533        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
78534        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
78535
78536        @warning Explicitly adding, removing or replacing children of an
78537        @if conly ASTNode_t structure@else ASTNode object@endif@~ may change the
78538        structure of the mathematical formula it represents, and may even render
78539        the representation invalid.  Callers need to be careful to use this method
78540        in the context of other operations to create complete and correct
78541        formulas.  The method @if conly ASTNode_isWellFormedASTNode()@else
78542        ASTNode.isWellFormedASTNode()@endif@~ may also be useful for checking the
78543        results of node modifications.
78544
78545        @see addChild()
78546        @see prependChild()
78547        @see insertChild()
78548        @see removeChild()
78549
78550        """
78551        return _libsbml.ASTNode_replaceChild(self, n, disownedChild, delreplaced)
78552
78553    def insertChild(self, n, disownedChild):
78554        r"""
78555        insertChild(ASTNode self, unsigned int n, ASTNode disownedChild) -> int
78556
78557        Inserts the given ASTNode at point n in the list of children
78558        of this ASTNode.
78559
78560        @param n long the index of the ASTNode being added.
78561        @param disownedChild ASTNode to insert as the nth child.
78562
78563        @return integer value indicating success/failure of the
78564        function.  @if clike The value is drawn from the
78565        enumeration #OperationReturnValues_t. @endif@~ The possible values
78566        returned by this function are:
78567        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
78568        @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
78569        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
78570
78571        @warning Explicitly adding, removing or replacing children of an
78572        @if conly ASTNode_t structure@else ASTNode object@endif@~ may change the
78573        structure of the mathematical formula it represents, and may even render
78574        the representation invalid.  Callers need to be careful to use this method
78575        in the context of other operations to create complete and correct
78576        formulas.  The method @if conly ASTNode_isWellFormedASTNode()@else
78577        ASTNode.isWellFormedASTNode()@endif@~ may also be useful for checking the
78578        results of node modifications.
78579
78580        @see addChild()
78581        @see prependChild()
78582        @see replaceChild()
78583        @see removeChild()
78584
78585        """
78586        return _libsbml.ASTNode_insertChild(self, n, disownedChild)
78587
78588    def deepCopy(self):
78589        r"""
78590        deepCopy(ASTNode self) -> ASTNode
78591
78592        Creates a recursive copy of this node and all its children.
78593
78594        @return a copy of this ASTNode and all its children.  The caller owns
78595        the returned ASTNode and is responsible for deleting it.
78596
78597        """
78598        return _libsbml.ASTNode_deepCopy(self)
78599
78600    def getChild(self, n):
78601        r"""
78602        getChild(ASTNode self, unsigned int n) -> ASTNode
78603
78604        Returns the child at index n of this node.
78605
78606        @param n the index of the child to get.
78607
78608        @return the nth child of this ASTNode or @c None if this node has no nth
78609        child (<code>n &gt; </code>
78610        @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~
78611        <code>- 1</code>).
78612
78613        @see getNumChildren()
78614        @see getLeftChild()
78615        @see getRightChild()
78616
78617        """
78618        return _libsbml.ASTNode_getChild(self, n)
78619
78620    def getLeftChild(self):
78621        r"""
78622        getLeftChild(ASTNode self) -> ASTNode
78623
78624        Returns the left child of this node.
78625
78626        @return the left child of this ASTNode.  This is equivalent to calling
78627        @if clike getChild()@else ASTNode.getChild()@endif@~
78628        with an argument of @c 0.
78629
78630        @see getNumChildren()
78631        @see getChild()
78632        @see getRightChild()
78633
78634        """
78635        return _libsbml.ASTNode_getLeftChild(self)
78636
78637    def getRightChild(self):
78638        r"""
78639        getRightChild(ASTNode self) -> ASTNode
78640
78641        Returns the right child of this node.
78642
78643        @return the right child of this ASTNode, or @c None if this node has no
78644        right child.  If
78645        @if clike getNumChildren()@else ASTNode.getNumChildren()@endif@~
78646        <code>&gt; 1</code>, then this is equivalent to:
78647        @verbatim
78648        getChild( getNumChildren() - 1 );
78649        @endverbatim
78650
78651        @see getNumChildren()
78652        @see getLeftChild()
78653        @see getChild()
78654
78655        """
78656        return _libsbml.ASTNode_getRightChild(self)
78657
78658    def getNumChildren(self):
78659        r"""
78660        getNumChildren(ASTNode self) -> unsigned int
78661
78662        Returns the number of children of this node.
78663
78664        @return the number of children of this ASTNode, or 0 is this node has
78665        no children.
78666
78667        """
78668        return _libsbml.ASTNode_getNumChildren(self)
78669
78670    def addSemanticsAnnotation(self, disownedAnnotation):
78671        r"""
78672        addSemanticsAnnotation(ASTNode self, XMLNode disownedAnnotation) -> int
78673
78674        Adds the given XMLNode as a MathML <code>&lt;semantics&gt;</code>
78675        element to this ASTNode.
78676
78677        @htmlinclude about-semantic-annotations.html
78678
78679        @param disownedAnnotation the annotation to add.
78680        Will become a child of the parent node.
78681
78682        @return integer value indicating success/failure of the
78683        function.  @if clike The value is drawn from the
78684        enumeration #OperationReturnValues_t. @endif@~ The possible values
78685        returned by this function are:
78686        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
78687        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
78688
78689        @note Although SBML permits the use of the MathML
78690        <code>&lt;semantics&gt;</code> annotation construct, the truth is that
78691        this construct has so far (at this time of this writing, which is early
78692        2014) seen very little use in SBML software.  The full implications of
78693        using these annotations are still poorly understood.  If you wish to
78694        use this construct, we urge you to discuss possible uses and applications
78695        on the SBML discussion lists, particularly <a target='_blank'
78696        href='http://sbml.org/Forums'>sbml-discuss</a> and/or <a target='_blank'
78697        href='http://sbml.org/Forums'>sbml-interoperability</a>.
78698
78699        @see getNumSemanticsAnnotations()
78700        @see getSemanticsAnnotation()
78701
78702        """
78703        return _libsbml.ASTNode_addSemanticsAnnotation(self, disownedAnnotation)
78704
78705    def getNumSemanticsAnnotations(self):
78706        r"""
78707        getNumSemanticsAnnotations(ASTNode self) -> unsigned int
78708
78709        Returns the number of MathML <code>&lt;semantics&gt;</code> element
78710        elements on this node.
78711
78712        @htmlinclude about-semantic-annotations.html
78713
78714        @return the number of annotations of this ASTNode.
78715
78716        @note Although SBML permits the use of the MathML
78717        <code>&lt;semantics&gt;</code> annotation construct, the truth is that
78718        this construct has so far (at this time of this writing, which is early
78719        2014) seen very little use in SBML software.  The full implications of
78720        using these annotations are still poorly understood.  If you wish to
78721        use this construct, we urge you to discuss possible uses and applications
78722        on the SBML discussion lists, particularly <a target='_blank'
78723        href='http://sbml.org/Forums'>sbml-discuss</a> and/or <a target='_blank'
78724        href='http://sbml.org/Forums'>sbml-interoperability</a>.
78725
78726        @see addSemanticsAnnotation()
78727        @see getSemanticsAnnotation()
78728
78729        """
78730        return _libsbml.ASTNode_getNumSemanticsAnnotations(self)
78731
78732    def getSemanticsAnnotation(self, n):
78733        r"""
78734        getSemanticsAnnotation(ASTNode self, unsigned int n) -> XMLNode
78735
78736        Returns the nth MathML <code>&lt;semantics&gt;</code> element on this
78737        ASTNode.
78738
78739        @htmlinclude about-semantic-annotations.html
78740
78741        @param n the index of the annotation to return.  Callers should
78742        use ASTNode.getNumSemanticsAnnotations() to first find out how
78743        many annotations there are.
78744
78745        @return the nth annotation inside this ASTNode, or @c None if this node has
78746        no nth annotation (<code>n &gt;</code>
78747        @if clike getNumSemanticsAnnotations()@else ASTNode.getNumSemanticsAnnotations()@endif@~
78748        <code>- 1</code>).
78749
78750        @note Although SBML permits the use of the MathML
78751        <code>&lt;semantics&gt;</code> annotation construct, the truth is that
78752        this construct has so far (at this time of this writing, which is early
78753        2014) seen very little use in SBML software.  The full implications of
78754        using these annotations are still poorly understood.  If you wish to
78755        use this construct, we urge you to discuss possible uses and applications
78756        on the SBML discussion lists, particularly <a target='_blank'
78757        href='http://sbml.org/Forums'>sbml-discuss</a> and/or <a target='_blank'
78758        href='http://sbml.org/Forums'>sbml-interoperability</a>.
78759
78760        @see getNumSemanticsAnnotations()
78761        @see addSemanticsAnnotation()
78762
78763        """
78764        return _libsbml.ASTNode_getSemanticsAnnotation(self, n)
78765
78766    def getCharacter(self):
78767        r"""
78768        getCharacter(ASTNode self) -> char
78769
78770        Returns the value of this node as a single character.
78771
78772        This function should be called only when
78773        @if clike getType()@else ASTNode.getType()@endif@~ returns
78774        @link libsbml#AST_PLUS AST_PLUS@endlink,
78775        @link libsbml#AST_MINUS AST_MINUS@endlink,
78776        @link libsbml#AST_TIMES AST_TIMES@endlink,
78777        @link libsbml#AST_DIVIDE AST_DIVIDE@endlink or
78778        @link libsbml#AST_POWER AST_POWER@endlink.
78779
78780        @return the value of this ASTNode as a single character
78781
78782        """
78783        return _libsbml.ASTNode_getCharacter(self)
78784
78785    def getId(self):
78786        r"""
78787        getId(ASTNode self) -> string
78788
78789        Returns the MathML @c id attribute value of this ASTNode.
78790
78791        @return the MathML id of this ASTNode.
78792
78793        @see isSetId()
78794        @see setId()
78795        @see unsetId()
78796
78797        """
78798        return _libsbml.ASTNode_getId(self)
78799
78800    def getClass(self):
78801        r"""
78802        getClass(ASTNode self) -> string
78803
78804        Returns the MathML @c class attribute value of this ASTNode.
78805
78806        @return the MathML class of this ASTNode, or an empty string if it does not exist.
78807
78808        @see isSetClass()
78809        @see @if java setClassName(string id)@else setClass()@endif@~
78810        @see unsetClass()
78811
78812        """
78813        return _libsbml.ASTNode_getClass(self)
78814
78815    def getStyle(self):
78816        r"""
78817        getStyle(ASTNode self) -> string
78818
78819        Returns the MathML @c style attribute value of this ASTNode.
78820
78821        @return the MathML style of this ASTNode, or an empty string if it does not exist.
78822
78823        @see isSetStyle()
78824        @see setStyle()
78825        @see unsetStyle()
78826
78827        """
78828        return _libsbml.ASTNode_getStyle(self)
78829
78830    def getInteger(self):
78831        r"""
78832        getInteger(ASTNode self) -> long
78833
78834        Returns the value of this node as an integer.
78835
78836        If this node type is @link libsbml#AST_RATIONAL AST_RATIONAL@endlink, this
78837        method returns the value of the numerator.
78838
78839        @return the value of this ASTNode as a (<code>long</code>) integer if type @link libsbml#AST_INTEGER AST_INTEGER@endlink; the numerator if type @link libsbml#AST_RATIONAL AST_RATIONAL@endlink, and @c 0 otherwise.
78840
78841        @note This function should be called only when
78842        @if clike getType()@else ASTNode.getType()@endif@~ returns
78843        @link libsbml#AST_INTEGER AST_INTEGER@endlink or
78844        @link libsbml#AST_RATIONAL AST_RATIONAL@endlink.
78845        It will return @c 0 if the node type is @em not one of these, but since
78846        @c 0 may be a valid value for integer, it is important to be sure that
78847        the node type is one of the expected types in order to understand if
78848        @c 0 is the actual value.
78849
78850        @see getNumerator()
78851        @see getDenominator()
78852
78853        """
78854        return _libsbml.ASTNode_getInteger(self)
78855
78856    def getName(self):
78857        r"""
78858        getName(ASTNode self) -> char const *
78859
78860        Returns the value of this node as a string.
78861
78862        This function may be called on nodes that (1) are not operators, i.e.,
78863        nodes for which @if clike isOperator()@else
78864        ASTNode.isOperator()@endif@~ returns @c False, and (2) are not numbers,
78865        i.e., @if clike isNumber()@else ASTNode.isNumber()@endif@~ returns
78866        @c None.
78867
78868        @return the value of this ASTNode as a string, or @c None if it is
78869        a node that does not have a name equivalent (e.g., if it is a number).
78870
78871        """
78872        return _libsbml.ASTNode_getName(self)
78873
78874    def getOperatorName(self):
78875        r"""
78876        getOperatorName(ASTNode self) -> char const *
78877
78878        Returns the value of this operator node as a string.
78879
78880        This function may be called on nodes that are operators, i.e., nodes for
78881        which @if clike isOperator()@else ASTNode.isOperator()@endif@~ returns
78882        @c True.
78883
78884        @return the name of this operator ASTNode as a string (or @c None if not
78885        an operator).
78886
78887        """
78888        return _libsbml.ASTNode_getOperatorName(self)
78889
78890    def getNumerator(self):
78891        r"""
78892        getNumerator(ASTNode self) -> long
78893
78894        Returns the value of the numerator of this node if of
78895        type @link libsbml#AST_RATIONAL AST_RATIONAL@endlink, or the
78896        numerical value of the node if of type
78897        @link libsbml#AST_INTEGER AST_INTEGER@endlink; @c 0 otherwise.
78898
78899        This function should be called only when
78900        @if clike getType()@else ASTNode.getType()@endif@~ returns
78901        @link libsbml#AST_RATIONAL AST_RATIONAL@endlink or
78902        @link libsbml#AST_INTEGER AST_INTEGER@endlink.
78903        It will return @c 0 if the node type is another type, but since @c 0 may
78904        be a valid value for the denominator of a rational number or of an integer, it is
78905        important to be sure that the node type is the correct type in order to
78906        correctly interpret the returned value.
78907
78908        @return the value of the numerator of this ASTNode if
78909        @link libsbml#AST_RATIONAL AST_RATIONAL@endlink, the value if
78910        @link libsbml#AST_INTEGER AST_INTEGER@endlink, or @c 0 otherwise.
78911
78912        @see getDenominator()
78913        @see getInteger()
78914
78915        """
78916        return _libsbml.ASTNode_getNumerator(self)
78917
78918    def getDenominator(self):
78919        r"""
78920        getDenominator(ASTNode self) -> long
78921
78922        Returns the value of the denominator of this node.
78923
78924        @return the value of the denominator of this ASTNode, or @c 1 (true) if
78925        this node is not of type @link libsbml#AST_RATIONAL AST_RATIONAL@endlink.
78926
78927        @note This function should be called only when
78928        @if clike getType()@else ASTNode.getType()@endif@~ returns
78929        @link libsbml#AST_RATIONAL AST_RATIONAL@endlink.
78930        It will return @c 1 if the node type is another type, but since @c 1 may
78931        be a valid value for the denominator of a rational number, it is
78932        important to be sure that the node type is the correct type in order to
78933        correctly interpret the returned value.
78934
78935        @see getNumerator()
78936
78937        """
78938        return _libsbml.ASTNode_getDenominator(self)
78939
78940    def getReal(self):
78941        r"""
78942        getReal(ASTNode self) -> double
78943
78944        Returns the real-numbered value of this node.
78945
78946        This function performs the necessary arithmetic if the node type is
78947        @link libsbml#AST_REAL_E AST_REAL_E@endlink (<em>mantissa *
78948        10<sup>exponent</sup></em>) or
78949        @link libsbml#AST_RATIONAL AST_RATIONAL@endlink
78950        (<em>numerator / denominator</em>).
78951
78952        @return the value of this ASTNode as a real (double), or @c 0
78953        if this is not a node that holds a number.
78954
78955        @note This function should be called only when this ASTNode has a
78956        numerical value type.  It will return @c 0 if the node type is another
78957        type, but since @c 0 may be a valid value, it is important to be sure
78958        that the node type is the correct type in order to correctly interpret
78959        the returned value.
78960
78961        """
78962        return _libsbml.ASTNode_getReal(self)
78963
78964    def getMantissa(self):
78965        r"""
78966        getMantissa(ASTNode self) -> double
78967
78968        Returns the mantissa value of this node.
78969
78970        If @if clike getType()@else ASTNode.getType()@endif@~ returns
78971        @link libsbml#AST_REAL AST_REAL@endlink, this method is
78972        identical to ASTNode.getReal().
78973
78974        @return the value of the mantissa of this ASTNode, or @c 0 if this
78975        node is not a type that has a real-numbered value.
78976
78977        @note This function should be called only when
78978        @if clike getType()@else ASTNode.getType()@endif@~ returns
78979        @link libsbml#AST_REAL_E AST_REAL_E@endlink,
78980        @link libsbml#AST_REAL AST_REAL@endlink or
78981        @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink.  It
78982        will return @c 0 if the node type is another type, but since @c 0 may be
78983        a valid value, it is important to be sure that the node type is the
78984        correct type in order to correctly interpret the returned value.
78985
78986        @see getExponent()
78987
78988        """
78989        return _libsbml.ASTNode_getMantissa(self)
78990
78991    def getExponent(self):
78992        r"""
78993        getExponent(ASTNode self) -> long
78994
78995        Returns the exponent value of this ASTNode.
78996
78997        @return the value of the exponent of this ASTNode, or @c 0 if this
78998        is not a type of node that has an exponent.
78999
79000        @note This function should be called only when
79001        @if clike getType()@else ASTNode.getType()@endif@~
79002        returns @link libsbml#AST_REAL_E AST_REAL_E@endlink.
79003        It will return @c 0 if the node type is another type, but since @c 0 may
79004        be a valid value, it is important to be sure that the node type is the
79005        correct type in order to correctly interpret the returned value.
79006
79007        @see getMantissa()
79008
79009        """
79010        return _libsbml.ASTNode_getExponent(self)
79011
79012    def getValue(self):
79013        r"""
79014        getValue(ASTNode self) -> double
79015
79016        Returns the numerical value of this ASTNode.
79017
79018        @return the numerical value of this ASTNode, or @c NaN if this
79019        is not a type of node that has a numerical value.
79020
79021        @note This function will return a numerical value (as a double) for
79022        any ASTNode_t that represents a number, a constant such as
79023        @link libsbml#AST_CONSTANT_PI AST_CONSTANT_PI@endlink,
79024        @link libsbml#AST_CONSTANT_E AST_CONSTANT_E@endlink, or
79025        @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink, or
79026        @c 1 for nodes of type
79027        @link libsbml#AST_CONSTANT_TRUE AST_CONSTANT_TRUE@endlink and @c 0 for nodes of type
79028        @link libsbml#AST_CONSTANT_FALSE AST_CONSTANT_FALSE@endlink. It does not evaluate
79029        the node in any way so, for example, it will not return the value of
79030        a named ASTNode_t or attempt to evaluate a function.
79031        This includes a node representing @c time i.e. nodes
79032        of type @link libsbml#AST_NAME_TIME AST_NAME_TIME@endlink.
79033
79034        """
79035        return _libsbml.ASTNode_getValue(self)
79036
79037    def getPrecedence(self):
79038        r"""
79039        getPrecedence(ASTNode self) -> int
79040
79041        Returns the precedence of this node in the infix math syntax of SBML
79042        Level&nbsp;1.  For more information about the infix syntax, see the
79043        discussion about <a href='#math-convert'>text string formulas</a> at
79044        the top of the documentation for ASTNode.
79045
79046        @return an integer indicating the precedence of this ASTNode
79047
79048        """
79049        return _libsbml.ASTNode_getPrecedence(self)
79050
79051    def getType(self):
79052        r"""
79053        getType(ASTNode self) -> ASTNodeType_t
79054
79055        Returns the type of this ASTNode.
79056
79057        The value returned is one of the Core AST type codes such as
79058        @link libsbml#AST_LAMBDA AST_LAMBDA@endlink,
79059        @link libsbml#AST_PLUS AST_PLUS@endlink, etc.
79060
79061        @return the type of this ASTNode.
79062
79063        """
79064        return _libsbml.ASTNode_getType(self)
79065
79066    def getUnits(self):
79067        r"""
79068        getUnits(ASTNode self) -> string
79069
79070        Returns the units of this ASTNode.
79071
79072        @htmlinclude about-sbml-units-attrib.html
79073
79074        @return the units of this ASTNode.
79075
79076        @note The <code>sbml:units</code> attribute is only available in SBML
79077        Level&nbsp;3.  It may not be used in Levels 1&ndash;2 of SBML.
79078
79079        @see @sbmlfunction{parseL3Formula, String}
79080
79081        """
79082        return _libsbml.ASTNode_getUnits(self)
79083
79084    def isAvogadro(self):
79085        r"""
79086        isAvogadro(ASTNode self) -> bool
79087
79088        Returns @c True (nonzero) if this node is the special
79089        symbol @c avogadro.  The predicate returns @c False (zero) otherwise.
79090
79091        SBML Level&nbsp;3 introduced a predefined MathML <code>&lt;csymbol&gt;</code>
79092        for the value of Avogadro's constant.  LibSBML stores this internally as
79093        a node of type @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink.
79094        This method returns @c True if this node has that type.
79095
79096        @return @c True if this ASTNode is the special symbol avogadro,
79097        @c False otherwise.
79098
79099        @see @sbmlfunction{parseL3Formula, String}
79100
79101        """
79102        return _libsbml.ASTNode_isAvogadro(self)
79103
79104    def isBoolean(self):
79105        r"""
79106        isBoolean(ASTNode self) -> bool
79107
79108        Returns @c True if this node has a Boolean type.
79109
79110        The ASTNode objects that have Boolean types are the logical operators,
79111        relational operators, and the constants @c True or @c False.
79112
79113        @return @c True if this ASTNode has a Boolean type, @c False otherwise.
79114
79115        """
79116        return _libsbml.ASTNode_isBoolean(self)
79117
79118    def returnsBoolean(self, model=None):
79119        r"""
79120        returnsBoolean(ASTNode self, Model model=None) -> bool
79121
79122        Returns @c True (nonzero) if this node returns a Boolean type
79123        or @c False (zero) otherwise.
79124
79125        This function looks at the whole ASTNode rather than just the top
79126        level of the ASTNode. Thus it will consider return values from
79127        piecewise statements.  In addition, if this ASTNode uses a function
79128        call, the return value of the functionDefinition will be determined.
79129        Note that this is only possible where the ASTNode can trace its parent
79130        Model, that is, the ASTNode must represent the <code>&lt;math&gt;</code> element of some
79131        SBML object that has already been added to an instance of an SBMLDocument.
79132        If this is not the case, this function will return @c False unless
79133        isBoolean() returns @c True.
79134
79135        @see isBoolean()
79136
79137        @return @c True if this ASTNode returns a Boolean, @c False otherwise.
79138
79139        """
79140        return _libsbml.ASTNode_returnsBoolean(self, model)
79141
79142    def isConstant(self):
79143        r"""
79144        isConstant(ASTNode self) -> bool
79145
79146        Returns @c True (nonzero) if this node represents a MathML
79147        constant (e.g., @c True, @c Pi).
79148
79149        @return @c True if this ASTNode is a MathML constant, @c False otherwise.
79150
79151        @note this function will also return @c True for nodes of type
79152        @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink in SBML Level&nbsp;3.
79153
79154        """
79155        return _libsbml.ASTNode_isConstant(self)
79156
79157    def isCiNumber(self):
79158        r"""
79159        isCiNumber(ASTNode self) -> bool
79160
79161        Returns @c True (nonzero) if this node represents a MathML
79162        ci element representing a value not a function (e.g., @c True, @c Pi).
79163
79164        @return @c True if this ASTNode is a MathML ci element, @c False otherwise.
79165
79166        """
79167        return _libsbml.ASTNode_isCiNumber(self)
79168
79169    def isConstantNumber(self):
79170        r"""
79171        isConstantNumber(ASTNode self) -> bool
79172
79173        Returns @c True (nonzero) if this node represents a MathML
79174        constant with numeric value (e.g., @c Pi).
79175
79176        @return @c True if this ASTNode is a MathML constant, @c False otherwise.
79177
79178        @note this function will also return @c True for
79179        @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink in SBML Level&nbsp;3.
79180
79181        """
79182        return _libsbml.ASTNode_isConstantNumber(self)
79183
79184    def isCSymbolFunction(self):
79185        r"""
79186        isCSymbolFunction(ASTNode self) -> bool
79187
79188        Returns @c True (nonzero) if this node represents a MathML
79189        csymbol representing a function.
79190
79191        @return @c True if this ASTNode is a MathML csymbol function, @c False otherwise.
79192
79193        """
79194        return _libsbml.ASTNode_isCSymbolFunction(self)
79195
79196    def isFunction(self):
79197        r"""
79198        isFunction(ASTNode self) -> bool
79199
79200        Returns @c True if this node represents a function.
79201
79202        The three types of functions in SBML are MathML functions (e.g.,
79203        <code>abs()</code>), SBML Level&nbsp;1 functions (in the SBML
79204        Level&nbsp;1 math syntax), and user-defined functions (using
79205        FunctionDefinition in SBML Level&nbsp;2 and&nbsp;3).
79206
79207        @return @c True if this ASTNode is a function, @c False otherwise.
79208
79209        """
79210        return _libsbml.ASTNode_isFunction(self)
79211
79212    def isInfinity(self):
79213        r"""
79214        isInfinity(ASTNode self) -> bool
79215
79216        Returns @c True (nonzero) if this node represents
79217        the special IEEE 754 value infinity, @c False (zero) otherwise.
79218
79219        @return @c True if this ASTNode is the special IEEE 754 value infinity,
79220        @c False otherwise.
79221
79222        """
79223        return _libsbml.ASTNode_isInfinity(self)
79224
79225    def isInteger(self):
79226        r"""
79227        isInteger(ASTNode self) -> bool
79228
79229        Returns @c True (nonzero) if this node contains an
79230        integer value, @c False (zero) otherwise.
79231
79232        @return @c True if this ASTNode is of type @link libsbml#AST_INTEGER AST_INTEGER@endlink, @c False otherwise.
79233
79234        """
79235        return _libsbml.ASTNode_isInteger(self)
79236
79237    def isLambda(self):
79238        r"""
79239        isLambda(ASTNode self) -> bool
79240
79241        Returns @c True (nonzero) if this node is a MathML
79242        <code>&lt;lambda&gt;</code>, @c False (zero) otherwise.
79243
79244        @return @c True if this ASTNode is of type @link libsbml#AST_LAMBDA AST_LAMBDA@endlink, @c False otherwise.
79245
79246        """
79247        return _libsbml.ASTNode_isLambda(self)
79248
79249    def isLog10(self):
79250        r"""
79251        isLog10(ASTNode self) -> bool
79252
79253        Returns @c True (nonzero) if this node represents a
79254        @c log10 function, @c False (zero) otherwise.
79255
79256        More precisely, this predicate returns @c True if the node type is
79257        @link libsbml#AST_FUNCTION_LOG AST_FUNCTION_LOG@endlink with two
79258        children, the first of which is an @link libsbml#AST_INTEGER AST_INTEGER@endlink equal to 10.
79259
79260        @return @c True if the given ASTNode represents a log10() function,
79261        @c False otherwise.
79262
79263        @see @sbmlfunction{parseL3Formula, String}
79264
79265        """
79266        return _libsbml.ASTNode_isLog10(self)
79267
79268    def isLogical(self):
79269        r"""
79270        isLogical(ASTNode self) -> bool
79271
79272        Returns @c True (nonzero) if this node is a MathML
79273        logical operator.
79274
79275        The possible MathML logical operators in SBML core are @c and, @c or, @c not,
79276        @c xor, and (as of SBML Level&nbsp;3 Version&nbsp;2) @c implies.  If
79277        the node represents a logical operator defined in a Level&nbsp;3 package,
79278        it will also return @c True.
79279
79280        @return @c True if this ASTNode is a MathML logical operator, @c False
79281        otherwise.
79282
79283        """
79284        return _libsbml.ASTNode_isLogical(self)
79285
79286    def isName(self):
79287        r"""
79288        isName(ASTNode self) -> bool
79289
79290        Returns @c True if this node is a user-defined variable name
79291        or the symbols for time or Avogadro's constant.
79292
79293        SBML Levels&nbsp;2 and&nbsp;3 provides <code>&lt;csymbol&gt;</code>
79294        definitions for 'time' and 'avogadro', which can be used to represent
79295        simulation time and Avogadro's constant in MathML.  Note that this
79296        method does @em not return @c True for the other <code>csymbol</code>
79297        values defined by SBML, 'delay', because the 'delay' is a function
79298        and not a constant or variable.  Similarly, this function returns
79299        @c False for the csymbol functions added by the 'Distributions' package.
79300
79301        @return @c True if this ASTNode is a user-defined variable name in SBML
79302        or the special symbols for time or Avogadro's constant. It returns
79303        @c False otherwise.
79304
79305        """
79306        return _libsbml.ASTNode_isName(self)
79307
79308    def isNaN(self):
79309        r"""
79310        isNaN(ASTNode self) -> bool
79311
79312        Returns @c True (nonzero) if this node represents the
79313        special IEEE 754 value 'not a number' (NaN), @c False (zero)
79314        otherwise.
79315
79316        @return @c True if this ASTNode is the special IEEE 754 NaN, @c False
79317        otherwise.
79318
79319        """
79320        return _libsbml.ASTNode_isNaN(self)
79321
79322    def isNegInfinity(self):
79323        r"""
79324        isNegInfinity(ASTNode self) -> bool
79325
79326        Returns @c True (nonzero) if this node represents the
79327        special IEEE 754 value 'negative infinity', @c False (zero) otherwise.
79328
79329        @return @c True if this ASTNode is the special IEEE 754 value negative
79330        infinity, @c False otherwise.
79331
79332        """
79333        return _libsbml.ASTNode_isNegInfinity(self)
79334
79335    def isNumber(self):
79336        r"""
79337        isNumber(ASTNode self) -> bool
79338
79339        Returns @c True (nonzero) if this node contains a number,
79340        @c False (zero) otherwise.  This is functionally equivalent to the
79341        following code:
79342        @verbatim
79343         isInteger() || isReal()
79344         @endverbatim
79345
79346        @return @c True if this ASTNode is a number, @c False otherwise.
79347
79348        """
79349        return _libsbml.ASTNode_isNumber(self)
79350
79351    def isOperator(self):
79352        r"""
79353        isOperator(ASTNode self) -> bool
79354
79355        Returns @c True if this node is a mathematical
79356        operator.
79357
79358        The possible mathematical operators in the MathML syntax supported by
79359        SBML are <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>
79360        and <code>^</code> (power).
79361
79362        @return @c True if this ASTNode is an operator, @c False otherwise.
79363
79364        """
79365        return _libsbml.ASTNode_isOperator(self)
79366
79367    def isPiecewise(self):
79368        r"""
79369        isPiecewise(ASTNode self) -> bool
79370
79371        Returns @c True (nonzero) if this node is the MathML
79372        <code>&lt;piecewise&gt;</code> construct.
79373
79374        @return @c True if this ASTNode is a MathML @c piecewise function,
79375        @c False (zero) otherwise.
79376
79377        """
79378        return _libsbml.ASTNode_isPiecewise(self)
79379
79380    def isRational(self):
79381        r"""
79382        isRational(ASTNode self) -> bool
79383
79384        Returns @c True (nonzero) if this node represents a rational
79385        number.
79386
79387        @return @c True if this ASTNode is of type
79388        @link libsbml#AST_RATIONAL AST_RATIONAL@endlink, @c False (zero) otherwise.
79389
79390        """
79391        return _libsbml.ASTNode_isRational(self)
79392
79393    def isReal(self):
79394        r"""
79395        isReal(ASTNode self) -> bool
79396
79397        Returns @c True (nonzero) if this node can represent a
79398        real number, @c False (zero) otherwise.
79399
79400        More precisely, this node must be of one of the following types: @link libsbml#AST_REAL AST_REAL@endlink, @link libsbml#AST_REAL_E AST_REAL_E@endlink or @link libsbml#AST_RATIONAL AST_RATIONAL@endlink.
79401
79402        @return @c True if the value of this ASTNode can represented as a real
79403        number, @c False otherwise.
79404
79405        """
79406        return _libsbml.ASTNode_isReal(self)
79407
79408    def isRelational(self):
79409        r"""
79410        isRelational(ASTNode self) -> bool
79411
79412        Returns @c True if this node is a MathML
79413        relational operator.
79414
79415        The MathML relational operators are <code>==</code>, <code>&gt;=</code>,
79416        <code>&gt;</code>, <code>&lt;</code>, and <code>!=</code>.
79417
79418        @return @c True if this ASTNode is a MathML relational operator, @c False otherwise
79419
79420        """
79421        return _libsbml.ASTNode_isRelational(self)
79422
79423    def isSqrt(self):
79424        r"""
79425        isSqrt(ASTNode self) -> bool
79426
79427        Returns @c True (nonzero) if this node represents a
79428        square root function, @c False (zero) otherwise.
79429
79430        More precisely, the node type must be @link libsbml#AST_FUNCTION_ROOT AST_FUNCTION_ROOT@endlink with two
79431        children, the first of which is an @link libsbml#AST_INTEGER AST_INTEGER@endlink node having value equal to 2.
79432
79433        @return @c True if the given ASTNode represents a sqrt() function,
79434        @c False otherwise.
79435
79436        """
79437        return _libsbml.ASTNode_isSqrt(self)
79438
79439    def isUMinus(self):
79440        r"""
79441        isUMinus(ASTNode self) -> bool
79442
79443        Returns @c True (nonzero) if this node is a unary minus
79444        operator, @c False (zero) otherwise.
79445
79446        A node is defined as a unary minus node if it is of type @link libsbml#AST_MINUS AST_MINUS@endlink and has exactly one child.
79447
79448        For numbers, unary minus nodes can be 'collapsed' by negating the
79449        number.  In fact, @sbmlfunction{parseFormula, String}
79450        does this during its parsing process, and @sbmlfunction{parseL3Formula, String}
79451        has a configuration option that allows this behavior to be turned
79452        on or off.  However, unary minus nodes for symbols
79453        (@link libsbml#AST_NAME AST_NAME@endlink) cannot
79454        be 'collapsed', so this predicate function is necessary.
79455
79456        @return @c True if this ASTNode is a unary minus, @c False otherwise.
79457
79458        @see @sbmlfunction{parseL3Formula, String}
79459
79460        """
79461        return _libsbml.ASTNode_isUMinus(self)
79462
79463    def isUPlus(self):
79464        r"""
79465        isUPlus(ASTNode self) -> bool
79466
79467        Returns @c True (nonzero) if this node is a unary plus
79468        operator, @c False (zero) otherwise.  A node is defined as a unary
79469        minus node if it is of type @link libsbml#AST_MINUS AST_MINUS@endlink and has exactly one child.
79470
79471        @return @c True if this ASTNode is a unary plus, @c False otherwise.
79472
79473        """
79474        return _libsbml.ASTNode_isUPlus(self)
79475
79476    def isUserFunction(self):
79477        r"""
79478        isUserFunction(ASTNode self) -> bool
79479
79480        Returns @c True (nonzero) if this node represents a
79481        MathML user-defined function.
79482
79483        @return @c True if this ASTNode is a user-defined function, @c False otherwise.
79484
79485        """
79486        return _libsbml.ASTNode_isUserFunction(self)
79487
79488    def hasTypeAndNumChildren(self, type, numchildren):
79489        r"""
79490        hasTypeAndNumChildren(ASTNode self, ASTNodeType_t type, unsigned int numchildren) -> int
79491
79492        Returns @c True if this node is of type @p type
79493        and has @p numchildren number of children.  Designed
79494        for use in cases where it is useful to discover if the node is
79495        a unary not or unary minus, or a times node with no children, etc.
79496
79497        @return @c True if this ASTNode is has the specified type and number
79498        of children, @c False otherwise.
79499
79500        """
79501        return _libsbml.ASTNode_hasTypeAndNumChildren(self, type, numchildren)
79502
79503    def isUnknown(self):
79504        r"""
79505        isUnknown(ASTNode self) -> bool
79506
79507        Returns @c True (nonzero) if this node has an unknown type.
79508
79509        'Unknown' nodes have the type @link libsbml#AST_UNKNOWN AST_UNKNOWN@endlink.
79510        Nodes with unknown types will not appear in an
79511        ASTNode tree returned by libSBML based upon valid SBML input; the only
79512        situation in which a node with type @link libsbml#AST_UNKNOWN AST_UNKNOWN@endlink
79513        may appear is immediately after having create a
79514        new, untyped node using the ASTNode constructor.  Callers creating
79515        nodes should endeavor to set the type to a valid node type as soon as
79516        possible after creating new nodes.
79517
79518        @return @c True if this ASTNode is of type @link libsbml#AST_UNKNOWN AST_UNKNOWN@endlink, @c False otherwise.
79519
79520        """
79521        return _libsbml.ASTNode_isUnknown(self)
79522
79523    def isSetId(self):
79524        r"""
79525        isSetId(ASTNode self) -> bool
79526
79527        Returns @c True (nonzero) if this node has a value for the MathML
79528        attribute 'id'.
79529
79530        @return @c True if this ASTNode has an attribute id, @c False otherwise.
79531
79532        @see isSetClass()
79533        @see isSetStyle()
79534        @see setId()
79535        @see unsetId()
79536
79537        """
79538        return _libsbml.ASTNode_isSetId(self)
79539
79540    def isSetClass(self):
79541        r"""
79542        isSetClass(ASTNode self) -> bool
79543
79544        Returns @c True (nonzero) if this node has a value for the MathML
79545        attribute 'class'.
79546
79547        @return @c True if this ASTNode has an attribute class, @c False otherwise.
79548
79549        @see isSetId()
79550        @see isSetStyle()
79551        @see @if java setClassName(string id)@else setClass()@endif@~
79552        @see unsetClass()
79553
79554        """
79555        return _libsbml.ASTNode_isSetClass(self)
79556
79557    def isSetStyle(self):
79558        r"""
79559        isSetStyle(ASTNode self) -> bool
79560
79561        Returns @c True (nonzero) if this node has a value for the MathML
79562        attribute 'style'.
79563
79564        @return @c True if this ASTNode has an attribute style, @c False otherwise.
79565
79566        @see isSetClass()
79567        @see isSetId()
79568        @see setStyle()
79569        @see unsetStyle()
79570
79571        """
79572        return _libsbml.ASTNode_isSetStyle(self)
79573
79574    def isSetUnits(self):
79575        r"""
79576        isSetUnits(ASTNode self) -> bool
79577
79578        Returns @c True (nonzero) if this node has the attribute
79579        <code>sbml:units</code>.
79580
79581        @htmlinclude about-sbml-units-attrib.html
79582
79583        @return @c True if this ASTNode has units associated with it, @c False otherwise.
79584
79585        @note The <code>sbml:units</code> attribute is only available in SBML
79586        Level&nbsp;3.  It may not be used in Levels 1&ndash;2 of SBML.
79587
79588        @see hasUnits()
79589        @see setUnits()
79590
79591        """
79592        return _libsbml.ASTNode_isSetUnits(self)
79593
79594    def hasUnits(self):
79595        r"""
79596        hasUnits(ASTNode self) -> bool
79597
79598        Returns @c True (nonzero) if this node or any of its
79599        children nodes have the attribute <code>sbml:units</code>.
79600
79601        @htmlinclude about-sbml-units-attrib.html
79602
79603        @return @c True if this ASTNode or its children has units associated
79604        with it, @c False otherwise.
79605
79606        @note The <code>sbml:units</code> attribute is only available in SBML
79607        Level&nbsp;3.  It may not be used in Levels 1&ndash;2 of SBML.
79608
79609        @see isSetUnits()
79610        @see setUnits()
79611
79612        """
79613        return _libsbml.ASTNode_hasUnits(self)
79614
79615    def setCharacter(self, value):
79616        r"""
79617        setCharacter(ASTNode self, char value) -> int
79618
79619        Sets the value of this ASTNode to the given character.  If character
79620        is one of @c +, @c -, <code>*</code>, <code>/</code> or @c ^, the node
79621        type will be set accordingly.  For all other characters, the node type
79622        will be set to @link libsbml#AST_UNKNOWN AST_UNKNOWN@endlink.
79623
79624        @param value the character value to which the node's value should be
79625        set.
79626
79627        @return integer value indicating success/failure of the
79628        function.  @if clike The value is drawn from the
79629        enumeration #OperationReturnValues_t. @endif@~ This particular
79630        function only does one thing irrespective of user input or
79631        object state, and thus will only return a single value:
79632        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79633
79634        """
79635        return _libsbml.ASTNode_setCharacter(self, value)
79636
79637    def setId(self, id):
79638        r"""
79639        setId(ASTNode self, string id) -> int
79640
79641        Sets the MathML attribute @c id of this ASTNode.
79642
79643        @param id @c string representing the identifier.
79644
79645        @return integer value indicating success/failure of the
79646        function.  @if clike The value is drawn from the
79647        enumeration #OperationReturnValues_t. @endif@~ This particular
79648        function only does one thing irrespective of user input or
79649        object state, and thus will only return a single value:
79650        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79651
79652        @see isSetId()
79653        @see getId()
79654        @see unsetId()
79655
79656        """
79657        return _libsbml.ASTNode_setId(self, id)
79658
79659    def setClass(self, className):
79660        r"""
79661        setClass(ASTNode self, string className) -> int
79662
79663        Sets the MathML attribute @c class of this ASTNode to @p className.
79664
79665        @param className @c string representing the MathML class for this node.
79666
79667        @return integer value indicating success/failure of the
79668        function.  @if clike The value is drawn from the
79669        enumeration #OperationReturnValues_t. @endif@~ This particular
79670        function only does one thing irrespective of user input or
79671        object state, and thus will only return a single value:
79672        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79673
79674        @if java
79675        @note In the API interfaces for languages other than Java, this method
79676        is named <code>setClass()</code>, but in Java it is renamed
79677        <code>setClassName()</code> to avoid a name collision with Java's
79678        standard object method of the same name.
79679        @endif@~
79680
79681        @see isSetClass()
79682        @see getClass()
79683        @see unsetClass()
79684
79685        """
79686        return _libsbml.ASTNode_setClass(self, className)
79687
79688    def setStyle(self, style):
79689        r"""
79690        setStyle(ASTNode self, string style) -> int
79691
79692        Sets the MathML attribute @c style of this ASTNode to style.
79693
79694        @param style @c string representing the identifier.
79695
79696        @return integer value indicating success/failure of the
79697        function.  @if clike The value is drawn from the
79698        enumeration #OperationReturnValues_t. @endif@~ This particular
79699        function only does one thing irrespective of user input or
79700        object state, and thus will only return a single value:
79701        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79702
79703        @see isSetStyle()
79704        @see getStyle()
79705        @see unsetStyle()
79706
79707        """
79708        return _libsbml.ASTNode_setStyle(self, style)
79709
79710    def setName(self, name):
79711        r"""
79712        setName(ASTNode self, char const * name) -> int
79713
79714        Sets the value of this ASTNode to the given name.
79715
79716        As a side effect, this ASTNode object's type will be reset to
79717        @link libsbml#AST_NAME AST_NAME@endlink if (and <em>only
79718        if</em>) the ASTNode was previously an operator (
79719        @if clike isOperator()@else ASTNode.isOperator()@endif@~
79720        <code>== true</code>), number (
79721        @if clike isNumber()@else ASTNode.isNumber()@endif@~
79722        <code>== true</code>), or unknown.
79723        This allows names to be set for @link libsbml#AST_FUNCTION AST_FUNCTION@endlink nodes and the like.
79724
79725        @param name the string containing the name to which this node's value
79726        should be set.
79727
79728        @return integer value indicating success/failure of the
79729        function.  @if clike The value is drawn from the
79730        enumeration #OperationReturnValues_t. @endif@~ This particular
79731        function only does one thing irrespective of user input or
79732        object state, and thus will only return a single value:
79733        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79734
79735        """
79736        return _libsbml.ASTNode_setName(self, name)
79737
79738    def setValue(self, *args):
79739        r"""
79740        setValue(ASTNode self, long value) -> int
79741        setValue(ASTNode self, long numerator, long denominator) -> int
79742        setValue(ASTNode self, double value) -> int
79743        setValue(ASTNode self, double mantissa, long exponent) -> int
79744
79745        This method has multiple variants; they differ in the arguments
79746         they accept.  Each variant is described separately below.
79747
79748        @par
79749        <hr>
79750        <span class='variant-sig-heading'>Method variant with the following signature</span>:
79751         <pre class='signature'>setValue(long numerator, long denominator)</pre>
79752
79753        Sets the value of this ASTNode to the given rational in two parts: the
79754        numerator and denominator.  The node type is set to @link libsbml#AST_RATIONAL AST_RATIONAL@endlink.
79755
79756        @param numerator the numerator value of the rational.
79757        @param denominator the denominator value of the rational.
79758
79759        @return integer value indicating success/failure of the
79760        function.  @if clike The value is drawn from the
79761        enumeration #OperationReturnValues_t. @endif@~ This particular
79762        function only does one thing irrespective of user input or
79763        object state, and thus will only return a single value:
79764        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79765
79766
79767        @par
79768        <hr>
79769        <span class='variant-sig-heading'>Method variant with the following signature</span>:
79770         <pre class='signature'>setValue(double mantissa, long exponent)</pre>
79771
79772        Sets the value of this ASTNode to the given real (@c float) in two
79773        parts: the mantissa and the exponent.  The node type is set to
79774        @link libsbml#AST_REAL_E AST_REAL_E@endlink.
79775
79776        @param mantissa the mantissa of this node's real-numbered value.
79777        @param exponent the exponent of this node's real-numbered value.
79778
79779        @return integer value indicating success/failure of the
79780        function.  @if clike The value is drawn from the
79781        enumeration #OperationReturnValues_t. @endif@~ This particular
79782        function only does one thing irrespective of user input or
79783        object state, and thus will only return a single value:
79784        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79785
79786
79787        @par
79788        <hr>
79789        <span class='variant-sig-heading'>Method variant with the following signature</span>:
79790         <pre class='signature'>setValue(int value)</pre>
79791
79792        Sets the value of this ASTNode to the given integer and sets the node
79793        type to @link libsbml#AST_INTEGER AST_INTEGER@endlink.
79794
79795        @param value the integer to which this node's value should be set.
79796
79797        @return integer value indicating success/failure of the
79798        function.  @if clike The value is drawn from the
79799        enumeration #OperationReturnValues_t. @endif@~ This particular
79800        function only does one thing irrespective of user input or
79801        object state, and thus will only return a single value:
79802        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79803
79804
79805        @par
79806        <hr>
79807        <span class='variant-sig-heading'>Method variant with the following signature</span>:
79808         <pre class='signature'>setValue(double value)</pre>
79809
79810        Sets the value of this ASTNode to the given real (@c float) and sets
79811        the node type to @link libsbml#AST_REAL AST_REAL@endlink.
79812
79813        This is functionally equivalent to:
79814        @verbatim
79815        setValue(value, 0);
79816        @endverbatim
79817
79818        @param value the @c float format number to which this node's value
79819        should be set.
79820
79821        @return integer value indicating success/failure of the
79822        function.  @if clike The value is drawn from the
79823        enumeration #OperationReturnValues_t. @endif@~ This particular
79824        function only does one thing irrespective of user input or
79825        object state, and thus will only return a single value:
79826        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79827
79828
79829        @par
79830        <hr>
79831        <span class='variant-sig-heading'>Method variant with the following signature</span>:
79832         <pre class='signature'>setValue(long value)</pre>
79833
79834        Sets the value of this ASTNode to the given (@c long) integer and sets
79835        the node type to @link libsbml#AST_INTEGER AST_INTEGER@endlink.
79836
79837        @param value the integer to which this node's value should be set.
79838
79839        @return integer value indicating success/failure of the
79840        function.  @if clike The value is drawn from the
79841        enumeration #OperationReturnValues_t. @endif@~ This particular
79842        function only does one thing irrespective of user input or
79843        object state, and thus will only return a single value:
79844        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79845
79846        """
79847        return _libsbml.ASTNode_setValue(self, *args)
79848
79849    def setType(self, type):
79850        r"""
79851        setType(ASTNode self, ASTNodeType_t type) -> int
79852
79853        Sets the type of this ASTNode to the given type code.
79854
79855        @param type the type to which this node should be set.
79856
79857        @return integer value indicating success/failure of the
79858        function.  @if clike The value is drawn from the
79859        enumeration #OperationReturnValues_t. @endif@~ The possible values
79860        returned by this function are:
79861        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79862        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
79863
79864        @note A side-effect of doing this is that any numerical values previously
79865        stored in this node are reset to zero.
79866
79867        """
79868        return _libsbml.ASTNode_setType(self, type)
79869
79870    def setUnits(self, units):
79871        r"""
79872        setUnits(ASTNode self, string units) -> int
79873
79874        Sets the units of this ASTNode to units.
79875
79876        The units will be set @em only if this ASTNode object represents a
79877        MathML <code>&lt;cn&gt;</code> element, i.e., represents a number.
79878        Callers may use
79879        @if clike isNumber()@else ASTNode.isNumber()@endif@~
79880        to inquire whether the node is of that type.
79881
79882        @htmlinclude about-sbml-units-attrib.html
79883
79884        @param units @c string representing the unit identifier.
79885
79886        @return integer value indicating success/failure of the
79887        function.  @if clike The value is drawn from the
79888        enumeration #OperationReturnValues_t. @endif@~ The possible values
79889        returned by this function are:
79890        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79891        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
79892        @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
79893
79894        @note The <code>sbml:units</code> attribute is only available in SBML
79895        Level&nbsp;3.  It may not be used in Levels 1&ndash;2 of SBML.
79896
79897        @see isSetUnits()
79898        @see hasUnits()
79899
79900        """
79901        return _libsbml.ASTNode_setUnits(self, units)
79902
79903    def swapChildren(self, that):
79904        r"""
79905        swapChildren(ASTNode self, ASTNode that) -> int
79906
79907        Swaps the children of this ASTNode object with the children of the
79908        given ASTNode object.
79909
79910        @param that the other node whose children should be used to replace
79911        <em>this</em> node's children.
79912
79913        @return integer value indicating success/failure of the
79914        function.  @if clike The value is drawn from the
79915        enumeration #OperationReturnValues_t. @endif@~ The possible values
79916        returned by this function are:
79917        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79918        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
79919
79920        """
79921        return _libsbml.ASTNode_swapChildren(self, that)
79922
79923    def renameSIdRefs(self, oldid, newid):
79924        r"""
79925        renameSIdRefs(ASTNode self, string oldid, string newid)
79926
79927        Renames all the SIdRef attributes on this node and any child node
79928
79929        """
79930        return _libsbml.ASTNode_renameSIdRefs(self, oldid, newid)
79931
79932    def renameUnitSIdRefs(self, oldid, newid):
79933        r"""
79934        renameUnitSIdRefs(ASTNode self, string oldid, string newid)
79935
79936        Renames all the UnitSIdRef attributes on this node and any child node.
79937
79938        The only place UnitSIDRefs appear is in MathML <code>&lt;cn&gt;</code>
79939        elements, so the effects of this method are limited to that.
79940
79941        @param oldid the old identifier.
79942        @param newid the new identifier.
79943
79944        """
79945        return _libsbml.ASTNode_renameUnitSIdRefs(self, oldid, newid)
79946
79947    def replaceIDWithFunction(self, id, function):
79948        r"""
79949        replaceIDWithFunction(ASTNode self, string id, ASTNode function)
79950
79951        @internal
79952
79953        @internal
79954
79955        """
79956        return _libsbml.ASTNode_replaceIDWithFunction(self, id, function)
79957
79958    def multiplyTimeBy(self, function):
79959        r"""
79960        multiplyTimeBy(ASTNode self, ASTNode function)
79961
79962        @internal
79963
79964        @internal
79965
79966        """
79967        return _libsbml.ASTNode_multiplyTimeBy(self, function)
79968
79969    def unsetUnits(self):
79970        r"""
79971        unsetUnits(ASTNode self) -> int
79972
79973        Unsets the units of this ASTNode.
79974
79975        @return integer value indicating success/failure of the
79976        function.  @if clike The value is drawn from the
79977        enumeration #OperationReturnValues_t. @endif@~ The possible values
79978        returned by this function are:
79979        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79980        @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
79981        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
79982
79983        """
79984        return _libsbml.ASTNode_unsetUnits(self)
79985
79986    def unsetId(self):
79987        r"""
79988        unsetId(ASTNode self) -> int
79989
79990        Unsets the MathML @c id attribute of this ASTNode.
79991
79992        @return integer value indicating success/failure of the
79993        function.  @if clike The value is drawn from the
79994        enumeration #OperationReturnValues_t. @endif@~ The possible values
79995        returned by this function are:
79996        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
79997        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
79998
79999        """
80000        return _libsbml.ASTNode_unsetId(self)
80001
80002    def unsetClass(self):
80003        r"""
80004        unsetClass(ASTNode self) -> int
80005
80006        Unsets the MathML @c class attribute of this ASTNode.
80007
80008        @return integer value indicating success/failure of the
80009        function.  @if clike The value is drawn from the
80010        enumeration #OperationReturnValues_t. @endif@~ The possible values
80011        returned by this function are:
80012        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
80013        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
80014
80015        """
80016        return _libsbml.ASTNode_unsetClass(self)
80017
80018    def unsetStyle(self):
80019        r"""
80020        unsetStyle(ASTNode self) -> int
80021
80022        Unsets the MathML @c style attribute of this ASTNode.
80023
80024        @return integer value indicating success/failure of the
80025        function.  @if clike The value is drawn from the
80026        enumeration #OperationReturnValues_t. @endif@~ The possible values
80027        returned by this function are:
80028        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
80029        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
80030
80031        """
80032        return _libsbml.ASTNode_unsetStyle(self)
80033
80034    def setDefinitionURL(self, *args):
80035        r"""
80036        setDefinitionURL(ASTNode self, XMLAttributes url) -> int
80037        setDefinitionURL(ASTNode self, string url) -> int
80038        """
80039        return _libsbml.ASTNode_setDefinitionURL(self, *args)
80040
80041    def getDefinitionURL(self):
80042        r"""
80043        getDefinitionURL(ASTNode self) -> XMLAttributes
80044
80045        Returns the MathML @c definitionURL attribute value.
80046
80047        @return the value of the @c definitionURL attribute, in the form of
80048        a libSBML XMLAttributes object.
80049
80050        @see setDefinitionURL()
80051        @see setDefinitionURL()
80052        @see getDefinitionURLString()
80053
80054        """
80055        return _libsbml.ASTNode_getDefinitionURL(self)
80056
80057    def replaceArgument(self, bvar, arg):
80058        r"""
80059        replaceArgument(ASTNode self, string bvar, ASTNode arg)
80060
80061        Replaces occurrences of a given name with a given ASTNode.
80062
80063        For example, if the formula in this ASTNode is <code>x + y</code>,
80064        and the function is called with @c bvar = @c 'x' and @c arg = an ASTNode
80065        representing the real value @c 3.  This method would substitute @c 3 for
80066        @c x within this ASTNode object, resulting in the forula <code>3 + y</code>.
80067
80068        @param bvar a string representing the variable name to be substituted.
80069        @param arg an ASTNode representing the name/value/formula to use as
80070        a replacement.
80071
80072        """
80073        return _libsbml.ASTNode_replaceArgument(self, bvar, arg)
80074
80075    def getParentSBMLObject(self):
80076        r"""
80077        getParentSBMLObject(ASTNode self) -> SBase
80078
80079        Returns the parent SBML object.
80080
80081        @return the parent SBML object of this ASTNode.
80082
80083        @see isSetParentSBMLObject()
80084        @if clike @see setParentSBMLObject()@endif@~
80085        @see unsetParentSBMLObject()
80086
80087        """
80088        return _libsbml.ASTNode_getParentSBMLObject(self)
80089
80090    def unsetParentSBMLObject(self):
80091        r"""
80092        unsetParentSBMLObject(ASTNode self) -> int
80093
80094        Unsets the parent SBML object.
80095
80096        @return integer value indicating success/failure of the
80097        function.  @if clike The value is drawn from the
80098        enumeration #OperationReturnValues_t. @endif@~ The possible values
80099        returned by this function are:
80100        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
80101        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
80102
80103        @see isSetParentSBMLObject()
80104        @see getParentSBMLObject()
80105        @if clike @see setParentSBMLObject()@endif@~
80106
80107        """
80108        return _libsbml.ASTNode_unsetParentSBMLObject(self)
80109
80110    def isSetParentSBMLObject(self):
80111        r"""
80112        isSetParentSBMLObject(ASTNode self) -> bool
80113
80114        Returns @c True if this node has a value for the parent SBML
80115        object.
80116
80117        @return @c True if this ASTNode has an parent SBML object set, @c False otherwise.
80118
80119        @see getParentSBMLObject()
80120        @if clike @see setParentSBMLObject()@endif@~
80121        @see unsetParentSBMLObject()
80122
80123        """
80124        return _libsbml.ASTNode_isSetParentSBMLObject(self)
80125
80126    def reduceToBinary(self):
80127        r"""
80128        reduceToBinary(ASTNode self)
80129
80130        Reduces this ASTNode to a binary tree.
80131
80132        Example: if this ASTNode is <code>and(x, y, z)</code>, then the
80133        formula of the reduced node is <code>and(and(x, y), z)</code>.  The
80134        operation replaces the formula stored in the current ASTNode object.
80135
80136        """
80137        return _libsbml.ASTNode_reduceToBinary(self)
80138
80139    def unsetUserData(self):
80140        r"""
80141        unsetUserData(ASTNode self) -> int
80142
80143        Unsets the user data of this node.
80144
80145        The user data can be used by the application developer to attach custom
80146        information to the node.  In case of a deep copy, this attribute will
80147        passed as it is. The attribute will be never interpreted by this class.
80148
80149        @return integer value indicating success/failure of the
80150        function.  @if clike The value is drawn from the
80151        enumeration #OperationReturnValues_t. @endif@~ The possible values
80152        returned by this function are:
80153        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
80154        @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
80155
80156        @if clike
80157        @see setUserData()
80158        @see getUserData()
80159        @see isSetUserData()
80160        @endif@~
80161
80162        """
80163        return _libsbml.ASTNode_unsetUserData(self)
80164
80165    def isSetUserData(self):
80166        r"""
80167        isSetUserData(ASTNode self) -> bool
80168
80169        Returns @c True if this node has a user data object.
80170
80171        @return @c True if this ASTNode has a user data object set, @c False
80172        otherwise.
80173
80174        @if clike
80175        @see setUserData()
80176        @see getUserData()
80177        @see unsetUserData()
80178        @endif@~
80179
80180        """
80181        return _libsbml.ASTNode_isSetUserData(self)
80182
80183    def isWellFormedASTNode(self):
80184        r"""
80185        isWellFormedASTNode(ASTNode self) -> bool
80186
80187        Returns @c True or @c False depending on whether this
80188        ASTNode is well-formed.
80189
80190        @note An ASTNode may be well-formed, with each node and its children
80191        having the appropriate number of children for the given type, but may
80192        still be invalid in the context of its use within an SBML model.
80193
80194        @return @c True if this ASTNode is well-formed, @c False otherwise.
80195
80196        @see hasCorrectNumberArguments()
80197
80198        """
80199        return _libsbml.ASTNode_isWellFormedASTNode(self)
80200
80201    def hasCorrectNumberArguments(self):
80202        r"""
80203        hasCorrectNumberArguments(ASTNode self) -> bool
80204
80205        Returns @c True if this ASTNode has the correct number of children for
80206        its type.
80207
80208        For example, an ASTNode with type @link libsbml#AST_MINUS AST_MINUS@endlink
80209        expects 1 or 2 child nodes.
80210
80211        @return @c True if this ASTNode has the appropriate number of children
80212        for its type, @c False otherwise.
80213
80214        @note This function performs a check on the top-level node only.  Child
80215        nodes are not checked.
80216
80217        @see isWellFormedASTNode()
80218
80219        """
80220        return _libsbml.ASTNode_hasCorrectNumberArguments(self)
80221
80222    def getDefinitionURLString(self):
80223        r"""
80224        getDefinitionURLString(ASTNode self) -> string
80225
80226        Returns the MathML @c definitionURL attribute value as a string.
80227
80228        @return the value of the @c definitionURL attribute, as a string.
80229
80230        @see getDefinitionURL()
80231        @see setDefinitionURL()
80232        @see setDefinitionURL()
80233
80234        """
80235        return _libsbml.ASTNode_getDefinitionURLString(self)
80236
80237    def representsBvar(self):
80238        r"""
80239        representsBvar(ASTNode self) -> bool
80240
80241        @internal
80242
80243        @internal
80244
80245        """
80246        return _libsbml.ASTNode_representsBvar(self)
80247
80248    def isBvar(self):
80249        r"""
80250        isBvar(ASTNode self) -> bool
80251
80252        @internal
80253
80254        @internal
80255
80256        """
80257        return _libsbml.ASTNode_isBvar(self)
80258
80259    def setBvar(self):
80260        r"""
80261        setBvar(ASTNode self)
80262
80263        @internal
80264
80265        @internal
80266
80267        """
80268        return _libsbml.ASTNode_setBvar(self)
80269
80270    def usesL3V2MathConstructs(self):
80271        r"""
80272        usesL3V2MathConstructs(ASTNode self) -> bool
80273
80274        @internal
80275
80276        @internal
80277
80278        """
80279        return _libsbml.ASTNode_usesL3V2MathConstructs(self)
80280
80281    def usesRateOf(self):
80282        r"""
80283        usesRateOf(ASTNode self) -> bool
80284
80285        @internal
80286
80287        @internal
80288
80289        """
80290        return _libsbml.ASTNode_usesRateOf(self)
80291
80292    def isQualifier(self):
80293        r"""
80294        isQualifier(ASTNode self) -> bool
80295
80296        @internal
80297
80298        @internal
80299
80300        """
80301        return _libsbml.ASTNode_isQualifier(self)
80302
80303    def isSemantics(self):
80304        r"""
80305        isSemantics(ASTNode self) -> bool
80306
80307        @internal
80308
80309        @internal
80310
80311        """
80312        return _libsbml.ASTNode_isSemantics(self)
80313
80314    def getNumBvars(self):
80315        r"""
80316        getNumBvars(ASTNode self) -> unsigned int
80317
80318        @internal
80319
80320        @internal
80321
80322        """
80323        return _libsbml.ASTNode_getNumBvars(self)
80324
80325    def addPlugin(self, plugin):
80326        r"""
80327        addPlugin(ASTNode self, ASTBasePlugin plugin)
80328
80329        @internal
80330
80331        @internal
80332
80333        """
80334        return _libsbml.ASTNode_addPlugin(self, plugin)
80335
80336    def loadASTPlugins(self, sbmlns):
80337        r"""
80338        loadASTPlugins(ASTNode self, SBMLNamespaces sbmlns)
80339
80340        @internal
80341
80342        @internal
80343
80344        """
80345        return _libsbml.ASTNode_loadASTPlugins(self, sbmlns)
80346
80347    def loadASTPlugin(self, pkgName):
80348        r"""
80349        loadASTPlugin(ASTNode self, string pkgName)
80350
80351        @internal
80352
80353        @internal
80354
80355        """
80356        return _libsbml.ASTNode_loadASTPlugin(self, pkgName)
80357
80358    def getASTPlugin(self, *args):
80359        r"""
80360        getASTPlugin(ASTNode self, SBMLNamespaces sbmlns) -> ASTBasePlugin
80361        getASTPlugin(ASTNode self, ASTNodeType_t type) -> ASTBasePlugin
80362        getASTPlugin(ASTNode self, string name, bool isCsymbol=False, bool strCmpIsCaseSensitive=False) -> ASTBasePlugin
80363        getASTPlugin(ASTNode self, SBMLNamespaces sbmlns) -> ASTBasePlugin
80364        getASTPlugin(ASTNode self, ASTNodeType_t type) -> ASTBasePlugin
80365        getASTPlugin(ASTNode self, string name, bool isCsymbol=False, bool strCmpIsCaseSensitive=False) -> ASTBasePlugin
80366
80367        This method has multiple variants; they differ in the arguments
80368         they accept.  Each variant is described separately below.
80369
80370        @par
80371        <hr>
80372        <span class='variant-sig-heading'>Method variant with the following signature</span>:
80373         <pre class='signature'>getASTPlugin(SBMLNamespaces  sbmlns)</pre>
80374
80375        Returns a plug-in object (extension interface) for an SBML Level&nbsp;3
80376        package extension with the given @p sbmlns.
80377
80378        @param sbmlns the namespace of the plugin to return.
80379
80380        @return the plug-in object (the libSBML extension interface) of
80381        a package extension with the given package name or URI, or @c None
80382        if none exist.
80383
80384
80385        @par
80386        <hr>
80387        <span class='variant-sig-heading'>Method variant with the following signature</span>:
80388         <pre class='signature'>getASTPlugin(string name, bool isCsymbol = false, bool strCmpIsCaseSensitive = false)</pre>
80389
80390        Returns a plug-in object (extension interface) for an SBML Level&nbsp;3
80391        package extension for the package with the given constraints.
80392
80393        @param name the type or csymbol defined by the returned plugin.
80394        @param isCsymbol Boolean indicator of whether the @p name is a csymbol
80395        (if @c True) or type (if @c False).
80396        @param strCmpIsCaseSensitive whether to search for the matching type
80397        or csymbol in case-sensitve manner (if @c True) or case-insensitive
80398        manner (if @c False).
80399
80400        @return the plug-in object (the libSBML extension interface) of
80401        a package extension that defines the given @p name, or @c None
80402        if none exist.
80403
80404
80405
80406        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
80407
80408
80409        @par
80410        <hr>
80411        <span class='variant-sig-heading'>Method variant with the following signature</span>:
80412         <pre class='signature'>getASTPlugin(ASTNodeType_t type)</pre>
80413
80414        Returns a plug-in object (extension interface) for an SBML Level&nbsp;3
80415        package extension for the package that defines the given @p type.
80416
80417        @param type the @if clike #ASTNodeType_t@else type@endif@~ that is defined by the given plugin.
80418
80419        @return the plug-in object (the libSBML extension interface) of
80420        a package extension that defines the given @p type, or @c None
80421        if none exist.
80422
80423        """
80424        return _libsbml.ASTNode_getASTPlugin(self, *args)
80425
80426    def getPlugin(self, *args):
80427        r"""
80428        getPlugin(ASTNode self, string package) -> ASTBasePlugin
80429        getPlugin(ASTNode self, string package) -> ASTBasePlugin
80430        getPlugin(ASTNode self, unsigned int n) -> ASTBasePlugin
80431        getPlugin(ASTNode self, unsigned int n) -> ASTBasePlugin
80432        """
80433        return _libsbml.ASTNode_getPlugin(self, *args)
80434
80435    def getNumPlugins(self):
80436        r"""
80437        getNumPlugins(ASTNode self) -> unsigned int
80438
80439        @internal
80440
80441        @internal
80442
80443        """
80444        return _libsbml.ASTNode_getNumPlugins(self)
80445
80446    def __eq__(self, rhs):
80447      if ((self is None) and (rhs is None)): return True
80448      if ((self is None) or  (rhs is None)): return False
80449      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
80450        if (self.this == rhs.this): return True
80451      return False
80452
80453    def __ne__(self, rhs):
80454      if ((self is None) and (rhs is None)): return False
80455      if ((self is None) or  (rhs is None)): return True
80456      if (hasattr(self, 'this') and hasattr(rhs, 'this')):
80457        if (self.this == rhs.this): return False
80458      return True
80459
80460
80461    def getListOfNodes(self):
80462        r"""
80463        getListOfNodes(ASTNode self) -> ASTNodeList
80464
80465        Returns a list of nodes.
80466
80467        Unlike the equivalent method in the libSBML C/C++ interface, this method does
80468        not offer the ability to pass a predicate as an argument.  The method always
80469        returns the list of all ASTNode objects.
80470
80471        @return the ASTNodeList of nodes.
80472
80473        @warning The list returned is owned by the caller and should be deleted after
80474        the caller is done using it.  The ASTNode objects in the list; however, are
80475        <strong>not</strong> owned by the caller (as they still belong to the tree
80476        itself), and therefore should not be deleted.
80477
80478        """
80479        return _libsbml.ASTNode_getListOfNodes(self)
80480
80481# Register ASTNode in _libsbml:
80482_libsbml.ASTNode_swigregister(ASTNode)
80483
80484
80485def readMathMLFromString(xml):
80486    r"""
80487    readMathMLFromString(char const * xml) -> ASTNode
80488
80489    Reads the MathML from the given XML string, constructs a corresponding
80490    abstract syntax tree, and returns a pointer to the root of the tree.
80491
80492    @param xml a string containing a full MathML expression.
80493
80494    @return the root of an AST corresponding to the given mathematical
80495    expression, otherwise @c None is returned if the given string is @c None
80496    or invalid.
80497
80498    @if conly
80499    @memberof ASTNode_t
80500    @endif
80501
80502    """
80503    return _libsbml.readMathMLFromString(xml)
80504
80505def readMathMLFromStringWithNamespaces(xml, xmlns):
80506    r"""
80507    readMathMLFromStringWithNamespaces(char const * xml, XMLNamespaces xmlns) -> ASTNode
80508
80509    Reads the MathML from the given XML string, constructs a corresponding
80510    abstract syntax tree, and returns a pointer to the root of the tree.
80511
80512    @param xml a string containing a full MathML expression.
80513    @param xmlns an @if conly XMLNamespaces_t structure @else XMLNamespaces
80514    object@endif@~ containing namespaces that are considered active during the
80515    read. (For example, an SBML Level&nbsp;3 package namespace.)
80516
80517    @return the root of an AST corresponding to the given mathematical
80518    expression, otherwise @c None is returned if the given string is @c None
80519    or invalid.
80520
80521    @if conly
80522    @memberof ASTNode_t
80523    @endif
80524
80525    """
80526    return _libsbml.readMathMLFromStringWithNamespaces(xml, xmlns)
80527
80528def writeMathMLToString(node):
80529    r"""
80530    writeMathMLToString(ASTNode node) -> char *
80531
80532    Writes the given AST node (and its children) to a string as MathML, and
80533    returns the string.
80534
80535    @param node the root of an AST to write out to the stream.
80536
80537    @return a string containing the written-out MathML representation
80538    of the given AST.
80539
80540    @note The string is owned by the caller and should be freed (with
80541    free()) when no longer needed.  @c None is returned if the given
80542    argument is @c None.
80543
80544    @if conly
80545    @memberof ASTNode_t
80546    @endif
80547
80548    """
80549    return _libsbml.writeMathMLToString(node)
80550
80551def writeMathMLWithNamespaceToString(node, sbmlns):
80552    r"""
80553    writeMathMLWithNamespaceToString(ASTNode node, SBMLNamespaces sbmlns) -> char *
80554
80555    Writes the given AST node (and its children) to a string as MathML, and
80556    returns the string.
80557
80558    @param node the root of an AST to write out to the stream.
80559    @param sbmlns the SBML namespace to be used
80560
80561    @return a string containing the written-out MathML representation
80562    of the given AST.
80563
80564    @note The string is owned by the caller and should be freed (with
80565    free()) when no longer needed.  @c None is returned if the given
80566    argument is @c None.
80567
80568    @if conly
80569    @memberof ASTNode_t
80570    @endif
80571
80572    """
80573    return _libsbml.writeMathMLWithNamespaceToString(node, sbmlns)
80574
80575def parseFormula(formula):
80576    r"""
80577    parseFormula(char const * formula) -> ASTNode
80578
80579    Parses a text string as a mathematical formula and returns an AST
80580    representation of it.
80581
80582    @par
80583    The text-string form of mathematical formulas produced by
80584    @sbmlfunction{formulaToString, ASTNode} and read by
80585    @sbmlfunction{parseFormula, String} use a simple C-inspired infix
80586    notation taken from SBML Level&nbsp;1.  A formula in this text-string form
80587    therefore can be handed to a program that understands SBML Level&nbsp;1
80588    mathematical expressions, or used as part of a formula translation system.
80589    The syntax is described in detail in the documentation for ASTNode.  The
80590    following are illustrative examples of formulas expressed using this syntax:
80591    @verbatim
80592    0.10 * k4^2
80593    @endverbatim
80594    @verbatim
80595    (vm * s1)/(km + s1)
80596    @endverbatim
80597
80598    Note that this facility is provided as a convenience by libSBML---the
80599    MathML standard does not actually define a 'string-form' equivalent to
80600    MathML expression trees, so the choice of formula syntax is somewhat
80601    arbitrary.  The approach taken by libSBML is to use the syntax defined by
80602    SBML Level&nbsp;1 (which in fact used a text-string representation of
80603    formulas and not MathML).  This formula syntax is based mostly on C
80604    programming syntax, and may contain operators, function calls, symbols,
80605    and white space characters.  The following table provides the precedence
80606    rules for the different entities that may appear in formula strings.
80607
80608    @htmlinclude math-precedence-table.html
80609
80610    In the table above, @em operand implies the construct is an operand, @em
80611    prefix implies the operation is applied to the following arguments, @em
80612    unary implies there is one argument, and @em binary implies there are
80613    two arguments.  The values in the <b>Precedence</b> column show how the
80614    order of different types of operation are determined.  For example, the
80615    expression <code>a * b + c</code> is evaluated as <code>(a * b) +
80616    c</code> because the @c * operator has higher precedence.  The
80617    <b>Associates</b> column shows how the order of similar precedence
80618    operations is determined; for example, <code>a - b + c</code> is
80619    evaluated as <code>(a - b) + c</code> because the @c + and @c -
80620    operators are left-associative.
80621
80622    The function call syntax consists of a function name, followed by optional
80623    white space, followed by an opening parenthesis token, followed by a
80624    sequence of zero or more arguments separated by commas (with each comma
80625    optionally preceded and/or followed by zero or more white space
80626    characters, followed by a closing parenthesis token.  The function name
80627    must be chosen from one of the pre-defined functions in SBML or a
80628    user-defined function in the model.  The following table lists the names
80629    of certain common mathematical functions; this table corresponds to
80630    Table&nbsp;6 in the <a target='_blank' href='http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2'>SBML Level&nbsp;1 Version&nbsp;2 specification</a>:
80631
80632    @htmlinclude string-functions-table.html
80633
80634    @warning <span class='warning'>There are differences between the symbols
80635    used to represent the common mathematical functions and the corresponding
80636    MathML token names.  This is a potential source of incompatibilities.
80637    Note in particular that in this text-string syntax, <code>log(x)</code>
80638    represents the natural logarithm, whereas in MathML, the natural logarithm
80639    is <code>&lt;ln/&gt;</code>.  Application writers are urged to be careful
80640    when translating between text forms and MathML forms, especially if they
80641    provide a direct text-string input facility to users of their software
80642    systems.</span>
80643
80644    @param formula the text-string formula expression to be parsed.
80645
80646    @return the root node of the AST corresponding to the @p formula, or
80647    @c None if an error occurred in parsing the formula
80648
80649    @see @sbmlfunction{parseL3Formula, String}
80650    @see @sbmlfunction{formulaToString, ASTNode}
80651    @see @sbmlfunction{formulaToL3String, ASTNode}
80652    @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
80653    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
80654    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
80655    @see L3ParserSettings
80656
80657    @note
80658    Callers using SBML Level&nbsp;3 are encouraged to use the facilities
80659    provided by libSBML's newer and more powerful Level&nbsp;3-oriented
80660    formula parser and formatter.  The entry points to this second system are
80661    @sbmlfunction{parseL3Formula, String} and
80662    @sbmlfunction{formulaToL3String, ASTNode}.  The Level&nbsp;1-oriented
80663    system (i.e., what is provided by @sbmlfunction{formulaToString, String}
80664    and @sbmlfunction{parseFormula, ASTNode}) is provided
80665    untouched for backwards compatibility.
80666
80667    @note We urge developers to keep in mind that the text-string formula
80668    syntax is specific to libSBML.  <em>Neither MathML nor SBML define a
80669    text-string format for mathematical formulas.</em> LibSBML's particular
80670    syntax should not be considered to be a canonical or standard
80671    general-purpose mathematical expression syntax.  LibSBML provides methods
80672    for parsing and transforming text-string math formulas back and forth from
80673    AST structures for the convenience of calling applications, but it is
80674    important to keep the system's limitations in mind.
80675
80676    @if conly
80677    @memberof ASTNode_t
80678    @endif
80679
80680    """
80681    return _libsbml.parseFormula(formula)
80682
80683def formulaToL3String(tree):
80684    r"""
80685    formulaToL3String(ASTNode tree) -> char *
80686
80687    Converts an AST to a string representation of a formula using a syntax
80688    derived from SBML Level&nbsp;1, but extended to include elements from
80689    SBML Level&nbsp;2 and SBML Level&nbsp;3.
80690
80691    @par
80692    The text-string form of mathematical formulas read by the function
80693    @sbmlfunction{parseL3Formula, String} and written by the function
80694    @sbmlfunction{formulaToL3String, ASTNode} uses an expanded version of
80695    the syntax read and written by @sbmlfunction{parseFormula, String}
80696    and @sbmlfunction{formulaToString, ASTNode}, respectively.  The
80697    latter two libSBML functions were originally developed to support
80698    conversion between SBML Levels&nbsp;1 and&nbsp;2, and were focused on the
80699    syntax of mathematical formulas used in SBML Level&nbsp;1.  With time, and
80700    the use of MathML in SBML Levels&nbsp;2 and&nbsp;3, it became clear that
80701    supporting Level&nbsp;2 and&nbsp;3's expanded mathematical syntax would be
80702    useful for software developers.  To maintain backwards compatibility for
80703    libSBML users, the original @sbmlfunction{formulaToString, ASTNode}
80704    and @sbmlfunction{parseFormula, String} have been left untouched,
80705    and instead, the new functionality is provided in the form of
80706    @sbmlfunction{parseL3Formula, String} and
80707    @sbmlfunction{formulaToL3String, ASTNode}.
80708
80709    The following lists the main differences in the formula syntax supported by
80710    the Level 3 ('L3') versions of the formula parsers and formatters,
80711    compared to what is supported by the Level&nbsp;1-oriented
80712    @sbmlfunction{parseFormula, String} and
80713    @sbmlfunction{formulaToString, ASTNode}:
80714
80715    @li Units may be asociated with bare numbers, using the following syntax:
80716    <div style='margin: 10px auto 10px 25px; display: block'>
80717    <span class='code' style='background-color: #d0d0ee'>number</span>
80718    <span class='code' style='background-color: #edd'>unit</span>
80719    </div>
80720    The <span class='code' style='background-color: #d0d0ee'>number</span>
80721    may be in any form (an integer, real, or rational
80722    number), and the
80723    <span class='code' style='background-color: #edd'>unit</span>
80724    must conform to the syntax of an SBML identifier (technically, the
80725    type defined as @c SId in the SBML specifications).  The whitespace between
80726    <span class='code' style='background-color: #d0d0ee'>number</span>
80727    and <span class='code' style='background-color: #edd'>unit</span>
80728    is optional.
80729
80730    @li The Boolean function symbols @c && (@em and), @c || (@em or), @c ! (@em not),
80731    and @c != (@em not @em equals) may be used.
80732
80733    @li The @em modulo operation is allowed as the symbol @c @% and will
80734    produce a <code>&lt;piecewise&gt;</code> function in the corresponding
80735    MathML output by default, or can produce the MathML function @c rem,
80736    depending on the L3ParserSettings object (see
80737    L3ParserSettings_setParseModuloL3v2() ).
80738
80739    @li All inverse trigonometric functions may be defined in the infix either
80740    using @c arc as a prefix or simply @c a; in other words, both @c arccsc
80741    and @c acsc are interpreted as the operator @em arccosecant as defined in
80742    MathML&nbsp;2.0.  (Many functions in the simpler SBML Level&nbsp;1
80743    oriented parser implemented by @sbmlfunction{parseFormula, String}
80744    are defined this way as well, but not all.)
80745
80746    @li The following expression is parsed as a rational number instead of
80747    as a numerical division:
80748    <pre style='display: block; margin-left: 25px'>
80749    (<span class='code' style='background-color: #d0d0ee'>integer</span>/<span class='code' style='background-color: #d0d0ee'>integer</span>)</pre>
80750    <strong>Spaces are not allowed</strong> in this construct; in other words,
80751    &quot;<code>(3 / 4)</code>&quot; (with whitespace between the numbers and
80752    the operator) will be parsed into the MathML <code>&lt;divide&gt;</code>
80753    construct rather than a rational number.  You can, however, assign units to a
80754    rational number as a whole; here is an example: &quot;<code>(3/4) ml</code>&quot;.
80755    (In the case of division rather than a rational number, units are not interpreted
80756    in this way.)
80757
80758    @li Various parser and formatter behaviors may be altered through the use
80759    of a L3ParserSettings object in conjunction with the functions
80760    @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} and
80761    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
80762    The settings available include the following:
80763    <ul style='list-style-type: circle'>
80764
80765    <li style='margin-bottom: 0.5em'> The function @c log with a single
80766    argument (&quot;<code>log(x)</code>&quot;) can be parsed as
80767    <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
80768    desired.
80769
80770    <li style='margin-bottom: 0.5em'> Unary minus signs can be collapsed or
80771    preserved; that is, sequential pairs of unary minuses (e.g., &quot;<code>-
80772    -3</code>&quot;) can be removed from the input entirely and single unary
80773    minuses can be incorporated into the number node, or all minuses can be
80774    preserved in the AST node structure.
80775
80776    <li style='margin-bottom: 0.5em'> Parsing of units embedded in the input
80777    string can be turned on and off.
80778
80779    <li style='margin-bottom: 0.5em'> The string @c avogadro can be parsed as
80780    a MathML @em csymbol or as an identifier.
80781
80782    <li style='margin-bottom: 0.5em'> The string @% can be parsed either as a
80783    piecewise function or as the 'rem' function:  <code>a @% b</code> will either
80784    become
80785
80786    <code>piecewise(a - b*ceil(a/b), xor((a < 0), (b < 0)), a - b*floor(a/b))</code>
80787
80788    or
80789
80790    <code>rem(a, b)</code>.
80791
80792    The latter is simpler, but the @c rem MathML is only allowed
80793    as of SBML Level&nbsp;3 Version&nbsp;2.</li>
80794
80795    <li style='margin-bottom: 0.5em'> A Model object may optionally be
80796    provided to the parser using the variant function call
80797    @sbmlfunction{parseL3FormulaWithModel, String\, Model} or
80798    stored in a L3ParserSettings object passed to the variant function
80799    @sbmlfunction{parseL3FormulaWithSettings, String\,
80800    L3ParserSettings}.  When a Model object is provided, identifiers
80801    (values of type @c SId ) from that model are used in preference to
80802    pre-defined MathML definitions for both symbols and functions.
80803    More precisely:
80804    <ul style='list-style-type: square'>
80805
80806    <li style='margin-bottom: 0.5em'> <em>In the case of symbols</em>: the
80807    Model entities whose identifiers will shadow identical symbols in the
80808    mathematical formula are: Species, Compartment, Parameter, Reaction, and
80809    SpeciesReference.  For instance, if the parser is given a Model containing
80810    a Species with the identifier &quot;<code>pi</code>&quot;, and the formula
80811    to be parsed is &quot;<code>3*pi</code>&quot;, the MathML produced will
80812    contain the construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of
80813    the construct <code>&lt;pi/&gt;</code>.
80814
80815    <li style='margin-bottom: 0.5em'> <em>In the case of user-defined
80816    functions</em>: when a Model object is provided, @c SId values of
80817    user-defined functions present in the model will be used preferentially
80818    over pre-defined MathML functions.  For example, if the passed-in Model
80819    contains a FunctionDefinition object with the identifier
80820    &quot;<code>sin</code>&quot;, that function will be used instead of the
80821    predefined MathML function <code>&lt;sin/&gt;</code>.
80822    </ul>
80823
80824    <li style='margin-bottom: 0.5em'> An SBMLNamespaces object may optionally
80825    be provided to identify SBML Level&nbsp;3 packages that extend the
80826    syntax understood by the formula parser.  When the namespaces are provided,
80827    the parser will interpret possible additional syntax defined by the libSBML
80828    plug-ins implementing the SBML Level&nbsp;3 packages; for example, it may
80829    understand vector/array extensions introduced by the SBML Level&nbsp;3 @em
80830    Arrays package.
80831    </ul>
80832
80833    These configuration settings cannot be changed directly using the basic
80834    parser and formatter functions, but @em can be changed on a per-call basis
80835    by using the alternative functions @sbmlfunction{parseL3FormulaWithSettings,
80836    String\, L3ParserSettings} and
80837    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\,
80838    L3ParserSettings}.
80839
80840    Neither SBML nor the MathML standard define a 'string-form' equivalent to
80841    MathML expressions.  The approach taken by libSBML is to start with the
80842    formula syntax defined by SBML Level&nbsp;1 (which in fact used a custom
80843    text-string representation of formulas, and not MathML), and expand it to
80844    include the functionality described above.  This formula syntax is based
80845    mostly on C programming syntax, and may contain operators, function calls,
80846    symbols, and white space characters.  The following table provides the
80847    precedence rules for the different entities that may appear in formula
80848    strings.
80849
80850    @htmlinclude math-precedence-table-l3.html
80851
80852    In the table above, @em operand implies the construct is an operand, @em
80853    prefix implies the operation is applied to the following arguments, @em
80854    unary implies there is one argument, and @em binary implies there are
80855    two arguments.  The values in the <b>Precedence</b> column show how the
80856    order of different types of operation are determined.  For example, the
80857    expression <code>a + b * c</code> is evaluated as <code>a + (b * c)</code>
80858    because the @c * operator has higher precedence.  The
80859    <b>Associates</b> column shows how the order of similar precedence
80860    operations is determined; for example, <code>a && b || c</code> is
80861    evaluated as <code>(a && b) || c</code> because the @c && and @c ||
80862    operators are left-associative and have the same precedence.
80863
80864    The function call syntax consists of a function name, followed by optional
80865    white space, followed by an opening parenthesis token, followed by a
80866    sequence of zero or more arguments separated by commas (with each comma
80867    optionally preceded and/or followed by zero or more white space
80868    characters), followed by a closing parenthesis token.  The function name
80869    must be chosen from one of the pre-defined functions in SBML or a
80870    user-defined function in the model.  The following table lists the names
80871    of certain common mathematical functions; this table corresponds to
80872    Table&nbsp;6 in the <a target='_blank'
80873    href='http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2'>SBML
80874    Level&nbsp;1 Version&nbsp;2 specification</a> with additions based on the
80875    functions added in SBML Level 2 and Level 3:
80876
80877    @htmlinclude string-functions-table-l3.html
80878
80879    Parsing of the various MathML functions and constants are all
80880    case-insensitive by default: function names such as <code>cos</code>,
80881    <code>Cos</code> and <code>COS</code> are all parsed as the MathML cosine
80882    operator, <code>&lt;cos&gt;</code>.  However, <em>when a Model object is
80883    used</em> in conjunction with either
80884    @sbmlfunction{parseL3FormulaWithModel, String\, Model} or
80885    @sbmlfunction{parseL3FormulaWithSettings, String\,
80886    L3ParserSettings}, any identifiers found in that model will be
80887    parsed in a case-<em>sensitive</em> way.  For example, if a model contains
80888    a Species having the identifier <code>Pi</code>, the parser will parse
80889    &quot;<code>Pi</code>&quot; in the input as &quot;<code>&lt;ci&gt; Pi
80890    &lt;/ci&gt;</code>&quot; but will continue to parse the symbols
80891    &quot;<code>pi</code>&quot; and &quot;<code>PI</code>&quot; as
80892    &quot;<code>&lt;pi&gt;</code>&quot;.
80893
80894    As mentioned above, the manner in which the 'L3' versions of the formula
80895    parser and formatter interpret the function &quot;<code>log</code>&quot;
80896    can be changed.  To do so, callers should use the function
80897    @sbmlfunction{parseL3FormulaWithSettings, String\,
80898    L3ParserSettings} and pass it an appropriate L3ParserSettings
80899    object.  By default, unlike the SBML Level&nbsp;1 parser implemented by
80900    @sbmlfunction{parseFormula, String}, the string
80901    &quot;<code>log</code>&quot; is interpreted as the base&nbsp;10 logarithm,
80902    and @em not as the natural logarithm.  However, you can change the
80903    interpretation to be base-10 log, natural log, or as an error; since the
80904    name 'log' by itself is ambiguous, you require that the parser uses
80905    @c log10 or @c ln instead, which are more clear.  Please refer to
80906    @sbmlfunction{parseL3FormulaWithSettings, String\,
80907    L3ParserSettings}.
80908
80909    In addition, the following symbols will be translated to their MathML
80910    equivalents, if no symbol with the same @c SId identifier string exists
80911    in the Model object provided:
80912
80913    @htmlinclude string-values-table-l3.html
80914
80915    Again, as mentioned above, whether the string
80916    &quot;<code>avogadro</code>&quot; is parsed as an AST node of type
80917    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or
80918    @link libsbml#AST_NAME AST_NAME@endlink is configurable; use the version of
80919    the parser function called @sbmlfunction{parseL3FormulaWithSettings,
80920    String\, L3ParserSettings}.  This Avogadro-related
80921    functionality is provided because SBML Level&nbsp;2 models may not use
80922    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink AST nodes.
80923
80924    @param tree the AST to be converted.
80925
80926    @return the formula from the given AST as text string, with a syntax
80927    oriented towards the capabilities defined in SBML Level&nbsp;3.  The
80928    caller owns the returned string and is responsible for freeing it when it
80929    is no longer needed.  If @p tree is a null pointer, then a null pointer is
80930    returned.
80931
80932    @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
80933    @see @sbmlfunction{formulaToString, ASTNode}
80934    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
80935    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
80936    @see @sbmlfunction{parseFormula, String}
80937    @see L3ParserSettings
80938    @see @sbmlfunction{getDefaultL3ParserSettings,}
80939    @see @sbmlfunction{getLastParseL3Error,}
80940
80941    @if conly
80942    @memberof ASTNode_t
80943    @endif
80944
80945    """
80946    return _libsbml.formulaToL3String(tree)
80947
80948def formulaToL3StringWithSettings(tree, settings):
80949    r"""
80950    formulaToL3StringWithSettings(ASTNode tree, L3ParserSettings settings) -> char *
80951
80952    Converts an AST to a text string representation of a formula, using
80953    specific formatter settings.
80954
80955    This function behaves identically to @sbmlfunction{formulaToL3String,
80956    ASTNode} but its behavior is controlled by two fields in the @p
80957    settings object, namely:
80958
80959    @li <em>parseunits</em> ('parse units'): If this field in the @p settings
80960    object is set to <code>true</code> (the default), the function will
80961    write out the units of any numerical ASTNodes that have them,
80962    producing (for example) &quot;<code>3 mL</code>&quot;,
80963    &quot;<code>(3/4) m</code>&quot;, or &quot;<code>5.5e-10
80964    M</code>&quot;.  If this is set to <code>false</code>, this function
80965    will only write out the number itself (&quot;<code>3</code>&quot;,
80966    &quot;<code>(3/4)</code>&quot;, and &quot;<code>5.5e-10</code>&quot;,
80967    in the previous examples).
80968    @li <em>collapseminus</em> ('collapse minus'): If this field in the @p
80969    settings object is set to <code>false</code> (the default), the
80970    function will write out explicitly any doubly-nested unary minus
80971    ASTNodes, producing (for example) &quot;<code>- -x</code>&quot; or
80972    even &quot;<code>- - - - -3.1</code>&quot;.  If this is set to
80973    <code>true</code>, the function will collapse the nodes before
80974    producing the infix form, producing &quot;<code>x</code>&quot; and
80975    &quot;<code>-3.1</code>&quot; in the previous examples.
80976
80977    All the other settings of the L3ParserSettings object passed in as @p
80978    settings will be ignored for the purposes of this function: the
80979    <em>parselog</em> ('parse log') setting is ignored so that
80980    &quot;<code>log10(x)</code>&quot;, &quot;<code>ln(x)</code>&quot;, and
80981    &quot;<code>log(x, y)</code>&quot; are always produced; the
80982    <em>avocsymbol</em> ('Avogadro csymbol') is irrelevant to the behavior
80983    of this function; and nothing in the Model object set via the
80984    <em>model</em> setting is used.
80985
80986    @param tree the AST to be converted.
80987    @param settings the L3ParserSettings object used to modify the behavior of
80988    this function.
80989
80990    @return the formula from the given AST as text string, with a syntax
80991    oriented towards the capabilities defined in SBML Level&nbsp;3.  The
80992    caller owns the returned string and is responsible for freeing it when it
80993    is no longer needed.  If @p tree is a null pointer, then a null pointer is
80994    returned.
80995
80996    @see @sbmlfunction{formulaToL3String, ASTNode}
80997    @see @sbmlfunction{formulaToString, ASTNode}
80998    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
80999    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
81000    @see @sbmlfunction{parseFormula, String}
81001    @see L3ParserSettings
81002    @see @sbmlfunction{getDefaultL3ParserSettings,}
81003    @see @sbmlfunction{getLastParseL3Error,}
81004
81005    @if conly
81006    @memberof ASTNode_t
81007    @endif
81008
81009    """
81010    return _libsbml.formulaToL3StringWithSettings(tree, settings)
81011
81012def formulaToString(tree):
81013    r"""
81014    formulaToString(ASTNode tree) -> char *
81015
81016    Converts an AST to a string representation of a formula using a syntax
81017    basically derived from SBML Level&nbsp;1.
81018
81019    @par
81020    The text-string form of mathematical formulas produced by
81021    @sbmlfunction{formulaToString, ASTNode} and read by
81022    @sbmlfunction{parseFormula, String} use a simple C-inspired infix
81023    notation taken from SBML Level&nbsp;1.  A formula in this text-string form
81024    therefore can be handed to a program that understands SBML Level&nbsp;1
81025    mathematical expressions, or used as part of a formula translation system.
81026    The syntax is described in detail in the documentation for ASTNode.  The
81027    following are illustrative examples of formulas expressed using this syntax:
81028    @verbatim
81029    0.10 * k4^2
81030    @endverbatim
81031    @verbatim
81032    (vm * s1)/(km + s1)
81033    @endverbatim
81034
81035    Note that this facility is provided as a convenience by libSBML---the
81036    MathML standard does not actually define a 'string-form' equivalent to
81037    MathML expression trees, so the choice of formula syntax is somewhat
81038    arbitrary.  The approach taken by libSBML is to use the syntax defined by
81039    SBML Level&nbsp;1 (which in fact used a text-string representation of
81040    formulas and not MathML).  This formula syntax is based mostly on C
81041    programming syntax, and may contain operators, function calls, symbols,
81042    and white space characters.  The following table provides the precedence
81043    rules for the different entities that may appear in formula strings.
81044
81045    @htmlinclude math-precedence-table.html
81046
81047    In the table above, @em operand implies the construct is an operand, @em
81048    prefix implies the operation is applied to the following arguments, @em
81049    unary implies there is one argument, and @em binary implies there are
81050    two arguments.  The values in the <b>Precedence</b> column show how the
81051    order of different types of operation are determined.  For example, the
81052    expression <code>a * b + c</code> is evaluated as <code>(a * b) +
81053    c</code> because the @c * operator has higher precedence.  The
81054    <b>Associates</b> column shows how the order of similar precedence
81055    operations is determined; for example, <code>a - b + c</code> is
81056    evaluated as <code>(a - b) + c</code> because the @c + and @c -
81057    operators are left-associative.
81058
81059    The function call syntax consists of a function name, followed by optional
81060    white space, followed by an opening parenthesis token, followed by a
81061    sequence of zero or more arguments separated by commas (with each comma
81062    optionally preceded and/or followed by zero or more white space
81063    characters, followed by a closing parenthesis token.  The function name
81064    must be chosen from one of the pre-defined functions in SBML or a
81065    user-defined function in the model.  The following table lists the names
81066    of certain common mathematical functions; this table corresponds to
81067    Table&nbsp;6 in the <a target='_blank' href='http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2'>SBML Level&nbsp;1 Version&nbsp;2 specification</a>:
81068
81069    @htmlinclude string-functions-table.html
81070
81071    @warning <span class='warning'>There are differences between the symbols
81072    used to represent the common mathematical functions and the corresponding
81073    MathML token names.  This is a potential source of incompatibilities.
81074    Note in particular that in this text-string syntax, <code>log(x)</code>
81075    represents the natural logarithm, whereas in MathML, the natural logarithm
81076    is <code>&lt;ln/&gt;</code>.  Application writers are urged to be careful
81077    when translating between text forms and MathML forms, especially if they
81078    provide a direct text-string input facility to users of their software
81079    systems.</span>
81080
81081    @note
81082    Callers using SBML Level&nbsp;3 are encouraged to use the facilities
81083    provided by libSBML's newer and more powerful Level&nbsp;3-oriented
81084    formula parser and formatter.  The entry points to this second system are
81085    @sbmlfunction{parseL3Formula, String} and
81086    @sbmlfunction{formulaToL3String, ASTNode}.  The Level&nbsp;1-oriented
81087    system (i.e., what is provided by @sbmlfunction{formulaToString, String}
81088    and @sbmlfunction{parseFormula, ASTNode}) is provided
81089    untouched for backwards compatibility.
81090
81091    @param tree the AST to be converted.
81092
81093    @return the formula from the given AST as an SBML Level 1 text-string
81094    mathematical formula.  The caller owns the returned string and is
81095    responsible for freeing it when it is no longer needed.
81096
81097    @see @sbmlfunction{formulaToL3String, ASTNode}
81098    @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
81099    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
81100    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
81101    @see @sbmlfunction{parseFormula, String}
81102
81103    @note We urge developers to keep in mind that the text-string formula
81104    syntax is specific to libSBML.  <em>Neither MathML nor SBML define a
81105    text-string format for mathematical formulas.</em> LibSBML's particular
81106    syntax should not be considered to be a canonical or standard
81107    general-purpose mathematical expression syntax.  LibSBML provides methods
81108    for parsing and transforming text-string math formulas back and forth from
81109    AST structures for the convenience of calling applications, but it is
81110    important to keep the system's limitations in mind.
81111
81112    @if conly
81113    @memberof ASTNode_t
81114    @endif
81115
81116    """
81117    return _libsbml.formulaToString(tree)
81118
81119def parseL3Formula(formula):
81120    r"""
81121    parseL3Formula(char const * formula) -> ASTNode
81122
81123    Parses a text string as a mathematical formula and returns an AST
81124    representation of it.
81125
81126    @par
81127    The text-string form of mathematical formulas read by the function
81128    @sbmlfunction{parseL3Formula, String} and written by the function
81129    @sbmlfunction{formulaToL3String, ASTNode} uses an expanded version of
81130    the syntax read and written by @sbmlfunction{parseFormula, String}
81131    and @sbmlfunction{formulaToString, ASTNode}, respectively.  The
81132    latter two libSBML functions were originally developed to support
81133    conversion between SBML Levels&nbsp;1 and&nbsp;2, and were focused on the
81134    syntax of mathematical formulas used in SBML Level&nbsp;1.  With time, and
81135    the use of MathML in SBML Levels&nbsp;2 and&nbsp;3, it became clear that
81136    supporting Level&nbsp;2 and&nbsp;3's expanded mathematical syntax would be
81137    useful for software developers.  To maintain backwards compatibility for
81138    libSBML users, the original @sbmlfunction{formulaToString, ASTNode}
81139    and @sbmlfunction{parseFormula, String} have been left untouched,
81140    and instead, the new functionality is provided in the form of
81141    @sbmlfunction{parseL3Formula, String} and
81142    @sbmlfunction{formulaToL3String, ASTNode}.
81143
81144    The following lists the main differences in the formula syntax supported by
81145    the Level 3 ('L3') versions of the formula parsers and formatters,
81146    compared to what is supported by the Level&nbsp;1-oriented
81147    @sbmlfunction{parseFormula, String} and
81148    @sbmlfunction{formulaToString, ASTNode}:
81149
81150    @li Units may be asociated with bare numbers, using the following syntax:
81151    <div style='margin: 10px auto 10px 25px; display: block'>
81152    <span class='code' style='background-color: #d0d0ee'>number</span>
81153    <span class='code' style='background-color: #edd'>unit</span>
81154    </div>
81155    The <span class='code' style='background-color: #d0d0ee'>number</span>
81156    may be in any form (an integer, real, or rational
81157    number), and the
81158    <span class='code' style='background-color: #edd'>unit</span>
81159    must conform to the syntax of an SBML identifier (technically, the
81160    type defined as @c SId in the SBML specifications).  The whitespace between
81161    <span class='code' style='background-color: #d0d0ee'>number</span>
81162    and <span class='code' style='background-color: #edd'>unit</span>
81163    is optional.
81164
81165    @li The Boolean function symbols @c && (@em and), @c || (@em or), @c ! (@em not),
81166    and @c != (@em not @em equals) may be used.
81167
81168    @li The @em modulo operation is allowed as the symbol @c @% and will
81169    produce a <code>&lt;piecewise&gt;</code> function in the corresponding
81170    MathML output by default, or can produce the MathML function @c rem,
81171    depending on the L3ParserSettings object (see
81172    L3ParserSettings_setParseModuloL3v2() ).
81173
81174    @li All inverse trigonometric functions may be defined in the infix either
81175    using @c arc as a prefix or simply @c a; in other words, both @c arccsc
81176    and @c acsc are interpreted as the operator @em arccosecant as defined in
81177    MathML&nbsp;2.0.  (Many functions in the simpler SBML Level&nbsp;1
81178    oriented parser implemented by @sbmlfunction{parseFormula, String}
81179    are defined this way as well, but not all.)
81180
81181    @li The following expression is parsed as a rational number instead of
81182    as a numerical division:
81183    <pre style='display: block; margin-left: 25px'>
81184    (<span class='code' style='background-color: #d0d0ee'>integer</span>/<span class='code' style='background-color: #d0d0ee'>integer</span>)</pre>
81185    <strong>Spaces are not allowed</strong> in this construct; in other words,
81186    &quot;<code>(3 / 4)</code>&quot; (with whitespace between the numbers and
81187    the operator) will be parsed into the MathML <code>&lt;divide&gt;</code>
81188    construct rather than a rational number.  You can, however, assign units to a
81189    rational number as a whole; here is an example: &quot;<code>(3/4) ml</code>&quot;.
81190    (In the case of division rather than a rational number, units are not interpreted
81191    in this way.)
81192
81193    @li Various parser and formatter behaviors may be altered through the use
81194    of a L3ParserSettings object in conjunction with the functions
81195    @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} and
81196    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
81197    The settings available include the following:
81198    <ul style='list-style-type: circle'>
81199
81200    <li style='margin-bottom: 0.5em'> The function @c log with a single
81201    argument (&quot;<code>log(x)</code>&quot;) can be parsed as
81202    <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
81203    desired.
81204
81205    <li style='margin-bottom: 0.5em'> Unary minus signs can be collapsed or
81206    preserved; that is, sequential pairs of unary minuses (e.g., &quot;<code>-
81207    -3</code>&quot;) can be removed from the input entirely and single unary
81208    minuses can be incorporated into the number node, or all minuses can be
81209    preserved in the AST node structure.
81210
81211    <li style='margin-bottom: 0.5em'> Parsing of units embedded in the input
81212    string can be turned on and off.
81213
81214    <li style='margin-bottom: 0.5em'> The string @c avogadro can be parsed as
81215    a MathML @em csymbol or as an identifier.
81216
81217    <li style='margin-bottom: 0.5em'> The string @% can be parsed either as a
81218    piecewise function or as the 'rem' function:  <code>a @% b</code> will either
81219    become
81220
81221    <code>piecewise(a - b*ceil(a/b), xor((a < 0), (b < 0)), a - b*floor(a/b))</code>
81222
81223    or
81224
81225    <code>rem(a, b)</code>.
81226
81227    The latter is simpler, but the @c rem MathML is only allowed
81228    as of SBML Level&nbsp;3 Version&nbsp;2.</li>
81229
81230    <li style='margin-bottom: 0.5em'> A Model object may optionally be
81231    provided to the parser using the variant function call
81232    @sbmlfunction{parseL3FormulaWithModel, String\, Model} or
81233    stored in a L3ParserSettings object passed to the variant function
81234    @sbmlfunction{parseL3FormulaWithSettings, String\,
81235    L3ParserSettings}.  When a Model object is provided, identifiers
81236    (values of type @c SId ) from that model are used in preference to
81237    pre-defined MathML definitions for both symbols and functions.
81238    More precisely:
81239    <ul style='list-style-type: square'>
81240
81241    <li style='margin-bottom: 0.5em'> <em>In the case of symbols</em>: the
81242    Model entities whose identifiers will shadow identical symbols in the
81243    mathematical formula are: Species, Compartment, Parameter, Reaction, and
81244    SpeciesReference.  For instance, if the parser is given a Model containing
81245    a Species with the identifier &quot;<code>pi</code>&quot;, and the formula
81246    to be parsed is &quot;<code>3*pi</code>&quot;, the MathML produced will
81247    contain the construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of
81248    the construct <code>&lt;pi/&gt;</code>.
81249
81250    <li style='margin-bottom: 0.5em'> <em>In the case of user-defined
81251    functions</em>: when a Model object is provided, @c SId values of
81252    user-defined functions present in the model will be used preferentially
81253    over pre-defined MathML functions.  For example, if the passed-in Model
81254    contains a FunctionDefinition object with the identifier
81255    &quot;<code>sin</code>&quot;, that function will be used instead of the
81256    predefined MathML function <code>&lt;sin/&gt;</code>.
81257    </ul>
81258
81259    <li style='margin-bottom: 0.5em'> An SBMLNamespaces object may optionally
81260    be provided to identify SBML Level&nbsp;3 packages that extend the
81261    syntax understood by the formula parser.  When the namespaces are provided,
81262    the parser will interpret possible additional syntax defined by the libSBML
81263    plug-ins implementing the SBML Level&nbsp;3 packages; for example, it may
81264    understand vector/array extensions introduced by the SBML Level&nbsp;3 @em
81265    Arrays package.
81266    </ul>
81267
81268    These configuration settings cannot be changed directly using the basic
81269    parser and formatter functions, but @em can be changed on a per-call basis
81270    by using the alternative functions @sbmlfunction{parseL3FormulaWithSettings,
81271    String\, L3ParserSettings} and
81272    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\,
81273    L3ParserSettings}.
81274
81275    Neither SBML nor the MathML standard define a 'string-form' equivalent to
81276    MathML expressions.  The approach taken by libSBML is to start with the
81277    formula syntax defined by SBML Level&nbsp;1 (which in fact used a custom
81278    text-string representation of formulas, and not MathML), and expand it to
81279    include the functionality described above.  This formula syntax is based
81280    mostly on C programming syntax, and may contain operators, function calls,
81281    symbols, and white space characters.  The following table provides the
81282    precedence rules for the different entities that may appear in formula
81283    strings.
81284
81285    @htmlinclude math-precedence-table-l3.html
81286
81287    In the table above, @em operand implies the construct is an operand, @em
81288    prefix implies the operation is applied to the following arguments, @em
81289    unary implies there is one argument, and @em binary implies there are
81290    two arguments.  The values in the <b>Precedence</b> column show how the
81291    order of different types of operation are determined.  For example, the
81292    expression <code>a + b * c</code> is evaluated as <code>a + (b * c)</code>
81293    because the @c * operator has higher precedence.  The
81294    <b>Associates</b> column shows how the order of similar precedence
81295    operations is determined; for example, <code>a && b || c</code> is
81296    evaluated as <code>(a && b) || c</code> because the @c && and @c ||
81297    operators are left-associative and have the same precedence.
81298
81299    The function call syntax consists of a function name, followed by optional
81300    white space, followed by an opening parenthesis token, followed by a
81301    sequence of zero or more arguments separated by commas (with each comma
81302    optionally preceded and/or followed by zero or more white space
81303    characters), followed by a closing parenthesis token.  The function name
81304    must be chosen from one of the pre-defined functions in SBML or a
81305    user-defined function in the model.  The following table lists the names
81306    of certain common mathematical functions; this table corresponds to
81307    Table&nbsp;6 in the <a target='_blank'
81308    href='http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2'>SBML
81309    Level&nbsp;1 Version&nbsp;2 specification</a> with additions based on the
81310    functions added in SBML Level 2 and Level 3:
81311
81312    @htmlinclude string-functions-table-l3.html
81313
81314    Parsing of the various MathML functions and constants are all
81315    case-insensitive by default: function names such as <code>cos</code>,
81316    <code>Cos</code> and <code>COS</code> are all parsed as the MathML cosine
81317    operator, <code>&lt;cos&gt;</code>.  However, <em>when a Model object is
81318    used</em> in conjunction with either
81319    @sbmlfunction{parseL3FormulaWithModel, String\, Model} or
81320    @sbmlfunction{parseL3FormulaWithSettings, String\,
81321    L3ParserSettings}, any identifiers found in that model will be
81322    parsed in a case-<em>sensitive</em> way.  For example, if a model contains
81323    a Species having the identifier <code>Pi</code>, the parser will parse
81324    &quot;<code>Pi</code>&quot; in the input as &quot;<code>&lt;ci&gt; Pi
81325    &lt;/ci&gt;</code>&quot; but will continue to parse the symbols
81326    &quot;<code>pi</code>&quot; and &quot;<code>PI</code>&quot; as
81327    &quot;<code>&lt;pi&gt;</code>&quot;.
81328
81329    As mentioned above, the manner in which the 'L3' versions of the formula
81330    parser and formatter interpret the function &quot;<code>log</code>&quot;
81331    can be changed.  To do so, callers should use the function
81332    @sbmlfunction{parseL3FormulaWithSettings, String\,
81333    L3ParserSettings} and pass it an appropriate L3ParserSettings
81334    object.  By default, unlike the SBML Level&nbsp;1 parser implemented by
81335    @sbmlfunction{parseFormula, String}, the string
81336    &quot;<code>log</code>&quot; is interpreted as the base&nbsp;10 logarithm,
81337    and @em not as the natural logarithm.  However, you can change the
81338    interpretation to be base-10 log, natural log, or as an error; since the
81339    name 'log' by itself is ambiguous, you require that the parser uses
81340    @c log10 or @c ln instead, which are more clear.  Please refer to
81341    @sbmlfunction{parseL3FormulaWithSettings, String\,
81342    L3ParserSettings}.
81343
81344    In addition, the following symbols will be translated to their MathML
81345    equivalents, if no symbol with the same @c SId identifier string exists
81346    in the Model object provided:
81347
81348    @htmlinclude string-values-table-l3.html
81349
81350    Again, as mentioned above, whether the string
81351    &quot;<code>avogadro</code>&quot; is parsed as an AST node of type
81352    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or
81353    @link libsbml#AST_NAME AST_NAME@endlink is configurable; use the version of
81354    the parser function called @sbmlfunction{parseL3FormulaWithSettings,
81355    String\, L3ParserSettings}.  This Avogadro-related
81356    functionality is provided because SBML Level&nbsp;2 models may not use
81357    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink AST nodes.
81358
81359    @param formula the text-string formula expression to be parsed.
81360
81361    @return the root node of an AST representing the mathematical formula, or
81362    @c None if an error occurred while parsing the formula.  When @c None is
81363    returned, an error is recorded internally; information about the error can
81364    be retrieved using @sbmlfunction{getLastParseL3Error,}.
81365
81366    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
81367    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
81368    @see @sbmlfunction{parseFormula, String}
81369    @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
81370    @see @sbmlfunction{formulaToL3String, ASTNode}
81371    @see @sbmlfunction{formulaToString, ASTNode}
81372    @see L3ParserSettings
81373    @see @sbmlfunction{getDefaultL3ParserSettings,}
81374    @see @sbmlfunction{getLastParseL3Error,}
81375
81376    @note We urge developers to keep in mind that the text-string formula
81377    syntax is specific to libSBML.  <em>Neither MathML nor SBML define a
81378    text-string format for mathematical formulas.</em> LibSBML's particular
81379    syntax should not be considered to be a canonical or standard
81380    general-purpose mathematical expression syntax.  LibSBML provides methods
81381    for parsing and transforming text-string math formulas back and forth from
81382    AST structures for the convenience of calling applications, but it is
81383    important to keep the system's limitations in mind.
81384
81385    @if conly
81386    @memberof ASTNode_t
81387    @endif
81388
81389    """
81390    return _libsbml.parseL3Formula(formula)
81391
81392def parseL3FormulaWithModel(formula, model):
81393    r"""
81394    parseL3FormulaWithModel(char const * formula, Model model) -> ASTNode
81395
81396    Parses a text string as a mathematical formula using a Model to resolve
81397    symbols, and returns an AST representation of the result.
81398
81399    This is identical to @sbmlfunction{parseL3Formula, String}, except
81400    that this function uses the given model in the argument @p model to check
81401    against identifiers that appear in the @p formula.  For more information
81402    about the parser, please see the definition of L3ParserSettings and
81403    the function @sbmlfunction{parseL3Formula, String}.
81404
81405    @param formula the mathematical formula expression to be parsed.
81406
81407    @param model the Model object to use for checking identifiers.
81408
81409    @return the root node of an AST representing the mathematical formula,
81410    or @c None if an error occurred while parsing the formula.  When @c None
81411    is returned, an error is recorded internally; information about the
81412    error can be retrieved using @sbmlfunction{getLastParseL3Error,}.
81413
81414    @see @sbmlfunction{parseL3Formula, String}
81415    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
81416    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
81417    @see @sbmlfunction{parseFormula, String}
81418    @see @sbmlfunction{getLastParseL3Error,}
81419    @see L3ParserSettings
81420
81421    @if conly
81422    @memberof ASTNode_t
81423    @endif
81424
81425    """
81426    return _libsbml.parseL3FormulaWithModel(formula, model)
81427
81428def parseL3FormulaWithSettings(formula, settings):
81429    r"""
81430    parseL3FormulaWithSettings(char const * formula, L3ParserSettings settings) -> ASTNode
81431
81432    Parses a text string as a mathematical formula using specific parser
81433    settings and returns an AST representation of the result.
81434
81435    This is identical to @sbmlfunction{parseL3Formula, String}, except
81436    that this function uses the parser settings given in the argument @p
81437    settings.  The settings override the default parsing behavior.  The
81438    following parsing behaviors can be configured:
81439
81440    @li A Model object may optionally be provided to use identifiers (values
81441    of type @c SId) from the model in preference to pre-defined MathML symbols
81442    More precisely, the Model entities whose identifiers will shadow identical
81443    symbols in the mathematical formula are: Species, Compartment, Parameter,
81444    Reaction, and SpeciesReference.  For instance, if the parser is given a
81445    Model containing a Species with the identifier
81446    &quot;<code>pi</code>&quot;, and the formula to be parsed is
81447    &quot;<code>3*pi</code>&quot;, the MathML produced by the parser will
81448    contain the construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of
81449    the construct <code>&lt;pi/&gt;</code>.  Another example, if the passed-in
81450    Model contains a FunctionDefinition with the identifier
81451    &quot;<code>sin</code>&quot;, that function will be used instead of the
81452    predefined MathML function <code>&lt;sin/&gt;</code>.
81453    @li The function @c log with a single argument
81454    (&quot;<code>log(x)</code>&quot;) can be parsed as <code>log10(x)</code>,
81455    <code>ln(x)</code>, or treated as an error, as desired.
81456    @li Unary minus signs can be either collapsed or preserved; that is, the
81457    parser can either (1) remove sequential pairs of unary minuses (e.g.,
81458    &quot;<code>- -3</code>&quot;) from the input and incorporate single unary
81459    minuses into the number node, or (2) preserve all minuses in the AST node
81460    structure, turning them into ASTNode objects of type
81461    @link libsbml#AST_MINUS AST_MINUS@endlink.
81462    @li The character sequence &quot;<code>number id</code>&quot; can be
81463    interpreted as a numerical value @c number followed by units of measurement
81464    indicated by @c id, or it can be treated as a syntax error.  (In
81465    Level&nbsp;3, MathML <code>&lt;cn&gt;</code> elements can have an
81466    attribute named @c units placed in the SBML namespace, which can be used
81467    to indicate the units to be associated with the number.  The text-string
81468    infix formula parser allows units to be placed after raw numbers; they are
81469    interpreted as unit identifiers for units defined by the SBML
81470    specification or in the containing Model object.)
81471    @li The symbol @c avogadro can be parsed either as a MathML @em csymbol or
81472    as a identifier.  More specifically, &quot;<code>avogadro</code>&quot; can
81473    be treated as an ASTNode of type
81474    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or of type
81475    @link libsbml#AST_NAME AST_NAME@endlink.
81476    @li Strings that match built-in functions and constants can either be parsed
81477    as a match regardless of capitalization, or may be required to be
81478    all-lower-case to be considered a match.
81479    @li LibSBML plug-ins implementing support for SBML Level&nbsp;3 packages
81480    may introduce extensions to the syntax understood by the parser.  The
81481    precise nature of the extensions will be documented by the individual
81482    package plug-ins.  An example of a possible extension is a notation for
81483    vectors and arrays, introduced by the SBML Level&nbsp;3 @em Arrays
81484    package.
81485
81486    For more details about the parser, please see the definition of
81487    L3ParserSettings and @sbmlfunction{parseL3FormulaWithSettings, String\,
81488    L3ParserSettings}.
81489
81490    @param formula the mathematical formula expression to be parsed.
81491
81492    @param settings the settings to be used for this parser invocation.
81493
81494    @return the root node of an AST representing the mathematical formula,
81495    or @c None if an error occurred while parsing the formula.  When @c None
81496    is returned, an error is recorded internally; information about the
81497    error can be retrieved using @sbmlfunction{getLastParseL3Error,}.
81498
81499    @see @sbmlfunction{parseL3Formula, String}
81500    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
81501    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
81502    @see @sbmlfunction{parseFormula, String}
81503    @see @sbmlfunction{getLastParseL3Error,}
81504    @see L3ParserSettings
81505
81506    @if conly
81507    @memberof ASTNode_t
81508    @endif
81509
81510    """
81511    return _libsbml.parseL3FormulaWithSettings(formula, settings)
81512
81513def getDefaultL3ParserSettings():
81514    r"""
81515    getDefaultL3ParserSettings() -> L3ParserSettings
81516
81517    Returns a copy of the default Level&nbsp;3 ('L3') formula parser settings.
81518
81519    The data structure storing the settings allows callers to change the
81520    following parsing behaviors:
81521
81522    @par
81523    The text-string form of mathematical formulas read by the function
81524    @sbmlfunction{parseL3Formula, String} and written by the function
81525    @sbmlfunction{formulaToL3String, ASTNode} uses an expanded version of
81526    the syntax read and written by @sbmlfunction{parseFormula, String}
81527    and @sbmlfunction{formulaToString, ASTNode}, respectively.  The
81528    latter two libSBML functions were originally developed to support
81529    conversion between SBML Levels&nbsp;1 and&nbsp;2, and were focused on the
81530    syntax of mathematical formulas used in SBML Level&nbsp;1.  With time, and
81531    the use of MathML in SBML Levels&nbsp;2 and&nbsp;3, it became clear that
81532    supporting Level&nbsp;2 and&nbsp;3's expanded mathematical syntax would be
81533    useful for software developers.  To maintain backwards compatibility for
81534    libSBML users, the original @sbmlfunction{formulaToString, ASTNode}
81535    and @sbmlfunction{parseFormula, String} have been left untouched,
81536    and instead, the new functionality is provided in the form of
81537    @sbmlfunction{parseL3Formula, String} and
81538    @sbmlfunction{formulaToL3String, ASTNode}.
81539
81540    The following lists the main differences in the formula syntax supported by
81541    the Level 3 ('L3') versions of the formula parsers and formatters,
81542    compared to what is supported by the Level&nbsp;1-oriented
81543    @sbmlfunction{parseFormula, String} and
81544    @sbmlfunction{formulaToString, ASTNode}:
81545
81546    @li Units may be asociated with bare numbers, using the following syntax:
81547    <div style='margin: 10px auto 10px 25px; display: block'>
81548    <span class='code' style='background-color: #d0d0ee'>number</span>
81549    <span class='code' style='background-color: #edd'>unit</span>
81550    </div>
81551    The <span class='code' style='background-color: #d0d0ee'>number</span>
81552    may be in any form (an integer, real, or rational
81553    number), and the
81554    <span class='code' style='background-color: #edd'>unit</span>
81555    must conform to the syntax of an SBML identifier (technically, the
81556    type defined as @c SId in the SBML specifications).  The whitespace between
81557    <span class='code' style='background-color: #d0d0ee'>number</span>
81558    and <span class='code' style='background-color: #edd'>unit</span>
81559    is optional.
81560
81561    @li The Boolean function symbols @c && (@em and), @c || (@em or), @c ! (@em not),
81562    and @c != (@em not @em equals) may be used.
81563
81564    @li The @em modulo operation is allowed as the symbol @c @% and will
81565    produce a <code>&lt;piecewise&gt;</code> function in the corresponding
81566    MathML output by default, or can produce the MathML function @c rem,
81567    depending on the L3ParserSettings object (see
81568    L3ParserSettings_setParseModuloL3v2() ).
81569
81570    @li All inverse trigonometric functions may be defined in the infix either
81571    using @c arc as a prefix or simply @c a; in other words, both @c arccsc
81572    and @c acsc are interpreted as the operator @em arccosecant as defined in
81573    MathML&nbsp;2.0.  (Many functions in the simpler SBML Level&nbsp;1
81574    oriented parser implemented by @sbmlfunction{parseFormula, String}
81575    are defined this way as well, but not all.)
81576
81577    @li The following expression is parsed as a rational number instead of
81578    as a numerical division:
81579    <pre style='display: block; margin-left: 25px'>
81580    (<span class='code' style='background-color: #d0d0ee'>integer</span>/<span class='code' style='background-color: #d0d0ee'>integer</span>)</pre>
81581    <strong>Spaces are not allowed</strong> in this construct; in other words,
81582    &quot;<code>(3 / 4)</code>&quot; (with whitespace between the numbers and
81583    the operator) will be parsed into the MathML <code>&lt;divide&gt;</code>
81584    construct rather than a rational number.  You can, however, assign units to a
81585    rational number as a whole; here is an example: &quot;<code>(3/4) ml</code>&quot;.
81586    (In the case of division rather than a rational number, units are not interpreted
81587    in this way.)
81588
81589    @li Various parser and formatter behaviors may be altered through the use
81590    of a L3ParserSettings object in conjunction with the functions
81591    @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} and
81592    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
81593    The settings available include the following:
81594    <ul style='list-style-type: circle'>
81595
81596    <li style='margin-bottom: 0.5em'> The function @c log with a single
81597    argument (&quot;<code>log(x)</code>&quot;) can be parsed as
81598    <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
81599    desired.
81600
81601    <li style='margin-bottom: 0.5em'> Unary minus signs can be collapsed or
81602    preserved; that is, sequential pairs of unary minuses (e.g., &quot;<code>-
81603    -3</code>&quot;) can be removed from the input entirely and single unary
81604    minuses can be incorporated into the number node, or all minuses can be
81605    preserved in the AST node structure.
81606
81607    <li style='margin-bottom: 0.5em'> Parsing of units embedded in the input
81608    string can be turned on and off.
81609
81610    <li style='margin-bottom: 0.5em'> The string @c avogadro can be parsed as
81611    a MathML @em csymbol or as an identifier.
81612
81613    <li style='margin-bottom: 0.5em'> The string @% can be parsed either as a
81614    piecewise function or as the 'rem' function:  <code>a @% b</code> will either
81615    become
81616
81617    <code>piecewise(a - b*ceil(a/b), xor((a < 0), (b < 0)), a - b*floor(a/b))</code>
81618
81619    or
81620
81621    <code>rem(a, b)</code>.
81622
81623    The latter is simpler, but the @c rem MathML is only allowed
81624    as of SBML Level&nbsp;3 Version&nbsp;2.</li>
81625
81626    <li style='margin-bottom: 0.5em'> A Model object may optionally be
81627    provided to the parser using the variant function call
81628    @sbmlfunction{parseL3FormulaWithModel, String\, Model} or
81629    stored in a L3ParserSettings object passed to the variant function
81630    @sbmlfunction{parseL3FormulaWithSettings, String\,
81631    L3ParserSettings}.  When a Model object is provided, identifiers
81632    (values of type @c SId ) from that model are used in preference to
81633    pre-defined MathML definitions for both symbols and functions.
81634    More precisely:
81635    <ul style='list-style-type: square'>
81636
81637    <li style='margin-bottom: 0.5em'> <em>In the case of symbols</em>: the
81638    Model entities whose identifiers will shadow identical symbols in the
81639    mathematical formula are: Species, Compartment, Parameter, Reaction, and
81640    SpeciesReference.  For instance, if the parser is given a Model containing
81641    a Species with the identifier &quot;<code>pi</code>&quot;, and the formula
81642    to be parsed is &quot;<code>3*pi</code>&quot;, the MathML produced will
81643    contain the construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of
81644    the construct <code>&lt;pi/&gt;</code>.
81645
81646    <li style='margin-bottom: 0.5em'> <em>In the case of user-defined
81647    functions</em>: when a Model object is provided, @c SId values of
81648    user-defined functions present in the model will be used preferentially
81649    over pre-defined MathML functions.  For example, if the passed-in Model
81650    contains a FunctionDefinition object with the identifier
81651    &quot;<code>sin</code>&quot;, that function will be used instead of the
81652    predefined MathML function <code>&lt;sin/&gt;</code>.
81653    </ul>
81654
81655    <li style='margin-bottom: 0.5em'> An SBMLNamespaces object may optionally
81656    be provided to identify SBML Level&nbsp;3 packages that extend the
81657    syntax understood by the formula parser.  When the namespaces are provided,
81658    the parser will interpret possible additional syntax defined by the libSBML
81659    plug-ins implementing the SBML Level&nbsp;3 packages; for example, it may
81660    understand vector/array extensions introduced by the SBML Level&nbsp;3 @em
81661    Arrays package.
81662    </ul>
81663
81664    These configuration settings cannot be changed directly using the basic
81665    parser and formatter functions, but @em can be changed on a per-call basis
81666    by using the alternative functions @sbmlfunction{parseL3FormulaWithSettings,
81667    String\, L3ParserSettings} and
81668    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\,
81669    L3ParserSettings}.
81670
81671    Neither SBML nor the MathML standard define a 'string-form' equivalent to
81672    MathML expressions.  The approach taken by libSBML is to start with the
81673    formula syntax defined by SBML Level&nbsp;1 (which in fact used a custom
81674    text-string representation of formulas, and not MathML), and expand it to
81675    include the functionality described above.  This formula syntax is based
81676    mostly on C programming syntax, and may contain operators, function calls,
81677    symbols, and white space characters.  The following table provides the
81678    precedence rules for the different entities that may appear in formula
81679    strings.
81680
81681    @htmlinclude math-precedence-table-l3.html
81682
81683    In the table above, @em operand implies the construct is an operand, @em
81684    prefix implies the operation is applied to the following arguments, @em
81685    unary implies there is one argument, and @em binary implies there are
81686    two arguments.  The values in the <b>Precedence</b> column show how the
81687    order of different types of operation are determined.  For example, the
81688    expression <code>a + b * c</code> is evaluated as <code>a + (b * c)</code>
81689    because the @c * operator has higher precedence.  The
81690    <b>Associates</b> column shows how the order of similar precedence
81691    operations is determined; for example, <code>a && b || c</code> is
81692    evaluated as <code>(a && b) || c</code> because the @c && and @c ||
81693    operators are left-associative and have the same precedence.
81694
81695    The function call syntax consists of a function name, followed by optional
81696    white space, followed by an opening parenthesis token, followed by a
81697    sequence of zero or more arguments separated by commas (with each comma
81698    optionally preceded and/or followed by zero or more white space
81699    characters), followed by a closing parenthesis token.  The function name
81700    must be chosen from one of the pre-defined functions in SBML or a
81701    user-defined function in the model.  The following table lists the names
81702    of certain common mathematical functions; this table corresponds to
81703    Table&nbsp;6 in the <a target='_blank'
81704    href='http://sbml.org/Documents/Specifications#SBML_Level_1_Version_2'>SBML
81705    Level&nbsp;1 Version&nbsp;2 specification</a> with additions based on the
81706    functions added in SBML Level 2 and Level 3:
81707
81708    @htmlinclude string-functions-table-l3.html
81709
81710    Parsing of the various MathML functions and constants are all
81711    case-insensitive by default: function names such as <code>cos</code>,
81712    <code>Cos</code> and <code>COS</code> are all parsed as the MathML cosine
81713    operator, <code>&lt;cos&gt;</code>.  However, <em>when a Model object is
81714    used</em> in conjunction with either
81715    @sbmlfunction{parseL3FormulaWithModel, String\, Model} or
81716    @sbmlfunction{parseL3FormulaWithSettings, String\,
81717    L3ParserSettings}, any identifiers found in that model will be
81718    parsed in a case-<em>sensitive</em> way.  For example, if a model contains
81719    a Species having the identifier <code>Pi</code>, the parser will parse
81720    &quot;<code>Pi</code>&quot; in the input as &quot;<code>&lt;ci&gt; Pi
81721    &lt;/ci&gt;</code>&quot; but will continue to parse the symbols
81722    &quot;<code>pi</code>&quot; and &quot;<code>PI</code>&quot; as
81723    &quot;<code>&lt;pi&gt;</code>&quot;.
81724
81725    As mentioned above, the manner in which the 'L3' versions of the formula
81726    parser and formatter interpret the function &quot;<code>log</code>&quot;
81727    can be changed.  To do so, callers should use the function
81728    @sbmlfunction{parseL3FormulaWithSettings, String\,
81729    L3ParserSettings} and pass it an appropriate L3ParserSettings
81730    object.  By default, unlike the SBML Level&nbsp;1 parser implemented by
81731    @sbmlfunction{parseFormula, String}, the string
81732    &quot;<code>log</code>&quot; is interpreted as the base&nbsp;10 logarithm,
81733    and @em not as the natural logarithm.  However, you can change the
81734    interpretation to be base-10 log, natural log, or as an error; since the
81735    name 'log' by itself is ambiguous, you require that the parser uses
81736    @c log10 or @c ln instead, which are more clear.  Please refer to
81737    @sbmlfunction{parseL3FormulaWithSettings, String\,
81738    L3ParserSettings}.
81739
81740    In addition, the following symbols will be translated to their MathML
81741    equivalents, if no symbol with the same @c SId identifier string exists
81742    in the Model object provided:
81743
81744    @htmlinclude string-values-table-l3.html
81745
81746    Again, as mentioned above, whether the string
81747    &quot;<code>avogadro</code>&quot; is parsed as an AST node of type
81748    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or
81749    @link libsbml#AST_NAME AST_NAME@endlink is configurable; use the version of
81750    the parser function called @sbmlfunction{parseL3FormulaWithSettings,
81751    String\, L3ParserSettings}.  This Avogadro-related
81752    functionality is provided because SBML Level&nbsp;2 models may not use
81753    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink AST nodes.
81754
81755    For more details about the parser, please see the definition of
81756    L3ParserSettings and @sbmlfunction{parseL3Formula, String}.
81757
81758    @see @sbmlfunction{parseL3Formula, String}
81759    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
81760    @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
81761    @see L3ParserSettings
81762
81763    @if conly
81764    @memberof L3ParserSettings_t
81765    @endif
81766
81767    """
81768    return _libsbml.getDefaultL3ParserSettings()
81769
81770def getLastParseL3Error():
81771    r"""
81772    getLastParseL3Error() -> char *
81773
81774    Returns the last error reported by the 'L3' mathematical formula parser.
81775
81776    If the functions @sbmlfunction{parseL3Formula, String},
81777    @sbmlfunction{parseL3FormulaWithSettings, String\,
81778    L3ParserSettings}, or @sbmlfunction{parseL3FormulaWithModel,
81779    String\, Model} return @c None, an error is set internally.
81780    This function allows callers to retrieve information about the error.
81781
81782    @return a string describing the error that occurred.  This will contain
81783    the input string the parser was trying to parse, the character it had
81784    parsed when it encountered the error, and a description of the error.
81785
81786    @see @sbmlfunction{parseL3Formula, String}
81787    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
81788    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
81789    @see @sbmlfunction{getDefaultL3ParserSettings,}
81790
81791    @if conly
81792    @memberof ASTNode_t
81793    @endif
81794
81795    """
81796    return _libsbml.getLastParseL3Error()
81797
81798def SBML_deleteL3Parser():
81799    r"""
81800    SBML_deleteL3Parser()
81801
81802    @internal
81803
81804    @internal
81805
81806    """
81807    return _libsbml.SBML_deleteL3Parser()
81808L3P_PARSE_LOG_AS_LOG10 = _libsbml.L3P_PARSE_LOG_AS_LOG10
81809
81810L3P_PARSE_LOG_AS_LN = _libsbml.L3P_PARSE_LOG_AS_LN
81811
81812L3P_PARSE_LOG_AS_ERROR = _libsbml.L3P_PARSE_LOG_AS_ERROR
81813
81814L3P_COLLAPSE_UNARY_MINUS = _libsbml.L3P_COLLAPSE_UNARY_MINUS
81815
81816L3P_EXPAND_UNARY_MINUS = _libsbml.L3P_EXPAND_UNARY_MINUS
81817
81818L3P_PARSE_UNITS = _libsbml.L3P_PARSE_UNITS
81819
81820L3P_NO_UNITS = _libsbml.L3P_NO_UNITS
81821
81822L3P_AVOGADRO_IS_CSYMBOL = _libsbml.L3P_AVOGADRO_IS_CSYMBOL
81823
81824L3P_AVOGADRO_IS_NAME = _libsbml.L3P_AVOGADRO_IS_NAME
81825
81826L3P_COMPARE_BUILTINS_CASE_INSENSITIVE = _libsbml.L3P_COMPARE_BUILTINS_CASE_INSENSITIVE
81827
81828L3P_COMPARE_BUILTINS_CASE_SENSITIVE = _libsbml.L3P_COMPARE_BUILTINS_CASE_SENSITIVE
81829
81830L3P_MODULO_IS_REM = _libsbml.L3P_MODULO_IS_REM
81831
81832L3P_MODULO_IS_PIECEWISE = _libsbml.L3P_MODULO_IS_PIECEWISE
81833
81834L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY = _libsbml.L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY
81835
81836L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC = _libsbml.L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC
81837
81838L3P_PARSE_PACKAGE_MATH_DIRECTLY = _libsbml.L3P_PARSE_PACKAGE_MATH_DIRECTLY
81839
81840L3P_PARSE_PACKAGE_MATH_AS_GENERIC = _libsbml.L3P_PARSE_PACKAGE_MATH_AS_GENERIC
81841
81842INFIX_SYNTAX_NAMED_SQUARE_BRACKETS = _libsbml.INFIX_SYNTAX_NAMED_SQUARE_BRACKETS
81843
81844INFIX_SYNTAX_CURLY_BRACES = _libsbml.INFIX_SYNTAX_CURLY_BRACES
81845
81846INFIX_SYNTAX_CURLY_BRACES_SEMICOLON = _libsbml.INFIX_SYNTAX_CURLY_BRACES_SEMICOLON
81847
81848class L3ParserSettings(object):
81849    r"""
81850
81851    @sbmlpackage{core}
81852
81853    @htmlinclude pkg-marker-core.html Controls the behavior of the Level 3 formula parser.
81854
81855    @htmlinclude not-sbml-warning.html
81856
81857    The function
81858    @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings},
81859    along with its variants @sbmlfunction{parseL3Formula, String} and
81860    @sbmlfunction{parseL3FormulaWithModel, String\, Model},
81861    are the interfaces to a parser for mathematical formulas written as
81862    text strings.  The inverse function is @sbmlfunction{formulaToL3String,
81863    ASTNode} and its variants such as
81864    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}.
81865    The parsers and the formula writers convert between a text-string
81866    representation of mathematical formulas and Abstract Syntax Trees (ASTs),
81867    represented in libSBML using ASTNode objects.
81868    Compared to the parser and writer implemented by the functions
81869    @sbmlfunction{parseFormula, String} and
81870    @sbmlfunction{formulaToString, ASTNode},
81871    which were designed primarily for converting the mathematical formula
81872    strings in SBML Level&nbsp;1, the SBML Level&nbsp;3 or 'L3' variants of
81873    the parser and writer use an extended formula syntax.  They also have a
81874    number of configurable behaviors.  This class (L3ParserSettings) is an
81875    object used to communicate the configuration settings with callers.
81876
81877    The following aspects of the parser are configurable using
81878    L3ParserSettings objects.  (For the formula writer, only a subset of these
81879    settings is relevant; please see the documentation for
81880    @sbmlfunction{formulaToL3StringWithSettings, ASTNode\,
81881    L3ParserSettings} for more information about which ones).
81882
81883    @li A Model object may optionally be provided to use identifiers (values
81884    of type @c SId) from the model in preference to pre-defined MathML symbols
81885    More precisely, the Model entities whose identifiers will shadow identical
81886    symbols in the mathematical formula are: Species, Compartment, Parameter,
81887    Reaction, and SpeciesReference.  For instance, if the parser is given a
81888    Model containing a Species with the identifier
81889    &quot;<code>pi</code>&quot;, and the formula to be parsed is
81890    &quot;<code>3*pi</code>&quot;, the MathML produced by the parser will
81891    contain the construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of
81892    the construct <code>&lt;pi/&gt;</code>.  Another example, if the passed-in
81893    Model contains a FunctionDefinition with the identifier
81894    &quot;<code>sin</code>&quot;, that function will be used instead of the
81895    predefined MathML function <code>&lt;sin/&gt;</code>.
81896    @li The function @c log with a single argument
81897    (&quot;<code>log(x)</code>&quot;) can be parsed as <code>log10(x)</code>,
81898    <code>ln(x)</code>, or treated as an error, as desired.
81899    @li Unary minus signs can be either collapsed or preserved; that is, the
81900    parser can either (1) remove sequential pairs of unary minuses (e.g.,
81901    &quot;<code>- -3</code>&quot;) from the input and incorporate single unary
81902    minuses into the number node, or (2) preserve all minuses in the AST node
81903    structure, turning them into ASTNode objects of type
81904    @link libsbml#AST_MINUS AST_MINUS@endlink.
81905    @li The character sequence &quot;<code>number id</code>&quot; can be
81906    interpreted as a numerical value @c number followed by units of measurement
81907    indicated by @c id, or it can be treated as a syntax error.  (In
81908    Level&nbsp;3, MathML <code>&lt;cn&gt;</code> elements can have an
81909    attribute named @c units placed in the SBML namespace, which can be used
81910    to indicate the units to be associated with the number.  The text-string
81911    infix formula parser allows units to be placed after raw numbers; they are
81912    interpreted as unit identifiers for units defined by the SBML
81913    specification or in the containing Model object.)
81914    @li The symbol @c avogadro can be parsed either as a MathML @em csymbol or
81915    as a identifier.  More specifically, &quot;<code>avogadro</code>&quot; can
81916    be treated as an ASTNode of type
81917    @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink or of type
81918    @link libsbml#AST_NAME AST_NAME@endlink.
81919    @li Strings that match built-in functions and constants can either be parsed
81920    as a match regardless of capitalization, or may be required to be
81921    all-lower-case to be considered a match.
81922    @li LibSBML plug-ins implementing support for SBML Level&nbsp;3 packages
81923    may introduce extensions to the syntax understood by the parser.  The
81924    precise nature of the extensions will be documented by the individual
81925    package plug-ins.  An example of a possible extension is a notation for
81926    vectors and arrays, introduced by the SBML Level&nbsp;3 @em Arrays
81927    package.
81928
81929    To obtain the default configuration values, callers can use the function
81930    @sbmlfunction{getDefaultL3ParserSettings,}.  To change the configuration,
81931    callers can create an L3ParserSettings object, set the desired
81932    characteristics using the methods provided, and pass that object to
81933    @sbmlfunction{parseL3FormulaWithSettings, String formula\, L3ParserSettings settings}.
81934
81935    @see @sbmlfunction{parseL3Formula, String}
81936    @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}
81937    @see @sbmlfunction{parseL3FormulaWithModel, String\, Model}
81938    @see @sbmlfunction{parseFormula, String}
81939    @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}
81940    @see @sbmlfunction{formulaToL3String, ASTNode}
81941    @see @sbmlfunction{formulaToString, ASTNode}
81942    @see @sbmlfunction{getDefaultL3ParserSettings,}
81943
81944    """
81945
81946    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
81947    __repr__ = _swig_repr
81948
81949    def __init__(self, *args):
81950        r"""
81951        __init__(L3ParserSettings self) -> L3ParserSettings
81952        __init__(L3ParserSettings self, Model model, ParseLogType_t parselog, bool collapseminus, bool parseunits, bool avocsymbol, bool caseSensitive=False, SBMLNamespaces sbmlns=None, bool moduloL3v2=False, bool l3v2functions=False) -> L3ParserSettings
81953        __init__(L3ParserSettings self, L3ParserSettings source) -> L3ParserSettings
81954
81955        This method has multiple variants; they differ in the arguments
81956         they accept.  Each variant is described separately below.
81957
81958        @par
81959        <hr>
81960        <span class='variant-sig-heading'>Method variant with the following signature</span>:
81961         <pre class='signature'>L3ParserSettings()</pre>
81962
81963        Creates a new L3ParserSettings object with default values.
81964
81965        This is the default constructor for the L3ParserSettings object.  It
81966        sets the stored Model object to @c None and sets the following
81967        field values in the L3ParserSettings object:
81968
81969        @li <em>parseunits</em> ('parse units') is set to
81970        @link libsbml#L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink.
81971
81972        @li <em>collapseminus</em> ('collapse minus') is set to
81973        @link libsbml#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink.
81974
81975        @li <em>parselog</em> ('parse log') is set to
81976        @link libsbml#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink.
81977
81978        @li <em>avocsymbol</em> ('Avogadro csymbol') is set to
81979        @link libsbml#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink.
81980
81981        @li <em>caseSensitive</em> ('case sensitive') is set to
81982        @link libsbml#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE@endlink.
81983
81984        @li <em>moduloL3v2</em> ('modulo l3v2') is set to
81985        @link libsbml#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink.
81986
81987        @li <em>sbmlns</em> ('SBML namespaces') is set to @c None (which
81988        indicates that no syntax extensions due to SBML Level&nbsp;3 packages
81989        will be assumed---the formula parser will only understand the
81990        core syntax described in the documentation for
81991        @sbmlfunction{parseL3Formula, String}).
81992
81993
81994        @par
81995        <hr>
81996        <span class='variant-sig-heading'>Method variant with the following signature</span>:
81997         <pre class='signature'>L3ParserSettings(L3ParserSettings source)</pre>
81998
81999        Copy constructor.
82000
82001        @param source the instance to copy.
82002
82003
82004        @par
82005        <hr>
82006        <span class='variant-sig-heading'>Method variant with the following signature</span>:
82007         <pre class='signature'>L3ParserSettings(Model model, ParseLogType_t parselog, bool collapseminus, bool parseunits, bool avocsymbol, bool caseSensitive = false, SBMLNamespaces sbmlns = None, bool moduloL3v2 = false, bool l3v2functions = false)</pre>
82008
82009        Creates a new L3ParserSettings object with specific values for all
82010        possible settings.
82011
82012        @param model a Model object to be used for disambiguating identifiers
82013        encountered by @sbmlfunction{parseL3FormulaWithSettings, String\,
82014        L3ParserSettings} in mathematical formulas.
82015
82016        @param parselog ('parse log') a flag that controls how the parser will
82017        handle the symbol @c log in mathematical formulas. The function @c log
82018        with a single argument (&quot;<code>log(x)</code>&quot;) can be parsed
82019        as <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
82020        desired, by using the parameter values
82021        @link libsbml#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink,
82022        @link libsbml#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink, or
82023        @link libsbml#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink, respectively.
82024
82025        @param collapseminus ('collapse minus') a flag that controls how the
82026        parser will handle minus signs in formulas.  Unary minus signs can be
82027        collapsed or preserved; that is, sequential pairs of unary minuses
82028        (e.g., &quot;<code>- -3</code>&quot;) can be removed from the input
82029        entirely and single unary minuses can be incorporated into the number
82030        node, or all minuses can be preserved in the AST node structure.
82031        The possible values of this field are
82032        @link libsbml#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS@endlink (to collapse unary minuses) and
82033        @link libsbml#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink (to expand unary minuses).
82034
82035        @param parseunits ('parse units') a flag that controls how the parser
82036        will handle apparent references to units of measurement associated with
82037        raw numbers in a formula.  If set to the value
82038        @link libsbml#L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink, units are parsed; if set to the value
82039        @link libsbml#L3P_NO_UNITS L3P_NO_UNITS@endlink, units are not parsed.
82040
82041        @param avocsymbol ('Avogadro csymbol') a flag that controls how the
82042        parser will handle the appearance of the symbol @c avogadro in a
82043        formula.  If set to the value @link libsbml#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink,
82044        the symbol is interpreted as the SBML/MathML @em csymbol @c avogadro; if
82045        set to the value @link libsbml#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink, the symbol is
82046        interpreted as a plain symbol name.
82047
82048        @param caseSensitive ('case sensitive') a flag that controls how the
82049        cases of alphabetical characters are treated when symbols are compared.
82050        If the flag is set to the value
82051        @link libsbml#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE@endlink, symbols are
82052        compared in a case-insensitive manner, which means that mathematical
82053        functions such as @c 'sin' will be matched no matter what their case is:
82054        @c 'Sin', @c 'SIN', etc.  If the flag is set to the value
82055        @link libsbml#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE@endlink, symbols are
82056        interpreted in a case-sensitive manner.
82057
82058        @param sbmlns ('SBML namespaces') an SBML namespaces object.  The
82059        namespaces identify the SBML Level&nbsp;3 packages that can extend the
82060        syntax understood by the formula parser.  When non-@c None, the parser
82061        will interpret additional syntax defined by the packages; for example,
82062        it may understand vector/array extensions introduced by the SBML
82063        Level&nbsp;3 @em Arrays package.
82064
82065        @param moduloL3v2 ('modulo L3v2') a flag that controls how the
82066        parser will handle the @% ('modulo') symbol in formulas.  By default,
82067        the parser will convert 'a % b' to a piecewise function that properly
82068        calculates the remainder of a with respect to be, but the parser can
82069        also be set to produce the MathML @c rem function, should the target
82070        of the produced ASTNode be an SBML Level&nbsp;3 Version&nbsp;2
82071        document, where the @c rem function is legal.
82072        The possible values of this field are
82073        @link libsbml#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink (to parse @% as a piecewise function) and
82074        @link libsbml#L3P_MODULO_IS_REM L3P_MODULO_IS_REM@endlink (to parse @% as @c rem).
82075
82076        @param l3v2functions ('parse L3v2 functions directly') is a Boolean flag
82077        that controls how to translate certain mathematical functions added in SBML
82078        Level&nbsp;3 Version&nbsp;2 Core.  The parser can either turn them into
82079        specific AST node types, or turn them all into
82080        @link libsbml#AST_FUNCTION AST_FUNCTION@endlink with the name set to the
82081        function name in question.
82082
82083        @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~
82084
82085        @see getModel()
82086        @see setModel()
82087        @see unsetModel()
82088        @see getParseLog()
82089        @see setParseLog()
82090        @see getParseUnits()
82091        @see setParseUnits()
82092        @see getParseCollapseMinus()
82093        @see setParseCollapseMinus()
82094        @see getParseAvogadroCsymbol()
82095        @see setParseAvogadroCsymbol()
82096        @see getParseModuloL3v2()
82097        @see setParseModuloL3v2()
82098        @see getParseL3v2Functions()
82099        @see setParseL3v2Functions()
82100
82101
82102
82103        @note Owing to the way that language interfaces are created in libSBML, this documentation may show methods that define default values for parameters with text that has the form <i><code>parameter</code></i> = <i><code>value</code></i>. This is <strong>not</strong> to be intepreted as a Python keyword argument; the use of a parameter name followed by an equals sign followed by a value is only meant to indicate a default value if the argument is not provided at all.  It is not a keyword in the Python sense.
82104
82105        """
82106        _libsbml.L3ParserSettings_swiginit(self, _libsbml.new_L3ParserSettings(*args))
82107    __swig_destroy__ = _libsbml.delete_L3ParserSettings
82108
82109    def setModel(self, model):
82110        r"""
82111        setModel(L3ParserSettings self, Model model)
82112
82113        Sets the model reference in this L3ParserSettings object.
82114
82115        @par
82116        When a Model object is provided, identifiers (values of type @c SId)
82117        from that model are used in preference to pre-defined MathML symbol
82118        definitions.  More precisely, the Model entities whose identifiers will
82119        shadow identical symbols in the mathematical formula are: Species,
82120        Compartment, Parameter, Reaction, and SpeciesReference.  For instance, if
82121        the parser is given a Model containing a Species with the identifier
82122        &quot;<code>pi</code>&quot;, and the formula to be parsed is
82123        &quot;<code>3*pi</code>&quot;, the MathML produced will contain the
82124        construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of the construct
82125        <code>&lt;pi/&gt;</code>.  Similarly, when a Model object is provided,
82126        @c SId values of user-defined functions present in the Model will be used
82127        preferentially over pre-defined MathML functions.  For example, if the
82128        passed-in Model contains a FunctionDefinition with the identifier
82129        &quot;<code>sin</code>&quot;, that function will be used instead of the
82130        predefined MathML function <code>&lt;sin/&gt;</code>.
82131
82132        @param model a Model object to be used for disambiguating identifiers.
82133
82134        @warning <span class='warning'>This does @em not copy the Model object.
82135        This means that modifications made to the Model after invoking this
82136        method may affect parsing behavior, because the parser will query the
82137        @em current contents of the model.</span>
82138
82139        @see getModel()
82140        @see unsetModel()
82141
82142        """
82143        return _libsbml.L3ParserSettings_setModel(self, model)
82144
82145    def getModel(self):
82146        r"""
82147        getModel(L3ParserSettings self) -> Model
82148
82149        Returns the Model object referenced by this L3ParserSettings object.
82150
82151        @par
82152        When a Model object is provided, identifiers (values of type @c SId)
82153        from that model are used in preference to pre-defined MathML symbol
82154        definitions.  More precisely, the Model entities whose identifiers will
82155        shadow identical symbols in the mathematical formula are: Species,
82156        Compartment, Parameter, Reaction, and SpeciesReference.  For instance, if
82157        the parser is given a Model containing a Species with the identifier
82158        &quot;<code>pi</code>&quot;, and the formula to be parsed is
82159        &quot;<code>3*pi</code>&quot;, the MathML produced will contain the
82160        construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of the construct
82161        <code>&lt;pi/&gt;</code>.  Similarly, when a Model object is provided,
82162        @c SId values of user-defined functions present in the Model will be used
82163        preferentially over pre-defined MathML functions.  For example, if the
82164        passed-in Model contains a FunctionDefinition with the identifier
82165        &quot;<code>sin</code>&quot;, that function will be used instead of the
82166        predefined MathML function <code>&lt;sin/&gt;</code>.
82167
82168        @see setModel()
82169        @see unsetModel()
82170
82171        """
82172        return _libsbml.L3ParserSettings_getModel(self)
82173
82174    def unsetModel(self):
82175        r"""
82176        unsetModel(L3ParserSettings self)
82177
82178        Unsets the Model reference in this L3ParserSettings object.
82179
82180        The effect of calling this method is to set the stored model value
82181        to @c None.
82182
82183        @see setModel()
82184        @see getModel()
82185
82186        """
82187        return _libsbml.L3ParserSettings_unsetModel(self)
82188
82189    def setParseLog(self, type):
82190        r"""
82191        setParseLog(L3ParserSettings self, ParseLogType_t type)
82192
82193        Sets the behavior for handling @c log in mathematical formulas.
82194
82195        The function @c log with a single argument
82196        (&quot;<code>log(x)</code>&quot;) can be parsed as
82197        <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error.
82198        These three behaviors are set, respectively, by using the value
82199        @link libsbml#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink,
82200        @link libsbml#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink, or
82201        @link libsbml#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink
82202        for the @p type parameter.
82203
82204        @param type a constant, one of following three possibilities:
82205        @li @link libsbml#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink
82206        @li @link libsbml#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink
82207        @li @link libsbml#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink
82208
82209        @see getParseLog()
82210
82211        """
82212        return _libsbml.L3ParserSettings_setParseLog(self, type)
82213
82214    def getParseLog(self):
82215        r"""
82216        getParseLog(L3ParserSettings self) -> ParseLogType_t
82217
82218        Indicates the current behavior set for handling the function @c log with
82219        one argument.
82220
82221        The function @c log with a single argument
82222        (&quot;<code>log(x)</code>&quot;) can be parsed as
82223        <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
82224        desired.  These three possible behaviors are indicated, respectively, by
82225        the values
82226        @link libsbml#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink,
82227        @link libsbml#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink, and
82228        @link libsbml#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink.
82229
82230        @return One of following three constants:
82231        @li @link libsbml#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink
82232        @li @link libsbml#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink
82233        @li @link libsbml#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink
82234
82235        @see setParseLog()
82236
82237        """
82238        return _libsbml.L3ParserSettings_getParseLog(self)
82239
82240    def setParseCollapseMinus(self, collapseminus):
82241        r"""
82242        setParseCollapseMinus(L3ParserSettings self, bool collapseminus)
82243
82244        Sets the behavior for handling unary minuses appearing in mathematical
82245        formulas.
82246
82247        @par
82248        This setting affects two behaviors.  First, pairs of multiple unary
82249        minuses in a row (e.g., &quot;<code>- -3</code>&quot;) can be collapsed
82250        and ignored in the input, or the multiple minuses can be preserved in the
82251        AST node tree that is generated by the parser.  Second, minus signs in
82252        front of numbers can be collapsed into the number node itself; for
82253        example, a &quot;<code>- 4.1</code>&quot; can be turned into a single
82254        ASTNode of type @link libsbml#AST_REAL AST_REAL@endlink with a value of
82255        <code>-4.1</code>, or it can be turned into a node of type
82256        @link libsbml#AST_MINUS AST_MINUS@endlink having a child node of type
82257        @link libsbml#AST_REAL AST_REAL@endlink.
82258
82259        This method lets you tell the parser which behavior to use---either
82260        collapse minuses or always preserve them.  The two possibilities are
82261        represented using the following constants:
82262
82263        <ul>
82264        <li> @link libsbml#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS@endlink (value = @c True): collapse
82265        unary minuses where possible.
82266        <li> @link libsbml#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink (value = @c False): do not
82267        collapse unary minuses, and instead translate each one into an AST node of
82268        type @link libsbml#AST_MINUS AST_MINUS@endlink.
82269        </ul>
82270
82271        @param collapseminus a boolean value (one of the constants
82272        @link libsbml#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS@endlink or
82273        @link libsbml#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink)
82274        indicating how unary minus signs in the input should be handled.
82275
82276        @see getParseCollapseMinus()
82277
82278        """
82279        return _libsbml.L3ParserSettings_setParseCollapseMinus(self, collapseminus)
82280
82281    def getParseCollapseMinus(self):
82282        r"""
82283        getParseCollapseMinus(L3ParserSettings self) -> bool
82284
82285        Indicates the current behavior set for handling multiple unary minuses
82286        in formulas.
82287
82288        @par
82289        This setting affects two behaviors.  First, pairs of multiple unary
82290        minuses in a row (e.g., &quot;<code>- -3</code>&quot;) can be collapsed
82291        and ignored in the input, or the multiple minuses can be preserved in the
82292        AST node tree that is generated by the parser.  Second, minus signs in
82293        front of numbers can be collapsed into the number node itself; for
82294        example, a &quot;<code>- 4.1</code>&quot; can be turned into a single
82295        ASTNode of type @link libsbml#AST_REAL AST_REAL@endlink with a value of
82296        <code>-4.1</code>, or it can be turned into a node of type
82297        @link libsbml#AST_MINUS AST_MINUS@endlink having a child node of type
82298        @link libsbml#AST_REAL AST_REAL@endlink.
82299
82300        @return A boolean indicating the behavior currently set.  The possible
82301        values are as follows:
82302        <ul>
82303        <li> @link libsbml#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS@endlink (value = @c True): collapse
82304        unary minuses where possible.
82305        <li> @link libsbml#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink (value = @c False): do not
82306        collapse unary minuses, and instead translate each one into an AST node of
82307        type @link libsbml#AST_MINUS AST_MINUS@endlink.
82308        </ul>
82309
82310        @see setParseCollapseMinus()
82311
82312        """
82313        return _libsbml.L3ParserSettings_getParseCollapseMinus(self)
82314
82315    def setParseUnits(self, units):
82316        r"""
82317        setParseUnits(L3ParserSettings self, bool units)
82318
82319        Sets the parser's behavior in handling units associated with numbers
82320        in a mathematical formula.
82321
82322        @par
82323        In SBML Level&nbsp;2, there is no means of associating a unit of
82324        measurement with a pure number in a formula, while SBML Level&nbsp;3 does
82325        define a syntax for this.  In Level&nbsp;3, MathML <code>&lt;cn&gt;</code>
82326        elements can have an attribute named @c units placed in the SBML
82327        namespace, which can be used to indicate the units to be associated with
82328        the number.  The text-string infix formula parser allows units to be
82329        placed after raw numbers; they are interpreted as unit identifiers for
82330        units defined by the SBML specification or in the containing Model object.
82331        Some examples include: &quot;<code>4 mL</code>&quot;, &quot;<code>2.01
82332        Hz</code>&quot;, &quot;<code>3.1e-6 M</code>&quot;, and &quot;<code>(5/8)
82333        inches</code>&quot;.  To produce a valid SBML model, there must either
82334        exist a UnitDefinition corresponding to the identifier of the unit, or the
82335        unit must be defined in Table&nbsp;2 of the SBML Level&nbsp;3 specification.
82336
82337        This method sets the formula parser's behavior with respect to units.
82338
82339        @param units a boolean indicating whether to parse units.  The
82340        possible values are as follows:
82341        <ul>
82342        <li> @link libsbml#L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink (value = @c True): parse units in the
82343        text-string formula.
82344        <li> @link libsbml#L3P_NO_UNITS L3P_NO_UNITS@endlink (value = @c False): treat units in the
82345        text-string formula as errors.
82346        </ul>
82347
82348        @see getParseUnits()
82349
82350        """
82351        return _libsbml.L3ParserSettings_setParseUnits(self, units)
82352
82353    def getParseUnits(self):
82354        r"""
82355        getParseUnits(L3ParserSettings self) -> bool
82356
82357        Indicates the current behavior set for handling units in text-string
82358        mathematical formulas.
82359
82360        @par
82361        In SBML Level&nbsp;2, there is no means of associating a unit of
82362        measurement with a pure number in a formula, while SBML Level&nbsp;3 does
82363        define a syntax for this.  In Level&nbsp;3, MathML <code>&lt;cn&gt;</code>
82364        elements can have an attribute named @c units placed in the SBML
82365        namespace, which can be used to indicate the units to be associated with
82366        the number.  The text-string infix formula parser allows units to be
82367        placed after raw numbers; they are interpreted as unit identifiers for
82368        units defined by the SBML specification or in the containing Model object.
82369        Some examples include: &quot;<code>4 mL</code>&quot;, &quot;<code>2.01
82370        Hz</code>&quot;, &quot;<code>3.1e-6 M</code>&quot;, and &quot;<code>(5/8)
82371        inches</code>&quot;.  To produce a valid SBML model, there must either
82372        exist a UnitDefinition corresponding to the identifier of the unit, or the
82373        unit must be defined in Table&nbsp;2 of the SBML Level&nbsp;3 specification.
82374
82375        Since SBML Level&nbsp;2 does not have the ability to associate units
82376        with pure numbers, the value should be expected to be @c False
82377        (@link libsbml#L3P_NO_UNITS L3P_NO_UNITS@endlink) when parsing text-string
82378        formulas intended for use in SBML Level&nbsp;2 documents.
82379
82380        @return A boolean indicating whether to parse units.  The
82381        possible values are as follows:
82382        <ul>
82383        <li> @link libsbml#L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink (value = @c True): parse units in the
82384        text-string formula.
82385        <li> @link libsbml#L3P_NO_UNITS L3P_NO_UNITS@endlink (value = @c False): treat units in the
82386        text-string formula as errors.
82387        </ul>
82388
82389        @see setParseUnits()
82390
82391        """
82392        return _libsbml.L3ParserSettings_getParseUnits(self)
82393
82394    def setParseAvogadroCsymbol(self, l2only):
82395        r"""
82396        setParseAvogadroCsymbol(L3ParserSettings self, bool l2only)
82397
82398        Sets the parser's behavior in handling the symbol @c avogadro in
82399        mathematical formulas.
82400
82401        @par
82402        SBML Level&nbsp;3 defines a symbol for representing the value of
82403        Avogadro's constant, but it is not defined in SBML Level&nbsp;2.  As a
82404        result, the text-string formula parser must behave differently
82405        depending on which SBML Level is being targeted.  For Level&nbsp;3
82406        documents, it can interpret instances of @c avogadro in the input
82407        as a reference to the MathML @em csymbol for Avogadro's constant
82408        defined in the SBML Level&nbsp;3 specification.  For Level&nbsp;2,
82409        it must treat @c avogadro as just another plain symbol.
82410
82411        This method allows callers to set the <code>avogadro</code>-handling
82412        behavior in this L3ParserSettings object.  The possible values of @p
82413        l2only are as follows:
82414
82415        <ul>
82416        <li> @link libsbml#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink (value = @c True): tells the
82417        parser to translate the string @c avogadro (in any capitalization) into an
82418        AST node of type @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink.
82419        <li> @link libsbml#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink (value = @c False): tells the
82420        parser to translate the string @c avogadro into an AST of type
82421        @link libsbml#AST_NAME AST_NAME@endlink.
82422        </ul>
82423
82424        Since SBML Level&nbsp;2 does not define a symbol for Avogadro's
82425        constant, the value should be set to
82426        @link libsbml#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink when parsing text-string formulas
82427        intended for use in SBML Level&nbsp;2 documents.
82428
82429        @param l2only a boolean value indicating how the string @c avogadro
82430        should be treated when encountered in a formula.  This will be one of
82431        the values @link libsbml#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink or
82432        @link libsbml#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink.
82433
82434        @see getParseAvogadroCsymbol()
82435
82436        """
82437        return _libsbml.L3ParserSettings_setParseAvogadroCsymbol(self, l2only)
82438
82439    def getParseAvogadroCsymbol(self):
82440        r"""
82441        getParseAvogadroCsymbol(L3ParserSettings self) -> bool
82442
82443        Indicates the current behavior set for handling @c avogadro for SBML
82444        Level&nbsp;3.
82445
82446        @par
82447        SBML Level&nbsp;3 defines a symbol for representing the value of
82448        Avogadro's constant, but it is not defined in SBML Level&nbsp;2.  As a
82449        result, the text-string formula parser must behave differently
82450        depending on which SBML Level is being targeted.  For Level&nbsp;3
82451        documents, it can interpret instances of @c avogadro in the input
82452        as a reference to the MathML @em csymbol for Avogadro's constant
82453        defined in the SBML Level&nbsp;3 specification.  For Level&nbsp;2,
82454        it must treat @c avogadro as just another plain symbol.
82455
82456        This method returns the current setting of the
82457        <code>avogadro</code>-handling behavior in this L3ParserSettings object.
82458        The possible values are as follows:
82459
82460        <ul>
82461        <li> @link libsbml#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink (value = @c True): tells the
82462        parser to translate the string @c avogadro (in any capitalization) into an
82463        AST node of type @link libsbml#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink.
82464        <li> @link libsbml#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink (value = @c False): tells the
82465        parser to translate the string @c avogadro into an AST of type
82466        @link libsbml#AST_NAME AST_NAME@endlink.
82467        </ul>
82468
82469        @return A boolean indicating which mode is currently set; one of
82470        @link libsbml#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink
82471        or
82472        @link libsbml#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink.
82473
82474        @see setParseAvogadroCsymbol()
82475
82476        """
82477        return _libsbml.L3ParserSettings_getParseAvogadroCsymbol(self)
82478
82479    def setComparisonCaseSensitivity(self, strcmp):
82480        r"""
82481        setComparisonCaseSensitivity(L3ParserSettings self, bool strcmp)
82482
82483        Sets the parser's behavior with respect to case sensitivity for
82484        recognizing predefined symbols.
82485
82486        @par
82487        By default (which is the value
82488        @link libsbml#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE@endlink), the parser
82489        compares symbols in a case @em insensitive manner for built-in functions
82490        such as @c 'sin' and @c 'piecewise', and for constants such as @c 'True'
82491        and @c 'avogadro'.  Setting this option to
82492        @link libsbml#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE@endlink causes the parser to
82493        become case sensitive.  In that mode, for example, the symbols @c 'sin'
82494        and @c 'True' will match the built-in values, but the symbols @c 'SIN',
82495        @c 'Sin', @c 'True', @c 'TRUE', and so on, will not.
82496
82497        @param strcmp a boolean indicating whether to be case sensitive (if
82498        @c True) or be case insensitive (if @c False).
82499
82500        @see getComparisonCaseSensitivity()
82501
82502        """
82503        return _libsbml.L3ParserSettings_setComparisonCaseSensitivity(self, strcmp)
82504
82505    def getComparisonCaseSensitivity(self):
82506        r"""
82507        getComparisonCaseSensitivity(L3ParserSettings self) -> bool
82508
82509        Returns @c True if the parser is configured to match built-in symbols
82510        in a case-insensitive way.
82511
82512        @par
82513        By default (which is the value
82514        @link libsbml#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE@endlink), the parser
82515        compares symbols in a case @em insensitive manner for built-in functions
82516        such as @c 'sin' and @c 'piecewise', and for constants such as @c 'True'
82517        and @c 'avogadro'.  Setting this option to
82518        @link libsbml#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE@endlink causes the parser to
82519        become case sensitive.  In that mode, for example, the symbols @c 'sin'
82520        and @c 'True' will match the built-in values, but the symbols @c 'SIN',
82521        @c 'Sin', @c 'True', @c 'TRUE', and so on, will not.
82522
82523        @return @c True if matches are done in a case-sensitive manner, and
82524        @c False if the parser will recognize built-in functions and
82525        constants regardless of case,.
82526
82527        @see setComparisonCaseSensitivity()
82528
82529        """
82530        return _libsbml.L3ParserSettings_getComparisonCaseSensitivity(self)
82531
82532    def setParseModuloL3v2(self, modulol3v2):
82533        r"""
82534        setParseModuloL3v2(L3ParserSettings self, bool modulol3v2)
82535
82536        Sets the behavior for handling the @% symbol in mathematical
82537        formulas.
82538
82539        @par
82540        This setting affects whether the @% symbol (modulo) is parsed as a
82541        piecewise equation that returns the modulo value of the entries on
82542        either side of the symbol, or whether it is parsed as the MathML
82543        'rem' function, which was allowed in SBML Level&nbsp;3 Version&nbsp;2,
82544        but not in previous level/versions.  The latter is more succinct, but
82545        might not be legal SBML for the desired target SBML document.
82546
82547        This method lets you tell the parser which behavior to use---either
82548        parse @% as the 'rem' function or as a piecewise function with the
82549        same interpretation.  The two possibilities are
82550        represented using the following constants:
82551
82552        <ul>
82553        <li> @link libsbml#L3P_MODULO_IS_REM L3P_MODULO_IS_REM@endlink (value = @c True): use the
82554        'rem' MathML function (@link libsbml#AST_FUNCTION_REM AST_FUNCTION_REM@endlink).
82555        <li> @link libsbml#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink (value = @c False): use
82556        a piecewise function (@link libsbml#AST_FUNCTION_PIECEWISE AST_FUNCTION_PIECEWISE@endlink)
82557        to encode the modulo rule explicitly.
82558        </ul>
82559
82560        @param modulol3v2 a boolean value (one of the constants
82561        @link libsbml#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink or
82562        @link libsbml#L3P_MODULO_IS_REM L3P_MODULO_IS_REM@endlink)
82563        indicating how the @% symbol in the input should be handled.
82564
82565        @see getParseModuloL3v2()
82566
82567        """
82568        return _libsbml.L3ParserSettings_setParseModuloL3v2(self, modulol3v2)
82569
82570    def getParseModuloL3v2(self):
82571        r"""
82572        getParseModuloL3v2(L3ParserSettings self) -> bool
82573
82574        Indicates the current behavior set for handling the @% symbol in
82575        mathematical formulas.
82576
82577        @par
82578        This setting affects whether the @% symbol (modulo) is parsed as a
82579        piecewise equation that returns the modulo value of the entries on
82580        either side of the symbol, or whether it is parsed as the MathML
82581        'rem' function, which was allowed in SBML Level&nbsp;3 Version&nbsp;2,
82582        but not in previous level/versions.  The latter is more succinct, but
82583        might not be legal SBML for the desired target SBML document.
82584
82585        @return A boolean indicating the behavior currently set.  The possible
82586        values are as follows:
82587        <ul>
82588        <li> @link libsbml#L3P_MODULO_IS_REM L3P_MODULO_IS_REM@endlink (value = @c True): use the
82589        'rem' MathML function (@link libsbml#AST_FUNCTION_REM AST_FUNCTION_REM@endlink).
82590        <li> @link libsbml#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink (value = @c False): use
82591        a piecewise function (@link libsbml#AST_FUNCTION_PIECEWISE AST_FUNCTION_PIECEWISE@endlink)
82592        to encode the modulo rule explicitly.
82593        </ul>
82594
82595        @see setParseModuloL3v2()
82596
82597        """
82598        return _libsbml.L3ParserSettings_getParseModuloL3v2(self)
82599
82600    def setParseL3v2Functions(self, l3v2functions):
82601        r"""
82602        setParseL3v2Functions(L3ParserSettings self, bool l3v2functions)
82603
82604        Sets the behavior for handling functions added in SBML L3v2
82605
82606        @par
82607        This setting affects whether the names of functions added in SBML
82608        Level&nbsp;3 Version&nbsp;2 are parsed as those added MathML functions,
82609        or whether they are added as generic functions with those names (to
82610        be used in SBML as function definitions).
82611
82612        This method lets you tell the parser which behavior to use---either
82613        to parse the functions added in L3v2 as their built-in counterparts,
82614        or as generic functions with that name (to be defined by SBML as
82615        function definitions).  The two possibilities are
82616        represented using the following constants:
82617
82618        <ul>
82619        <li> @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY@endlink (value = @c True):
82620        parse the strings <code>rateOf</code>, <code>implies</code>,
82621        <code>max</code>, <code>min</code>, <code>quotient</code>, and
82622        <code>rem</code> as
82623        @link libsbml#AST_FUNCTION_RATE_OF AST_FUNCTION_RATE_OF@endlink,
82624        @link libsbml#AST_LOGICAL_IMPLIES AST_LOGICAL_IMPLIES@endlink,
82625        @link libsbml#AST_FUNCTION_MAX AST_FUNCTION_MAX@endlink,
82626        @link libsbml#AST_FUNCTION_MIN AST_FUNCTION_MIN@endlink,
82627        @link libsbml#AST_FUNCTION_QUOTIENT AST_FUNCTION_QUOTIENT@endlink, and
82628        @link libsbml#AST_FUNCTION_REM AST_FUNCTION_REM@endlink, respectively.
82629        <li> @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC@endlink (value = @c False):
82630        parse the strings <code>rateOf</code>, <code>implies</code>,
82631        <code>max</code>, <code>min</code>, <code>quotient</code>, and
82632        <code>rem</code> all as
82633        @link libsbml#AST_FUNCTION AST_FUNCTION@endlink with the appropriate
82634        name set.
82635        </ul>
82636
82637        @param l3v2functions a boolean value (one of the constants
82638        @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY@endlink or
82639        @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC@endlink)
82640        indicating how to interpret those function names.
82641
82642        @see getParseL3v2Functions()
82643
82644        """
82645        return _libsbml.L3ParserSettings_setParseL3v2Functions(self, l3v2functions)
82646
82647    def getParseL3v2Functions(self):
82648        r"""
82649        getParseL3v2Functions(L3ParserSettings self) -> bool
82650
82651        Indicates the current behavior set for handling whether to
82652        parse the functions added in L3v2 as that MathML or not.
82653
82654        @par
82655        This setting affects whether the names of functions added in SBML
82656        Level&nbsp;3 Version&nbsp;2 are parsed as those added MathML functions,
82657        or whether they are added as generic functions with those names (to
82658        be used in SBML as function definitions).
82659
82660        @return A boolean indicating the behavior currently set.  The possible
82661        values are as follows:
82662        <ul>
82663        <li> @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY@endlink (value = @c True):
82664        parse the strings <code>rateOf</code>, <code>implies</code>,
82665        <code>max</code>, <code>min</code>, <code>quotient</code>, and
82666        <code>rem</code> as
82667        @link libsbml#AST_FUNCTION_RATE_OF AST_FUNCTION_RATE_OF@endlink,
82668        @link libsbml#AST_LOGICAL_IMPLIES AST_LOGICAL_IMPLIES@endlink,
82669        @link libsbml#AST_FUNCTION_MAX AST_FUNCTION_MAX@endlink,
82670        @link libsbml#AST_FUNCTION_MIN AST_FUNCTION_MIN@endlink,
82671        @link libsbml#AST_FUNCTION_QUOTIENT AST_FUNCTION_QUOTIENT@endlink, and
82672        @link libsbml#AST_FUNCTION_REM AST_FUNCTION_REM@endlink, respectively.
82673        <li> @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC@endlink (value = @c False):
82674        parse the strings <code>rateOf</code>, <code>implies</code>,
82675        <code>max</code>, <code>min</code>, <code>quotient</code>, and
82676        <code>rem</code> all as
82677        @link libsbml#AST_FUNCTION AST_FUNCTION@endlink with the appropriate
82678        name set.
82679        </ul>
82680
82681        @see setParseL3v2Functions()
82682
82683        """
82684        return _libsbml.L3ParserSettings_getParseL3v2Functions(self)
82685
82686    def setParsePackageMath(self, package, parsepackage):
82687        r"""
82688        setParsePackageMath(L3ParserSettings self, ExtendedMathType_t package, bool parsepackage)
82689
82690        Sets the behavior for handling functions added in SBML packages
82691
82692        @par
82693        This setting affects whether the math added in a given SBML
82694        Level&nbsp;3 package are parsed as those added MathML elements,
82695        or whether they are added as generic functions or variables
82696        with those names.
82697
82698        This method lets you tell the parser which behavior to use---either
82699        to parse the functions added in a given package as their built-in counterparts,
82700        or as generic functions with that name (to be defined by SBML as
82701        function definitions).  The two possibilities are
82702        represented using the following constants:
82703
82704        <ul>
82705        <li> @link libsbml#L3P_PARSE_PACKAGE_MATH_DIRECTLY L3P_PARSE_PACKAGE_MATH_DIRECTLY@endlink (value = @c True): parse any
82706        string defined in a given SBML L3 package as its corresponding ASTType_t.
82707        <li> @link libsbml#L3P_PARSE_PACKAGE_MATH_AS_GENERIC L3P_PARSE_PACKAGE_MATH_AS_GENERIC@endlink (value = @c False):
82708        parse any string that would have been defined in the given SBML L3 package
82709        as @link libsbml#AST_FUNCTION AST_FUNCTION@endlink or @link libsbml#AST_NAME AST_NAME@endlink
82710        with the appropriate name set.
82711        </ul>
82712
82713        @param package an ExtendedMathType_t indicating the extended math package
82714        to be queried.
82715        @param parsepackage a boolean value (one of the constants
82716        @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY@endlink or
82717        @link libsbml#L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC@endlink)
82718        indicating how to interpret those function names.
82719
82720        @see getParsePackageMath()
82721
82722        """
82723        return _libsbml.L3ParserSettings_setParsePackageMath(self, package, parsepackage)
82724
82725    def getParsePackageMath(self, package):
82726        r"""
82727        getParsePackageMath(L3ParserSettings self, ExtendedMathType_t package) -> bool
82728
82729        Indicates the current behavior set for handling whether to
82730        parse the functions added in the given package as that MathML or not.
82731
82732        @par
82733        This setting affects whether the math added in a given SBML
82734        Level&nbsp;3 package are parsed as those added MathML elements,
82735        or whether they are added as generic functions or variables
82736        with those names.
82737
82738        @param package an ExtendedMathType_t indicating the extended math package
82739        to be set.
82740
82741        @return A boolean indicating the behavior currently set.  The possible
82742        values are as follows:
82743        <ul>
82744        <li> @link libsbml#L3P_PARSE_PACKAGE_MATH_DIRECTLY L3P_PARSE_PACKAGE_MATH_DIRECTLY@endlink (value = @c True): parse any
82745        string defined in a given SBML L3 package as its corresponding ASTType_t.
82746        <li> @link libsbml#L3P_PARSE_PACKAGE_MATH_AS_GENERIC L3P_PARSE_PACKAGE_MATH_AS_GENERIC@endlink (value = @c False):
82747        parse any string that would have been defined in the given SBML L3 package
82748        as @link libsbml#AST_FUNCTION AST_FUNCTION@endlink or @link libsbml#AST_NAME AST_NAME@endlink
82749        with the appropriate name set.
82750        </ul>
82751
82752        @see setParsePackageMath()
82753
82754        """
82755        return _libsbml.L3ParserSettings_getParsePackageMath(self, package)
82756
82757    def visitPackageInfixSyntax(self, parent, node, sb):
82758        r"""
82759        visitPackageInfixSyntax(L3ParserSettings self, ASTNode parent, ASTNode node, StringBuffer_t * sb)
82760
82761        @internal
82762
82763        @internal
82764
82765        """
82766        return _libsbml.L3ParserSettings_visitPackageInfixSyntax(self, parent, node, sb)
82767
82768# Register L3ParserSettings in _libsbml:
82769_libsbml.L3ParserSettings_swigregister(L3ParserSettings)
82770
82771class DefinitionURLRegistry(object):
82772    r"""
82773
82774    @sbmlpackage{core}
82775
82776    @htmlinclude pkg-marker-core.html Registry of all libSBML SBML DefinitionURLs.
82777
82778    @htmlinclude libsbml-facility-only-warning.html
82779
82780    LibSBML provides facilities for transforming and converting SBML
82781    documents in various ways.  These transformations can involve
82782    essentially anything that can be written algorithmically; examples
82783    include converting the units of measurement in a model, or converting
82784    from one Level+Version combination of SBML to another.  DefinitionURLs are
82785    implemented as objects derived from the class DefinitionURL.
82786
82787    The DefinitionURL registry, implemented as a singleton object of class
82788    DefinitionURLRegistry, maintains a list of known DefinitionURLs and provides
82789    methods for discovering them.  Callers can use the method
82790    DefinitionURLRegistry.getNumDefinitionURLs() to find out how many
82791    DefinitionURLs are registered, then use
82792    DefinitionURLRegistry.getDefinitionURLByIndex() to
82793    iterate over each one; alternatively, callers can use
82794    DefinitionURLRegistry.getDefinitionURLFor()
82795    to search for a DefinitionURL having specific properties.
82796
82797    """
82798
82799    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
82800
82801    def __init__(self, *args, **kwargs):
82802        raise AttributeError("No constructor defined")
82803    __repr__ = _swig_repr
82804
82805    @staticmethod
82806    def getInstance():
82807        r"""
82808        getInstance() -> DefinitionURLRegistry
82809
82810        Returns the singleton instance for the DefinitionURL registry.
82811
82812        Prior to using the registry, callers have to obtain a copy of the
82813        registry.  This static method provides the means for doing that.
82814
82815        @return the singleton for the DefinitionURL registry.
82816
82817        """
82818        return _libsbml.DefinitionURLRegistry_getInstance()
82819
82820    @staticmethod
82821    def addDefinitionURL(url, type):
82822        r"""
82823        addDefinitionURL(string url, int type) -> int
82824
82825        Adds the given DefinitionURL to the registry of SBML DefinitionURLs.
82826
82827        @param url the DefinitionURL to add to the registry.
82828        @param type the ASTNodeType_t of the URL to add to the registry.
82829
82830        @return integer value indicating success/failure of the
82831        function.  @if clike The value is drawn from the
82832        enumeration #OperationReturnValues_t. @endif@~ The possible values
82833        returned by this function are:
82834        @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
82835        @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
82836
82837        """
82838        return _libsbml.DefinitionURLRegistry_addDefinitionURL(url, type)
82839
82840    @staticmethod
82841    def getNumDefinitionURLs():
82842        r"""
82843        getNumDefinitionURLs() -> int
82844
82845        Returns the number of DefinitionURLs known by the registry.
82846
82847        @return the number of registered DefinitionURLs.
82848
82849        @see getDefinitionURLByIndex()
82850
82851        """
82852        return _libsbml.DefinitionURLRegistry_getNumDefinitionURLs()
82853
82854    @staticmethod
82855    def addSBMLDefinitions():
82856        r"""
82857        addSBMLDefinitions()
82858
82859
82860
82861        """
82862        return _libsbml.DefinitionURLRegistry_addSBMLDefinitions()
82863
82864    @staticmethod
82865    def getCoreDefinitionsAdded():
82866        r"""
82867        getCoreDefinitionsAdded() -> bool
82868
82869
82870
82871        """
82872        return _libsbml.DefinitionURLRegistry_getCoreDefinitionsAdded()
82873
82874    @staticmethod
82875    def getType(url):
82876        r"""
82877        getType(string url) -> int
82878
82879
82880
82881        """
82882        return _libsbml.DefinitionURLRegistry_getType(url)
82883
82884    @staticmethod
82885    def getDefinitionUrlByIndex(index):
82886        r"""
82887        getDefinitionUrlByIndex(int index) -> string
82888
82889
82890
82891        """
82892        return _libsbml.DefinitionURLRegistry_getDefinitionUrlByIndex(index)
82893
82894    @staticmethod
82895    def clearDefinitions():
82896        r"""
82897        clearDefinitions()
82898
82899
82900
82901        """
82902        return _libsbml.DefinitionURLRegistry_clearDefinitions()
82903    __swig_destroy__ = _libsbml.delete_DefinitionURLRegistry
82904
82905# Register DefinitionURLRegistry in _libsbml:
82906_libsbml.DefinitionURLRegistry_swigregister(DefinitionURLRegistry)
82907
82908def DefinitionURLRegistry_getInstance():
82909    r"""
82910    DefinitionURLRegistry_getInstance() -> DefinitionURLRegistry
82911
82912    Returns the singleton instance for the DefinitionURL registry.
82913
82914    Prior to using the registry, callers have to obtain a copy of the
82915    registry.  This static method provides the means for doing that.
82916
82917    @return the singleton for the DefinitionURL registry.
82918
82919    """
82920    return _libsbml.DefinitionURLRegistry_getInstance()
82921
82922def DefinitionURLRegistry_addDefinitionURL(url, type):
82923    r"""
82924    DefinitionURLRegistry_addDefinitionURL(string url, int type) -> int
82925
82926    Adds the given DefinitionURL to the registry of SBML DefinitionURLs.
82927
82928    @param url the DefinitionURL to add to the registry.
82929    @param type the ASTNodeType_t of the URL to add to the registry.
82930
82931    @return integer value indicating success/failure of the
82932    function.  @if clike The value is drawn from the
82933    enumeration #OperationReturnValues_t. @endif@~ The possible values
82934    returned by this function are:
82935    @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
82936    @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
82937
82938    """
82939    return _libsbml.DefinitionURLRegistry_addDefinitionURL(url, type)
82940
82941def DefinitionURLRegistry_getNumDefinitionURLs():
82942    r"""
82943    DefinitionURLRegistry_getNumDefinitionURLs() -> int
82944
82945    Returns the number of DefinitionURLs known by the registry.
82946
82947    @return the number of registered DefinitionURLs.
82948
82949    @see getDefinitionURLByIndex()
82950
82951    """
82952    return _libsbml.DefinitionURLRegistry_getNumDefinitionURLs()
82953
82954def DefinitionURLRegistry_addSBMLDefinitions():
82955    r"""
82956    DefinitionURLRegistry_addSBMLDefinitions()
82957
82958
82959
82960    """
82961    return _libsbml.DefinitionURLRegistry_addSBMLDefinitions()
82962
82963def DefinitionURLRegistry_getCoreDefinitionsAdded():
82964    r"""
82965    DefinitionURLRegistry_getCoreDefinitionsAdded() -> bool
82966
82967
82968
82969    """
82970    return _libsbml.DefinitionURLRegistry_getCoreDefinitionsAdded()
82971
82972def DefinitionURLRegistry_getType(url):
82973    r"""
82974    DefinitionURLRegistry_getType(string url) -> int
82975
82976
82977
82978    """
82979    return _libsbml.DefinitionURLRegistry_getType(url)
82980
82981def DefinitionURLRegistry_getDefinitionUrlByIndex(index):
82982    r"""
82983    DefinitionURLRegistry_getDefinitionUrlByIndex(int index) -> string
82984
82985
82986
82987    """
82988    return _libsbml.DefinitionURLRegistry_getDefinitionUrlByIndex(index)
82989
82990def DefinitionURLRegistry_clearDefinitions():
82991    r"""
82992    DefinitionURLRegistry_clearDefinitions()
82993
82994
82995
82996    """
82997    return _libsbml.DefinitionURLRegistry_clearDefinitions()
82998
82999class MathFilter(ElementFilter):
83000    r"""
83001
83002    @sbmlpackage{core}
83003
83004    @htmlinclude pkg-marker-core.html
83005    @internal
83006
83007    """
83008
83009    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
83010    __repr__ = _swig_repr
83011
83012    def __init__(self):
83013        r"""
83014        __init__(MathFilter self) -> MathFilter
83015
83016        @sbmlpackage{core}
83017
83018        @htmlinclude pkg-marker-core.html
83019        @internal
83020
83021        """
83022        if self.__class__ == MathFilter:
83023            _self = None
83024        else:
83025            _self = self
83026        _libsbml.MathFilter_swiginit(self, _libsbml.new_MathFilter(_self, ))
83027    __swig_destroy__ = _libsbml.delete_MathFilter
83028
83029    def filter(self, element):
83030        r"""
83031        filter(MathFilter self, SBase element) -> bool
83032
83033        Predicate to test elements.
83034
83035        This is the central predicate of the ElementFilter class.  In subclasses
83036        of ElementFilter, callers should implement this method such that it
83037        returns @c True for @p element arguments that are 'desirable' and
83038        @c False for those that are 'undesirable' in whatever filtering context the
83039        ElementFilter subclass is designed to be used.
83040
83041        @param element the element to be tested.
83042
83043        @return @c True if the @p element is desirable or should be kept,
83044        @c False otherwise.
83045
83046        """
83047        return _libsbml.MathFilter_filter(self, element)
83048    def __disown__(self):
83049        self.this.disown()
83050        _libsbml.disown_MathFilter(self)
83051        return weakref.proxy(self)
83052
83053# Register MathFilter in _libsbml:
83054_libsbml.MathFilter_swigregister(MathFilter)
83055
83056class ASTNodeValues_t(object):
83057    r"""Proxy of C++ ASTNodeValues_t class."""
83058
83059    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
83060    __repr__ = _swig_repr
83061    name = property(_libsbml.ASTNodeValues_t_name_get, _libsbml.ASTNodeValues_t_name_set, doc=r"""name : std::string""")
83062    type = property(_libsbml.ASTNodeValues_t_type_get, _libsbml.ASTNodeValues_t_type_set, doc=r"""type : ASTNodeType_t""")
83063    isFunction = property(_libsbml.ASTNodeValues_t_isFunction_get, _libsbml.ASTNodeValues_t_isFunction_set, doc=r"""isFunction : bool""")
83064    csymbolURL = property(_libsbml.ASTNodeValues_t_csymbolURL_get, _libsbml.ASTNodeValues_t_csymbolURL_set, doc=r"""csymbolURL : std::string""")
83065    allowedChildrenType = property(_libsbml.ASTNodeValues_t_allowedChildrenType_get, _libsbml.ASTNodeValues_t_allowedChildrenType_set, doc=r"""allowedChildrenType : AllowedChildrenType_t""")
83066    numAllowedChildren = property(_libsbml.ASTNodeValues_t_numAllowedChildren_get, _libsbml.ASTNodeValues_t_numAllowedChildren_set, doc=r"""numAllowedChildren : std::vector<(unsigned int)>""")
83067
83068    def __init__(self):
83069        r"""__init__(ASTNodeValues_t self) -> ASTNodeValues_t"""
83070        _libsbml.ASTNodeValues_t_swiginit(self, _libsbml.new_ASTNodeValues_t())
83071    __swig_destroy__ = _libsbml.delete_ASTNodeValues_t
83072
83073# Register ASTNodeValues_t in _libsbml:
83074_libsbml.ASTNodeValues_t_swigregister(ASTNodeValues_t)
83075
83076class ASTBasePlugin(object):
83077    r"""
83078
83079    @sbmlpackage{core}
83080
83081    @htmlinclude pkg-marker-core.html Base class for extensions that plug into AST classes.
83082
83083    @htmlinclude not-sbml-warning.html
83084    @internal
83085
83086    """
83087
83088    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
83089
83090    def __init__(self, *args, **kwargs):
83091        raise AttributeError("No constructor defined")
83092    __repr__ = _swig_repr
83093
83094    def getStringFor(self, type):
83095        r"""getStringFor(ASTBasePlugin self, ASTNodeType_t type) -> string"""
83096        return _libsbml.ASTBasePlugin_getStringFor(self, type)
83097
83098    def getConstCharFor(self, type):
83099        r"""getConstCharFor(ASTBasePlugin self, ASTNodeType_t type) -> char const *"""
83100        return _libsbml.ASTBasePlugin_getConstCharFor(self, type)
83101
83102    def getConstCharCsymbolURLFor(self, type):
83103        r"""getConstCharCsymbolURLFor(ASTBasePlugin self, ASTNodeType_t type) -> char const *"""
83104        return _libsbml.ASTBasePlugin_getConstCharCsymbolURLFor(self, type)
83105
83106    def getASTNodeTypeFor(self, symbol):
83107        r"""getASTNodeTypeFor(ASTBasePlugin self, string symbol) -> ASTNodeType_t"""
83108        return _libsbml.ASTBasePlugin_getASTNodeTypeFor(self, symbol)
83109
83110    def getASTNodeTypeForCSymbolURL(self, url):
83111        r"""getASTNodeTypeForCSymbolURL(ASTBasePlugin self, string url) -> ASTNodeType_t"""
83112        return _libsbml.ASTBasePlugin_getASTNodeTypeForCSymbolURL(self, url)
83113
83114    def hasCorrectNamespace(self, namespaces):
83115        r"""hasCorrectNamespace(ASTBasePlugin self, SBMLNamespaces namespaces) -> bool"""
83116        return _libsbml.ASTBasePlugin_hasCorrectNamespace(self, namespaces)
83117
83118    def defines(self, *args):
83119        r"""
83120        defines(ASTBasePlugin self, ASTNodeType_t type) -> bool
83121        defines(ASTBasePlugin self, string name, bool strCmpIsCaseSensitive=False) -> bool
83122        """
83123        return _libsbml.ASTBasePlugin_defines(self, *args)
83124
83125    def isFunction(self, type):
83126        r"""isFunction(ASTBasePlugin self, ASTNodeType_t type) -> bool"""
83127        return _libsbml.ASTBasePlugin_isFunction(self, type)
83128
83129    def getNumAllowedChildren(self, type):
83130        r"""getNumAllowedChildren(ASTBasePlugin self, ASTNodeType_t type) -> std::vector< unsigned int >"""
83131        return _libsbml.ASTBasePlugin_getNumAllowedChildren(self, type)
83132
83133    def isLogical(self, type):
83134        r"""isLogical(ASTBasePlugin self, ASTNodeType_t type) -> bool"""
83135        return _libsbml.ASTBasePlugin_isLogical(self, type)
83136
83137    def isMathMLNodeTag(self, *args):
83138        r"""
83139        isMathMLNodeTag(ASTBasePlugin self, string node) -> bool
83140        isMathMLNodeTag(ASTBasePlugin self, ASTNodeType_t type) -> bool
83141        """
83142        return _libsbml.ASTBasePlugin_isMathMLNodeTag(self, *args)
83143
83144    def getExtendedMathType(self):
83145        r"""getExtendedMathType(ASTBasePlugin self) -> ExtendedMathType_t"""
83146        return _libsbml.ASTBasePlugin_getExtendedMathType(self)
83147
83148    def evaluateASTNode(self, node, m=None):
83149        r"""evaluateASTNode(ASTBasePlugin self, ASTNode node, Model m=None) -> double"""
83150        return _libsbml.ASTBasePlugin_evaluateASTNode(self, node, m)
83151
83152    def getUnitDefinitionFromPackage(self, uff, node, inKL, reactNo):
83153        r"""getUnitDefinitionFromPackage(ASTBasePlugin self, UnitFormulaFormatter * uff, ASTNode node, bool inKL, int reactNo) -> UnitDefinition"""
83154        return _libsbml.ASTBasePlugin_getUnitDefinitionFromPackage(self, uff, node, inKL, reactNo)
83155
83156    def getASTNodeValue(self, n):
83157        r"""getASTNodeValue(ASTBasePlugin self, unsigned int n) -> ASTNodeValues_t"""
83158        return _libsbml.ASTBasePlugin_getASTNodeValue(self, n)
83159
83160    def allowedInFunctionDefinition(self, type):
83161        r"""
83162        allowedInFunctionDefinition(ASTBasePlugin self, ASTNodeType_t type) -> int
83163
83164        @internal
83165
83166        @internal
83167
83168        """
83169        return _libsbml.ASTBasePlugin_allowedInFunctionDefinition(self, type)
83170    __swig_destroy__ = _libsbml.delete_ASTBasePlugin
83171
83172    def clone(self):
83173        r"""
83174        clone(ASTBasePlugin self) -> ASTBasePlugin
83175
83176        @internal
83177
83178        @internal
83179
83180        """
83181        return _libsbml.ASTBasePlugin_clone(self)
83182
83183    def getElementNamespace(self):
83184        r"""
83185        getElementNamespace(ASTBasePlugin self) -> string
83186
83187        @internal
83188
83189        @internal
83190
83191        """
83192        return _libsbml.ASTBasePlugin_getElementNamespace(self)
83193
83194    def getPrefix(self):
83195        r"""
83196        getPrefix(ASTBasePlugin self) -> string
83197
83198        @internal
83199
83200        @internal
83201
83202        """
83203        return _libsbml.ASTBasePlugin_getPrefix(self)
83204
83205    def getPackageName(self):
83206        r"""
83207        getPackageName(ASTBasePlugin self) -> string
83208
83209        @internal
83210
83211        @internal
83212
83213        """
83214        return _libsbml.ASTBasePlugin_getPackageName(self)
83215
83216    def setSBMLExtension(self, ext):
83217        r"""
83218        setSBMLExtension(ASTBasePlugin self, SBMLExtension ext) -> int
83219
83220        @internal
83221
83222        @internal
83223
83224        """
83225        return _libsbml.ASTBasePlugin_setSBMLExtension(self, ext)
83226
83227    def setPrefix(self, prefix):
83228        r"""
83229        setPrefix(ASTBasePlugin self, string prefix) -> int
83230
83231        @internal
83232
83233        @internal
83234
83235        """
83236        return _libsbml.ASTBasePlugin_setPrefix(self, prefix)
83237
83238    def connectToParent(self, astbase):
83239        r"""
83240        connectToParent(ASTBasePlugin self, ASTNode astbase)
83241
83242        @internal
83243
83244        @internal
83245
83246        """
83247        return _libsbml.ASTBasePlugin_connectToParent(self, astbase)
83248
83249    def enablePackageInternal(self, pkgURI, pkgPrefix, flag):
83250        r"""
83251        enablePackageInternal(ASTBasePlugin self, string pkgURI, string pkgPrefix, bool flag)
83252
83253        @internal
83254
83255        @internal
83256
83257        """
83258        return _libsbml.ASTBasePlugin_enablePackageInternal(self, pkgURI, pkgPrefix, flag)
83259
83260    def stripPackage(self, pkgPrefix, flag):
83261        r"""
83262        stripPackage(ASTBasePlugin self, string pkgPrefix, bool flag) -> bool
83263
83264        @internal
83265
83266        @internal
83267
83268        """
83269        return _libsbml.ASTBasePlugin_stripPackage(self, pkgPrefix, flag)
83270
83271    def getURI(self):
83272        r"""
83273        getURI(ASTBasePlugin self) -> string
83274
83275        @internal
83276
83277        @internal
83278
83279        """
83280        return _libsbml.ASTBasePlugin_getURI(self)
83281
83282    def getParentASTObject(self, *args):
83283        r"""
83284        getParentASTObject(ASTBasePlugin self) -> ASTNode
83285        getParentASTObject(ASTBasePlugin self) -> ASTNode
83286
83287        @internal
83288
83289        @internal
83290
83291        """
83292        return _libsbml.ASTBasePlugin_getParentASTObject(self, *args)
83293
83294    def setElementNamespace(self, uri):
83295        r"""
83296        setElementNamespace(ASTBasePlugin self, string uri) -> int
83297
83298        @internal
83299
83300        @internal
83301
83302        """
83303        return _libsbml.ASTBasePlugin_setElementNamespace(self, uri)
83304
83305    def getLevel(self):
83306        r"""
83307        getLevel(ASTBasePlugin self) -> unsigned int
83308
83309        @internal
83310
83311        @internal
83312
83313        """
83314        return _libsbml.ASTBasePlugin_getLevel(self)
83315
83316    def getVersion(self):
83317        r"""
83318        getVersion(ASTBasePlugin self) -> unsigned int
83319
83320        @internal
83321
83322        @internal
83323
83324        """
83325        return _libsbml.ASTBasePlugin_getVersion(self)
83326
83327    def getPackageVersion(self):
83328        r"""
83329        getPackageVersion(ASTBasePlugin self) -> unsigned int
83330
83331        @internal
83332
83333        @internal
83334
83335        """
83336        return _libsbml.ASTBasePlugin_getPackageVersion(self)
83337
83338    def getSBMLNamespaces(self):
83339        r"""
83340        getSBMLNamespaces(ASTBasePlugin self) -> SBMLNamespaces
83341
83342        @internal
83343
83344        @internal
83345
83346        """
83347        return _libsbml.ASTBasePlugin_getSBMLNamespaces(self)
83348
83349    def renameSIdRefs(self, oldid, newid):
83350        r"""
83351        renameSIdRefs(ASTBasePlugin self, string oldid, string newid)
83352
83353        @internal
83354
83355        @internal
83356
83357        """
83358        return _libsbml.ASTBasePlugin_renameSIdRefs(self, oldid, newid)
83359
83360    def renameUnitSIdRefs(self, oldid, newid):
83361        r"""
83362        renameUnitSIdRefs(ASTBasePlugin self, string oldid, string newid)
83363
83364        @internal
83365
83366        @internal
83367
83368        """
83369        return _libsbml.ASTBasePlugin_renameUnitSIdRefs(self, oldid, newid)
83370
83371    def replaceIDWithFunction(self, id, function):
83372        r"""
83373        replaceIDWithFunction(ASTBasePlugin self, string id, ASTNode function)
83374
83375        @internal
83376
83377        @internal
83378
83379        """
83380        return _libsbml.ASTBasePlugin_replaceIDWithFunction(self, id, function)
83381
83382    def checkNumArguments(self, function, error):
83383        r"""
83384        checkNumArguments(ASTBasePlugin self, ASTNode function, std::stringstream & error) -> int
83385
83386        @internal
83387
83388        @internal
83389
83390        """
83391        return _libsbml.ASTBasePlugin_checkNumArguments(self, function, error)
83392
83393    def getL3PackageInfixPrecedence(self):
83394        r"""
83395        getL3PackageInfixPrecedence(ASTBasePlugin self) -> int
83396
83397        @internal
83398
83399        @internal
83400
83401        """
83402        return _libsbml.ASTBasePlugin_getL3PackageInfixPrecedence(self)
83403
83404    def hasCorrectNumArguments(self, function):
83405        r"""
83406        hasCorrectNumArguments(ASTBasePlugin self, ASTNode function) -> bool
83407
83408        @internal
83409
83410        @internal
83411
83412        """
83413        return _libsbml.ASTBasePlugin_hasCorrectNumArguments(self, function)
83414
83415    def hasPackageOnlyInfixSyntax(self):
83416        r"""
83417        hasPackageOnlyInfixSyntax(ASTBasePlugin self) -> bool
83418
83419        @internal
83420
83421        @internal
83422
83423        """
83424        return _libsbml.ASTBasePlugin_hasPackageOnlyInfixSyntax(self)
83425
83426    def hasUnambiguousPackageInfixGrammar(self, child):
83427        r"""
83428        hasUnambiguousPackageInfixGrammar(ASTBasePlugin self, ASTNode child) -> bool
83429
83430        @internal
83431
83432        @internal
83433
83434        """
83435        return _libsbml.ASTBasePlugin_hasUnambiguousPackageInfixGrammar(self, child)
83436
83437    def isPackageInfixFunction(self):
83438        r"""
83439        isPackageInfixFunction(ASTBasePlugin self) -> bool
83440
83441        @internal
83442
83443        @internal
83444
83445        """
83446        return _libsbml.ASTBasePlugin_isPackageInfixFunction(self)
83447
83448# Register ASTBasePlugin in _libsbml:
83449_libsbml.ASTBasePlugin_swigregister(ASTBasePlugin)
83450
83451
83452
83453