001    /* ----------------------------------------------------------------------------
002     * This file was automatically generated by SWIG (http://www.swig.org).
003     * Version 2.0.9
004     *
005     * Do not make changes to this file unless you know what you are doing--modify
006     * the SWIG interface file instead.
007     * ----------------------------------------------------------------------------- */
008    
009    package org.sbml.libsbml;
010    
011    /** 
012     * 
013     * Implementation of SBML's Model construct.
014     * <p>
015     * In an SBML model definition, a single object of class {@link Model} serves as
016     * the overall container for the lists of the various model components.
017     * All of the lists are optional, but if a given list container is present
018     * within the model, the list must not be empty; that is, it must have
019     * length one or more.  The following are the components and lists
020     * permitted in different Levels and Versions of SBML in
021     * version 5.8.0
022     * of libSBML:
023     * <ul>
024     * <li> In SBML Level 1, the components are: {@link UnitDefinition}, {@link Compartment},
025     * {@link Species}, {@link Parameter}, {@link Rule}, and {@link Reaction}.  Instances of the classes are
026     * placed inside instances of classes {@link ListOfUnitDefinitions},
027     * {@link ListOfCompartments}, {@link ListOfSpecies}, {@link ListOfParameters}, {@link ListOfRules}, and
028     * {@link ListOfReactions}.
029     * <p>
030     * <li> In SBML Level 2 Version 1, the components are: {@link FunctionDefinition},
031     * {@link UnitDefinition}, {@link Compartment}, {@link Species}, {@link Parameter}, {@link Rule}, {@link Reaction} and
032     * {@link Event}.  Instances of the classes are placed inside instances of classes
033     * {@link ListOfFunctionDefinitions}, {@link ListOfUnitDefinitions}, {@link ListOfCompartments},
034     * {@link ListOfSpecies}, {@link ListOfParameters}, {@link ListOfRules}, {@link ListOfReactions}, and
035     * {@link ListOfEvents}.
036     * <p>
037     * <li> In SBML Level 2 Versions 2, 3 and 4, the components are:
038     * {@link FunctionDefinition}, {@link UnitDefinition}, {@link CompartmentType}, {@link SpeciesType},
039     * {@link Compartment}, {@link Species}, {@link Parameter}, {@link InitialAssignment}, {@link Rule}, {@link Constraint},
040     * {@link Reaction} and {@link Event}.  Instances of the classes are placed inside
041     * instances of classes {@link ListOfFunctionDefinitions}, {@link ListOfUnitDefinitions},
042     * {@link ListOfCompartmentTypes}, {@link ListOfSpeciesTypes}, {@link ListOfCompartments},
043     * {@link ListOfSpecies}, {@link ListOfParameters}, {@link ListOfInitialAssignments}, {@link ListOfRules},
044     * {@link ListOfConstraints}, {@link ListOfReactions}, and {@link ListOfEvents}.
045     * <p>
046     * <li> In SBML Level 3 Version 1, the components are: {@link FunctionDefinition},
047     * {@link UnitDefinition}, {@link Compartment}, {@link Species}, {@link Parameter}, {@link InitialAssignment},
048     * {@link Rule}, {@link Constraint}, {@link Reaction} and {@link Event}.  Instances of the classes are
049     * placed inside instances of classes {@link ListOfFunctionDefinitions},
050     * {@link ListOfUnitDefinitions}, {@link ListOfCompartments}, {@link ListOfSpecies},
051     * {@link ListOfParameters}, {@link ListOfInitialAssignments}, {@link ListOfRules},
052     * {@link ListOfConstraints}, {@link ListOfReactions}, and {@link ListOfEvents}.  
053     * </ul>
054     * <p>
055     * Although all the lists are optional, there are dependencies between SBML
056     * components such that defining some components requires defining others.
057     * An example is that defining a species requires defining a compartment,
058     * and defining a reaction requires defining a species.  The dependencies
059     * are explained in more detail in the SBML specifications.
060     * <p>
061     * In addition to the above lists and attributes, the {@link Model} class in both
062     * SBML Level&nbsp;2 and Level&nbsp;3 has the usual two attributes of 'id'
063     * and 'name', and both are optional.  As is the case for other SBML
064     * components with 'id' and 'name' attributes, they must be used according
065     * to the guidelines described in the SBML specifications.  (Within the
066     * frameworks of SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1 Core, a
067     * {@link Model} object identifier has no assigned meaning, but extension packages
068     * planned for SBML Level&nbsp;3 are likely to make use of this
069     * identifier.)
070     * <p>
071     * Finally, SBML Level&nbsp;3 has introduced a number of additional {@link Model}
072     * attributes.  They are discussed in a separate section below.
073     * <p>
074     * <p>
075     * <h2>Approaches to creating objects using the libSBML API</h2>
076     * <p>
077     * LibSBML provides two main mechanisms for creating objects: class
078     * constructors
079     * (e.g., <a href='org/sbml/{@link libsbml}/Species.html'>Species()</a> ), 
080     * and <code>create<span class='placeholder'><em>Object</em></span>()</code>
081     * methods (such as {@link Model#createSpecies()}) provided by certain <span
082     * class='placeholder'><em>Object</em></span> classes such as {@link Model}.  These
083     * multiple mechanisms are provided by libSBML for flexibility and to
084     * support different use-cases, but they also have different implications
085     * for the overall model structure.
086     * <p>
087     * In general, the recommended approach is to use the <code>create<span
088     * class='placeholder'><em>Object</em></span>()</code> methods.  These
089     * methods both create an object <em>and</em> link it to the parent in one step.
090     * Here is an example:<div class='fragment'><pre>
091    // Create an {@link SBMLDocument} object in Level 3 Version 1 format:
092    
093    {@link SBMLDocument} sbmlDoc = new {@link SBMLDocument}(3, 1);
094    
095    // Create a {@link Model} object inside the {@link SBMLDocument} object and set
096    // its identifier.  The call returns a pointer to the {@link Model} object
097    // created, and methods called on that object affect the attributes
098    // of the object attached to the model (as expected).  Note that
099    // the call to setId() returns a status code, and a real program
100    // should check this status code to make sure everything went okay.
101    
102    {@link Model} model = sbmlDoc.createModel();
103    model.setId(&#34;BestModelEver&#34;);
104    
105    // Create a {@link Species} object inside the {@link Model} and set its identifier.
106    // Similar to the lines above, this call returns a pointer to the {@link Species}
107    // object created, and methods called on that object affect the attributes
108    // of the object attached to the model (as expected).  Note that, like
109    // with {@link Model}, the call to setId() returns a status code, and a real program
110    // should check this status code to make sure everything went okay.
111    
112    {@link Species} sp = model.createSpecies();
113    sp.setId(&#34;BestSpeciesEver&#34;);
114    </pre></div>
115     * <p>
116     * <p>
117     * The <code>create<span
118     * class='placeholder'><em>Object</em></span>()</code> methods return a
119     * pointer to the object created, but they also add the object to the
120     * relevant list of object instances contained in the parent.  (These lists
121     * become the <code>&lt;listOf<span
122     * class='placeholder'><em>Object</em></span>s&gt;</code> elements in the
123     * finished XML rendition of SBML.)  In the example above,
124     * {@link Model#createSpecies()} adds the created species directly to the
125     * <code>&lt;listOfSpecies<i></i>&gt;</code> list in the model.  Subsequently,
126     * methods called on the species change the species in the model (which is
127     * what is expected in most situations).
128     * <p>
129     * <h2>Consistency and adherence to SBML specifications</h2>
130     * <p>
131     * To make it easier for applications to do whatever they need,
132     * libSBML version 5.8.0
133     * is relatively lax when it comes to enforcing correctness and
134     * completeness of models <em>during</em> model construction and editing.
135     * Essentially, libSBML <em>will</em> <em>not</em> in most cases check automatically
136     * that a model's components have valid attribute values, or that the
137     * overall model is consistent and free of errors&mdash;even obvious errors
138     * such as duplication of identifiers.  This allows applications great
139     * leeway in how they build their models, but it means that software
140     * authors must take deliberate steps to ensure that the model will be, in
141     * the end, valid SBML.  These steps include such things as keeping track
142     * of the identifiers used in a model, manually performing updates in
143     * certain situations where an entity is referenced in more than one place
144     * (e.g., a species that is referenced by multiple {@link SpeciesReference}
145     * objects), and so on.
146     * <p>
147     * That said, libSBML does provide powerful features for deliberately
148     * performing validation of SBML when an application decides it is time to
149     * do so.  The interfaces to these facilities are on the {@link SBMLDocument}
150     * class, in the form of {@link SBMLDocument#checkInternalConsistency()} and
151     * {@link SBMLDocument#checkConsistency()}.  Please refer to the documentation for
152     * {@link SBMLDocument} for more information about this.
153     * <p>
154     * While applications may play fast and loose and live like free spirits
155     * during the construction and editing of SBML models, they should always
156     * make sure to call {@link SBMLDocument#checkInternalConsistency()} and/or
157     * {@link SBMLDocument#checkConsistency()} before writing out the final version of
158     * an SBML model.
159     * <p>
160     * <p>
161     * <h2>Model attributes introduced in SBML Level&nbsp;3</h2>
162     * <p>
163     * As mentioned above, the {@link Model} class has a number of optional attributes
164     * in SBML Level&nbsp;3 Version&nbsp;1 Core.  These are 'substanceUnits',
165     * 'timeUnits', 'volumeUnits', 'areaUnits', 'lengthUnits', 'extentUnits',
166     * and 'conversionFactor.  The following provide more information about
167     * them.
168     * <p>
169     * <h3>The 'substanceUnits' attribute</h3>
170     * <p>
171     * The 'substanceUnits' attribute is used to specify the unit of
172     * measurement associated with substance quantities of {@link Species} objects that
173     * do not specify units explicitly.  If a given {@link Species} object definition
174     * does not specify its unit of substance quantity via the 'substanceUnits'
175     * attribute on the {@link Species} object instance, then that species inherits the
176     * value of the {@link Model} 'substanceUnits' attribute.  If the {@link Model} does not
177     * define a value for this attribute, then there is no unit to inherit, and
178     * all species that do not specify individual 'substanceUnits' attribute
179     * values then have <em>no</em> declared units for their quantities.  The
180     * SBML Level&nbsp;3 Version&nbsp;1 Core specification provides more
181     * details.
182     * <p>
183     * Note that when the identifier of a species appears in a model's
184     * mathematical expressions, the unit of measurement associated with that
185     * identifier is <em>not solely determined</em> by setting 'substanceUnits'
186     * on {@link Model} or {@link Species}.  Please see the discussion about units given in
187     * the documentation for the {@link Species} class.
188     * <p>
189     * <p>
190     * <h3>The 'timeUnits' attribute</h3>
191     * <p>
192     * The 'timeUnits' attribute on SBML Level&nbsp;3's {@link Model} object is used to
193     * specify the unit in which time is measured in the model.  This attribute
194     * on {@link Model} is the <em>only</em> way to specify a unit for time in a model.
195     * It is a global attribute; time is measured in the model everywhere in
196     * the same way.  This is particularly relevant to {@link Reaction} and {@link RateRule}
197     * objects in a model: all {@link Reaction} and {@link RateRule} objects in SBML define
198     * per-time values, and the unit of time is given by the 'timeUnits'
199     * attribute on the {@link Model} object instance.  If the {@link Model} 'timeUnits'
200     * attribute has no value, it means that the unit of time is not defined
201     * for the model's reactions and rate rules.  Leaving it unspecified in an
202     * SBML model does not result in an invalid model in SBML Level&nbsp;3;
203     * however, as a matter of best practice, we strongly recommend that all
204     * models specify units of measurement for time.
205     * <p>
206     * <p>
207     * <h3>The 'volumeUnits', 'areaUnits', and 'lengthUnits' attributes</h3>
208     * <p>
209     * The attributes 'volumeUnits', 'areaUnits' and 'lengthUnits' together are
210     * used to set the units of measurements for the sizes of {@link Compartment}
211     * objects in an SBML Level&nbsp;3 model when those objects do not
212     * otherwise specify units.  The three attributes correspond to the most
213     * common cases of compartment dimensions: 'volumeUnits' for compartments
214     * having a 'spatialDimensions' attribute value of <code>'3'</code>, 'areaUnits' for
215     * compartments having a 'spatialDimensions' attribute value of <code>'2'</code>, and
216     * 'lengthUnits' for compartments having a 'spatialDimensions' attribute
217     * value of <code>'1'.</code>  The attributes are not applicable to compartments
218     * whose 'spatialDimensions' attribute values are <em>not</em> one of <code>'1'</code>, 
219     * <code>'2'</code> or <code>'3'.</code>
220     * <p>
221     * If a given {@link Compartment} object instance does not provide a value for its
222     * 'units' attribute, then the unit of measurement of that compartment's
223     * size is inherited from the value specified by the {@link Model} 'volumeUnits',
224     * 'areaUnits' or 'lengthUnits' attribute, as appropriate based on the
225     * {@link Compartment} object's 'spatialDimensions' attribute value.  If the {@link Model}
226     * object does not define the relevant attribute, then there are no units
227     * to inherit, and all {@link Compartment} objects that do not set a value for
228     * their 'units' attribute then have <em>no</em> units associated with
229     * their compartment sizes.
230     * <p>
231     * The use of three separate attributes is a carry-over from SBML
232     * Level&nbsp;2.  Note that it is entirely possible for a model to define a
233     * value for two or more of the attributes 'volumeUnits', 'areaUnits' and
234     * 'lengthUnits' simultaneously, because SBML models may contain
235     * compartments with different numbers of dimensions.
236     * <p>
237     * <p>
238     * <h3>The 'extentUnits' attribute</h3>
239     * <p>
240     * Reactions are processes that occur over time.  These processes involve
241     * events of some sort, where a single ``reaction event'' is one in which
242     * some set of entities (known as reactants, products and modifiers in
243     * SBML) interact, once.  The <em>extent</em> of a reaction is a measure of
244     * how many times the reaction has occurred, while the time derivative of
245     * the extent gives the instantaneous rate at which the reaction is
246     * occurring.  Thus, what is colloquially referred to as the 'rate of the
247     * reaction' is in fact equal to the rate of change of reaction extent.
248     * <p>
249     * In SBML Level&nbsp;3, the combination of 'extentUnits' and 'timeUnits'
250     * defines the units of kinetic laws in SBML and establishes how the
251     * numerical value of each {@link KineticLaw} object's mathematical formula is
252     * meant to be interpreted in a model.  The units of the kinetic laws are
253     * taken to be 'extentUnits' divided by 'timeUnits'.
254     * <p>
255     * Note that this embodies an important principle in SBML Level&nbsp;3
256     * models: <em>all reactions in an SBML model must have the same units</em>
257     * for the rate of change of extent.  In other words, the units of all
258     * reaction rates in the model <em>must be the same</em>.  There is only
259     * one global value for 'extentUnits' and one global value for 'timeUnits'.
260     * <p>
261     * <p>
262     * <h3>The 'conversionFactor' attribute</h3>
263     * <p>
264     * The attribute 'conversionFactor' in SBML Level&nbsp;3's {@link Model} object
265     * defines a global value inherited by all {@link Species} object instances that do
266     * not define separate values for their 'conversionFactor' attributes.  The
267     * value of this attribute must refer to a {@link Parameter} object instance
268     * defined in the model.  The {@link Parameter} object in question must be a
269     * constant; ie it must have its 'constant' attribute value set to 
270     * <code>'true'.</code>
271     * <p>
272     * If a given {@link Species} object definition does not specify a conversion
273     * factor via the 'conversionFactor' attribute on {@link Species}, then the species
274     * inherits the conversion factor specified by the {@link Model} 'conversionFactor'
275     * attribute.  If the {@link Model} does not define a value for this attribute,
276     * then there is no conversion factor to inherit.  More information about
277     * conversion factors is provided in the SBML Level&nbsp;3 Version&nbsp;1
278     * specification.
279     */
280    
281    public class Model extends SBase {
282       private long swigCPtr;
283    
284       protected Model(long cPtr, boolean cMemoryOwn)
285       {
286         super(libsbmlJNI.Model_SWIGUpcast(cPtr), cMemoryOwn);
287         swigCPtr = cPtr;
288       }
289    
290       protected static long getCPtr(Model obj)
291       {
292         return (obj == null) ? 0 : obj.swigCPtr;
293       }
294    
295       protected static long getCPtrAndDisown (Model obj)
296       {
297         long ptr = 0;
298    
299         if (obj != null)
300         {
301           ptr             = obj.swigCPtr;
302           obj.swigCMemOwn = false;
303         }
304    
305         return ptr;
306       }
307    
308      protected void finalize() {
309        delete();
310      }
311    
312      public synchronized void delete() {
313        if (swigCPtr != 0) {
314          if (swigCMemOwn) {
315            swigCMemOwn = false;
316            libsbmlJNI.delete_Model(swigCPtr);
317          }
318          swigCPtr = 0;
319        }
320        super.delete();
321      }
322    
323      
324    /**
325       * Creates a new {@link Model} using the given SBML <code>level</code> and <code>version</code>
326       * values.
327       * <p>
328       * @param level a long integer, the SBML Level to assign to this {@link Model}
329       * <p>
330       * @param version a long integer, the SBML Version to assign to this
331       * {@link Model}
332       * <p>
333       * @throws SBMLConstructorException 
334       * Thrown if the given <code>level</code> and <code>version</code> combination, or this kind
335       * of SBML object, are either invalid or mismatched with respect to the
336       * parent {@link SBMLDocument} object.
337       * <p>
338       * @note Upon the addition of a {@link Model} object to an {@link SBMLDocument}
339       * (e.g., using {@link SBMLDocument#setModel(Model m)}), the SBML Level, SBML Version
340       * and XML namespace of the document <em>override</em> the values used
341       * when creating the {@link Model} object via this constructor.  This is
342       * necessary to ensure that an SBML document is a consistent structure.
343       * Nevertheless, the ability to supply the values at the time of creation
344       * of a {@link Model} is an important aid to producing valid SBML.  Knowledge
345       * of the intented SBML Level and Version determine whether it is valid
346       * to assign a particular value to an attribute, or whether it is valid
347       * to add an object to an existing {@link SBMLDocument}.
348       */ public
349     Model(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
350        this(libsbmlJNI.new_Model__SWIG_0(level, version), true);
351      }
352    
353      
354    /**
355       * Creates a new {@link Model} using the given {@link SBMLNamespaces} object
356       * <code>sbmlns</code>.
357       * <p>
358       * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
359       * information.  It is used to communicate the SBML Level, Version, and
360       * (in Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.
361       * A common approach to using this class constructor is to create an
362       * {@link SBMLNamespaces} object somewhere in a program, once, then pass it to
363       * object constructors such as this one when needed.
364       * <p>
365       * @param sbmlns an {@link SBMLNamespaces} object.
366       * <p>
367       * @throws SBMLConstructorException 
368       * Thrown if the given <code>level</code> and <code>version</code> combination, or this kind
369       * of SBML object, are either invalid or mismatched with respect to the
370       * parent {@link SBMLDocument} object.
371       * <p>
372       * @note Upon the addition of a {@link Model} object to an {@link SBMLDocument} (e.g.,
373       * using {@link SBMLDocument#setModel(Model m)}), the SBML XML namespace of the document 
374       * <em>overrides</em> the value used when creating the {@link Model} object via this
375       * constructor.  This is necessary to ensure that an SBML document is a
376       * consistent structure.  Nevertheless, the ability to supply the values
377       * at the time of creation of a {@link Model} is an important aid to producing
378       * valid SBML.  Knowledge of the intented SBML Level and Version
379       * determine whether it is valid to assign a particular value to an
380       * attribute, or whether it is valid to add an object to an existing
381       * {@link SBMLDocument}.
382       */ public
383     Model(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException {
384        this(libsbmlJNI.new_Model__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
385      }
386    
387      
388    /**
389       * Copy constructor; creates a (deep) copy of the given {@link Model} object.
390       * <p>
391       * @param orig the object to copy.
392       * <p>
393       * @throws SBMLConstructorException 
394       * Thrown if the argument <code>orig</code> is <code>null.</code>
395       */ public
396     Model(Model orig) throws org.sbml.libsbml.SBMLConstructorException {
397        this(libsbmlJNI.new_Model__SWIG_2(Model.getCPtr(orig), orig), true);
398      }
399    
400      
401    /**
402       * Creates and returns a deep copy of this {@link Model} object.
403       * <p>
404       * @return a (deep) copy of this {@link Model}.
405       */ public
406     Model cloneObject() {
407        long cPtr = libsbmlJNI.Model_cloneObject(swigCPtr, this);
408        return (cPtr == 0) ? null : new Model(cPtr, true);
409      }
410    
411      
412    /**
413       * Returns the first child element found that has the given <code>id</code> in the
414       * model-wide SId namespace, or <code>null</code> if no such object is found.
415       * <p>
416       * @param id string representing the id of objects to find.
417       * <p>
418       * @return pointer to the first element found with the given <code>id</code>.
419       */ public
420     SBase getElementBySId(String id) {
421      return libsbml.DowncastSBase(libsbmlJNI.Model_getElementBySId(swigCPtr, this, id), false);
422    }
423    
424      
425    /**
426       * Returns the first child element it can find with the given <code>metaid</code>, or
427       * null if no such object is found.
428       * <p>
429       * @param metaid string representing the metaid of objects to find
430       * <p>
431       * @return pointer to the first element found with the given <code>metaid</code>.
432       */ public
433     SBase getElementByMetaId(String metaid) {
434      return libsbml.DowncastSBase(libsbmlJNI.Model_getElementByMetaId(swigCPtr, this, metaid), false);
435    }
436    
437      
438    /**
439       * Returns the value of the 'id' attribute of this {@link Model}.
440       * <p>
441       * @return the id of this {@link Model}.
442       */ public
443     String getId() {
444        return libsbmlJNI.Model_getId(swigCPtr, this);
445      }
446    
447      
448    /**
449       * Returns the value of the 'name' attribute of this {@link Model}.
450       * <p>
451       * @return the name of this {@link Model}.
452       */ public
453     String getName() {
454        return libsbmlJNI.Model_getName(swigCPtr, this);
455      }
456    
457      
458    /**
459       * Returns the value of the 'substanceUnits' attribute of this {@link Model}.
460       * <p>
461       * @return the substanceUnits of this {@link Model}.
462       * <p>
463       * @note The 'substanceUnits' attribute is available in
464       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
465       */ public
466     String getSubstanceUnits() {
467        return libsbmlJNI.Model_getSubstanceUnits(swigCPtr, this);
468      }
469    
470      
471    /**
472       * Returns the value of the 'timeUnits' attribute of this {@link Model}.
473       * <p>
474       * @return the timeUnits of this {@link Model}.
475       * <p>
476       * @note The 'timeUnits' attribute is available in 
477       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
478       */ public
479     String getTimeUnits() {
480        return libsbmlJNI.Model_getTimeUnits(swigCPtr, this);
481      }
482    
483      
484    /**
485       * Returns the value of the 'volumeUnits' attribute of this {@link Model}.
486       * <p>
487       * @return the volumeUnits of this {@link Model}.
488       * <p>
489       * @note The 'volumeUnits' attribute is available in 
490       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
491       */ public
492     String getVolumeUnits() {
493        return libsbmlJNI.Model_getVolumeUnits(swigCPtr, this);
494      }
495    
496      
497    /**
498       * Returns the value of the 'areaUnits' attribute of this {@link Model}.
499       * <p>
500       * @return the areaUnits of this {@link Model}.
501       * <p>
502       * @note The 'areaUnits' attribute is available in 
503       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
504       */ public
505     String getAreaUnits() {
506        return libsbmlJNI.Model_getAreaUnits(swigCPtr, this);
507      }
508    
509      
510    /**
511       * Returns the value of the 'lengthUnits' attribute of this {@link Model}.
512       * <p>
513       * @return the lengthUnits of this {@link Model}.
514       * <p>
515       * @note The 'lengthUnits' attribute is available in 
516       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
517       */ public
518     String getLengthUnits() {
519        return libsbmlJNI.Model_getLengthUnits(swigCPtr, this);
520      }
521    
522      
523    /**
524       * Returns the value of the 'extentUnits' attribute of this {@link Model}.
525       * <p>
526       * @return the extentUnits of this {@link Model}.
527       * <p>
528       * @note The 'extentUnits' attribute is available in 
529       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
530       */ public
531     String getExtentUnits() {
532        return libsbmlJNI.Model_getExtentUnits(swigCPtr, this);
533      }
534    
535      
536    /**
537       * Returns the value of the 'conversionFactor' attribute of this {@link Model}.
538       * <p>
539       * @return the conversionFactor of this {@link Model}.
540       * <p>
541       * @note The 'conversionFactor' attribute is available in 
542       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
543       */ public
544     String getConversionFactor() {
545        return libsbmlJNI.Model_getConversionFactor(swigCPtr, this);
546      }
547    
548      
549    /**
550       * Predicate returning <code>true</code> if this
551       * {@link Model}'s 'id' attribute is set.
552       * <p>
553       * @return <code>true</code> if the 'id' attribute of this {@link Model} is
554       * set, <code>false</code> otherwise.
555       */ public
556     boolean isSetId() {
557        return libsbmlJNI.Model_isSetId(swigCPtr, this);
558      }
559    
560      
561    /**
562       * Predicate returning <code>true</code> if this
563       * {@link Model}'s 'name' attribute is set.
564       * <p>
565       * @return <code>true</code> if the 'name' attribute of this {@link Model} is
566       * set, <code>false</code> otherwise.
567       */ public
568     boolean isSetName() {
569        return libsbmlJNI.Model_isSetName(swigCPtr, this);
570      }
571    
572      
573    /**
574       * Predicate returning <code>true</code> if this
575       * {@link Model}'s 'substanceUnits' attribute is set.
576       * <p>
577       * @return <code>true</code> if the 'substanceUnits' attribute of this {@link Model} is
578       * set, <code>false</code> otherwise.
579       * <p>
580       * @note The 'substanceUnits' attribute is available in 
581       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
582       */ public
583     boolean isSetSubstanceUnits() {
584        return libsbmlJNI.Model_isSetSubstanceUnits(swigCPtr, this);
585      }
586    
587      
588    /**
589       * Predicate returning <code>true</code> if this
590       * {@link Model}'s 'timeUnits' attribute is set.
591       * <p>
592       * @return <code>true</code> if the 'timeUnits' attribute of this {@link Model} is
593       * set, <code>false</code> otherwise.
594       * <p>
595       * @note The 'substanceUnits' attribute is available in 
596       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
597       */ public
598     boolean isSetTimeUnits() {
599        return libsbmlJNI.Model_isSetTimeUnits(swigCPtr, this);
600      }
601    
602      
603    /**
604       * Predicate returning <code>true</code> if this
605       * {@link Model}'s 'volumeUnits' attribute is set.
606       * <p>
607       * @return <code>true</code> if the 'volumeUnits' attribute of this {@link Model} is
608       * set, <code>false</code> otherwise.
609       * <p>
610       * @note The 'volumeUnits' attribute is available in 
611       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
612       */ public
613     boolean isSetVolumeUnits() {
614        return libsbmlJNI.Model_isSetVolumeUnits(swigCPtr, this);
615      }
616    
617      
618    /**
619       * Predicate returning <code>true</code> if this
620       * {@link Model}'s 'areaUnits' attribute is set.
621       * <p>
622       * @return <code>true</code> if the 'areaUnits' attribute of this {@link Model} is
623       * set, <code>false</code> otherwise.
624       * <p>
625       * @note The 'areaUnits' attribute is available in 
626       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
627       */ public
628     boolean isSetAreaUnits() {
629        return libsbmlJNI.Model_isSetAreaUnits(swigCPtr, this);
630      }
631    
632      
633    /**
634       * Predicate returning <code>true</code> if this
635       * {@link Model}'s 'lengthUnits' attribute is set.
636       * <p>
637       * @return <code>true</code> if the 'lengthUnits' attribute of this {@link Model} is
638       * set, <code>false</code> otherwise.
639       * <p>
640       * @note The 'lengthUnits' attribute is available in 
641       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
642       */ public
643     boolean isSetLengthUnits() {
644        return libsbmlJNI.Model_isSetLengthUnits(swigCPtr, this);
645      }
646    
647      
648    /**
649       * Predicate returning <code>true</code> if this
650       * {@link Model}'s 'extentUnits' attribute is set.
651       * <p>
652       * @return <code>true</code> if the 'extentUnits' attribute of this {@link Model} is
653       * set, <code>false</code> otherwise.
654       * <p>
655       * @note The 'extentUnits' attribute is available in 
656       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
657       */ public
658     boolean isSetExtentUnits() {
659        return libsbmlJNI.Model_isSetExtentUnits(swigCPtr, this);
660      }
661    
662      
663    /**
664       * Predicate returning <code>true</code> if this
665       * {@link Model}'s 'conversionFactor' attribute is set.
666       * <p>
667       * @return <code>true</code> if the 'conversionFactor' attribute of this {@link Model} is
668       * set, <code>false</code> otherwise.
669       * <p>
670       * @note The 'conversionFactor' attribute is available in 
671       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
672       */ public
673     boolean isSetConversionFactor() {
674        return libsbmlJNI.Model_isSetConversionFactor(swigCPtr, this);
675      }
676    
677      
678    /**
679       * Sets the value of the 'id' attribute of this {@link Model}.
680       * <p>
681       * The string <code>sid</code> is copied.  Note that SBML has strict requirements
682       * for the syntax of identifiers.  The following is a summary of the definition of the SBML identifier type 
683    <code>SId</code>, which defines the permitted syntax of identifiers.  We
684    express the syntax using an extended form of BNF notation: 
685    <pre style='margin-left: 2em; border: none; font-weight: bold; font-size: 13px; color: black'>
686    letter .= 'a'..'z','A'..'Z'
687    digit  .= '0'..'9'
688    idChar .= letter | digit | '_'
689    SId    .= ( letter | '_' ) idChar*
690    </pre>
691    The characters <code>(</code> and <code>)</code> are used for grouping, the
692    character <code>*</code> 'zero or more times', and the character
693    <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
694    determined by an exact character sequence match; i.e., comparisons must be
695    performed in a case-sensitive manner.  In addition, there are a few
696    conditions for the uniqueness of identifiers in an SBML model.  Please
697    consult the SBML specifications for the exact formulations.
698    <p>
699    
700       * <p>
701       * @param sid the string to use as the identifier of this {@link Model}
702       * <p>
703       * @return integer value indicating success/failure of the
704       * function.  The possible values
705       * returned by this function are:
706       * <ul>
707       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
708       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
709       * </ul>
710       */ public
711     int setId(String sid) {
712        return libsbmlJNI.Model_setId(swigCPtr, this, sid);
713      }
714    
715      
716    /**
717       * Sets the value of the 'name' attribute of this {@link Model}.
718       * <p>
719       * The string in <code>name</code> is copied.
720       * <p>
721       * @param name the new name for the {@link Model}
722       * <p>
723       * @return integer value indicating success/failure of the
724       * function.  The possible values
725       * returned by this function are:
726       * <ul>
727       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
728       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
729       * </ul>
730       */ public
731     int setName(String name) {
732        return libsbmlJNI.Model_setName(swigCPtr, this, name);
733      }
734    
735      
736    /**
737       * Sets the value of the 'substanceUnits' attribute of this {@link Model}.
738       * <p>
739       * The string in <code>units</code> is copied.
740       * <p>
741       * @param units the new substanceUnits for the {@link Model}
742       * <p>
743       * @return integer value indicating success/failure of the
744       * function.  The possible values
745       * returned by this function are:
746       * <ul>
747       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
748       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
749       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
750       * </ul>
751       * <p>
752       * @note The 'substanceUnits' attribute is available in 
753       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
754       */ public
755     int setSubstanceUnits(String units) {
756        return libsbmlJNI.Model_setSubstanceUnits(swigCPtr, this, units);
757      }
758    
759      
760    /**
761       * Sets the value of the 'timeUnits' attribute of this {@link Model}.
762       * <p>
763       * The string in <code>units</code> is copied.
764       * <p>
765       * @param units the new timeUnits for the {@link Model}
766       * <p>
767       * @return integer value indicating success/failure of the
768       * function.  The possible values
769       * returned by this function are:
770       * <ul>
771       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
772       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
773       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
774       * </ul>
775       * <p>
776       * @note The 'timeUnits' attribute is available in 
777       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
778       */ public
779     int setTimeUnits(String units) {
780        return libsbmlJNI.Model_setTimeUnits(swigCPtr, this, units);
781      }
782    
783      
784    /**
785       * Sets the value of the 'volumeUnits' attribute of this {@link Model}.
786       * <p>
787       * The string in <code>units</code> is copied.
788       * <p>
789       * @param units the new volumeUnits for the {@link Model}
790       * <p>
791       * @return integer value indicating success/failure of the
792       * function.  The possible values
793       * returned by this function are:
794       * <ul>
795       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
796       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
797       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
798       * </ul>
799       * <p>
800       * @note The 'volumeUnits' attribute is available in 
801       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
802       */ public
803     int setVolumeUnits(String units) {
804        return libsbmlJNI.Model_setVolumeUnits(swigCPtr, this, units);
805      }
806    
807      
808    /**
809       * Sets the value of the 'areaUnits' attribute of this {@link Model}.
810       * <p>
811       * The string in <code>units</code> is copied.
812       * <p>
813       * @param units the new areaUnits for the {@link Model}
814       * <p>
815       * @return integer value indicating success/failure of the
816       * function.  The possible values
817       * returned by this function are:
818       * <ul>
819       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
820       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
821       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
822       * </ul>
823       * <p>
824       * @note The 'areaUnits' attribute is available in 
825       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
826       */ public
827     int setAreaUnits(String units) {
828        return libsbmlJNI.Model_setAreaUnits(swigCPtr, this, units);
829      }
830    
831      
832    /**
833       * Sets the value of the 'lengthUnits' attribute of this {@link Model}.
834       * <p>
835       * The string in <code>units</code> is copied.
836       * <p>
837       * @param units the new lengthUnits for the {@link Model}
838       * <p>
839       * @return integer value indicating success/failure of the
840       * function.  The possible values
841       * returned by this function are:
842       * <ul>
843       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
844       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
845       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
846       * </ul>
847       * <p>
848       * @note The 'lengthUnits' attribute is available in 
849       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
850       */ public
851     int setLengthUnits(String units) {
852        return libsbmlJNI.Model_setLengthUnits(swigCPtr, this, units);
853      }
854    
855      
856    /**
857       * Sets the value of the 'extentUnits' attribute of this {@link Model}.
858       * <p>
859       * The string in <code>units</code> is copied.
860       * <p>
861       * @param units the new extentUnits for the {@link Model}
862       * <p>
863       * @return integer value indicating success/failure of the
864       * function.  The possible values
865       * returned by this function are:
866       * <ul>
867       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
868       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
869       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
870       * </ul>
871       * <p>
872       * @note The 'extentUnits' attribute is available in 
873       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
874       */ public
875     int setExtentUnits(String units) {
876        return libsbmlJNI.Model_setExtentUnits(swigCPtr, this, units);
877      }
878    
879      
880    /**
881       * Sets the value of the 'conversionFactor' attribute of this {@link Model}.
882       * <p>
883       * The string in <code>units</code> is copied.
884       * <p>
885       * @param units the new conversionFactor for the {@link Model}
886       * <p>
887       * @return integer value indicating success/failure of the
888       * function.  The possible values
889       * returned by this function are:
890       * <ul>
891       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
892       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
893       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
894       * </ul>
895       * <p>
896       * @note The 'conversionFactor' attribute is available in 
897       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
898       */ public
899     int setConversionFactor(String units) {
900        return libsbmlJNI.Model_setConversionFactor(swigCPtr, this, units);
901      }
902    
903      
904    /**
905       * Unsets the value of the 'id' attribute of this {@link Model}.
906       * <p>
907       * @return integer value indicating success/failure of the
908       * function.  The possible values
909       * returned by this function are:
910       * <ul>
911       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
912       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
913       * </ul>
914       */ public
915     int unsetId() {
916        return libsbmlJNI.Model_unsetId(swigCPtr, this);
917      }
918    
919      
920    /**
921       * Unsets the value of the 'name' attribute of this {@link Model}.
922       * <p>
923       * @return integer value indicating success/failure of the
924       * function.  The possible values
925       * returned by this function are:
926       * <ul>
927       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
928       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
929       * </ul>
930       */ public
931     int unsetName() {
932        return libsbmlJNI.Model_unsetName(swigCPtr, this);
933      }
934    
935      
936    /**
937       * Unsets the value of the 'substanceUnits' attribute of this {@link Model}.
938       * <p>
939       * @return integer value indicating success/failure of the
940       * function.  The possible values
941       * returned by this function are:
942       * <ul>
943       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
944       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
945       * </ul>
946       * <p>
947       * @note The 'substanceUnits' attribute is available in 
948       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
949       */ public
950     int unsetSubstanceUnits() {
951        return libsbmlJNI.Model_unsetSubstanceUnits(swigCPtr, this);
952      }
953    
954      
955    /**
956       * Unsets the value of the 'timeUnits' attribute of this {@link Model}.
957       * <p>
958       * @return integer value indicating success/failure of the
959       * function.  The possible values
960       * returned by this function are:
961       * <ul>
962       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
963       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
964       * </ul>
965       * <p>
966       * @note The 'timeUnits' attribute is available in 
967       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
968       */ public
969     int unsetTimeUnits() {
970        return libsbmlJNI.Model_unsetTimeUnits(swigCPtr, this);
971      }
972    
973      
974    /**
975       * Unsets the value of the 'volumeUnits' attribute of this {@link Model}.
976       * <p>
977       * @return integer value indicating success/failure of the
978       * function.  The possible values
979       * returned by this function are:
980       * <ul>
981       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
982       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
983       * </ul>
984       * <p>
985       * @note The 'volumeUnits' attribute is available in 
986       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
987       */ public
988     int unsetVolumeUnits() {
989        return libsbmlJNI.Model_unsetVolumeUnits(swigCPtr, this);
990      }
991    
992      
993    /**
994       * Unsets the value of the 'areaUnits' attribute of this {@link Model}.
995       * <p>
996       * @return integer value indicating success/failure of the
997       * function.  The possible values
998       * returned by this function are:
999       * <ul>
1000       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1001       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
1002       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1003       * </ul>
1004       * <p>
1005       * @note The 'areaUnits' attribute is available in 
1006       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
1007       */ public
1008     int unsetAreaUnits() {
1009        return libsbmlJNI.Model_unsetAreaUnits(swigCPtr, this);
1010      }
1011    
1012      
1013    /**
1014       * Unsets the value of the 'lengthUnits' attribute of this {@link Model}.
1015       * <p>
1016       * @return integer value indicating success/failure of the
1017       * function.  The possible values
1018       * returned by this function are:
1019       * <ul>
1020       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1021       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
1022       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1023       * </ul>
1024       * <p>
1025       * @note The 'lengthUnits' attribute is available in 
1026       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
1027       */ public
1028     int unsetLengthUnits() {
1029        return libsbmlJNI.Model_unsetLengthUnits(swigCPtr, this);
1030      }
1031    
1032      
1033    /**
1034       * Unsets the value of the 'extentUnits' attribute of this {@link Model}.
1035       * <p>
1036       * @return integer value indicating success/failure of the
1037       * function.  The possible values
1038       * returned by this function are:
1039       * <ul>
1040       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1041       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
1042       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1043       * </ul>
1044       * <p>
1045       * @note The 'extentUnits' attribute is available in 
1046       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
1047       */ public
1048     int unsetExtentUnits() {
1049        return libsbmlJNI.Model_unsetExtentUnits(swigCPtr, this);
1050      }
1051    
1052      
1053    /**
1054       * Unsets the value of the 'conversionFactor' attribute of this {@link Model}.
1055       * <p>
1056       * @return integer value indicating success/failure of the
1057       * function.  The possible values
1058       * returned by this function are:
1059       * <ul>
1060       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1061       * <li> {@link  libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE }
1062       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1063       * </ul>
1064       * <p>
1065       * @note The 'conversionFactor' attribute is available in 
1066       * SBML Level&nbsp;3 but is not present on {@link Model} in lower Levels of SBML.
1067       */ public
1068     int unsetConversionFactor() {
1069        return libsbmlJNI.Model_unsetConversionFactor(swigCPtr, this);
1070      }
1071    
1072      
1073    /**
1074       * Adds a copy of the given {@link FunctionDefinition} object to this {@link Model}.
1075       * <p>
1076       * @param fd the {@link FunctionDefinition} to add
1077       * <p>
1078       * @return integer value indicating success/failure of the
1079       * function.  The possible values
1080       * returned by this function are:
1081       * <ul>
1082       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1083       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1084       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1085       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1086       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1087       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1088       * </ul>
1089       * <p>
1090       * @note This method should be used with some caution.  The fact that
1091       * this method <em>copies</em> the object passed to it means that the caller
1092       * will be left holding a physically different object instance than the
1093       * one contained in this {@link Model}.  Changes made to the original object
1094       * instance (such as resetting attribute values) will <em>not affect the
1095       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1096       * to free the original object if it is no longer being used, or else a
1097       * memory leak will result.  Please see {@link Model#createFunctionDefinition()}
1098       * for a method that does not lead to these issues.
1099       * <p>
1100       * @see #createFunctionDefinition()
1101       */ public
1102     int addFunctionDefinition(FunctionDefinition fd) {
1103        return libsbmlJNI.Model_addFunctionDefinition(swigCPtr, this, FunctionDefinition.getCPtr(fd), fd);
1104      }
1105    
1106      
1107    /**
1108       * Adds a copy of the given {@link UnitDefinition} object to this {@link Model}.
1109       * <p>
1110       * @param ud the {@link UnitDefinition} object to add
1111       * <p>
1112       * @return integer value indicating success/failure of the
1113       * function.  The possible values
1114       * returned by this function are:
1115       * <ul>
1116       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1117       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1118       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1119       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1120       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1121       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1122       * </ul>
1123       * <p>
1124       * @note This method should be used with some caution.  The fact that
1125       * this method <em>copies</em> the object passed to it means that the caller
1126       * will be left holding a physically different object instance than the
1127       * one contained in this {@link Model}.  Changes made to the original object
1128       * instance (such as resetting attribute values) will <em>not affect the
1129       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1130       * to free the original object if it is no longer being used, or else a
1131       * memory leak will result.  Please see {@link Model#createUnitDefinition()} for
1132       * a method that does not lead to these issues.
1133       * <p>
1134       * @see #createUnitDefinition()
1135       */ public
1136     int addUnitDefinition(UnitDefinition ud) {
1137        return libsbmlJNI.Model_addUnitDefinition(swigCPtr, this, UnitDefinition.getCPtr(ud), ud);
1138      }
1139    
1140      
1141    /**
1142       * Adds a copy of the given {@link CompartmentType} object to this {@link Model}.
1143       * <p>
1144       * @param ct the {@link CompartmentType} object to add
1145       * <p>
1146       * @return integer value indicating success/failure of the
1147       * function.  The possible values
1148       * returned by this function are:
1149       * <ul>
1150       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1151       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1152       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1153       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1154       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1155       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1156       * </ul>
1157       * <p>
1158       * @note This method should be used with some caution.  The fact that
1159       * this method <em>copies</em> the object passed to it means that the caller
1160       * will be left holding a physically different object instance than the
1161       * one contained in this {@link Model}.  Changes made to the original object
1162       * instance (such as resetting attribute values) will <em>not affect the
1163       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1164       * to free the original object if it is no longer being used, or else a
1165       * memory leak will result.  Please see {@link Model#createCompartmentType()}
1166       * for a method that does not lead to these issues.
1167       * <p>
1168       * @note The {@link CompartmentType} object class is only available in SBML
1169       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
1170       * Level&nbsp;1 nor Level&nbsp;3.
1171       * <p>
1172       * @see #createCompartmentType()
1173       */ public
1174     int addCompartmentType(CompartmentType ct) {
1175        return libsbmlJNI.Model_addCompartmentType(swigCPtr, this, CompartmentType.getCPtr(ct), ct);
1176      }
1177    
1178      
1179    /**
1180       * Adds a copy of the given {@link SpeciesType} object to this {@link Model}.
1181       * <p>
1182       * @param st the {@link SpeciesType} object to add
1183       * <p>
1184       * @return integer value indicating success/failure of the
1185       * function.  The possible values
1186       * returned by this function are:
1187       * <ul>
1188       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1189       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1190       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1191       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1192       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1193       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1194       * </ul>
1195       * <p>
1196       * @note This method should be used with some caution.  The fact that
1197       * this method <em>copies</em> the object passed to it means that the caller
1198       * will be left holding a physically different object instance than the
1199       * one contained in this {@link Model}.  Changes made to the original object
1200       * instance (such as resetting attribute values) will <em>not affect the
1201       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1202       * to free the original object if it is no longer being used, or else a
1203       * memory leak will result.  Please see {@link Model#createSpeciesType()} for a
1204       * method that does not lead to these issues.
1205       * <p>
1206       * @note The {@link SpeciesType} object class is only available in SBML
1207       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
1208       * Level&nbsp;1 nor Level&nbsp;3.
1209       * <p>
1210       * @see #createSpeciesType()
1211       */ public
1212     int addSpeciesType(SpeciesType st) {
1213        return libsbmlJNI.Model_addSpeciesType(swigCPtr, this, SpeciesType.getCPtr(st), st);
1214      }
1215    
1216      
1217    /**
1218       * Adds a copy of the given {@link Compartment} object to this {@link Model}.
1219       * <p>
1220       * @param c the {@link Compartment} object to add
1221       * <p>
1222       * @return integer value indicating success/failure of the
1223       * function.  The possible values
1224       * returned by this function are:
1225       * <ul>
1226       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1227       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1228       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1229       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1230       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1231       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1232       * </ul>
1233       * <p>
1234       * @note This method should be used with some caution.  The fact that
1235       * this method <em>copies</em> the object passed to it means that the caller
1236       * will be left holding a physically different object instance than the
1237       * one contained in this {@link Model}.  Changes made to the original object
1238       * instance (such as resetting attribute values) will <em>not affect the
1239       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1240       * to free the original object if it is no longer being used, or else a
1241       * memory leak will result.  Please see {@link Model#createCompartment()} for a
1242       * method that does not lead to these issues.
1243       * <p>
1244       * @see #createCompartment()
1245       */ public
1246     int addCompartment(Compartment c) {
1247        return libsbmlJNI.Model_addCompartment(swigCPtr, this, Compartment.getCPtr(c), c);
1248      }
1249    
1250      
1251    /**
1252       * Adds a copy of the given {@link Species} object to this {@link Model}.
1253       * <p>
1254       * @param s the {@link Species} object to add
1255       * <p>
1256       * @return integer value indicating success/failure of the
1257       * function.  The possible values
1258       * returned by this function are:
1259       * <ul>
1260       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1261       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1262       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1263       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1264       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1265       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1266       * </ul>
1267       * <p>
1268       * @note This method should be used with some caution.  The fact that
1269       * this method <em>copies</em> the object passed to it means that the caller
1270       * will be left holding a physically different object instance than the
1271       * one contained in this {@link Model}.  Changes made to the original object
1272       * instance (such as resetting attribute values) will <em>not affect the
1273       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1274       * to free the original object if it is no longer being used, or else a
1275       * memory leak will result.  Please see {@link Model#createSpecies()} for a
1276       * method that does not lead to these issues.
1277       * <p>
1278       * @see #createSpecies()
1279       */ public
1280     int addSpecies(Species s) {
1281        return libsbmlJNI.Model_addSpecies(swigCPtr, this, Species.getCPtr(s), s);
1282      }
1283    
1284      
1285    /**
1286       * Adds a copy of the given {@link Parameter} object to this {@link Model}.
1287       * <p>
1288       * @param p the {@link Parameter} object to add
1289       * <p>
1290       * @return integer value indicating success/failure of the
1291       * function.  The possible values
1292       * returned by this function are:
1293       * <ul>
1294       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1295       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1296       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1297       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1298       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1299       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1300       * </ul>
1301       * <p>
1302       * @note This method should be used with some caution.  The fact that
1303       * this method <em>copies</em> the object passed to it means that the caller
1304       * will be left holding a physically different object instance than the
1305       * one contained in this {@link Model}.  Changes made to the original object
1306       * instance (such as resetting attribute values) will <em>not affect the
1307       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1308       * to free the original object if it is no longer being used, or else a
1309       * memory leak will result.  Please see {@link Model#createParameter()} for a
1310       * method that does not lead to these issues.
1311       * <p>
1312       * @see #createParameter()
1313       */ public
1314     int addParameter(Parameter p) {
1315        return libsbmlJNI.Model_addParameter(swigCPtr, this, Parameter.getCPtr(p), p);
1316      }
1317    
1318      
1319    /**
1320       * Adds a copy of the given {@link InitialAssignment} object to this {@link Model}.
1321       * <p>
1322       * @param ia the {@link InitialAssignment} object to add
1323       * <p>
1324       * @return integer value indicating success/failure of the
1325       * function.  The possible values
1326       * returned by this function are:
1327       * <ul>
1328       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1329       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1330       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1331       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1332       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1333       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1334       * </ul>
1335       * <p>
1336       * @note This method should be used with some caution.  The fact that
1337       * this method <em>copies</em> the object passed to it means that the caller
1338       * will be left holding a physically different object instance than the
1339       * one contained in this {@link Model}.  Changes made to the original object
1340       * instance (such as resetting attribute values) will <em>not affect the
1341       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1342       * to free the original object if it is no longer being used, or else a
1343       * memory leak will result.  Please see {@link Model#createInitialAssignment()}
1344       * for a method that does not lead to these issues.
1345       * <p>
1346       * @see #createInitialAssignment()
1347       */ public
1348     int addInitialAssignment(InitialAssignment ia) {
1349        return libsbmlJNI.Model_addInitialAssignment(swigCPtr, this, InitialAssignment.getCPtr(ia), ia);
1350      }
1351    
1352      
1353    /**
1354       * Adds a copy of the given {@link Rule} object to this {@link Model}.
1355       * <p>
1356       * @param r the {@link Rule} object to add
1357       * <p>
1358       * @return integer value indicating success/failure of the
1359       * function.  The possible values
1360       * returned by this function are:
1361       * <ul>
1362       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1363       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1364       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1365       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1366       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1367       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1368       * </ul>
1369       * <p>
1370       * @note This method should be used with some caution.  The fact that
1371       * this method <em>copies</em> the object passed to it means that the caller
1372       * will be left holding a physically different object instance than the
1373       * one contained in this {@link Model}.  Changes made to the original object
1374       * instance (such as resetting attribute values) will <em>not affect the
1375       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1376       * to free the original object if it is no longer being used, or else a
1377       * memory leak will result.  Please see the methods
1378       * {@link Model#createAlgebraicRule()}, {@link Model#createAssignmentRule()} and
1379       * {@link Model#createRateRule()} for methods that do not lead to these issues.
1380       * <p>
1381       * @see #createAlgebraicRule()
1382       * @see #createAssignmentRule()
1383       * @see #createRateRule()
1384       */ public
1385     int addRule(Rule r) {
1386        return libsbmlJNI.Model_addRule(swigCPtr, this, Rule.getCPtr(r), r);
1387      }
1388    
1389      
1390    /**
1391       * Adds a copy of the given {@link Constraint} object to this {@link Model}.
1392       * <p>
1393       * @param c the {@link Constraint} object to add
1394       * <p>
1395       * @return integer value indicating success/failure of the
1396       * function.  The possible values
1397       * returned by this function are:
1398       * <ul>
1399       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1400       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1401       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1402       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1403       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1404       * </ul>
1405       * <p>
1406       * @note This method should be used with some caution.  The fact that
1407       * this method <em>copies</em> the object passed to it means that the caller
1408       * will be left holding a physically different object instance than the
1409       * one contained in this {@link Model}.  Changes made to the original object
1410       * instance (such as resetting attribute values) will <em>not affect the
1411       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1412       * to free the original object if it is no longer being used, or else a
1413       * memory leak will result.  Please see {@link Model#createConstraint()} for a
1414       * method that does not lead to these issues.
1415       * <p>
1416       * @see #createConstraint()
1417       */ public
1418     int addConstraint(Constraint c) {
1419        return libsbmlJNI.Model_addConstraint(swigCPtr, this, Constraint.getCPtr(c), c);
1420      }
1421    
1422      
1423    /**
1424       * Adds a copy of the given {@link Reaction} object to this {@link Model}.
1425       * <p>
1426       * @param r the {@link Reaction} object to add
1427       * <p>
1428       * @return integer value indicating success/failure of the
1429       * function.  The possible values
1430       * returned by this function are:
1431       * <ul>
1432       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1433       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1434       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1435       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1436       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1437       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1438       * </ul>
1439       * <p>
1440       * @note This method should be used with some caution.  The fact that
1441       * this method <em>copies</em> the object passed to it means that the caller
1442       * will be left holding a physically different object instance than the
1443       * one contained in this {@link Model}.  Changes made to the original object
1444       * instance (such as resetting attribute values) will <em>not affect the
1445       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1446       * to free the original object if it is no longer being used, or else a
1447       * memory leak will result.  Please see {@link Model#createReaction()} for a
1448       * method that does not lead to these issues.
1449       * <p>
1450       * @see #createReaction()
1451       */ public
1452     int addReaction(Reaction r) {
1453        return libsbmlJNI.Model_addReaction(swigCPtr, this, Reaction.getCPtr(r), r);
1454      }
1455    
1456      
1457    /**
1458       * Adds a copy of the given {@link Event} object to this {@link Model}.
1459       * <p>
1460       * @param e the {@link Event} object to add
1461       * <p>
1462       * @return integer value indicating success/failure of the
1463       * function.  The possible values
1464       * returned by this function are:
1465       * <ul>
1466       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1467       * <li> {@link  libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH }
1468       * <li> {@link  libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH }
1469       * <li> {@link  libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID }
1470       * <li> {@link  libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT }
1471       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
1472       * </ul>
1473       * <p>
1474       * @note This method should be used with some caution.  The fact that
1475       * this method <em>copies</em> the object passed to it means that the caller
1476       * will be left holding a physically different object instance than the
1477       * one contained in this {@link Model}.  Changes made to the original object
1478       * instance (such as resetting attribute values) will <em>not affect the
1479       * instance in the {@link Model}</em>.  In addition, the caller should make sure
1480       * to free the original object if it is no longer being used, or else a
1481       * memory leak will result.  Please see {@link Model#createEvent()} for a method
1482       * that does not lead to these issues.
1483       * <p>
1484       * @see #createEvent()
1485       */ public
1486     int addEvent(Event e) {
1487        return libsbmlJNI.Model_addEvent(swigCPtr, this, Event.getCPtr(e), e);
1488      }
1489    
1490      
1491    /**
1492       * Creates a new {@link FunctionDefinition} inside this {@link Model} and returns it.
1493       * <p>
1494       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1495       * any SBML package namespaces, are used to initialize this
1496       * object's corresponding attributes.
1497       * <p>
1498       * @return the {@link FunctionDefinition} object created
1499       * <p>
1500       * @see #addFunctionDefinition(FunctionDefinition fd)
1501       */ public
1502     FunctionDefinition createFunctionDefinition() {
1503        long cPtr = libsbmlJNI.Model_createFunctionDefinition(swigCPtr, this);
1504        return (cPtr == 0) ? null : new FunctionDefinition(cPtr, false);
1505      }
1506    
1507      
1508    /**
1509       * Creates a new {@link UnitDefinition} inside this {@link Model} and returns it.
1510       * <p>
1511       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1512       * any SBML package namespaces, are used to initialize this
1513       * object's corresponding attributes.
1514       * <p>
1515       * @return the {@link UnitDefinition} object created
1516       * <p>
1517       * @see #addUnitDefinition(UnitDefinition ud)
1518       */ public
1519     UnitDefinition createUnitDefinition() {
1520        long cPtr = libsbmlJNI.Model_createUnitDefinition(swigCPtr, this);
1521        return (cPtr == 0) ? null : new UnitDefinition(cPtr, false);
1522      }
1523    
1524      
1525    /**
1526       * Creates a new {@link Unit} object within the last {@link UnitDefinition} object
1527       * created in this model and returns a pointer to it.
1528       * <p>
1529       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1530       * any SBML package namespaces, are used to initialize this
1531       * object's corresponding attributes.
1532       * <p>
1533       * The mechanism by which the {@link UnitDefinition} was created is not
1534       * significant.  If a {@link UnitDefinition} object does not exist in this model,
1535       * a new {@link Unit} is <em>not</em> created and <code>null</code> is returned instead.
1536       * <p>
1537       * @return the {@link Unit} object created
1538       * <p>
1539       * @see #addUnitDefinition(UnitDefinition ud)
1540       */ public
1541     Unit createUnit() {
1542        long cPtr = libsbmlJNI.Model_createUnit(swigCPtr, this);
1543        return (cPtr == 0) ? null : new Unit(cPtr, false);
1544      }
1545    
1546      
1547    /**
1548       * Creates a new {@link CompartmentType} inside this {@link Model} and returns it.
1549       * <p>
1550       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1551       * any SBML package namespaces, are used to initialize this
1552       * object's corresponding attributes.
1553       * <p>
1554       * @return the {@link CompartmentType} object created
1555       * <p>
1556       * @note The {@link CompartmentType} object class is only available in SBML
1557       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
1558       * Level&nbsp;1 nor Level&nbsp;3.
1559       * <p>
1560       * @see #addCompartmentType(CompartmentType ct)
1561       */ public
1562     CompartmentType createCompartmentType() {
1563        long cPtr = libsbmlJNI.Model_createCompartmentType(swigCPtr, this);
1564        return (cPtr == 0) ? null : new CompartmentType(cPtr, false);
1565      }
1566    
1567      
1568    /**
1569       * Creates a new {@link SpeciesType} inside this {@link Model} and returns it.
1570       * <p>
1571       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1572       * any SBML package namespaces, are used to initialize this
1573       * object's corresponding attributes.
1574       * <p>
1575       * @return the {@link SpeciesType} object created
1576       * <p>
1577       * @note The {@link SpeciesType} object class is only available in SBML
1578       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
1579       * Level&nbsp;1 nor Level&nbsp;3.
1580       * <p>
1581       * @see #addSpeciesType(SpeciesType st)
1582       */ public
1583     SpeciesType createSpeciesType() {
1584        long cPtr = libsbmlJNI.Model_createSpeciesType(swigCPtr, this);
1585        return (cPtr == 0) ? null : new SpeciesType(cPtr, false);
1586      }
1587    
1588      
1589    /**
1590       * Creates a new {@link Compartment} inside this {@link Model} and returns it.
1591       * <p>
1592       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1593       * any SBML package namespaces, are used to initialize this
1594       * object's corresponding attributes.
1595       * <p>
1596       * @return the {@link Compartment} object created
1597       * <p>
1598       * @see #addCompartment(Compartment c)
1599       */ public
1600     Compartment createCompartment() {
1601        long cPtr = libsbmlJNI.Model_createCompartment(swigCPtr, this);
1602        return (cPtr == 0) ? null : new Compartment(cPtr, false);
1603      }
1604    
1605      
1606    /**
1607       * Creates a new {@link Species} inside this {@link Model} and returns it.
1608       * <p>
1609       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1610       * any SBML package namespaces, are used to initialize this
1611       * object's corresponding attributes.
1612       * <p>
1613       * @return the {@link Species} object created
1614       * <p>
1615       * @see #addSpecies(Species s)
1616       */ public
1617     Species createSpecies() {
1618        long cPtr = libsbmlJNI.Model_createSpecies(swigCPtr, this);
1619        return (cPtr == 0) ? null : new Species(cPtr, false);
1620      }
1621    
1622      
1623    /**
1624       * Creates a new {@link Parameter} inside this {@link Model} and returns it.
1625       * <p>
1626       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1627       * any SBML package namespaces, are used to initialize this
1628       * object's corresponding attributes.
1629       * <p>
1630       * @return the {@link Parameter} object created
1631       * <p>
1632       * @see #addParameter(Parameter p)
1633       */ public
1634     Parameter createParameter() {
1635        long cPtr = libsbmlJNI.Model_createParameter(swigCPtr, this);
1636        return (cPtr == 0) ? null : new Parameter(cPtr, false);
1637      }
1638    
1639      
1640    /**
1641       * Creates a new {@link InitialAssignment} inside this {@link Model} and returns it.
1642       * <p>
1643       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1644       * any SBML package namespaces, are used to initialize this
1645       * object's corresponding attributes.
1646       * <p>
1647       * @return the {@link InitialAssignment} object created
1648       * <p>
1649       * @see #addInitialAssignment(InitialAssignment ia)
1650       */ public
1651     InitialAssignment createInitialAssignment() {
1652        long cPtr = libsbmlJNI.Model_createInitialAssignment(swigCPtr, this);
1653        return (cPtr == 0) ? null : new InitialAssignment(cPtr, false);
1654      }
1655    
1656      
1657    /**
1658       * Creates a new {@link AlgebraicRule} inside this {@link Model} and returns it.
1659       * <p>
1660       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1661       * any SBML package namespaces, are used to initialize this
1662       * object's corresponding attributes.
1663       * <p>
1664       * @return the {@link AlgebraicRule} object created
1665       * <p>
1666       * @see #addRule(Rule r)
1667       */ public
1668     AlgebraicRule createAlgebraicRule() {
1669        long cPtr = libsbmlJNI.Model_createAlgebraicRule(swigCPtr, this);
1670        return (cPtr == 0) ? null : new AlgebraicRule(cPtr, false);
1671      }
1672    
1673      
1674    /**
1675       * Creates a new {@link AssignmentRule} inside this {@link Model} and returns it.
1676       * <p>
1677       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1678       * any SBML package namespaces, are used to initialize this
1679       * object's corresponding attributes.
1680       * <p>
1681       * @return the {@link AssignmentRule} object created
1682       * <p>
1683       * @see #addRule(Rule r)
1684       */ public
1685     AssignmentRule createAssignmentRule() {
1686        long cPtr = libsbmlJNI.Model_createAssignmentRule(swigCPtr, this);
1687        return (cPtr == 0) ? null : new AssignmentRule(cPtr, false);
1688      }
1689    
1690      
1691    /**
1692       * Creates a new {@link RateRule} inside this {@link Model} and returns it.
1693       * <p>
1694       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1695       * any SBML package namespaces, are used to initialize this
1696       * object's corresponding attributes.
1697       * <p>
1698       * @return the {@link RateRule} object created
1699       * <p>
1700       * @see #addRule(Rule r)
1701       */ public
1702     RateRule createRateRule() {
1703        long cPtr = libsbmlJNI.Model_createRateRule(swigCPtr, this);
1704        return (cPtr == 0) ? null : new RateRule(cPtr, false);
1705      }
1706    
1707      
1708    /**
1709       * Creates a new {@link Constraint} inside this {@link Model} and returns it.
1710       * <p>
1711       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1712       * any SBML package namespaces, are used to initialize this
1713       * object's corresponding attributes.
1714       * <p>
1715       * @return the {@link Constraint} object created
1716       * <p>
1717       * @see #addConstraint(Constraint c)
1718       */ public
1719     Constraint createConstraint() {
1720        long cPtr = libsbmlJNI.Model_createConstraint(swigCPtr, this);
1721        return (cPtr == 0) ? null : new Constraint(cPtr, false);
1722      }
1723    
1724      
1725    /**
1726       * Creates a new {@link Reaction} inside this {@link Model} and returns it.
1727       * <p>
1728       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1729       * any SBML package namespaces, are used to initialize this
1730       * object's corresponding attributes.
1731       * <p>
1732       * @return the {@link Reaction} object created
1733       * <p>
1734       * @see #addReaction(Reaction r)
1735       */ public
1736     Reaction createReaction() {
1737        long cPtr = libsbmlJNI.Model_createReaction(swigCPtr, this);
1738        return (cPtr == 0) ? null : new Reaction(cPtr, false);
1739      }
1740    
1741      
1742    /**
1743       * Creates a new {@link SpeciesReference} object for a reactant inside the last
1744       * {@link Reaction} object in this {@link Model}, and returns a pointer to it.
1745       * <p>
1746       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1747       * any SBML package namespaces, are used to initialize this
1748       * object's corresponding attributes.
1749       * <p>
1750       * The mechanism by which the last {@link Reaction} object was created and added
1751       * to this {@link Model} is not significant.  It could have been created in a
1752       * variety of ways, for example using createReaction().  If a {@link Reaction}
1753       * does not exist for this model, a new {@link SpeciesReference} is <em>not</em>
1754       * created and <code>null</code> is returned instead.
1755       * <p>
1756       * @return the {@link SpeciesReference} object created
1757       */ public
1758     SpeciesReference createReactant() {
1759        long cPtr = libsbmlJNI.Model_createReactant(swigCPtr, this);
1760        return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1761      }
1762    
1763      
1764    /**
1765       * Creates a new {@link SpeciesReference} object for a product inside the last
1766       * {@link Reaction} object in this {@link Model}, and returns a pointer to it.
1767       * <p>
1768       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1769       * any SBML package namespaces, are used to initialize this
1770       * object's corresponding attributes.
1771       * <p>
1772       * The mechanism by which the last {@link Reaction} object was created and added
1773       * to this {@link Model} is not significant.  It could have been created in a
1774       * variety of ways, for example using createReaction().  If a {@link Reaction}
1775       * does not exist for this model, a new {@link SpeciesReference} is <em>not</em>
1776       * created and <code>null</code> is returned instead.
1777       * <p>
1778       * @return the {@link SpeciesReference} object created
1779       */ public
1780     SpeciesReference createProduct() {
1781        long cPtr = libsbmlJNI.Model_createProduct(swigCPtr, this);
1782        return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1783      }
1784    
1785      
1786    /**
1787       * Creates a new {@link ModifierSpeciesReference} object for a modifier species
1788       * inside the last {@link Reaction} object in this {@link Model}, and returns a pointer
1789       * to it.
1790       * <p>
1791       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1792       * any SBML package namespaces, are used to initialize this
1793       * object's corresponding attributes.
1794       * <p>
1795       * The mechanism by which the last {@link Reaction} object was created and added
1796       * to this {@link Model} is not significant.  It could have been created in a
1797       * variety of ways, for example using createReaction().  If a {@link Reaction}
1798       * does not exist for this model, a new {@link ModifierSpeciesReference} is 
1799       * <em>not</em> created and <code>null</code> is returned instead.
1800       * <p>
1801       * @return the {@link SpeciesReference} object created
1802       */ public
1803     ModifierSpeciesReference createModifier() {
1804        long cPtr = libsbmlJNI.Model_createModifier(swigCPtr, this);
1805        return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1806      }
1807    
1808      
1809    /**
1810       * Creates a new {@link KineticLaw} inside the last {@link Reaction} object created in
1811       * this {@link Model}, and returns a pointer to it.
1812       * <p>
1813       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1814       * any SBML package namespaces, are used to initialize this
1815       * object's corresponding attributes.
1816       * <p>
1817       * The mechanism by which the last {@link Reaction} object was created and added
1818       * to this {@link Model} is not significant.  It could have been created in a
1819       * variety of ways, for example using createReaction().  If a {@link Reaction}
1820       * does not exist for this model, or a {@link Reaction} exists but already has a
1821       * {@link KineticLaw}, a new {@link KineticLaw} is <em>not</em> created and <code>null</code> is returned
1822       * instead.
1823       * <p>
1824       * @return the {@link KineticLaw} object created
1825       */ public
1826     KineticLaw createKineticLaw() {
1827        long cPtr = libsbmlJNI.Model_createKineticLaw(swigCPtr, this);
1828        return (cPtr == 0) ? null : new KineticLaw(cPtr, false);
1829      }
1830    
1831      
1832    /**
1833       * Creates a new local {@link Parameter} inside the {@link KineticLaw} object of the last
1834       * {@link Reaction} created inside this {@link Model}, and returns a pointer to it.
1835       * <p>
1836       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1837       * any SBML package namespaces, are used to initialize this
1838       * object's corresponding attributes.
1839       * <p>
1840       * The last {@link KineticLaw} object in this {@link Model} could have been created in a
1841       * variety of ways.  For example, it could have been added using
1842       * createKineticLaw(), or it could be the result of using
1843       * {@link Reaction#createKineticLaw()} on the {@link Reaction} object created by a
1844       * createReaction().  If a {@link Reaction} does not exist for this model, or the
1845       * last {@link Reaction} does not contain a {@link KineticLaw} object, a new {@link Parameter} is
1846       * <em>not</em> created and <code>null</code> is returned instead.
1847       * <p>
1848       * @return the {@link Parameter} object created
1849       */ public
1850     Parameter createKineticLawParameter() {
1851        long cPtr = libsbmlJNI.Model_createKineticLawParameter(swigCPtr, this);
1852        return (cPtr == 0) ? null : new Parameter(cPtr, false);
1853      }
1854    
1855      
1856    /**
1857       * Creates a new {@link LocalParameter} inside the {@link KineticLaw} object of the last
1858       * {@link Reaction} created inside this {@link Model}, and returns a pointer to it.
1859       * <p>
1860       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1861       * any SBML package namespaces, are used to initialize this
1862       * object's corresponding attributes.
1863       * <p>
1864       * The last {@link KineticLaw} object in this {@link Model} could have been created in a
1865       * variety of ways.  For example, it could have been added using
1866       * createKineticLaw(), or it could be the result of using
1867       * {@link Reaction#createKineticLaw()} on the {@link Reaction} object created by a
1868       * createReaction().  If a {@link Reaction} does not exist for this model, or the
1869       * last {@link Reaction} does not contain a {@link KineticLaw} object, a new {@link Parameter} is
1870       * <em>not</em> created and <code>null</code> is returned instead.
1871       * <p>
1872       * @return the {@link Parameter} object created
1873       */ public
1874     LocalParameter createKineticLawLocalParameter() {
1875        long cPtr = libsbmlJNI.Model_createKineticLawLocalParameter(swigCPtr, this);
1876        return (cPtr == 0) ? null : new LocalParameter(cPtr, false);
1877      }
1878    
1879      
1880    /**
1881       * Creates a new {@link Event} inside this {@link Model} and returns it.
1882       * <p>
1883       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1884       * any SBML package namespaces, are used to initialize this
1885       * object's corresponding attributes.
1886       * <p>
1887       * @return the {@link Event} object created
1888       */ public
1889     Event createEvent() {
1890        long cPtr = libsbmlJNI.Model_createEvent(swigCPtr, this);
1891        return (cPtr == 0) ? null : new Event(cPtr, false);
1892      }
1893    
1894      
1895    /**
1896       * Creates a new {@link EventAssignment} inside the last {@link Event} object created in
1897       * this {@link Model}, and returns a pointer to it.
1898       * <p>
1899       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1900       * any SBML package namespaces, are used to initialize this
1901       * object's corresponding attributes.
1902       * <p>
1903       * The mechanism by which the last {@link Event} object in this model was created
1904       * is not significant.  It could have been created in a variety of ways,
1905       * for example by using createEvent().  If no {@link Event} object exists in this
1906       * {@link Model} object, a new {@link EventAssignment} is <em>not</em> created and <code>null</code> is
1907       * returned instead.
1908       * <p>
1909       * @return the {@link EventAssignment} object created
1910       */ public
1911     EventAssignment createEventAssignment() {
1912        long cPtr = libsbmlJNI.Model_createEventAssignment(swigCPtr, this);
1913        return (cPtr == 0) ? null : new EventAssignment(cPtr, false);
1914      }
1915    
1916      
1917    /**
1918       * Creates a new {@link Trigger} inside the last {@link Event} object created in
1919       * this {@link Model}, and returns a pointer to it.
1920       * <p>
1921       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1922       * any SBML package namespaces, are used to initialize this
1923       * object's corresponding attributes.
1924       * <p>
1925       * The mechanism by which the last {@link Event} object in this model was created
1926       * is not significant.  It could have been created in a variety of ways,
1927       * for example by using createEvent().  If no {@link Event} object exists in this
1928       * {@link Model} object, a new {@link Trigger} is <em>not</em> created and <code>null</code> is
1929       * returned instead.
1930       * <p>
1931       * @return the {@link Trigger} object created
1932       */ public
1933     Trigger createTrigger() {
1934        long cPtr = libsbmlJNI.Model_createTrigger(swigCPtr, this);
1935        return (cPtr == 0) ? null : new Trigger(cPtr, false);
1936      }
1937    
1938      
1939    /**
1940       * Creates a new {@link Delay} inside the last {@link Event} object created in
1941       * this {@link Model}, and returns a pointer to it.
1942       * <p>
1943       * The SBML Level and Version of the enclosing {@link Model} object, as well as
1944       * any SBML package namespaces, are used to initialize this
1945       * object's corresponding attributes.
1946       * <p>
1947       * The mechanism by which the last {@link Event} object in this model was created
1948       * is not significant.  It could have been created in a variety of ways,
1949       * for example by using createEvent().  If no {@link Event} object exists in this
1950       * {@link Model} object, a new {@link Delay} is <em>not</em> created and <code>null</code> is
1951       * returned instead.
1952       * <p>
1953       * @return the {@link Delay} object created
1954       */ public
1955     Delay createDelay() {
1956        long cPtr = libsbmlJNI.Model_createDelay(swigCPtr, this);
1957        return (cPtr == 0) ? null : new Delay(cPtr, false);
1958      }
1959    
1960      
1961    /**
1962       * Sets the value of the 'annotation' subelement of this SBML object to a
1963       * copy of <code>annotation</code>.
1964       * <p>
1965       * Any existing content of the 'annotation' subelement is discarded.
1966       * Unless you have taken steps to first copy and reconstitute any
1967       * existing annotations into the <code>annotation</code> that is about to be
1968       * assigned, it is likely that performing such wholesale replacement is
1969       * unfriendly towards other software applications whose annotations are
1970       * discarded.  An alternative may be to use appendAnnotation().
1971       * <p>
1972       * @param annotation an XML structure that is to be used as the content
1973       * of the 'annotation' subelement of this object
1974       * <p>
1975       * @return integer value indicating success/failure of the
1976       * function.  The possible values
1977       * returned by this function are:
1978       * <ul>
1979       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1980       * </ul>
1981       * <p>
1982       * @see #appendAnnotation(XMLNode annotation)
1983       */ public
1984     int setAnnotation(XMLNode annotation) {
1985        return libsbmlJNI.Model_setAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
1986      }
1987    
1988      
1989    /**
1990       * Sets the value of the 'annotation' subelement of this SBML object to a
1991       * copy of <code>annotation</code>.
1992       * <p>
1993       * Any existing content of the 'annotation' subelement is discarded.
1994       * Unless you have taken steps to first copy and reconstitute any
1995       * existing annotations into the <code>annotation</code> that is about to be
1996       * assigned, it is likely that performing such wholesale replacement is
1997       * unfriendly towards other software applications whose annotations are
1998       * discarded.  An alternative may be to use appendAnnotation().
1999       * <p>
2000       * @param annotation an XML string that is to be used as the content
2001       * of the 'annotation' subelement of this object
2002       * <p>
2003       * @return integer value indicating success/failure of the
2004       * function.  The possible values
2005       * returned by this function are:
2006       * <ul>
2007       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
2008       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
2009       * </ul>
2010       * <p>
2011       * @see #appendAnnotation(String annotation)
2012       */ public
2013     int setAnnotation(String annotation) {
2014        return libsbmlJNI.Model_setAnnotation__SWIG_1(swigCPtr, this, annotation);
2015      }
2016    
2017      
2018    /**
2019       * Appends annotation content to any existing content in the 'annotation'
2020       * subelement of this object.
2021       * <p>
2022       * The content in <code>annotation</code> is copied.  Unlike setAnnotation(), this
2023       * method allows other annotations to be preserved when an application
2024       * adds its own data.
2025       * <p>
2026       * @param annotation an XML structure that is to be copied and appended
2027       * to the content of the 'annotation' subelement of this object
2028       * <p>
2029       * @return integer value indicating success/failure of the
2030       * function.  The possible values
2031       * returned by this function are:
2032       * <ul>
2033       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
2034       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
2035       * </ul>
2036       * <p>
2037       * @see #setAnnotation(XMLNode annotation)
2038       */ public
2039     int appendAnnotation(XMLNode annotation) {
2040        return libsbmlJNI.Model_appendAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
2041      }
2042    
2043      
2044    /**
2045       * Appends annotation content to any existing content in the 'annotation'
2046       * subelement of this object.
2047       * <p>
2048       * The content in <code>annotation</code> is copied.  Unlike setAnnotation(), this 
2049       * method allows other annotations to be preserved when an application
2050       * adds its own data.
2051       * <p>
2052       * @param annotation an XML string that is to be copied and appended
2053       * to the content of the 'annotation' subelement of this object
2054       * <p>
2055       * @return integer value indicating success/failure of the
2056       * function.  The possible values
2057       * returned by this function are:
2058       * <ul>
2059       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
2060       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
2061       * </ul>
2062       * <p>
2063       * @see #setAnnotation(String annotation)
2064       */ public
2065     int appendAnnotation(String annotation) {
2066        return libsbmlJNI.Model_appendAnnotation__SWIG_1(swigCPtr, this, annotation);
2067      }
2068    
2069      
2070    /**
2071       * Get the {@link ListOfFunctionDefinitions} object in this {@link Model}.
2072       * <p>
2073       * @return the list of FunctionDefinitions for this {@link Model}.
2074       */ public
2075     ListOfFunctionDefinitions getListOfFunctionDefinitions() {
2076        long cPtr = libsbmlJNI.Model_getListOfFunctionDefinitions__SWIG_0(swigCPtr, this);
2077        return (cPtr == 0) ? null : new ListOfFunctionDefinitions(cPtr, false);
2078      }
2079    
2080      
2081    /**
2082       * Get the {@link ListOfUnitDefinitions} object in this {@link Model}.
2083       * <p>
2084       * @return the list of UnitDefinitions for this {@link Model}.
2085       */ public
2086     ListOfUnitDefinitions getListOfUnitDefinitions() {
2087        long cPtr = libsbmlJNI.Model_getListOfUnitDefinitions__SWIG_0(swigCPtr, this);
2088        return (cPtr == 0) ? null : new ListOfUnitDefinitions(cPtr, false);
2089      }
2090    
2091      
2092    /**
2093       * Get the {@link ListOfCompartmentTypes} object in this {@link Model}.
2094       * <p>
2095       * @return the list of CompartmentTypes for this {@link Model}.
2096       * <p>
2097       * @note The {@link CompartmentType} object class is only available in SBML
2098       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2099       * Level&nbsp;1 nor Level&nbsp;3.
2100       */ public
2101     ListOfCompartmentTypes getListOfCompartmentTypes() {
2102        long cPtr = libsbmlJNI.Model_getListOfCompartmentTypes__SWIG_0(swigCPtr, this);
2103        return (cPtr == 0) ? null : new ListOfCompartmentTypes(cPtr, false);
2104      }
2105    
2106      
2107    /**
2108       * Get the {@link ListOfSpeciesTypes} object in this {@link Model}.
2109       * <p>
2110       * @return the list of SpeciesTypes for this {@link Model}.
2111       * <p>
2112       * @note The {@link SpeciesType} object class is only available in SBML
2113       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2114       * Level&nbsp;1 nor Level&nbsp;3.
2115       */ public
2116     ListOfSpeciesTypes getListOfSpeciesTypes() {
2117        long cPtr = libsbmlJNI.Model_getListOfSpeciesTypes__SWIG_0(swigCPtr, this);
2118        return (cPtr == 0) ? null : new ListOfSpeciesTypes(cPtr, false);
2119      }
2120    
2121      
2122    /**
2123       * Get the {@link ListOfCompartments} object in this {@link Model}.
2124       * <p>
2125       * @return the list of Compartments for this {@link Model}.
2126       */ public
2127     ListOfCompartments getListOfCompartments() {
2128        long cPtr = libsbmlJNI.Model_getListOfCompartments__SWIG_0(swigCPtr, this);
2129        return (cPtr == 0) ? null : new ListOfCompartments(cPtr, false);
2130      }
2131    
2132      
2133    /**
2134       * Get the {@link ListOfSpecies} object in this {@link Model}.
2135       * <p>
2136       * @return the list of {@link Species} for this {@link Model}.
2137       */ public
2138     ListOfSpecies getListOfSpecies() {
2139        long cPtr = libsbmlJNI.Model_getListOfSpecies__SWIG_0(swigCPtr, this);
2140        return (cPtr == 0) ? null : new ListOfSpecies(cPtr, false);
2141      }
2142    
2143      
2144    /**
2145       * Get the {@link ListOfParameters} object in this {@link Model}.
2146       * <p>
2147       * @return the list of Parameters for this {@link Model}.
2148       */ public
2149     ListOfParameters getListOfParameters() {
2150        long cPtr = libsbmlJNI.Model_getListOfParameters__SWIG_0(swigCPtr, this);
2151        return (cPtr == 0) ? null : new ListOfParameters(cPtr, false);
2152      }
2153    
2154      
2155    /**
2156       * Get the {@link ListOfInitialAssignments} object in this {@link Model}.
2157       * <p>
2158       * @return the list of InitialAssignments for this {@link Model}.
2159       */ public
2160     ListOfInitialAssignments getListOfInitialAssignments() {
2161        long cPtr = libsbmlJNI.Model_getListOfInitialAssignments__SWIG_0(swigCPtr, this);
2162        return (cPtr == 0) ? null : new ListOfInitialAssignments(cPtr, false);
2163      }
2164    
2165      
2166    /**
2167       * Get the {@link ListOfRules} object in this {@link Model}.
2168       * <p>
2169       * @return the list of Rules for this {@link Model}.
2170       */ public
2171     ListOfRules getListOfRules() {
2172        long cPtr = libsbmlJNI.Model_getListOfRules__SWIG_0(swigCPtr, this);
2173        return (cPtr == 0) ? null : new ListOfRules(cPtr, false);
2174      }
2175    
2176      
2177    /**
2178       * Get the {@link ListOfConstraints} object in this {@link Model}.
2179       * <p>
2180       * @return the list of Constraints for this {@link Model}.
2181       */ public
2182     ListOfConstraints getListOfConstraints() {
2183        long cPtr = libsbmlJNI.Model_getListOfConstraints__SWIG_0(swigCPtr, this);
2184        return (cPtr == 0) ? null : new ListOfConstraints(cPtr, false);
2185      }
2186    
2187      
2188    /**
2189       * Get the {@link ListOfReactions} object in this {@link Model}.
2190       * <p>
2191       * @return the list of Reactions for this {@link Model}.
2192       */ public
2193     ListOfReactions getListOfReactions() {
2194        long cPtr = libsbmlJNI.Model_getListOfReactions__SWIG_0(swigCPtr, this);
2195        return (cPtr == 0) ? null : new ListOfReactions(cPtr, false);
2196      }
2197    
2198      
2199    /**
2200       * Get the {@link ListOfEvents} object in this {@link Model}.
2201       * <p>
2202       * @return the list of Events for this {@link Model}.
2203       */ public
2204     ListOfEvents getListOfEvents() {
2205        long cPtr = libsbmlJNI.Model_getListOfEvents__SWIG_0(swigCPtr, this);
2206        return (cPtr == 0) ? null : new ListOfEvents(cPtr, false);
2207      }
2208    
2209      
2210    /**
2211       * Get the nth FunctionDefinitions object in this {@link Model}.
2212       * <p>
2213       * @return the nth {@link FunctionDefinition} of this {@link Model}.
2214       */ public
2215     FunctionDefinition getFunctionDefinition(long n) {
2216        long cPtr = libsbmlJNI.Model_getFunctionDefinition__SWIG_0(swigCPtr, this, n);
2217        return (cPtr == 0) ? null : new FunctionDefinition(cPtr, false);
2218      }
2219    
2220      
2221    /**
2222       * Get a {@link FunctionDefinition} object based on its identifier.
2223       * <p>
2224       * @return the {@link FunctionDefinition} in this {@link Model} with the identifier
2225       * <code>sid</code> or <code>null</code> if no such {@link FunctionDefinition} exists.
2226       */ public
2227     FunctionDefinition getFunctionDefinition(String sid) {
2228        long cPtr = libsbmlJNI.Model_getFunctionDefinition__SWIG_2(swigCPtr, this, sid);
2229        return (cPtr == 0) ? null : new FunctionDefinition(cPtr, false);
2230      }
2231    
2232      
2233    /**
2234       * Get the nth {@link UnitDefinition} object in this {@link Model}.
2235       * <p>
2236       * @return the nth {@link UnitDefinition} of this {@link Model}.
2237       */ public
2238     UnitDefinition getUnitDefinition(long n) {
2239        long cPtr = libsbmlJNI.Model_getUnitDefinition__SWIG_0(swigCPtr, this, n);
2240        return (cPtr == 0) ? null : new UnitDefinition(cPtr, false);
2241      }
2242    
2243      
2244    /**
2245       * Get a {@link UnitDefinition} based on its identifier.
2246       * <p>
2247       * @return the {@link UnitDefinition} in this {@link Model} with the identifier <code>sid</code> or
2248       * <code>null</code> if no such {@link UnitDefinition} exists.
2249       */ public
2250     UnitDefinition getUnitDefinition(String sid) {
2251        long cPtr = libsbmlJNI.Model_getUnitDefinition__SWIG_2(swigCPtr, this, sid);
2252        return (cPtr == 0) ? null : new UnitDefinition(cPtr, false);
2253      }
2254    
2255      
2256    /**
2257       * Get the nth {@link CompartmentType} object in this {@link Model}.
2258       * <p>
2259       * @return the nth {@link CompartmentType} of this {@link Model}.
2260       * <p>
2261       * @note The {@link CompartmentType} object class is only available in SBML
2262       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2263       * Level&nbsp;1 nor Level&nbsp;3.
2264       */ public
2265     CompartmentType getCompartmentType(long n) {
2266        long cPtr = libsbmlJNI.Model_getCompartmentType__SWIG_0(swigCPtr, this, n);
2267        return (cPtr == 0) ? null : new CompartmentType(cPtr, false);
2268      }
2269    
2270      
2271    /**
2272       * Get a {@link CompartmentType} object based on its identifier.
2273       * <p>
2274       * @return the {@link CompartmentType} in this {@link Model} with the identifier <code>sid</code>
2275       * or <code>null</code> if no such {@link CompartmentType} exists.
2276       * <p>
2277       * @note The {@link CompartmentType} object class is only available in SBML
2278       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2279       * Level&nbsp;1 nor Level&nbsp;3.
2280       */ public
2281     CompartmentType getCompartmentType(String sid) {
2282        long cPtr = libsbmlJNI.Model_getCompartmentType__SWIG_2(swigCPtr, this, sid);
2283        return (cPtr == 0) ? null : new CompartmentType(cPtr, false);
2284      }
2285    
2286      
2287    /**
2288       * Get the nth {@link SpeciesType} object in this {@link Model}.
2289       * <p>
2290       * @return the nth {@link SpeciesType} of this {@link Model}.
2291       * <p>
2292       * @note The {@link SpeciesType} object class is only available in SBML
2293       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2294       * Level&nbsp;1 nor Level&nbsp;3.
2295       */ public
2296     SpeciesType getSpeciesType(long n) {
2297        long cPtr = libsbmlJNI.Model_getSpeciesType__SWIG_0(swigCPtr, this, n);
2298        return (cPtr == 0) ? null : new SpeciesType(cPtr, false);
2299      }
2300    
2301      
2302    /**
2303       * Get a {@link SpeciesType} object based on its identifier.
2304       * <p>
2305       * @return the {@link SpeciesType} in this {@link Model} with the identifier <code>sid</code> or
2306       * <code>null</code> if no such {@link SpeciesType} exists.
2307       * <p>
2308       * @note The {@link SpeciesType} object class is only available in SBML
2309       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2310       * Level&nbsp;1 nor Level&nbsp;3.
2311       */ public
2312     SpeciesType getSpeciesType(String sid) {
2313        long cPtr = libsbmlJNI.Model_getSpeciesType__SWIG_2(swigCPtr, this, sid);
2314        return (cPtr == 0) ? null : new SpeciesType(cPtr, false);
2315      }
2316    
2317      
2318    /**
2319       * Get the nth {@link Compartment} object in this {@link Model}.
2320       * <p>
2321       * @return the nth {@link Compartment} of this {@link Model}.
2322       */ public
2323     Compartment getCompartment(long n) {
2324        long cPtr = libsbmlJNI.Model_getCompartment__SWIG_0(swigCPtr, this, n);
2325        return (cPtr == 0) ? null : new Compartment(cPtr, false);
2326      }
2327    
2328      
2329    /**
2330       * Get a {@link Compartment} object based on its identifier.
2331       * <p>
2332       * @return the {@link Compartment} in this {@link Model} with the identifier <code>sid</code> or
2333       * <code>null</code> if no such {@link Compartment} exists.
2334       */ public
2335     Compartment getCompartment(String sid) {
2336        long cPtr = libsbmlJNI.Model_getCompartment__SWIG_2(swigCPtr, this, sid);
2337        return (cPtr == 0) ? null : new Compartment(cPtr, false);
2338      }
2339    
2340      
2341    /**
2342       * Get the nth {@link Species} object in this {@link Model}.
2343       * <p>
2344       * @return the nth {@link Species} of this {@link Model}.
2345       */ public
2346     Species getSpecies(long n) {
2347        long cPtr = libsbmlJNI.Model_getSpecies__SWIG_0(swigCPtr, this, n);
2348        return (cPtr == 0) ? null : new Species(cPtr, false);
2349      }
2350    
2351      
2352    /**
2353       * Get a {@link Species} object based on its identifier.
2354       * <p>
2355       * @return the {@link Species} in this {@link Model} with the identifier <code>sid</code> or <code>null</code>
2356       * if no such {@link Species} exists.
2357       */ public
2358     Species getSpecies(String sid) {
2359        long cPtr = libsbmlJNI.Model_getSpecies__SWIG_2(swigCPtr, this, sid);
2360        return (cPtr == 0) ? null : new Species(cPtr, false);
2361      }
2362    
2363      
2364    /**
2365       * Get the nth {@link Parameter} object in this {@link Model}.
2366       * <p>
2367       * @return the nth {@link Parameter} of this {@link Model}.
2368       */ public
2369     Parameter getParameter(long n) {
2370        long cPtr = libsbmlJNI.Model_getParameter__SWIG_0(swigCPtr, this, n);
2371        return (cPtr == 0) ? null : new Parameter(cPtr, false);
2372      }
2373    
2374      
2375    /**
2376       * Get a {@link Parameter} object based on its identifier.
2377       * <p>
2378       * @return the {@link Parameter} in this {@link Model} with the identifier <code>sid</code> or <code>null</code>
2379       * if no such {@link Parameter} exists.
2380       */ public
2381     Parameter getParameter(String sid) {
2382        long cPtr = libsbmlJNI.Model_getParameter__SWIG_2(swigCPtr, this, sid);
2383        return (cPtr == 0) ? null : new Parameter(cPtr, false);
2384      }
2385    
2386      
2387    /**
2388       * Get the nth {@link InitialAssignment} object in this {@link Model}.
2389       * <p>
2390       * @return the nth {@link InitialAssignment} of this {@link Model}.
2391       */ public
2392     InitialAssignment getInitialAssignment(long n) {
2393        long cPtr = libsbmlJNI.Model_getInitialAssignment__SWIG_0(swigCPtr, this, n);
2394        return (cPtr == 0) ? null : new InitialAssignment(cPtr, false);
2395      }
2396    
2397      
2398    /**
2399       * Get an {@link InitialAssignment} object based on the symbol to which it
2400       * assigns a value.
2401       * <p>
2402       * @return the {@link InitialAssignment} in this {@link Model} with the given 'symbol'
2403       * attribute value or <code>null</code> if no such {@link InitialAssignment} exists.
2404       */ public
2405     InitialAssignment getInitialAssignment(String symbol) {
2406        long cPtr = libsbmlJNI.Model_getInitialAssignment__SWIG_2(swigCPtr, this, symbol);
2407        return (cPtr == 0) ? null : new InitialAssignment(cPtr, false);
2408      }
2409    
2410      
2411    /**
2412       * Get the nth {@link Rule} object in this {@link Model}.
2413       * <p>
2414       * @return the nth {@link Rule} of this {@link Model}.
2415       */ public
2416     Rule getRule(long n) {
2417      return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_getRule__SWIG_0(swigCPtr, this, n), false);
2418    }
2419    
2420      
2421    /**
2422       * Get a {@link Rule} object based on the variable to which it assigns a value.
2423       * <p>
2424       * @return the {@link Rule} in this {@link Model} with the given 'variable' attribute
2425       * value or <code>null</code> if no such {@link Rule} exists.
2426       */ public
2427     Rule getRule(String variable) {
2428      return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_getRule__SWIG_2(swigCPtr, this, variable), false);
2429    }
2430    
2431      
2432    /**
2433       * Get the nth {@link Constraint} object in this {@link Model}.
2434       * <p>
2435       * @return the nth {@link Constraint} of this {@link Model}.
2436       */ public
2437     Constraint getConstraint(long n) {
2438        long cPtr = libsbmlJNI.Model_getConstraint__SWIG_0(swigCPtr, this, n);
2439        return (cPtr == 0) ? null : new Constraint(cPtr, false);
2440      }
2441    
2442      
2443    /**
2444       * Get the nth {@link Reaction} object in this {@link Model}.
2445       * <p>
2446       * @return the nth {@link Reaction} of this {@link Model}.
2447       */ public
2448     Reaction getReaction(long n) {
2449        long cPtr = libsbmlJNI.Model_getReaction__SWIG_0(swigCPtr, this, n);
2450        return (cPtr == 0) ? null : new Reaction(cPtr, false);
2451      }
2452    
2453      
2454    /**
2455       * Get a {@link Reaction} object based on its identifier.
2456       * <p>
2457       * @return the {@link Reaction} in this {@link Model} with the identifier <code>sid</code> or <code>null</code>
2458       * if no such {@link Reaction} exists.
2459       */ public
2460     Reaction getReaction(String sid) {
2461        long cPtr = libsbmlJNI.Model_getReaction__SWIG_2(swigCPtr, this, sid);
2462        return (cPtr == 0) ? null : new Reaction(cPtr, false);
2463      }
2464    
2465      
2466    /**
2467       * Get a {@link SpeciesReference} object based on its identifier.
2468       * <p>
2469       * @return the {@link SpeciesReference} in this {@link Model} with the identifier <code>sid</code> or <code>null</code>
2470       * if no such {@link SpeciesReference} exists.
2471       */ public
2472     SpeciesReference getSpeciesReference(String sid) {
2473        long cPtr = libsbmlJNI.Model_getSpeciesReference__SWIG_0(swigCPtr, this, sid);
2474        return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
2475      }
2476    
2477      
2478    /**
2479       * Get the nth {@link Event} object in this {@link Model}.
2480       * <p>
2481       * @return the nth {@link Event} of this {@link Model}.
2482       */ public
2483     Event getEvent(long n) {
2484        long cPtr = libsbmlJNI.Model_getEvent__SWIG_0(swigCPtr, this, n);
2485        return (cPtr == 0) ? null : new Event(cPtr, false);
2486      }
2487    
2488      
2489    /**
2490       * Get an {@link Event} object based on its identifier.
2491       * <p>
2492       * @return the {@link Event} in this {@link Model} with the identifier <code>sid</code> or <code>null</code> if
2493       * no such {@link Event} exists.
2494       */ public
2495     Event getEvent(String sid) {
2496        long cPtr = libsbmlJNI.Model_getEvent__SWIG_2(swigCPtr, this, sid);
2497        return (cPtr == 0) ? null : new Event(cPtr, false);
2498      }
2499    
2500      
2501    /**
2502       * Get the number of {@link FunctionDefinition} objects in this {@link Model}.
2503       * <p>
2504       * @return the number of FunctionDefinitions in this {@link Model}.
2505       */ public
2506     long getNumFunctionDefinitions() {
2507        return libsbmlJNI.Model_getNumFunctionDefinitions(swigCPtr, this);
2508      }
2509    
2510      
2511    /**
2512       * Get the number of {@link UnitDefinition} objects in this {@link Model}.
2513       * <p>
2514       * @return the number of UnitDefinitions in this {@link Model}.
2515       */ public
2516     long getNumUnitDefinitions() {
2517        return libsbmlJNI.Model_getNumUnitDefinitions(swigCPtr, this);
2518      }
2519    
2520      
2521    /**
2522       * Get the number of {@link CompartmentType} objects in this {@link Model}.
2523       * <p>
2524       * @return the number of CompartmentTypes in this {@link Model}.
2525       * <p>
2526       * @note The {@link CompartmentType} object class is only available in SBML
2527       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2528       * Level&nbsp;1 nor Level&nbsp;3.
2529       */ public
2530     long getNumCompartmentTypes() {
2531        return libsbmlJNI.Model_getNumCompartmentTypes(swigCPtr, this);
2532      }
2533    
2534      
2535    /**
2536       * Get the number of {@link SpeciesType} objects in this {@link Model}.
2537       * <p>
2538       * @return the number of SpeciesTypes in this {@link Model}.
2539       * <p>
2540       * @note The {@link SpeciesType} object class is only available in SBML
2541       * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2542       * Level&nbsp;1 nor Level&nbsp;3.
2543       */ public
2544     long getNumSpeciesTypes() {
2545        return libsbmlJNI.Model_getNumSpeciesTypes(swigCPtr, this);
2546      }
2547    
2548      
2549    /**
2550       * Get the number of {@link Compartment} objects in this {@link Model}.
2551       * <p>
2552       * @return the number of Compartments in this {@link Model}.
2553       */ public
2554     long getNumCompartments() {
2555        return libsbmlJNI.Model_getNumCompartments(swigCPtr, this);
2556      }
2557    
2558      
2559    /**
2560       * Get the number of Specie objects in this {@link Model}.
2561       * <p>
2562       * @return the number of {@link Species} in this {@link Model}.
2563       */ public
2564     long getNumSpecies() {
2565        return libsbmlJNI.Model_getNumSpecies(swigCPtr, this);
2566      }
2567    
2568      
2569    /**
2570       * Get the number of {@link Species} in this {@link Model} having their
2571       * 'boundaryCondition' attribute value set to <code>true.</code>
2572       * <p>
2573       * @return the number of {@link Species} in this {@link Model} with boundaryCondition set
2574       * to true.
2575       */ public
2576     long getNumSpeciesWithBoundaryCondition() {
2577        return libsbmlJNI.Model_getNumSpeciesWithBoundaryCondition(swigCPtr, this);
2578      }
2579    
2580      
2581    /**
2582       * Get the number of {@link Parameter} objects in this {@link Model}.
2583       * <p>
2584       * @return the number of Parameters in this {@link Model}.  Parameters defined in
2585       * KineticLaws are not included.
2586       */ public
2587     long getNumParameters() {
2588        return libsbmlJNI.Model_getNumParameters(swigCPtr, this);
2589      }
2590    
2591      
2592    /**
2593       * Get the number of {@link InitialAssignment} objects in this {@link Model}.
2594       * <p>
2595       * @return the number of InitialAssignments in this {@link Model}.
2596       */ public
2597     long getNumInitialAssignments() {
2598        return libsbmlJNI.Model_getNumInitialAssignments(swigCPtr, this);
2599      }
2600    
2601      
2602    /**
2603       * Get the number of {@link Rule} objects in this {@link Model}.
2604       * <p>
2605       * @return the number of Rules in this {@link Model}.
2606       */ public
2607     long getNumRules() {
2608        return libsbmlJNI.Model_getNumRules(swigCPtr, this);
2609      }
2610    
2611      
2612    /**
2613       * Get the number of {@link Constraint} objects in this {@link Model}.
2614       * <p>
2615       * @return the number of Constraints in this {@link Model}.
2616       */ public
2617     long getNumConstraints() {
2618        return libsbmlJNI.Model_getNumConstraints(swigCPtr, this);
2619      }
2620    
2621      
2622    /**
2623       * Get the number of {@link Reaction} objects in this {@link Model}.
2624       * <p>
2625       * @return the number of Reactions in this {@link Model}.
2626       */ public
2627     long getNumReactions() {
2628        return libsbmlJNI.Model_getNumReactions(swigCPtr, this);
2629      }
2630    
2631      
2632    /**
2633       * Get the number of {@link Event} objects in this {@link Model}.
2634       * <p>
2635       * @return the number of Events in this {@link Model}.
2636       */ public
2637     long getNumEvents() {
2638        return libsbmlJNI.Model_getNumEvents(swigCPtr, this);
2639      }
2640    
2641      
2642    /**
2643       * Finds this {@link Model}'s parent {@link SBMLDocument} and calls setModel(null) on it,
2644       * indirectly deleting itself.  Overridden from the {@link SBase} function since
2645       * the parent is not a {@link ListOf}.
2646       * <p>
2647       * @return integer value indicating success/failure of the
2648       * function.   The possible values
2649       * returned by this function are:
2650       * <ul>
2651       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
2652       * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
2653       * </ul>
2654       */ public
2655     int removeFromParentAndDelete() {
2656        return libsbmlJNI.Model_removeFromParentAndDelete(swigCPtr, this);
2657      }
2658    
2659      
2660    /**
2661       * Renames all the SIdRef attributes on this element, including any found in MathML
2662       */ public
2663     void renameSIdRefs(String oldid, String newid) {
2664        libsbmlJNI.Model_renameSIdRefs(swigCPtr, this, oldid, newid);
2665      }
2666    
2667      
2668    /**
2669       * Renames all the UnitSIdRef attributes on this element
2670       */ public
2671     void renameUnitSIdRefs(String oldid, String newid) {
2672        libsbmlJNI.Model_renameUnitSIdRefs(swigCPtr, this, oldid, newid);
2673      }
2674    
2675      
2676    /**
2677       * Predicate returning <code>true</code> if the
2678       * given {@link ASTNode} is a boolean.
2679       * <p>
2680       * Often times, this question can be answered with the {@link ASTNode}'s own
2681       * isBoolean() method, but if the AST is an expression that calls a
2682       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2683       * is needed for lookup context.
2684       * <p>
2685       * @return true if the given {@link ASTNode} is a boolean.
2686       * @internal
2687       */ public
2688     void convertL1ToL2() {
2689        libsbmlJNI.Model_convertL1ToL2(swigCPtr, this);
2690      }
2691    
2692      
2693    /**
2694       * Predicate returning <code>true</code> if the
2695       * given {@link ASTNode} is a boolean.
2696       * <p>
2697       * Often times, this question can be answered with the {@link ASTNode}'s own
2698       * isBoolean() method, but if the AST is an expression that calls a
2699       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2700       * is needed for lookup context.
2701       * <p>
2702       * @return true if the given {@link ASTNode} is a boolean.
2703       * @internal
2704       */ public
2705     void convertL1ToL3() {
2706        libsbmlJNI.Model_convertL1ToL3(swigCPtr, this);
2707      }
2708    
2709      
2710    /**
2711       * Predicate returning <code>true</code> if the
2712       * given {@link ASTNode} is a boolean.
2713       * <p>
2714       * Often times, this question can be answered with the {@link ASTNode}'s own
2715       * isBoolean() method, but if the AST is an expression that calls a
2716       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2717       * is needed for lookup context.
2718       * <p>
2719       * @return true if the given {@link ASTNode} is a boolean.
2720       * @internal
2721       */ public
2722     void convertL2ToL3() {
2723        libsbmlJNI.Model_convertL2ToL3(swigCPtr, this);
2724      }
2725    
2726      
2727    /**
2728       * Predicate returning <code>true</code> if the
2729       * given {@link ASTNode} is a boolean.
2730       * <p>
2731       * Often times, this question can be answered with the {@link ASTNode}'s own
2732       * isBoolean() method, but if the AST is an expression that calls a
2733       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2734       * is needed for lookup context.
2735       * <p>
2736       * @return true if the given {@link ASTNode} is a boolean.
2737       * @internal
2738       */ public
2739     void convertL2ToL1(boolean strict) {
2740        libsbmlJNI.Model_convertL2ToL1__SWIG_0(swigCPtr, this, strict);
2741      }
2742    
2743      
2744    /**
2745       * Predicate returning <code>true</code> if the
2746       * given {@link ASTNode} is a boolean.
2747       * <p>
2748       * Often times, this question can be answered with the {@link ASTNode}'s own
2749       * isBoolean() method, but if the AST is an expression that calls a
2750       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2751       * is needed for lookup context.
2752       * <p>
2753       * @return true if the given {@link ASTNode} is a boolean.
2754       * @internal
2755       */ public
2756     void convertL2ToL1() {
2757        libsbmlJNI.Model_convertL2ToL1__SWIG_1(swigCPtr, this);
2758      }
2759    
2760      
2761    /**
2762       * Predicate returning <code>true</code> if the
2763       * given {@link ASTNode} is a boolean.
2764       * <p>
2765       * Often times, this question can be answered with the {@link ASTNode}'s own
2766       * isBoolean() method, but if the AST is an expression that calls a
2767       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2768       * is needed for lookup context.
2769       * <p>
2770       * @return true if the given {@link ASTNode} is a boolean.
2771       * @internal
2772       */ public
2773     void convertL3ToL1() {
2774        libsbmlJNI.Model_convertL3ToL1(swigCPtr, this);
2775      }
2776    
2777      
2778    /**
2779       * Predicate returning <code>true</code> if the
2780       * given {@link ASTNode} is a boolean.
2781       * <p>
2782       * Often times, this question can be answered with the {@link ASTNode}'s own
2783       * isBoolean() method, but if the AST is an expression that calls a
2784       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2785       * is needed for lookup context.
2786       * <p>
2787       * @return true if the given {@link ASTNode} is a boolean.
2788       * @internal
2789       */ public
2790     void convertL3ToL2(boolean strict) {
2791        libsbmlJNI.Model_convertL3ToL2__SWIG_0(swigCPtr, this, strict);
2792      }
2793    
2794      
2795    /**
2796       * Predicate returning <code>true</code> if the
2797       * given {@link ASTNode} is a boolean.
2798       * <p>
2799       * Often times, this question can be answered with the {@link ASTNode}'s own
2800       * isBoolean() method, but if the AST is an expression that calls a
2801       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2802       * is needed for lookup context.
2803       * <p>
2804       * @return true if the given {@link ASTNode} is a boolean.
2805       * @internal
2806       */ public
2807     void convertL3ToL2() {
2808        libsbmlJNI.Model_convertL3ToL2__SWIG_1(swigCPtr, this);
2809      }
2810    
2811      
2812    /**
2813       * Predicate returning <code>true</code> if the
2814       * given {@link ASTNode} is a boolean.
2815       * <p>
2816       * Often times, this question can be answered with the {@link ASTNode}'s own
2817       * isBoolean() method, but if the AST is an expression that calls a
2818       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2819       * is needed for lookup context.
2820       * <p>
2821       * @return true if the given {@link ASTNode} is a boolean.
2822       * @internal
2823       */ public
2824     void addModifiers() {
2825        libsbmlJNI.Model_addModifiers(swigCPtr, this);
2826      }
2827    
2828      
2829    /**
2830       * Predicate returning <code>true</code> if the
2831       * given {@link ASTNode} is a boolean.
2832       * <p>
2833       * Often times, this question can be answered with the {@link ASTNode}'s own
2834       * isBoolean() method, but if the AST is an expression that calls a
2835       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2836       * is needed for lookup context.
2837       * <p>
2838       * @return true if the given {@link ASTNode} is a boolean.
2839       * @internal
2840       */ public
2841     void addConstantAttribute() {
2842        libsbmlJNI.Model_addConstantAttribute(swigCPtr, this);
2843      }
2844    
2845      
2846    /**
2847       * Predicate returning <code>true</code> if the
2848       * given {@link ASTNode} is a boolean.
2849       * <p>
2850       * Often times, this question can be answered with the {@link ASTNode}'s own
2851       * isBoolean() method, but if the AST is an expression that calls a
2852       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2853       * is needed for lookup context.
2854       * <p>
2855       * @return true if the given {@link ASTNode} is a boolean.
2856       * @internal
2857       */ public
2858     void setSpatialDimensions(double dims) {
2859        libsbmlJNI.Model_setSpatialDimensions__SWIG_0(swigCPtr, this, dims);
2860      }
2861    
2862      
2863    /**
2864       * Predicate returning <code>true</code> if the
2865       * given {@link ASTNode} is a boolean.
2866       * <p>
2867       * Often times, this question can be answered with the {@link ASTNode}'s own
2868       * isBoolean() method, but if the AST is an expression that calls a
2869       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2870       * is needed for lookup context.
2871       * <p>
2872       * @return true if the given {@link ASTNode} is a boolean.
2873       * @internal
2874       */ public
2875     void setSpatialDimensions() {
2876        libsbmlJNI.Model_setSpatialDimensions__SWIG_1(swigCPtr, this);
2877      }
2878    
2879      
2880    /**
2881       * Predicate returning <code>true</code> if the
2882       * given {@link ASTNode} is a boolean.
2883       * <p>
2884       * Often times, this question can be answered with the {@link ASTNode}'s own
2885       * isBoolean() method, but if the AST is an expression that calls a
2886       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2887       * is needed for lookup context.
2888       * <p>
2889       * @return true if the given {@link ASTNode} is a boolean.
2890       * @internal
2891       */ public
2892     void addDefinitionsForDefaultUnits() {
2893        libsbmlJNI.Model_addDefinitionsForDefaultUnits(swigCPtr, this);
2894      }
2895    
2896      
2897    /**
2898       * Predicate returning <code>true</code> if the
2899       * given {@link ASTNode} is a boolean.
2900       * <p>
2901       * Often times, this question can be answered with the {@link ASTNode}'s own
2902       * isBoolean() method, but if the AST is an expression that calls a
2903       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2904       * is needed for lookup context.
2905       * <p>
2906       * @return true if the given {@link ASTNode} is a boolean.
2907       * @internal
2908       */ public
2909     void convertParametersToLocals(long level, long version) {
2910        libsbmlJNI.Model_convertParametersToLocals(swigCPtr, this, level, version);
2911      }
2912    
2913      
2914    /**
2915       * Predicate returning <code>true</code> if the
2916       * given {@link ASTNode} is a boolean.
2917       * <p>
2918       * Often times, this question can be answered with the {@link ASTNode}'s own
2919       * isBoolean() method, but if the AST is an expression that calls a
2920       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2921       * is needed for lookup context.
2922       * <p>
2923       * @return true if the given {@link ASTNode} is a boolean.
2924       * @internal
2925       */ public
2926     void setSpeciesReferenceConstantValueAndStoichiometry() {
2927        libsbmlJNI.Model_setSpeciesReferenceConstantValueAndStoichiometry(swigCPtr, this);
2928      }
2929    
2930      
2931    /**
2932       * Predicate returning <code>true</code> if the
2933       * given {@link ASTNode} is a boolean.
2934       * <p>
2935       * Often times, this question can be answered with the {@link ASTNode}'s own
2936       * isBoolean() method, but if the AST is an expression that calls a
2937       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2938       * is needed for lookup context.
2939       * <p>
2940       * @return true if the given {@link ASTNode} is a boolean.
2941       * @internal
2942       */ public
2943     void removeParameterRuleUnits(boolean strict) {
2944        libsbmlJNI.Model_removeParameterRuleUnits(swigCPtr, this, strict);
2945      }
2946    
2947      
2948    /**
2949       * Predicate returning <code>true</code> if the
2950       * given {@link ASTNode} is a boolean.
2951       * <p>
2952       * Often times, this question can be answered with the {@link ASTNode}'s own
2953       * isBoolean() method, but if the AST is an expression that calls a
2954       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2955       * is needed for lookup context.
2956       * <p>
2957       * @return true if the given {@link ASTNode} is a boolean.
2958       * @internal
2959       */ public
2960     void convertStoichiometryMath() {
2961        libsbmlJNI.Model_convertStoichiometryMath(swigCPtr, this);
2962      }
2963    
2964      
2965    /**
2966       * Predicate returning <code>true</code> if the
2967       * given {@link ASTNode} is a boolean.
2968       * <p>
2969       * Often times, this question can be answered with the {@link ASTNode}'s own
2970       * isBoolean() method, but if the AST is an expression that calls a
2971       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2972       * is needed for lookup context.
2973       * <p>
2974       * @return true if the given {@link ASTNode} is a boolean.
2975       * @internal
2976       */ public
2977     void assignRequiredValues() {
2978        libsbmlJNI.Model_assignRequiredValues(swigCPtr, this);
2979      }
2980    
2981      
2982    /**
2983       * Predicate returning <code>true</code> if the
2984       * given {@link ASTNode} is a boolean.
2985       * <p>
2986       * Often times, this question can be answered with the {@link ASTNode}'s own
2987       * isBoolean() method, but if the AST is an expression that calls a
2988       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
2989       * is needed for lookup context.
2990       * <p>
2991       * @return true if the given {@link ASTNode} is a boolean.
2992       * @internal
2993       */ public
2994     void dealWithModelUnits() {
2995        libsbmlJNI.Model_dealWithModelUnits(swigCPtr, this);
2996      }
2997    
2998      
2999    /**
3000       * Predicate returning <code>true</code> if the
3001       * given {@link ASTNode} is a boolean.
3002       * <p>
3003       * Often times, this question can be answered with the {@link ASTNode}'s own
3004       * isBoolean() method, but if the AST is an expression that calls a
3005       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
3006       * is needed for lookup context.
3007       * <p>
3008       * @return true if the given {@link ASTNode} is a boolean.
3009       * @internal
3010       */ public
3011     void dealWithStoichiometry() {
3012        libsbmlJNI.Model_dealWithStoichiometry(swigCPtr, this);
3013      }
3014    
3015      
3016    /**
3017       * Predicate returning <code>true</code> if the
3018       * given {@link ASTNode} is a boolean.
3019       * <p>
3020       * Often times, this question can be answered with the {@link ASTNode}'s own
3021       * isBoolean() method, but if the AST is an expression that calls a
3022       * function defined in the {@link Model}'s {@link ListOfFunctionDefinitions}, the model
3023       * is needed for lookup context.
3024       * <p>
3025       * @return true if the given {@link ASTNode} is a boolean.
3026       * @internal
3027       */ public
3028     void dealWithEvents(boolean strict) {
3029        libsbmlJNI.Model_dealWithEvents(swigCPtr, this, strict);
3030      }
3031    
3032      
3033    /**
3034       * Sets this SBML object to child SBML objects (if any).
3035       * (Creates a child-parent relationship by the parent)
3036       * <p>
3037       * Subclasses must override this function if they define
3038       * one ore more child elements.
3039       * Basically, this function needs to be called in
3040       * constructor, copy constructor and assignment operator.
3041       * <p>
3042       * @see setSBMLDocument
3043       * @see enablePackageInternal
3044       * @internal
3045       */ public
3046     void connectToChild() {
3047        libsbmlJNI.Model_connectToChild(swigCPtr, this);
3048      }
3049    
3050      
3051    /**
3052       * Returns the libSBML type code for this SBML object.
3053       * <p>
3054       * LibSBML attaches an identifying code to every
3055       * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
3056       * other languages, the set of type codes is stored in an enumeration; in
3057       * the Java language interface for libSBML, the type codes are defined as
3058       * static integer constants in the interface class {@link
3059       * libsbmlConstants}.  The names of the type codes all begin with the
3060       * characters <code>SBML_.</code> 
3061       * <p>
3062       * @return the SBML type code for this object, or
3063       * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default).
3064       * <p>
3065       * @see #getElementName()
3066       */ public
3067     int getTypeCode() {
3068        return libsbmlJNI.Model_getTypeCode(swigCPtr, this);
3069      }
3070    
3071      
3072    /**
3073       * Returns the XML element name of this object, which for {@link Model}, is
3074       * always <code>'model'.</code>
3075       * <p>
3076       * @return the name of this element, i.e., <code>'model'.</code>
3077       */ public
3078     String getElementName() {
3079        return libsbmlJNI.Model_getElementName(swigCPtr, this);
3080      }
3081    
3082      
3083    /**
3084       * Populates the list of FormulaDataUnits with the units derived 
3085       * for the model. The list contains elements of class
3086       * FormulaUnitsData. 
3087       * <p>
3088       * The first element of the list refers to the default units
3089       * of 'substance per time' derived from the model and has the
3090       * unitReferenceId 'subs_per_time'. This facilitates the comparison of units
3091       * derived from mathematical formula with the expected units.
3092       * <p>
3093       * The next elements of the list record the units of the 
3094       * compartments and species established from either explicitly
3095       * declared or default units.
3096       * <p>
3097       * The next elements record the units of any parameters.
3098       * <p>
3099       * Subsequent elements of the list record the units derived for
3100       * each mathematical expression encountered within the model.
3101       * <p>
3102       * @note This function is utilised by the {@link Unit} Consistency Validator.
3103       * The list is populated prior to running the validation and thus
3104       * the consistency of units can be checked by accessing the members
3105       * of the list and comparing the appropriate data.
3106       */ public
3107     void populateListFormulaUnitsData() {
3108        libsbmlJNI.Model_populateListFormulaUnitsData(swigCPtr, this);
3109      }
3110    
3111      
3112    /**
3113       * Predicate returning <code>true</code> if 
3114       * the list of FormulaUnitsData is populated.
3115       * <p>
3116       * @return <code>true</code> if the list of FormulaUnitsData is populated, 
3117       * <code>false</code> otherwise.
3118       */ public
3119     boolean isPopulatedListFormulaUnitsData() {
3120        return libsbmlJNI.Model_isPopulatedListFormulaUnitsData(swigCPtr, this);
3121      }
3122    
3123      
3124    /**
3125       * Predicate returning <code>true</code> if
3126       * all the required elements for this {@link Model} object
3127       * have been set.
3128       * <p>
3129       * @note The required elements for a {@link Model} object are:
3130       * listOfCompartments (L1 only); listOfSpecies (L1V1 only);
3131       * listOfReactions(L1V1 only)
3132       * <p>
3133       * @return a boolean value indicating whether all the required
3134       * elements for this object have been defined.
3135       */ public
3136     boolean hasRequiredElements() {
3137        return libsbmlJNI.Model_hasRequiredElements(swigCPtr, this);
3138      }
3139    
3140      
3141    /**
3142       * Removes the nth {@link FunctionDefinition} object from this {@link Model} object and 
3143       * returns a pointer to it.
3144       * <p>
3145       * The caller owns the returned object and is responsible for deleting it.
3146       * <p>
3147       * @param n the index of the {@link FunctionDefinition} object to remove
3148       * <p>
3149       * @return the {@link FunctionDefinition} object removed.  As mentioned above, 
3150       * the caller owns the returned item. <code>null</code> is returned if the given index 
3151       * is out of range.
3152       * <p>
3153       */ public
3154     FunctionDefinition removeFunctionDefinition(long n) {
3155        long cPtr = libsbmlJNI.Model_removeFunctionDefinition__SWIG_0(swigCPtr, this, n);
3156        return (cPtr == 0) ? null : new FunctionDefinition(cPtr, true);
3157      }
3158    
3159      
3160    /**
3161       * Removes the {@link FunctionDefinition} object with the given identifier from this {@link Model} 
3162       * object and returns a pointer to it.
3163       * <p>
3164       * The caller owns the returned object and is responsible for deleting it.
3165       * If none of the {@link FunctionDefinition} objects in this {@link Model} object have the identifier 
3166       * <code>sid</code>, then <code>null</code> is returned.
3167       * <p>
3168       * @param sid the identifier of the {@link FunctionDefinition} object to remove
3169       * <p>
3170       * @return the {@link FunctionDefinition} object removed.  As mentioned above, the 
3171       * caller owns the returned object. <code>null</code> is returned if no {@link FunctionDefinition}
3172       * object with the identifier exists in this {@link Model} object.
3173       */ public
3174     FunctionDefinition removeFunctionDefinition(String sid) {
3175        long cPtr = libsbmlJNI.Model_removeFunctionDefinition__SWIG_1(swigCPtr, this, sid);
3176        return (cPtr == 0) ? null : new FunctionDefinition(cPtr, true);
3177      }
3178    
3179      
3180    /**
3181       * Removes the nth {@link UnitDefinition} object from this {@link Model} object and
3182       * returns a pointer to it.
3183       * <p>
3184       * The caller owns the returned object and is responsible for deleting it.
3185       * <p>
3186       * @param n the index of the {@link UnitDefinition} object to remove
3187       * <p>
3188       * @return the {@link UnitDefinition} object removed.  As mentioned above, 
3189       * the caller owns the returned item. <code>null</code> is returned if the given index 
3190       * is out of range.
3191       * <p>
3192       */ public
3193     UnitDefinition removeUnitDefinition(long n) {
3194        long cPtr = libsbmlJNI.Model_removeUnitDefinition__SWIG_0(swigCPtr, this, n);
3195        return (cPtr == 0) ? null : new UnitDefinition(cPtr, true);
3196      }
3197    
3198      
3199    /**
3200       * Removes the {@link UnitDefinition} object with the given identifier from this {@link Model}
3201       * object and returns a pointer to it.
3202       * <p>
3203       * The caller owns the returned object and is responsible for deleting it.
3204       * If none of the {@link UnitDefinition} objects in this {@link Model} object have the identifier 
3205       * <code>sid</code>, then <code>null</code> is returned.
3206       * <p>
3207       * @param sid the identifier of the {@link UnitDefinition} object to remove
3208       * <p>
3209       * @return the {@link UnitDefinition} object removed.  As mentioned above, the 
3210       * caller owns the returned object. <code>null</code> is returned if no {@link UnitDefinition}
3211       * object with the identifier exists in this {@link Model} object.
3212       */ public
3213     UnitDefinition removeUnitDefinition(String sid) {
3214        long cPtr = libsbmlJNI.Model_removeUnitDefinition__SWIG_1(swigCPtr, this, sid);
3215        return (cPtr == 0) ? null : new UnitDefinition(cPtr, true);
3216      }
3217    
3218      
3219    /**
3220       * Removes the nth {@link CompartmentType} object from this {@link Model} object and
3221       * returns a pointer to it.
3222       * <p>
3223       * The caller owns the returned object and is responsible for deleting it.
3224       * <p>
3225       * @param n the index of the {@link CompartmentType} object to remove
3226       * <p>
3227       * @return the ComapartmentType object removed.  As mentioned above, 
3228       * the caller owns the returned item. <code>null</code> is returned if the given index 
3229       * is out of range.
3230       * <p>
3231       */ public
3232     CompartmentType removeCompartmentType(long n) {
3233        long cPtr = libsbmlJNI.Model_removeCompartmentType__SWIG_0(swigCPtr, this, n);
3234        return (cPtr == 0) ? null : new CompartmentType(cPtr, true);
3235      }
3236    
3237      
3238    /**
3239       * Removes the {@link CompartmentType} object with the given identifier from this {@link Model}
3240       * object and returns a pointer to it.
3241       * <p>
3242       * The caller owns the returned object and is responsible for deleting it.
3243       * If none of the {@link CompartmentType} objects in this {@link Model} object have the identifier 
3244       * <code>sid</code>, then <code>null</code> is returned.
3245       * <p>
3246       * @param sid the identifier of the object to remove
3247       * <p>
3248       * @return the {@link CompartmentType} object removed.  As mentioned above, the 
3249       * caller owns the returned object. <code>null</code> is returned if no {@link CompartmentType}
3250       * object with the identifier exists in this {@link Model} object.
3251       */ public
3252     CompartmentType removeCompartmentType(String sid) {
3253        long cPtr = libsbmlJNI.Model_removeCompartmentType__SWIG_1(swigCPtr, this, sid);
3254        return (cPtr == 0) ? null : new CompartmentType(cPtr, true);
3255      }
3256    
3257      
3258    /**
3259       * Removes the nth {@link SpeciesType} object from this {@link Model} object and
3260       * returns a pointer to it.
3261       * <p>
3262       * The caller owns the returned object and is responsible for deleting it.
3263       * <p>
3264       * @param n the index of the {@link SpeciesType} object to remove
3265       * <p>
3266       * @return the {@link SpeciesType} object removed.  As mentioned above, 
3267       * the caller owns the returned item. <code>null</code> is returned if the given index 
3268       * is out of range.
3269       * <p>
3270       */ public
3271     SpeciesType removeSpeciesType(long n) {
3272        long cPtr = libsbmlJNI.Model_removeSpeciesType__SWIG_0(swigCPtr, this, n);
3273        return (cPtr == 0) ? null : new SpeciesType(cPtr, true);
3274      }
3275    
3276      
3277    /**
3278       * Removes the {@link SpeciesType} object with the given identifier from this {@link Model}
3279       * object and returns a pointer to it.
3280       * <p>
3281       * The caller owns the returned object and is responsible for deleting it.
3282       * If none of the {@link SpeciesType} objects in this {@link Model} object have the identifier 
3283       * <code>sid</code>, then <code>null</code> is returned.
3284       * <p>
3285       * @param sid the identifier of the {@link SpeciesType} object to remove
3286       * <p>
3287       * @return the {@link SpeciesType} object removed.  As mentioned above, the 
3288       * caller owns the returned object. <code>null</code> is returned if no {@link SpeciesType}
3289       * object with the identifier exists in this {@link Model} object.
3290       * <p>
3291       */ public
3292     SpeciesType removeSpeciesType(String sid) {
3293        long cPtr = libsbmlJNI.Model_removeSpeciesType__SWIG_1(swigCPtr, this, sid);
3294        return (cPtr == 0) ? null : new SpeciesType(cPtr, true);
3295      }
3296    
3297      
3298    /**
3299       * Removes the nth {@link Compartment} object from this {@link Model} object and
3300       * returns a pointer to it.
3301       * <p>
3302       * The caller owns the returned object and is responsible for deleting it.
3303       * <p>
3304       * @param n the index of the {@link Compartment} object to remove
3305       * <p>
3306       * @return the {@link Compartment} object removed.  As mentioned above, 
3307       * the caller owns the returned item. <code>null</code> is returned if the given index 
3308       * is out of range.
3309       * <p>
3310       */ public
3311     Compartment removeCompartment(long n) {
3312        long cPtr = libsbmlJNI.Model_removeCompartment__SWIG_0(swigCPtr, this, n);
3313        return (cPtr == 0) ? null : new Compartment(cPtr, true);
3314      }
3315    
3316      
3317    /**
3318       * Removes the {@link Compartment} object with the given identifier from this {@link Model}
3319       * object and returns a pointer to it.
3320       * <p>
3321       * The caller owns the returned object and is responsible for deleting it.
3322       * If none of the {@link Compartment} objects in this {@link Model} object have the identifier 
3323       * <code>sid</code>, then <code>null</code> is returned.
3324       * <p>
3325       * @param sid the identifier of the {@link Compartment} object to remove
3326       * <p>
3327       * @return the {@link Compartment} object removed.  As mentioned above, the 
3328       * caller owns the returned object. <code>null</code> is returned if no {@link Compartment}
3329       * object with the identifier exists in this {@link Model} object.
3330       */ public
3331     Compartment removeCompartment(String sid) {
3332        long cPtr = libsbmlJNI.Model_removeCompartment__SWIG_1(swigCPtr, this, sid);
3333        return (cPtr == 0) ? null : new Compartment(cPtr, true);
3334      }
3335    
3336      
3337    /**
3338       * Removes the nth {@link Species} object from this {@link Model} object and
3339       * returns a pointer to it.
3340       * <p>
3341       * The caller owns the returned object and is responsible for deleting it.
3342       * <p>
3343       * @param n the index of the {@link Species} object to remove
3344       * <p>
3345       * @return the {@link Species} object removed.  As mentioned above, 
3346       * the caller owns the returned item. <code>null</code> is returned if the given index 
3347       * is out of range.
3348       * <p>
3349       */ public
3350     Species removeSpecies(long n) {
3351        long cPtr = libsbmlJNI.Model_removeSpecies__SWIG_0(swigCPtr, this, n);
3352        return (cPtr == 0) ? null : new Species(cPtr, true);
3353      }
3354    
3355      
3356    /**
3357       * Removes the {@link Species} object with the given identifier from this {@link Model}
3358       * object and returns a pointer to it.
3359       * <p>
3360       * The caller owns the returned object and is responsible for deleting it.
3361       * If none of the {@link Species} objects in this {@link Model} object have the identifier 
3362       * <code>sid</code>, then <code>null</code> is returned.
3363       * <p>
3364       * @param sid the identifier of the {@link Species} object to remove
3365       * <p>
3366       * @return the {@link Species} object removed.  As mentioned above, the 
3367       * caller owns the returned object. <code>null</code> is returned if no {@link Species}
3368       * object with the identifier exists in this {@link Model} object.
3369       * <p>
3370       */ public
3371     Species removeSpecies(String sid) {
3372        long cPtr = libsbmlJNI.Model_removeSpecies__SWIG_1(swigCPtr, this, sid);
3373        return (cPtr == 0) ? null : new Species(cPtr, true);
3374      }
3375    
3376      
3377    /**
3378       * Removes the nth {@link Parameter} object from this {@link Model} object and
3379       * returns a pointer to it.
3380       * <p>
3381       * The caller owns the returned object and is responsible for deleting it.
3382       * <p>
3383       * @param n the index of the {@link Parameter} object to remove
3384       * <p>
3385       * @return the {@link Parameter} object removed.  As mentioned above, 
3386       * the caller owns the returned item. <code>null</code> is returned if the given index 
3387       * is out of range.
3388       * <p>
3389       */ public
3390     Parameter removeParameter(long n) {
3391        long cPtr = libsbmlJNI.Model_removeParameter__SWIG_0(swigCPtr, this, n);
3392        return (cPtr == 0) ? null : new Parameter(cPtr, true);
3393      }
3394    
3395      
3396    /**
3397       * Removes the {@link Parameter} object with the given identifier from this {@link Model}
3398       * object and returns a pointer to it.
3399       * <p>
3400       * The caller owns the returned object and is responsible for deleting it.
3401       * If none of the {@link Parameter} objects in this {@link Model} object have the identifier 
3402       * <code>sid</code>, then <code>null</code> is returned.
3403       * <p>
3404       * @param sid the identifier of the {@link Parameter} object to remove
3405       * <p>
3406       * @return the {@link Parameter} object removed.  As mentioned above, the 
3407       * caller owns the returned object. <code>null</code> is returned if no {@link Parameter}
3408       * object with the identifier exists in this {@link Model} object.
3409       */ public
3410     Parameter removeParameter(String sid) {
3411        long cPtr = libsbmlJNI.Model_removeParameter__SWIG_1(swigCPtr, this, sid);
3412        return (cPtr == 0) ? null : new Parameter(cPtr, true);
3413      }
3414    
3415      
3416    /**
3417       * Removes the nth {@link InitialAssignment} object from this {@link Model} object and
3418       * returns a pointer to it.
3419       * <p>
3420       * The caller owns the returned object and is responsible for deleting it.
3421       * <p>
3422       * @param n the index of the {@link InitialAssignment} object to remove
3423       * <p>
3424       * @return the {@link InitialAssignment} object removed.  As mentioned above, 
3425       * the caller owns the returned item. <code>null</code> is returned if the given index 
3426       * is out of range.
3427       * <p>
3428       */ public
3429     InitialAssignment removeInitialAssignment(long n) {
3430        long cPtr = libsbmlJNI.Model_removeInitialAssignment__SWIG_0(swigCPtr, this, n);
3431        return (cPtr == 0) ? null : new InitialAssignment(cPtr, true);
3432      }
3433    
3434      
3435    /**
3436       * Removes the {@link InitialAssignment} object with the given 'symbol' attribute 
3437       * from this {@link Model} object and returns a pointer to it.
3438       * <p>
3439       * The caller owns the returned object and is responsible for deleting it.
3440       * If none of the {@link InitialAssignment} objects in this {@link Model} object have the
3441       * 'symbol' attribute <code>symbol</code>, then <code>null</code> is returned.
3442       * <p>
3443       * @param symbol the 'symbol' attribute of the {@link InitialAssignment} object to remove
3444       * <p>
3445       * @return the {@link InitialAssignment} object removed.  As mentioned above, the 
3446       * caller owns the returned object. <code>null</code> is returned if no {@link InitialAssignment}
3447       * object with the 'symbol' attribute exists in this {@link Model} object.
3448       */ public
3449     InitialAssignment removeInitialAssignment(String symbol) {
3450        long cPtr = libsbmlJNI.Model_removeInitialAssignment__SWIG_1(swigCPtr, this, symbol);
3451        return (cPtr == 0) ? null : new InitialAssignment(cPtr, true);
3452      }
3453    
3454      
3455    /**
3456       * Removes the nth {@link Rule} object from this {@link Model} object and
3457       * returns a pointer to it.
3458       * <p>
3459       * The caller owns the returned object and is responsible for deleting it.
3460       * <p>
3461       * @param n the index of the {@link Rule} object to remove
3462       * <p>
3463       * @return the {@link Rule} object removed.  As mentioned above, 
3464       * the caller owns the returned item. <code>null</code> is returned if the given index 
3465       * is out of range.
3466       * <p>
3467       */ public
3468     Rule removeRule(long n) {
3469      return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_removeRule__SWIG_0(swigCPtr, this, n), true);
3470    }
3471    
3472      
3473    /**
3474       * Removes the {@link Rule} object with the given 'variable' attribute from this {@link Model} 
3475       * object and returns a pointer to it.
3476       * <p>
3477       * The caller owns the returned object and is responsible for deleting it.
3478       * If none of the {@link Rule} objects in this {@link Model} object have the 'variable' attribute
3479       * <code>variable</code>, then <code>null</code> is returned.
3480       * <p>
3481       * @param variable the 'variable' attribute of the {@link Rule} object to remove
3482       * <p>
3483       * @return the {@link Rule} object removed.  As mentioned above, the 
3484       * caller owns the returned object. <code>null</code> is returned if no {@link Rule}
3485       * object with the 'variable' attribute exists in this {@link Model} object.
3486       */ public
3487     Rule removeRule(String variable) {
3488      return (Rule) libsbml.DowncastSBase(libsbmlJNI.Model_removeRule__SWIG_1(swigCPtr, this, variable), true);
3489    }
3490    
3491      
3492    /**
3493       * Removes the nth {@link Constraint} object from this {@link Model} object and
3494       * returns a pointer to it.
3495       * <p>
3496       * The caller owns the returned object and is responsible for deleting it.
3497       * <p>
3498       * @param n the index of the {@link Constraint} object to remove
3499       * <p>
3500       * @return the {@link Constraint} object removed.  As mentioned above, 
3501       * the caller owns the returned item. <code>null</code> is returned if the given index 
3502       * is out of range.
3503       * <p>
3504       */ public
3505     Constraint removeConstraint(long n) {
3506        long cPtr = libsbmlJNI.Model_removeConstraint(swigCPtr, this, n);
3507        return (cPtr == 0) ? null : new Constraint(cPtr, true);
3508      }
3509    
3510      
3511    /**
3512       * Removes the nth {@link Reaction} object from this {@link Model} object and
3513       * returns a pointer to it.
3514       * <p>
3515       * The caller owns the returned object and is responsible for deleting it.
3516       * <p>
3517       * @param n the index of the {@link Reaction} object to remove
3518       * <p>
3519       * @return the {@link Reaction} object removed.  As mentioned above, 
3520       * the caller owns the returned item. <code>null</code> is returned if the given index 
3521       * is out of range.
3522       * <p>
3523       */ public
3524     Reaction removeReaction(long n) {
3525        long cPtr = libsbmlJNI.Model_removeReaction__SWIG_0(swigCPtr, this, n);
3526        return (cPtr == 0) ? null : new Reaction(cPtr, true);
3527      }
3528    
3529      
3530    /**
3531       * Removes the {@link Reaction} object with the given identifier from this {@link Model}
3532       * object and returns a pointer to it.
3533       * <p>
3534       * The caller owns the returned object and is responsible for deleting it.
3535       * If none of the {@link Reaction} objects in this {@link Model} object have the identifier 
3536       * <code>sid</code>, then <code>null</code> is returned.
3537       * <p>
3538       * @param sid the identifier of the {@link Reaction} object to remove
3539       * <p>
3540       * @return the {@link Reaction} object removed.  As mentioned above, the 
3541       * caller owns the returned object. <code>null</code> is returned if no {@link Reaction}
3542       * object with the identifier exists in this {@link Model} object.
3543       * <p>
3544       */ public
3545     Reaction removeReaction(String sid) {
3546        long cPtr = libsbmlJNI.Model_removeReaction__SWIG_1(swigCPtr, this, sid);
3547        return (cPtr == 0) ? null : new Reaction(cPtr, true);
3548      }
3549    
3550      
3551    /**
3552       * Removes the nth {@link Event} object from this {@link Model} object and
3553       * returns a pointer to it.
3554       * <p>
3555       * The caller owns the returned object and is responsible for deleting it.
3556       * <p>
3557       * @param n the index of the {@link Event} object to remove
3558       * <p>
3559       * @return the {@link Event} object removed.  As mentioned above, 
3560       * the caller owns the returned item. <code>null</code> is returned if the given index 
3561       * is out of range.
3562       * <p>
3563       */ public
3564     Event removeEvent(long n) {
3565        long cPtr = libsbmlJNI.Model_removeEvent__SWIG_0(swigCPtr, this, n);
3566        return (cPtr == 0) ? null : new Event(cPtr, true);
3567      }
3568    
3569      
3570    /**
3571       * Removes the {@link Event} object with the given identifier from this {@link Model}
3572       * object and returns a pointer to it.
3573       * <p>
3574       * The caller owns the returned object and is responsible for deleting it.
3575       * If none of the {@link Event} objects in this {@link Model} object have the identifier 
3576       * <code>sid</code>, then <code>null</code> is returned.
3577       * <p>
3578       * @param sid the identifier of the {@link Event} object to remove
3579       * <p>
3580       * @return the {@link Event} object removed.  As mentioned above, the 
3581       * caller owns the returned object. <code>null</code> is returned if no {@link Event}
3582       * object with the identifier exists in this {@link Model} object.
3583       * <p>
3584       */ public
3585     Event removeEvent(String sid) {
3586        long cPtr = libsbmlJNI.Model_removeEvent__SWIG_1(swigCPtr, this, sid);
3587        return (cPtr == 0) ? null : new Event(cPtr, true);
3588      }
3589    
3590      
3591    /**
3592       * Takes the contents of the passed-in {@link Model}, makes copies of everything,
3593       * and appends those copies to the appropriate places in this {@link Model}.  Also
3594       * calls 'appendFrom' on all plugin objects.
3595       * <p>
3596       * @param model the {@link Model} to merge with this one.
3597       * <p>
3598       */ public
3599     int appendFrom(Model model) {
3600        return libsbmlJNI.Model_appendFrom(swigCPtr, this, Model.getCPtr(model), model);
3601      }
3602    
3603      
3604    /**
3605       * Enables/Disables the given package with this element and child elements
3606       * (if any).  (This is an internal implementation for enablePackage
3607       * function)
3608       * <p>
3609       * @note Subclasses of the SBML Core package in which one or more child
3610       * elements are defined must override this function.
3611       * @internal
3612       */ public
3613     void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
3614        libsbmlJNI.Model_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
3615      }
3616    
3617    }