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