001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.7
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 reaction between species in an SBML model.
013 <p>
014 * A <em>reaction</em> represents any transformation, transport or binding
015 * process, typically a chemical reaction, that can change the quantity of
016 * one or more species.  In SBML, a reaction is defined primarily in terms
017 * of the participating reactants and products (and their corresponding
018 * stoichiometries), along with optional modifier species, an optional rate
019 * at which the reaction takes place, and optional parameters.
020 <p>
021 * As with other major objects in SBML, {@link Reaction} has a mandatory attribute,
022 * 'id', used to give the compartment type an identifier.  The identifier
023 * must be a text string conforming to the identifer syntax permitted in
024 * SBML.  In SBML Level&nbsp;2 and Level&nbsp;3, the reaction 'id'
025 * identifier can be used in mathematical formulas elsewhere in an SBML
026 * model to represent the rate of that reaction; this usage is explained
027 * below.  {@link Reaction} also has an optional 'name' attribute, of type 
028 * <code>string.</code>  The 'id' and 'name' must be used according to the guidelines
029 * described in the SBML specification.
030 <p>
031 * The species participating as reactants, products, and/or modifiers in a
032 * reaction are declared using lists of {@link SpeciesReference} and/or
033 * {@link ModifierSpeciesReference} instances stored in subelements
034 * 'listOfReactants', 'listOfProducts' and 'listOfModifiers'.  Certain
035 * restrictions are placed on the appearance of species in reaction
036 * definitions:
037 * <ul>
038 * <li> The ability of a species to appear as a reactant or product of any
039 * reaction in a model is governed by certain flags in that species'
040 * definition; see the definition of {@link Species} for more information.
041 <p>
042 * <li> Any species appearing in the mathematical formula of the subelement
043 * 'kineticLaw' (described below) of a {@link Reaction} must be declared in at
044 * least one of that {@link Reaction}'s lists of reactants, products, and/or
045 * modifiers.  Put another way, it is an error for a reaction's kinetic law
046 * formula to refer to species that have not been declared for that
047 * reaction.
048 <p>
049 * <li> A reaction definition can contain an empty list of reactants
050 * <em>or</em> an empty list of products, but it must have at least one
051 * reactant or product; in other words, a reaction without any reactant or
052 * product species is not permitted.  (This restriction does not apply to
053 * modifier species, which remain optional in all cases.)
054 * </ul>
055 <p>
056 * A reaction can contain up to one {@link KineticLaw} object in a subelement named
057 * 'kineticLaw'.  It defines the speed at which the process defined by the
058 * reaction takes place.  The description of {@link KineticLaw} provides more
059 * details about its use.  Note that although the inclusion of a {@link KineticLaw}
060 * object in an instance of a {@link Reaction} component is optional, there is no
061 * useful default that can be substituted in place of a missing rate
062 * expression in a reaction.  Moreover, a reaction's rate cannot be defined
063 * in any other way in SBML&mdash;{@link InitialAssignment}, {@link AssignmentRule},
064 * {@link RateRule}, {@link AlgebraicRule}, {@link Event}, and other constructs in SBML cannot be
065 * used to set the reaction rate separately.  Nevertheless, for some
066 * modeling applications, reactions without any defined rate can be
067 * perfectly acceptable.
068 <p>
069 * {@link Reaction} also has a boolean attribute named 'reversible' for indicating
070 * whether the reaction is reversible.  This attribute is optional in SBML
071 * Level&nbsp;2, with a default of <code>true</code>; it is mandatory in SBML
072 * Level&nbsp;3 (with no default value).  To say that a reaction is 
073 * <em>reversible</em> is to say it can proceed in either the forward or the reverse
074 * direction.  Although the reversibility of a reaction can sometimes be
075 * deduced by inspecting its rate expression, this is not always the case,
076 * especially for complicated expressions.  Moreover, the need in SBML to
077 * allow rate expressions (i.e., {@link KineticLaw}) to be optional leads to the
078 * need for a separate flag indicating reversibility.  Note that labeling a
079 * reaction as irreversible is an assertion that the reaction always
080 * proceeds in the given forward direction.  (Why else would it be flagged
081 * as irreversible?)  This implies the rate expression in the {@link KineticLaw}
082 * always has a non-negative value during simulations.  Software tools
083 * could provide a means of optionally testing that this condition holds.
084 * The presence of reversibility information in two places (i.e., the rate
085 * expression and the 'reversible' attribute on {@link Reaction}) leaves open the
086 * possibility that a model could contain contradictory information, but
087 * the creation of such a model would be an error on the part of the
088 * software generating it.
089 <p>
090 * The {@link Reaction} object class has another boolean attribute called 'fast'.
091 * This attribute is optional in SBML Level&nbsp;2, with a default of 
092 * <code>false</code>; it is mandatory in SBML Level&nbsp;3 (with no default value).  It
093 * is used to indicate that a reaction occurs on a vastly faster time scale
094 * than others in a system.  Readers are directed to the SBML Level&nbsp;2
095 * Version&nbsp;4 specification, which provides more detail about the
096 * conditions under which a reaction can be considered to be fast in this
097 * sense.  The attribute's default value is <code>false.</code>  SBML Level&nbsp;1
098 * and Level&nbsp;2 Version&nbsp;1 incorrectly claimed that software tools
099 * could ignore this attribute if they did not implement support for the
100 * corresponding concept; however, further research in SBML has revealed
101 * that this is not true, and 'fast' <em>cannot be ignored</em> if it is
102 * set to <code>true.</code>  SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 therefore
103 * stipulate that if a model has any reactions with 'fast' set to <code>true</code>,
104 * a software tool must be able to respect the attribute or else indicate
105 * to the user that it does not have the capacity to do so.  Analysis
106 * software cannot ignore the value of the 'fast' attribute because doing
107 * so may lead to different results as compared to a software system that
108 * <em>does</em> make use of 'fast'.
109 <p>
110 * In SBML Level&nbsp;3 Version&nbsp;1, the {@link Reaction} object has an
111 * additional optional attribute named 'compartment', whose value must be
112 * the identifier of a compartment defined in the enclosing {@link Model} object.
113 * The 'compartment' attribute can be used to indicate the compartment in
114 * which the reaction is assumed to take place.  If the attribute is
115 * present, its value must be the identifier of a {@link Compartment} object
116 * defined in the enclosing {@link Model} object.  Similar to the 'reversible'
117 * attribute, the value of the 'compartment' attribute has no direct impact
118 * on the construction of mathematical equations for the SBML model.  When
119 * a kinetic law is given for a reaction, the compartment location may
120 * already be implicit in the kinetic law (although this cannot always be
121 * guaranteed).  Nevertheless, software tools may find the 'compartment'
122 * attribute value useful for such purposes as analyzing the structure of
123 * the model, guiding the modeler in constructing correct rate formulas,
124 * and visualization purposes.
125 <p>
126 * Readers are urged to read the SBML specification for more details about
127 * the proper use of {@link Reaction}.
128 */
129
130public class Reaction extends SBase {
131   private long swigCPtr;
132
133   protected Reaction(long cPtr, boolean cMemoryOwn)
134   {
135     super(libsbmlJNI.Reaction_SWIGUpcast(cPtr), cMemoryOwn);
136     swigCPtr = cPtr;
137   }
138
139   protected static long getCPtr(Reaction obj)
140   {
141     return (obj == null) ? 0 : obj.swigCPtr;
142   }
143
144   protected static long getCPtrAndDisown (Reaction obj)
145   {
146     long ptr = 0;
147
148     if (obj != null)
149     {
150       ptr             = obj.swigCPtr;
151       obj.swigCMemOwn = false;
152     }
153
154     return ptr;
155   }
156
157  protected void finalize() {
158    delete();
159  }
160
161  public synchronized void delete() {
162    if (swigCPtr != 0) {
163      if (swigCMemOwn) {
164        swigCMemOwn = false;
165        libsbmlJNI.delete_Reaction(swigCPtr);
166      }
167      swigCPtr = 0;
168    }
169    super.delete();
170  }
171
172  
173/**
174   * Creates a new {@link Reaction} using the given SBML <code>level</code> and <code>version</code>
175   * values.
176   <p>
177   * @param level a long integer, the SBML Level to assign to this {@link Reaction}
178   <p>
179   * @param version a long integer, the SBML Version to assign to this
180   * {@link Reaction}
181   <p>
182   * <p>
183 * @throws SBMLConstructorException
184 * Thrown if the given <code>level</code> and <code>version</code> combination are invalid
185 * or if this object is incompatible with the given level and version.
186   <p>
187   * <p>
188 * @note Attempting to add an object to an {@link SBMLDocument} having a different
189 * combination of SBML Level, Version and XML namespaces than the object
190 * itself will result in an error at the time a caller attempts to make the
191 * addition.  A parent object must have compatible Level, Version and XML
192 * namespaces.  (Strictly speaking, a parent may also have more XML
193 * namespaces than a child, but the reverse is not permitted.)  The
194 * restriction is necessary to ensure that an SBML model has a consistent
195 * overall structure.  This requires callers to manage their objects
196 * carefully, but the benefit is increased flexibility in how models can be
197 * created by permitting callers to create objects bottom-up if desired.  In
198 * situations where objects are not yet attached to parents (e.g.,
199 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
200 * libSBML determine such things as whether it is valid to assign a
201 * particular value to an attribute.
202   */ public
203 Reaction(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
204    this(libsbmlJNI.new_Reaction__SWIG_0(level, version), true);
205  }
206
207  
208/**
209   * Creates a new {@link Reaction} using the given {@link SBMLNamespaces} object
210   * <code>sbmlns</code>.
211   <p>
212   * <p>
213 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
214 * information.  It is used to communicate the SBML Level, Version, and (in
215 * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
216 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
217 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
218 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments.
219   <p>
220   * @param sbmlns an {@link SBMLNamespaces} object.
221   <p>
222   * <p>
223 * @throws SBMLConstructorException
224 * Thrown if the given <code>sbmlns</code> is inconsistent or incompatible
225 * with this object.
226   <p>
227   * <p>
228 * @note Attempting to add an object to an {@link SBMLDocument} having a different
229 * combination of SBML Level, Version and XML namespaces than the object
230 * itself will result in an error at the time a caller attempts to make the
231 * addition.  A parent object must have compatible Level, Version and XML
232 * namespaces.  (Strictly speaking, a parent may also have more XML
233 * namespaces than a child, but the reverse is not permitted.)  The
234 * restriction is necessary to ensure that an SBML model has a consistent
235 * overall structure.  This requires callers to manage their objects
236 * carefully, but the benefit is increased flexibility in how models can be
237 * created by permitting callers to create objects bottom-up if desired.  In
238 * situations where objects are not yet attached to parents (e.g.,
239 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
240 * libSBML determine such things as whether it is valid to assign a
241 * particular value to an attribute.
242   */ public
243 Reaction(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException {
244    this(libsbmlJNI.new_Reaction__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
245  }
246
247  
248/**
249   * Copy constructor; creates a copy of this {@link Reaction}.
250   <p>
251   * @param orig the object to copy.
252   */ public
253 Reaction(Reaction orig) throws org.sbml.libsbml.SBMLConstructorException {
254    this(libsbmlJNI.new_Reaction__SWIG_2(Reaction.getCPtr(orig), orig), true);
255  }
256
257  
258/**
259   * Creates and returns a deep copy of this {@link Reaction} object.
260   <p>
261   * @return the (deep) copy of this {@link Reaction} object.
262   */ public
263 Reaction cloneObject() {
264    long cPtr = libsbmlJNI.Reaction_cloneObject(swigCPtr, this);
265    return (cPtr == 0) ? null : new Reaction(cPtr, true);
266  }
267
268  
269/**
270   * Returns the first child element found that has the given <code>id</code> in the
271   * model-wide SId namespace, or <code>null</code> if no such object is found.
272   <p>
273   * @param id string representing the id of objects to find.
274   <p>
275   * @return pointer to the first element found with the given <code>id</code>.
276   */ public
277 SBase getElementBySId(String id) {
278  return libsbml.DowncastSBase(libsbmlJNI.Reaction_getElementBySId(swigCPtr, this, id), false);
279}
280
281  
282/**
283   * Returns the first child element it can find with the given <code>metaid</code>, or
284   * <code>null</code> if no such object is found.
285   <p>
286   * @param metaid string representing the metaid of objects to find
287   <p>
288   * @return pointer to the first element found with the given <code>metaid</code>.
289   */ public
290 SBase getElementByMetaId(String metaid) {
291  return libsbml.DowncastSBase(libsbmlJNI.Reaction_getElementByMetaId(swigCPtr, this, metaid), false);
292}
293
294  
295/**
296   * <p>
297 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another
298 * value.
299 <p>
300 * <p>
301 * In SBML, object identifiers are of a data type called <code>SId</code>.
302 * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
303 * introduced for attribute values that refer to <code>SId</code> values; in
304 * previous Levels of SBML, this data type did not exist and attributes were
305 * simply described to as 'referring to an identifier', but the effective
306 * data type was the same as <code>SIdRef</code>in Level&nbsp;3.  These and
307 * other methods of libSBML refer to the type <code>SIdRef</code> for all
308 * Levels of SBML, even if the corresponding SBML specification did not
309 * explicitly name the data type.
310 <p>
311 * This method works by looking at all attributes and (if appropriate)
312 * mathematical formulas in MathML content, comparing the referenced
313 * identifiers to the value of <code>oldid</code>.  If any matches are found, the
314 * matching values are replaced with <code>newid</code>.  The method does <em>not</em>
315 * descend into child elements.
316 <p>
317 * @param oldid the old identifier
318 * @param newid the new identifier
319   */ public
320 void renameSIdRefs(String oldid, String newid) {
321    libsbmlJNI.Reaction_renameSIdRefs(swigCPtr, this, oldid, newid);
322  }
323
324  
325/**
326   * Initializes the fields of this {@link Reaction} object to 'typical' default
327   * values.
328   <p>
329   * The SBML {@link Reaction} component has slightly different aspects and
330   * default attribute values in different SBML Levels and Versions.
331   * This method sets the values to certain common defaults, based
332   * mostly on what they are in SBML Level&nbsp;2.  Specifically:
333   <p>
334   * <ul>
335   * <li> Sets the 'reversible' attribute to <code>true</code>
336   * <li> Sets the 'fast' attribute to <code>false</code>
337   * <li> Marks the 'fast' attribute as <em>not</em> having been set
338   *
339   * </ul> <p>
340   * <p>
341 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
342 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
343 * 'fast' attribute if they did not implement support for the corresponding
344 * concept; however, further research in SBML has revealed that this is not
345 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
346 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
347 * therefore stipulate that if a model has any reactions with 'fast' set to
348 * <code>true</code>, a software tool must be able to respect the attribute or else
349 * indicate to the user that it does not have the capacity to do so.  Readers
350 * are directed to the SBML specifications, which provides more detail about
351 * the conditions under which a reaction can be considered to be fast in this
352 * sense.</span>
353   */ public
354 void initDefaults() {
355    libsbmlJNI.Reaction_initDefaults(swigCPtr, this);
356  }
357
358  
359/**
360   * Returns the value of the 'id' attribute of this {@link Reaction}.
361   <p>
362   * @return the id of this {@link Reaction}.
363   */ public
364 String getId() {
365    return libsbmlJNI.Reaction_getId(swigCPtr, this);
366  }
367
368  
369/**
370   * Returns the value of the 'name' attribute of this {@link Reaction}.
371   <p>
372   * @return the name of this {@link Reaction}.
373   */ public
374 String getName() {
375    return libsbmlJNI.Reaction_getName(swigCPtr, this);
376  }
377
378  
379/**
380   * Returns the {@link KineticLaw} object contained in this {@link Reaction}.
381   <p>
382   * @return the {@link KineticLaw} instance.
383   */ public
384 KineticLaw getKineticLaw() {
385    long cPtr = libsbmlJNI.Reaction_getKineticLaw__SWIG_0(swigCPtr, this);
386    return (cPtr == 0) ? null : new KineticLaw(cPtr, false);
387  }
388
389  
390/**
391   * Returns the value of the 'reversible' attribute on the {@link Reaction} as a
392   * boolean value.
393   <p>
394   * @return the reversibility status of this {@link Reaction}.
395   */ public
396 boolean getReversible() {
397    return libsbmlJNI.Reaction_getReversible(swigCPtr, this);
398  }
399
400  
401/**
402   * Returns the value of the 'fast' attribute of this {@link Reaction}.
403   <p>
404   * @return the 'fast' status of this {@link Reaction}.
405   <p>
406   * <p>
407 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
408 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
409 * 'fast' attribute if they did not implement support for the corresponding
410 * concept; however, further research in SBML has revealed that this is not
411 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
412 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
413 * therefore stipulate that if a model has any reactions with 'fast' set to
414 * <code>true</code>, a software tool must be able to respect the attribute or else
415 * indicate to the user that it does not have the capacity to do so.  Readers
416 * are directed to the SBML specifications, which provides more detail about
417 * the conditions under which a reaction can be considered to be fast in this
418 * sense.</span>
419   */ public
420 boolean getFast() {
421    return libsbmlJNI.Reaction_getFast(swigCPtr, this);
422  }
423
424  
425/**
426   * (SBML Level&nbsp;3 only) Returns the value of the 'compartment'
427   * attribute on the {@link Reaction}.
428   <p>
429   * @return the compartment of this {@link Reaction}.
430   <p>
431   * @note The 'compartment' attribute is available in SBML Level&nbsp;3
432   * Version&nbsp;1 Core, but is not present on {@link Reaction} in lower Levels of
433   * SBML.
434   */ public
435 String getCompartment() {
436    return libsbmlJNI.Reaction_getCompartment(swigCPtr, this);
437  }
438
439  
440/**
441   * Predicate returning <code>true</code> if this
442   * {@link Reaction}'s 'id' attribute is set.
443   <p>
444   * @return <code>true</code> if the 'id' attribute of this {@link Reaction} is
445   * set, <code>false</code> otherwise.
446   */ public
447 boolean isSetId() {
448    return libsbmlJNI.Reaction_isSetId(swigCPtr, this);
449  }
450
451  
452/**
453   * Predicate returning <code>true</code> if this
454   * {@link Reaction}'s 'name' attribute is set.
455   <p>
456   * @return <code>true</code> if the 'name' attribute of this {@link Reaction} is
457   * set, <code>false</code> otherwise.
458   */ public
459 boolean isSetName() {
460    return libsbmlJNI.Reaction_isSetName(swigCPtr, this);
461  }
462
463  
464/**
465   * Predicate returning <code>true</code> if this
466   * {@link Reaction} contains a kinetic law object.
467   <p>
468   * @return <code>true</code> if a {@link KineticLaw} is present in this {@link Reaction},, <code>false</code>
469   * otherwise.
470   */ public
471 boolean isSetKineticLaw() {
472    return libsbmlJNI.Reaction_isSetKineticLaw(swigCPtr, this);
473  }
474
475  
476/**
477   * Predicate returning <code>true</code> if the value of
478   * the 'fast' attribute on this {@link Reaction}.
479   <p>
480   * @return <code>true</code> if the 'fast' attribute is true, <code>false</code> otherwise.
481   <p>
482   * <p>
483 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
484 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
485 * 'fast' attribute if they did not implement support for the corresponding
486 * concept; however, further research in SBML has revealed that this is not
487 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
488 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
489 * therefore stipulate that if a model has any reactions with 'fast' set to
490 * <code>true</code>, a software tool must be able to respect the attribute or else
491 * indicate to the user that it does not have the capacity to do so.  Readers
492 * are directed to the SBML specifications, which provides more detail about
493 * the conditions under which a reaction can be considered to be fast in this
494 * sense.</span>
495   */ public
496 boolean isSetFast() {
497    return libsbmlJNI.Reaction_isSetFast(swigCPtr, this);
498  }
499
500  
501/**
502   * Predicate returning <code>true</code> if this
503   * {@link Reaction}'s 'compartment' attribute is set.
504   <p>
505   * @return <code>true</code> if the 'compartment' attribute of this {@link Reaction} is
506   * set, <code>false</code> otherwise.
507   <p>
508   * @note The 'compartment' attribute is available in SBML
509   * Level&nbsp;3 Version&nbsp;1 Core, but is not present on {@link Reaction} in
510   * lower Levels of SBML.
511   */ public
512 boolean isSetCompartment() {
513    return libsbmlJNI.Reaction_isSetCompartment(swigCPtr, this);
514  }
515
516  
517/**
518   * Predicate returning <code>true</code> if this
519   * {@link Reaction}'s 'reversible' attribute is set.
520   <p>
521   * @return <code>true</code> if the 'reversible' attribute of this {@link Reaction} is
522   * set, <code>false</code> otherwise.
523   */ public
524 boolean isSetReversible() {
525    return libsbmlJNI.Reaction_isSetReversible(swigCPtr, this);
526  }
527
528  
529/**
530   * Sets the value of the 'id' attribute of this {@link Reaction}.
531   <p>
532   * The string <code>sid</code> is copied.
533   <p>
534   * <p>
535 * SBML has strict requirements for the syntax of identifiers, that is, the
536 * values of the 'id' attribute present on most types of SBML objects.
537 * The following is a summary of the definition of the SBML identifier type
538 * <code>SId</code>, which defines the permitted syntax of identifiers.  We
539 * express the syntax using an extended form of BNF notation:
540 * <pre style='margin-left: 2em; border: none; font-weight: bold; font-size: 13px; color: black'>
541 * letter .= 'a'..'z','A'..'Z'
542 * digit  .= '0'..'9'
543 * idChar .= letter | digit | '_'
544 * SId    .= ( letter | '_' ) idChar*</pre>
545 * The characters <code>(</code> and <code>)</code> are used for grouping, the
546 * character <code>*</code> 'zero or more times', and the character
547 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
548 * determined by an exact character sequence match; i.e., comparisons must be
549 * performed in a case-sensitive manner.  In addition, there are a few
550 * conditions for the uniqueness of identifiers in an SBML model.  Please
551 * consult the SBML specifications for the exact details of the uniqueness
552 * requirements.
553   <p>
554   * @param sid the string to use as the identifier of this {@link Reaction}
555   <p>
556   * <p>
557 * @return integer value indicating success/failure of the
558 * function.   The possible values
559 * returned by this function are:
560   * <ul>
561   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
562   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
563   * </ul>
564   */ public
565 int setId(String sid) {
566    return libsbmlJNI.Reaction_setId(swigCPtr, this, sid);
567  }
568
569  
570/**
571   * Sets the value of the 'name' attribute of this {@link Reaction}.
572   <p>
573   * The string in <code>name</code> is copied.
574   <p>
575   * @param name the new name for the {@link Reaction}
576   <p>
577   * <p>
578 * @return integer value indicating success/failure of the
579 * function.   The possible values
580 * returned by this function are:
581   * <ul>
582   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
583   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
584   * </ul>
585   */ public
586 int setName(String name) {
587    return libsbmlJNI.Reaction_setName(swigCPtr, this, name);
588  }
589
590  
591/**
592   * Sets the 'kineticLaw' subelement of this {@link Reaction} to a copy of the
593   * given {@link KineticLaw} object.
594   <p>
595   * @param kl the {@link KineticLaw} object to use.
596   <p>
597   * <p>
598 * @return integer value indicating success/failure of the
599 * function.   The possible values
600 * returned by this function are:
601   * <ul>
602   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
603   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
604   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
605   * </ul>
606  */ public
607 int setKineticLaw(KineticLaw kl) {
608    return libsbmlJNI.Reaction_setKineticLaw(swigCPtr, this, KineticLaw.getCPtr(kl), kl);
609  }
610
611  
612/**
613   * Sets the value of the 'reversible' attribute of this {@link Reaction}.
614   <p>
615   * @param value the value of the 'reversible' attribute.
616   <p>
617   * <p>
618 * @return integer value indicating success/failure of the
619 * function.   The possible values
620 * returned by this function are:
621   * <ul>
622   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
623   * </ul>
624   */ public
625 int setReversible(boolean value) {
626    return libsbmlJNI.Reaction_setReversible(swigCPtr, this, value);
627  }
628
629  
630/**
631   * Sets the value of the 'fast' attribute of this {@link Reaction}.
632   <p>
633   * @param value the value of the 'fast' attribute.
634   <p>
635   * <p>
636 * @return integer value indicating success/failure of the
637 * function.   The possible values
638 * returned by this function are:
639   * <ul>
640   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
641   *
642   * </ul> <p>
643   * <p>
644 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
645 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
646 * 'fast' attribute if they did not implement support for the corresponding
647 * concept; however, further research in SBML has revealed that this is not
648 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
649 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
650 * therefore stipulate that if a model has any reactions with 'fast' set to
651 * <code>true</code>, a software tool must be able to respect the attribute or else
652 * indicate to the user that it does not have the capacity to do so.  Readers
653 * are directed to the SBML specifications, which provides more detail about
654 * the conditions under which a reaction can be considered to be fast in this
655 * sense.</span>
656   */ public
657 int setFast(boolean value) {
658    return libsbmlJNI.Reaction_setFast(swigCPtr, this, value);
659  }
660
661  
662/**
663   * Sets the value of the 'compartment' attribute of this {@link Reaction}.
664   <p>
665   * The string <code>sid</code> is copied.  
666   <p>
667   * @param sid the string to use as the compartment of this {@link Reaction}
668   <p>
669   * <p>
670 * @return integer value indicating success/failure of the
671 * function.   The possible values
672 * returned by this function are:
673   * <ul>
674   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
675   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
676   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
677   *
678   * </ul> <p>
679   * @note The 'compartment' attribute is available in SBML
680   * Level&nbsp;3 Version&nbsp;1 Core, but is not present on {@link Reaction} in
681   * lower Levels of SBML.
682   */ public
683 int setCompartment(String sid) {
684    return libsbmlJNI.Reaction_setCompartment(swigCPtr, this, sid);
685  }
686
687  
688/**
689   * Unsets the value of the 'name' attribute of this {@link Reaction}.
690   <p>
691   * <p>
692 * @return integer value indicating success/failure of the
693 * function.   The possible values
694 * returned by this function are:
695   * <ul>
696   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
697   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
698   * </ul>
699   */ public
700 int unsetName() {
701    return libsbmlJNI.Reaction_unsetName(swigCPtr, this);
702  }
703
704  
705/**
706   * Unsets the 'kineticLaw' subelement of this {@link Reaction}.
707   <p>
708   * <p>
709 * @return integer value indicating success/failure of the
710 * function.   The possible values
711 * returned by this function are:
712   * <ul>
713   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
714   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
715   * </ul>
716   */ public
717 int unsetKineticLaw() {
718    return libsbmlJNI.Reaction_unsetKineticLaw(swigCPtr, this);
719  }
720
721  
722/**
723   * Unsets the value of the 'fast' attribute of this {@link Reaction}.
724   <p>
725   * <p>
726 * @return integer value indicating success/failure of the
727 * function.   The possible values
728 * returned by this function are:
729   * <ul>
730   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
731   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
732   *
733   * </ul> <p>
734   * <p>
735 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
736 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
737 * 'fast' attribute if they did not implement support for the corresponding
738 * concept; however, further research in SBML has revealed that this is not
739 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
740 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
741 * therefore stipulate that if a model has any reactions with 'fast' set to
742 * <code>true</code>, a software tool must be able to respect the attribute or else
743 * indicate to the user that it does not have the capacity to do so.  Readers
744 * are directed to the SBML specifications, which provides more detail about
745 * the conditions under which a reaction can be considered to be fast in this
746 * sense.</span>
747   */ public
748 int unsetFast() {
749    return libsbmlJNI.Reaction_unsetFast(swigCPtr, this);
750  }
751
752  
753/**
754   * Unsets the value of the 'compartment' attribute of this {@link Reaction}.
755   <p>
756   * <p>
757 * @return integer value indicating success/failure of the
758 * function.   The possible values
759 * returned by this function are:
760   * <ul>
761   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
762   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
763   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
764   *
765   * </ul> <p>
766   * @note The 'compartment' attribute is available in SBML
767   * Level&nbsp;3 Version&nbsp;1 Core, but is not present on {@link Reaction} in
768   * lower Levels of SBML.
769   */ public
770 int unsetCompartment() {
771    return libsbmlJNI.Reaction_unsetCompartment(swigCPtr, this);
772  }
773
774  
775/**
776   * Unsets the value of the 'reversible' attribute of this {@link Reaction}.
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_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
786   * </ul>
787   */ public
788 int unsetReversible() {
789    return libsbmlJNI.Reaction_unsetReversible(swigCPtr, this);
790  }
791
792  
793/**
794   * Adds a given {@link SpeciesReference} object as a reactant in this {@link Reaction}.
795   <p>
796   * The {@link SpeciesReference} instance in <code>sr</code> is copied.
797   <p>
798   * @param sr a {@link SpeciesReference} object referring to a {@link Species} in the
799   * enclosing {@link Model}
800   <p>
801   * <p>
802 * @return integer value indicating success/failure of the
803 * function.   The possible values
804 * returned by this function are:
805   * <ul>
806   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
807   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
808   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
809   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
810   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
811   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
812   *
813   * </ul> <p>
814   * <p>
815 * @note This method should be used with some caution.  The fact that this
816 * method <em>copies</em> the object passed to it means that the caller will be
817 * left holding a physically different object instance than the one contained
818 * inside this object.  Changes made to the original object instance (such as
819 * resetting attribute values) will <em>not affect the instance in this
820 * object</em>.  In addition, the caller should make sure to free the
821 * original object if it is no longer being used, or else a memory leak will
822 * result.  Please see other methods on this class (particularly a
823 * corresponding method whose name begins with the word <code>create</code>)
824 * for alternatives that do not lead to these issues. 
825   <p>
826   * @see #createReactant()
827   */ public
828 int addReactant(SpeciesReference sr) {
829    return libsbmlJNI.Reaction_addReactant__SWIG_0(swigCPtr, this, SpeciesReference.getCPtr(sr), sr);
830  }
831
832  
833/**
834   * Adds the given species as a reactant with the given stoichiometry
835   <p>
836   * @param species the species to be added as reactant
837   <p>
838   * @param stoichiometry an optional parameter specifying the
839   *        stoichiometry of the product (defaulting to 1)
840   <p>
841   * @param id an optional id to be given to the species reference that will
842   *        be created. (defaulting to empty string, i.e. not set)
843   <p>
844   * @param constant an attribute specifying whether the species reference is
845   *        constant or not (defaulting to true)
846   <p>
847   * <p>
848 * @return integer value indicating success/failure of the
849 * function.   The possible values
850 * returned by this function are:
851   * <ul>
852   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
853   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
854   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
855   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
856   *
857   * </ul> <p>
858   * <p>
859 * @note This method should be used with some caution.  The fact that this
860 * method <em>copies</em> the object passed to it means that the caller will be
861 * left holding a physically different object instance than the one contained
862 * inside this object.  Changes made to the original object instance (such as
863 * resetting attribute values) will <em>not affect the instance in this
864 * object</em>.  In addition, the caller should make sure to free the
865 * original object if it is no longer being used, or else a memory leak will
866 * result.  Please see other methods on this class (particularly a
867 * corresponding method whose name begins with the word <code>create</code>)
868 * for alternatives that do not lead to these issues.
869   <p>
870   * @note the {@link Species} object itself is NOT added to the model
871   <p>
872   * @see #createProduct()
873   */ public
874 int addReactant(Species species, double stoichiometry, String id, boolean constant) {
875    return libsbmlJNI.Reaction_addReactant__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id, constant);
876  }
877
878  
879/**
880   * Adds the given species as a reactant with the given stoichiometry
881   <p>
882   * @param species the species to be added as reactant
883   <p>
884   * @param stoichiometry an optional parameter specifying the
885   *        stoichiometry of the product (defaulting to 1)
886   <p>
887   * @param id an optional id to be given to the species reference that will
888   *        be created. (defaulting to empty string, i.e. not set)
889   <p>
890   * @param constant an attribute specifying whether the species reference is
891   *        constant or not (defaulting to true)
892   <p>
893   * <p>
894 * @return integer value indicating success/failure of the
895 * function.   The possible values
896 * returned by this function are:
897   * <ul>
898   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
899   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
900   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
901   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
902   *
903   * </ul> <p>
904   * <p>
905 * @note This method should be used with some caution.  The fact that this
906 * method <em>copies</em> the object passed to it means that the caller will be
907 * left holding a physically different object instance than the one contained
908 * inside this object.  Changes made to the original object instance (such as
909 * resetting attribute values) will <em>not affect the instance in this
910 * object</em>.  In addition, the caller should make sure to free the
911 * original object if it is no longer being used, or else a memory leak will
912 * result.  Please see other methods on this class (particularly a
913 * corresponding method whose name begins with the word <code>create</code>)
914 * for alternatives that do not lead to these issues.
915   <p>
916   * @note the {@link Species} object itself is NOT added to the model
917   <p>
918   * @see #createProduct()
919   */ public
920 int addReactant(Species species, double stoichiometry, String id) {
921    return libsbmlJNI.Reaction_addReactant__SWIG_2(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id);
922  }
923
924  
925/**
926   * Adds the given species as a reactant with the given stoichiometry
927   <p>
928   * @param species the species to be added as reactant
929   <p>
930   * @param stoichiometry an optional parameter specifying the
931   *        stoichiometry of the product (defaulting to 1)
932   <p>
933   * @param id an optional id to be given to the species reference that will
934   *        be created. (defaulting to empty string, i.e. not set)
935   <p>
936   * @param constant an attribute specifying whether the species reference is
937   *        constant or not (defaulting to true)
938   <p>
939   * <p>
940 * @return integer value indicating success/failure of the
941 * function.   The possible values
942 * returned by this function are:
943   * <ul>
944   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
945   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
946   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
947   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
948   *
949   * </ul> <p>
950   * <p>
951 * @note This method should be used with some caution.  The fact that this
952 * method <em>copies</em> the object passed to it means that the caller will be
953 * left holding a physically different object instance than the one contained
954 * inside this object.  Changes made to the original object instance (such as
955 * resetting attribute values) will <em>not affect the instance in this
956 * object</em>.  In addition, the caller should make sure to free the
957 * original object if it is no longer being used, or else a memory leak will
958 * result.  Please see other methods on this class (particularly a
959 * corresponding method whose name begins with the word <code>create</code>)
960 * for alternatives that do not lead to these issues.
961   <p>
962   * @note the {@link Species} object itself is NOT added to the model
963   <p>
964   * @see #createProduct()
965   */ public
966 int addReactant(Species species, double stoichiometry) {
967    return libsbmlJNI.Reaction_addReactant__SWIG_3(swigCPtr, this, Species.getCPtr(species), species, stoichiometry);
968  }
969
970  
971/**
972   * Adds the given species as a reactant with the given stoichiometry
973   <p>
974   * @param species the species to be added as reactant
975   <p>
976   * @param stoichiometry an optional parameter specifying the
977   *        stoichiometry of the product (defaulting to 1)
978   <p>
979   * @param id an optional id to be given to the species reference that will
980   *        be created. (defaulting to empty string, i.e. not set)
981   <p>
982   * @param constant an attribute specifying whether the species reference is
983   *        constant or not (defaulting to true)
984   <p>
985   * <p>
986 * @return integer value indicating success/failure of the
987 * function.   The possible values
988 * returned by this function are:
989   * <ul>
990   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
991   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
992   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
993   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
994   *
995   * </ul> <p>
996   * <p>
997 * @note This method should be used with some caution.  The fact that this
998 * method <em>copies</em> the object passed to it means that the caller will be
999 * left holding a physically different object instance than the one contained
1000 * inside this object.  Changes made to the original object instance (such as
1001 * resetting attribute values) will <em>not affect the instance in this
1002 * object</em>.  In addition, the caller should make sure to free the
1003 * original object if it is no longer being used, or else a memory leak will
1004 * result.  Please see other methods on this class (particularly a
1005 * corresponding method whose name begins with the word <code>create</code>)
1006 * for alternatives that do not lead to these issues.
1007   <p>
1008   * @note the {@link Species} object itself is NOT added to the model
1009   <p>
1010   * @see #createProduct()
1011   */ public
1012 int addReactant(Species species) {
1013    return libsbmlJNI.Reaction_addReactant__SWIG_4(swigCPtr, this, Species.getCPtr(species), species);
1014  }
1015
1016  
1017/**
1018   * Adds a given {@link SpeciesReference} object as a product in this {@link Reaction}.
1019   <p>
1020   * The {@link SpeciesReference} instance in <code>sr</code> is copied.
1021   <p>
1022   * @param sr a {@link SpeciesReference} object referring to a {@link Species} in the
1023   * enclosing {@link Model}
1024   <p>
1025   * <p>
1026 * @return integer value indicating success/failure of the
1027 * function.   The possible values
1028 * returned by this function are:
1029   * <ul>
1030   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1031   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
1032   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
1033   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1034   *
1035   * </ul> <p>
1036   * <p>
1037 * @note This method should be used with some caution.  The fact that this
1038 * method <em>copies</em> the object passed to it means that the caller will be
1039 * left holding a physically different object instance than the one contained
1040 * inside this object.  Changes made to the original object instance (such as
1041 * resetting attribute values) will <em>not affect the instance in this
1042 * object</em>.  In addition, the caller should make sure to free the
1043 * original object if it is no longer being used, or else a memory leak will
1044 * result.  Please see other methods on this class (particularly a
1045 * corresponding method whose name begins with the word <code>create</code>)
1046 * for alternatives that do not lead to these issues. 
1047   <p>
1048   * @see #createProduct()
1049   */ public
1050 int addProduct(SpeciesReference sr) {
1051    return libsbmlJNI.Reaction_addProduct__SWIG_0(swigCPtr, this, SpeciesReference.getCPtr(sr), sr);
1052  }
1053
1054  
1055/**
1056   * Adds the given species as a product with the given stoichiometry
1057   <p>
1058   * @param species the species to be added as product
1059   <p>
1060   * @param stoichiometry an optional parameter specifying the
1061   *        stoichiometry of the product (defaulting to 1)
1062   <p>
1063   * @param id an optional id to be given to the species reference that will
1064   *        be created. (defaulting to empty string, i.e. not set)
1065   <p>
1066   * @param constant an attribute specifying whether the species reference is
1067   *        constant or not (defaulting to true)
1068   <p>
1069   * <p>
1070 * @return integer value indicating success/failure of the
1071 * function.   The possible values
1072 * returned by this function are:
1073   * <ul>
1074   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1075   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1076   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1077   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1078   *
1079   * </ul> <p>
1080   * <p>
1081 * @note This method should be used with some caution.  The fact that this
1082 * method <em>copies</em> the object passed to it means that the caller will be
1083 * left holding a physically different object instance than the one contained
1084 * inside this object.  Changes made to the original object instance (such as
1085 * resetting attribute values) will <em>not affect the instance in this
1086 * object</em>.  In addition, the caller should make sure to free the
1087 * original object if it is no longer being used, or else a memory leak will
1088 * result.  Please see other methods on this class (particularly a
1089 * corresponding method whose name begins with the word <code>create</code>)
1090 * for alternatives that do not lead to these issues.
1091   <p>
1092   * @note the {@link Species} object itself is NOT added to the model
1093   <p>
1094   * @see #createProduct()
1095   */ public
1096 int addProduct(Species species, double stoichiometry, String id, boolean constant) {
1097    return libsbmlJNI.Reaction_addProduct__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id, constant);
1098  }
1099
1100  
1101/**
1102   * Adds the given species as a product with the given stoichiometry
1103   <p>
1104   * @param species the species to be added as product
1105   <p>
1106   * @param stoichiometry an optional parameter specifying the
1107   *        stoichiometry of the product (defaulting to 1)
1108   <p>
1109   * @param id an optional id to be given to the species reference that will
1110   *        be created. (defaulting to empty string, i.e. not set)
1111   <p>
1112   * @param constant an attribute specifying whether the species reference is
1113   *        constant or not (defaulting to true)
1114   <p>
1115   * <p>
1116 * @return integer value indicating success/failure of the
1117 * function.   The possible values
1118 * returned by this function are:
1119   * <ul>
1120   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1121   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1122   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1123   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1124   *
1125   * </ul> <p>
1126   * <p>
1127 * @note This method should be used with some caution.  The fact that this
1128 * method <em>copies</em> the object passed to it means that the caller will be
1129 * left holding a physically different object instance than the one contained
1130 * inside this object.  Changes made to the original object instance (such as
1131 * resetting attribute values) will <em>not affect the instance in this
1132 * object</em>.  In addition, the caller should make sure to free the
1133 * original object if it is no longer being used, or else a memory leak will
1134 * result.  Please see other methods on this class (particularly a
1135 * corresponding method whose name begins with the word <code>create</code>)
1136 * for alternatives that do not lead to these issues.
1137   <p>
1138   * @note the {@link Species} object itself is NOT added to the model
1139   <p>
1140   * @see #createProduct()
1141   */ public
1142 int addProduct(Species species, double stoichiometry, String id) {
1143    return libsbmlJNI.Reaction_addProduct__SWIG_2(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id);
1144  }
1145
1146  
1147/**
1148   * Adds the given species as a product with the given stoichiometry
1149   <p>
1150   * @param species the species to be added as product
1151   <p>
1152   * @param stoichiometry an optional parameter specifying the
1153   *        stoichiometry of the product (defaulting to 1)
1154   <p>
1155   * @param id an optional id to be given to the species reference that will
1156   *        be created. (defaulting to empty string, i.e. not set)
1157   <p>
1158   * @param constant an attribute specifying whether the species reference is
1159   *        constant or not (defaulting to true)
1160   <p>
1161   * <p>
1162 * @return integer value indicating success/failure of the
1163 * function.   The possible values
1164 * returned by this function are:
1165   * <ul>
1166   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1167   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1168   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1169   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1170   *
1171   * </ul> <p>
1172   * <p>
1173 * @note This method should be used with some caution.  The fact that this
1174 * method <em>copies</em> the object passed to it means that the caller will be
1175 * left holding a physically different object instance than the one contained
1176 * inside this object.  Changes made to the original object instance (such as
1177 * resetting attribute values) will <em>not affect the instance in this
1178 * object</em>.  In addition, the caller should make sure to free the
1179 * original object if it is no longer being used, or else a memory leak will
1180 * result.  Please see other methods on this class (particularly a
1181 * corresponding method whose name begins with the word <code>create</code>)
1182 * for alternatives that do not lead to these issues.
1183   <p>
1184   * @note the {@link Species} object itself is NOT added to the model
1185   <p>
1186   * @see #createProduct()
1187   */ public
1188 int addProduct(Species species, double stoichiometry) {
1189    return libsbmlJNI.Reaction_addProduct__SWIG_3(swigCPtr, this, Species.getCPtr(species), species, stoichiometry);
1190  }
1191
1192  
1193/**
1194   * Adds the given species as a product with the given stoichiometry
1195   <p>
1196   * @param species the species to be added as product
1197   <p>
1198   * @param stoichiometry an optional parameter specifying the
1199   *        stoichiometry of the product (defaulting to 1)
1200   <p>
1201   * @param id an optional id to be given to the species reference that will
1202   *        be created. (defaulting to empty string, i.e. not set)
1203   <p>
1204   * @param constant an attribute specifying whether the species reference is
1205   *        constant or not (defaulting to true)
1206   <p>
1207   * <p>
1208 * @return integer value indicating success/failure of the
1209 * function.   The possible values
1210 * returned by this function are:
1211   * <ul>
1212   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1213   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1214   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1215   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1216   *
1217   * </ul> <p>
1218   * <p>
1219 * @note This method should be used with some caution.  The fact that this
1220 * method <em>copies</em> the object passed to it means that the caller will be
1221 * left holding a physically different object instance than the one contained
1222 * inside this object.  Changes made to the original object instance (such as
1223 * resetting attribute values) will <em>not affect the instance in this
1224 * object</em>.  In addition, the caller should make sure to free the
1225 * original object if it is no longer being used, or else a memory leak will
1226 * result.  Please see other methods on this class (particularly a
1227 * corresponding method whose name begins with the word <code>create</code>)
1228 * for alternatives that do not lead to these issues.
1229   <p>
1230   * @note the {@link Species} object itself is NOT added to the model
1231   <p>
1232   * @see #createProduct()
1233   */ public
1234 int addProduct(Species species) {
1235    return libsbmlJNI.Reaction_addProduct__SWIG_4(swigCPtr, this, Species.getCPtr(species), species);
1236  }
1237
1238  
1239/**
1240   * Adds a given {@link ModifierSpeciesReference} object as a product in this
1241   * {@link Reaction}.
1242   <p>
1243   * The {@link ModifierSpeciesReference} instance in <code>msr</code> is copied.
1244   <p>
1245   * @param msr a {@link ModifierSpeciesReference} object referring to a {@link Species} in
1246   * the enclosing {@link Model}
1247   <p>
1248   * <p>
1249 * @return integer value indicating success/failure of the
1250 * function.   The possible values
1251 * returned by this function are:
1252   * <ul>
1253   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1254   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1255   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
1256   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1257   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
1258   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1259   *
1260   * </ul> <p>
1261   * <p>
1262 * @note This method should be used with some caution.  The fact that this
1263 * method <em>copies</em> the object passed to it means that the caller will be
1264 * left holding a physically different object instance than the one contained
1265 * inside this object.  Changes made to the original object instance (such as
1266 * resetting attribute values) will <em>not affect the instance in this
1267 * object</em>.  In addition, the caller should make sure to free the
1268 * original object if it is no longer being used, or else a memory leak will
1269 * result.  Please see other methods on this class (particularly a
1270 * corresponding method whose name begins with the word <code>create</code>)
1271 * for alternatives that do not lead to these issues. 
1272   <p>
1273   * @see #createModifier()
1274   */ public
1275 int addModifier(ModifierSpeciesReference msr) {
1276    return libsbmlJNI.Reaction_addModifier__SWIG_0(swigCPtr, this, ModifierSpeciesReference.getCPtr(msr), msr);
1277  }
1278
1279  
1280/**
1281   * Adds the given species as a modifier to this reaction
1282   <p>
1283   * @param species the species to be added as modifier
1284   <p>
1285   * @param id an optional id to be given to the species reference that will
1286   *        be created. (defaulting to empty string, i.e. not set)
1287   <p>
1288   * <p>
1289 * @return integer value indicating success/failure of the
1290 * function.   The possible values
1291 * returned by this function are:
1292   * <ul>
1293   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1294   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1295   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1296   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1297   *
1298   * </ul> <p>
1299   * <p>
1300 * @note This method should be used with some caution.  The fact that this
1301 * method <em>copies</em> the object passed to it means that the caller will be
1302 * left holding a physically different object instance than the one contained
1303 * inside this object.  Changes made to the original object instance (such as
1304 * resetting attribute values) will <em>not affect the instance in this
1305 * object</em>.  In addition, the caller should make sure to free the
1306 * original object if it is no longer being used, or else a memory leak will
1307 * result.  Please see other methods on this class (particularly a
1308 * corresponding method whose name begins with the word <code>create</code>)
1309 * for alternatives that do not lead to these issues.
1310   <p>
1311   * @note the {@link Species} object itself is NOT added to the model
1312   <p>
1313   * @see #createModifier()
1314   */ public
1315 int addModifier(Species species, String id) {
1316    return libsbmlJNI.Reaction_addModifier__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, id);
1317  }
1318
1319  
1320/**
1321   * Adds the given species as a modifier to this reaction
1322   <p>
1323   * @param species the species to be added as modifier
1324   <p>
1325   * @param id an optional id to be given to the species reference that will
1326   *        be created. (defaulting to empty string, i.e. not set)
1327   <p>
1328   * <p>
1329 * @return integer value indicating success/failure of the
1330 * function.   The possible values
1331 * returned by this function are:
1332   * <ul>
1333   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1334   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1335   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1336   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1337   *
1338   * </ul> <p>
1339   * <p>
1340 * @note This method should be used with some caution.  The fact that this
1341 * method <em>copies</em> the object passed to it means that the caller will be
1342 * left holding a physically different object instance than the one contained
1343 * inside this object.  Changes made to the original object instance (such as
1344 * resetting attribute values) will <em>not affect the instance in this
1345 * object</em>.  In addition, the caller should make sure to free the
1346 * original object if it is no longer being used, or else a memory leak will
1347 * result.  Please see other methods on this class (particularly a
1348 * corresponding method whose name begins with the word <code>create</code>)
1349 * for alternatives that do not lead to these issues.
1350   <p>
1351   * @note the {@link Species} object itself is NOT added to the model
1352   <p>
1353   * @see #createModifier()
1354   */ public
1355 int addModifier(Species species) {
1356    return libsbmlJNI.Reaction_addModifier__SWIG_2(swigCPtr, this, Species.getCPtr(species), species);
1357  }
1358
1359  
1360/**
1361   * Creates a new {@link SpeciesReference}, adds it to this {@link Reaction}'s list of
1362   * reactants, and returns it.
1363   <p>
1364   * @return a new {@link SpeciesReference} object.
1365   */ public
1366 SpeciesReference createReactant() {
1367    long cPtr = libsbmlJNI.Reaction_createReactant(swigCPtr, this);
1368    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1369  }
1370
1371  
1372/**
1373   * Creates a new {@link SpeciesReference}, adds it to this {@link Reaction}'s list of
1374   * products, and returns it.
1375   <p>
1376   * @return a new {@link SpeciesReference} object.
1377   */ public
1378 SpeciesReference createProduct() {
1379    long cPtr = libsbmlJNI.Reaction_createProduct(swigCPtr, this);
1380    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1381  }
1382
1383  
1384/**
1385   * Creates a new {@link ModifierSpeciesReference}, adds it to this {@link Reaction}'s
1386   * list of modifiers and returns it.
1387   <p>
1388   * @return a new {@link ModifierSpeciesReference} object.
1389   */ public
1390 ModifierSpeciesReference createModifier() {
1391    long cPtr = libsbmlJNI.Reaction_createModifier(swigCPtr, this);
1392    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1393  }
1394
1395  
1396/**
1397   * Creates a new {@link KineticLaw} object, installs it as this {@link Reaction}'s
1398   * 'kineticLaw' subelement, and returns it.
1399   <p>
1400   * If this {@link Reaction} had a previous {@link KineticLaw}, it will be destroyed.
1401   <p>
1402   * @return the new {@link KineticLaw} object
1403   */ public
1404 KineticLaw createKineticLaw() {
1405    long cPtr = libsbmlJNI.Reaction_createKineticLaw(swigCPtr, this);
1406    return (cPtr == 0) ? null : new KineticLaw(cPtr, false);
1407  }
1408
1409  
1410/**
1411   * Returns the list of reactants in this {@link Reaction} object.
1412   <p>
1413   * @return the {@link ListOfSpeciesReferences} containing the references to the
1414   * species acting as reactants in this reaction
1415   */ public
1416 ListOfSpeciesReferences getListOfReactants() {
1417    long cPtr = libsbmlJNI.Reaction_getListOfReactants__SWIG_0(swigCPtr, this);
1418    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1419  }
1420
1421  
1422/**
1423   * Returns the list of products in this {@link Reaction} object.
1424   <p>
1425   * @return the {@link ListOfSpeciesReferences} containing the references to the
1426   * species acting as products in this reaction
1427   */ public
1428 ListOfSpeciesReferences getListOfProducts() {
1429    long cPtr = libsbmlJNI.Reaction_getListOfProducts__SWIG_0(swigCPtr, this);
1430    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1431  }
1432
1433  
1434/**
1435   * Returns the list of modifiers in this {@link Reaction} object.
1436   <p>
1437   * @return the {@link ListOfSpeciesReferences} containing the references to the
1438   * species acting as modifiers in this reaction
1439   */ public
1440 ListOfSpeciesReferences getListOfModifiers() {
1441    long cPtr = libsbmlJNI.Reaction_getListOfModifiers__SWIG_0(swigCPtr, this);
1442    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1443  }
1444
1445  
1446/**
1447   * Returns the nth reactant species (as a {@link SpeciesReference} object) in 
1448   * the list of reactants in this {@link Reaction}.
1449   <p>
1450   * Callers should first call getNumReactants() to find out how many
1451   * reactants there are, to avoid using an invalid index number.
1452   <p>
1453   * @param n the index of the reactant sought.
1454   <p>
1455   * @return the nth reactant (as a {@link SpeciesReference} object) of this
1456   * {@link Reaction}.
1457   */ public
1458 SpeciesReference getReactant(long n) {
1459    long cPtr = libsbmlJNI.Reaction_getReactant__SWIG_0(swigCPtr, this, n);
1460    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1461  }
1462
1463  
1464/**
1465   * Returns the reactant species (as a {@link SpeciesReference} object) having 
1466   * a specific identifier in this {@link Reaction}.
1467   <p>
1468   * @param species the identifier of the reactant {@link Species} ('species' 
1469   * attribute of the reactant {@link SpeciesReference} object)
1470   <p>
1471   * @return a {@link SpeciesReference} object, or <code>null</code> if no species with the
1472   * given identifier <code>species</code> appears as a reactant in this {@link Reaction}.
1473   */ public
1474 SpeciesReference getReactant(String species) {
1475    long cPtr = libsbmlJNI.Reaction_getReactant__SWIG_2(swigCPtr, this, species);
1476    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1477  }
1478
1479  
1480/**
1481   * Returns the nth product species (as a {@link SpeciesReference} object) in 
1482   * the list of products in this {@link Reaction}.
1483   <p>
1484   * Callers should first call getNumProducts() to find out how many
1485   * products there are, to avoid using an invalid index number.
1486   <p>
1487   * @param n the index of the product sought.
1488   <p>
1489   * @return the nth product (as a {@link SpeciesReference} object) of this
1490   * {@link Reaction}.
1491   */ public
1492 SpeciesReference getProduct(long n) {
1493    long cPtr = libsbmlJNI.Reaction_getProduct__SWIG_0(swigCPtr, this, n);
1494    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1495  }
1496
1497  
1498/**
1499   * Returns the product species (as a {@link SpeciesReference} object) having 
1500   * a specific identifier in this {@link Reaction}.
1501   <p>
1502   * @param species the identifier of the product {@link Species} ('species'
1503   * attribute of the product {@link SpeciesReference} object)
1504   <p>
1505   * @return a {@link SpeciesReference} object, or <code>null</code> if no species with the
1506   * given identifier <code>species</code> appears as a product in this {@link Reaction}.
1507   */ public
1508 SpeciesReference getProduct(String species) {
1509    long cPtr = libsbmlJNI.Reaction_getProduct__SWIG_2(swigCPtr, this, species);
1510    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1511  }
1512
1513  
1514/**
1515   * Returns the nth modifier species (as a {@link ModifierSpeciesReference} object) 
1516   * in the list of modifiers of this {@link Reaction}.
1517   <p>
1518   * Callers should first call getNumModifiers() to find out how many
1519   * modifiers there are, to avoid using an invalid index number.
1520   <p>
1521   * @param n the index of the modifier species sought
1522   <p>
1523   * @return the nth modifier (as a {@link ModifierSpeciesReference} object) of
1524   * this {@link Reaction}.
1525   */ public
1526 ModifierSpeciesReference getModifier(long n) {
1527    long cPtr = libsbmlJNI.Reaction_getModifier__SWIG_0(swigCPtr, this, n);
1528    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1529  }
1530
1531  
1532/**
1533   * Returns the modifier species (as a {@link ModifierSpeciesReference} object) 
1534   * having a specific identifier in this {@link Reaction}.
1535   <p>
1536   * @param species the identifier of the modifier {@link Species} ('species' 
1537   * attribute of the {@link ModifierSpeciesReference} object)
1538   <p>
1539   * @return a {@link ModifierSpeciesReference} object, or <code>null</code> if no species with
1540   * the given identifier <code>species</code> appears as a modifier in this
1541   * {@link Reaction}.
1542   */ public
1543 ModifierSpeciesReference getModifier(String species) {
1544    long cPtr = libsbmlJNI.Reaction_getModifier__SWIG_2(swigCPtr, this, species);
1545    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1546  }
1547
1548  
1549/**
1550   * Returns the number of reactant species in this {@link Reaction}.
1551   <p>
1552   * @return the number of reactants in this {@link Reaction}.
1553   */ public
1554 long getNumReactants() {
1555    return libsbmlJNI.Reaction_getNumReactants(swigCPtr, this);
1556  }
1557
1558  
1559/**
1560   * Returns the number of product species in this {@link Reaction}.
1561   <p>
1562   * @return the number of products in this {@link Reaction}.
1563   */ public
1564 long getNumProducts() {
1565    return libsbmlJNI.Reaction_getNumProducts(swigCPtr, this);
1566  }
1567
1568  
1569/**
1570   * Returns the number of modifier species in this {@link Reaction}.
1571   <p>
1572   * @return the number of modifiers in this {@link Reaction}.
1573   */ public
1574 long getNumModifiers() {
1575    return libsbmlJNI.Reaction_getNumModifiers(swigCPtr, this);
1576  }
1577
1578  
1579/**
1580   * Removes the nth reactant species (SpeciesReference object) in the list of 
1581   * reactants in this {@link Reaction} and returns a pointer to it.
1582   <p>
1583   * The caller owns the returned object and is responsible for deleting it.
1584   * The caller should first call getNumReactants() to find out how many
1585   * reactants there are, to avoid using an invalid index number.
1586   <p>
1587   * @param n the index of the reactant {@link SpeciesReference} object to remove
1588   <p>
1589   * @return the removed reactant {@link SpeciesReference} object, or <code>null</code> if the 
1590   * given index is out of range.
1591   */ public
1592 SpeciesReference removeReactant(long n) {
1593    long cPtr = libsbmlJNI.Reaction_removeReactant__SWIG_0(swigCPtr, this, n);
1594    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1595  }
1596
1597  
1598/**
1599   * Removes the reactant species (SpeciesReference object) having the given  
1600   * 'species' attribute in this {@link Reaction} and returns a pointer to it.
1601   <p>
1602   * The caller owns the returned object and is responsible for deleting it.
1603   <p>
1604   * @param species the 'species' attribute of the reactant {@link SpeciesReference} 
1605   * object
1606   <p>
1607   * @return the removed reactant {@link SpeciesReference} object, or <code>null</code> if no 
1608   * reactant {@link SpeciesReference} object with the given 'species' attribute 
1609   * <code>species</code> exists in this {@link Reaction}.
1610   */ public
1611 SpeciesReference removeReactant(String species) {
1612    long cPtr = libsbmlJNI.Reaction_removeReactant__SWIG_1(swigCPtr, this, species);
1613    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1614  }
1615
1616  
1617/**
1618   * Removes the nth product species (SpeciesReference object) in the list of 
1619   * products in this {@link Reaction} and returns a pointer to it.
1620   <p>
1621   * The caller owns the returned object and is responsible for deleting it.
1622   * The caller should first call getNumProducts() to find out how many
1623   * products there are, to avoid using an invalid index number.
1624   <p>
1625   * @param n the index of the product {@link SpeciesReference} object to remove
1626   <p>
1627   * @return the removed product {@link SpeciesReference} object, or <code>null</code> if the 
1628   * given index is out of range.
1629   */ public
1630 SpeciesReference removeProduct(long n) {
1631    long cPtr = libsbmlJNI.Reaction_removeProduct__SWIG_0(swigCPtr, this, n);
1632    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1633  }
1634
1635  
1636/**
1637   * Removes the product species (SpeciesReference object) having the given  
1638   * 'species' attribute in this {@link Reaction} and returns a pointer to it.
1639   <p>
1640   * The caller owns the returned object and is responsible for deleting it.
1641   <p>
1642   * @param species the 'species' attribute of the product {@link SpeciesReference} 
1643   * object
1644   <p>
1645   * @return the removed product {@link SpeciesReference} object, or <code>null</code> if no 
1646   * product {@link SpeciesReference} object with the given 'species' attribute 
1647   * <code>species</code> exists in this {@link Reaction}.
1648   */ public
1649 SpeciesReference removeProduct(String species) {
1650    long cPtr = libsbmlJNI.Reaction_removeProduct__SWIG_1(swigCPtr, this, species);
1651    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1652  }
1653
1654  
1655/**
1656   * Removes the nth modifier species (ModifierSpeciesReference object) in 
1657   * the list of  modifiers in this {@link Reaction} and returns a pointer to it.
1658   <p>
1659   * The caller owns the returned object and is responsible for deleting it.
1660   * The caller should first call getNumModifiers() to find out how many
1661   * modifiers there are, to avoid using an invalid index number.
1662   <p>
1663   * @param n the index of the {@link ModifierSpeciesReference} object to remove
1664   <p>
1665   * @return the removed {@link ModifierSpeciesReference} object, or <code>null</code> if the 
1666   * given index is out of range.
1667   */ public
1668 ModifierSpeciesReference removeModifier(long n) {
1669    long cPtr = libsbmlJNI.Reaction_removeModifier__SWIG_0(swigCPtr, this, n);
1670    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, true);
1671  }
1672
1673  
1674/**
1675   * Removes the modifier species (ModifierSpeciesReference object) having 
1676   * the given 'species' attribute in this {@link Reaction} and returns a pointer to it.
1677   <p>
1678   * The caller owns the returned object and is responsible for deleting it.
1679   <p>
1680   * @param species the 'species' attribute of the {@link ModifierSpeciesReference} 
1681   * object
1682   <p>
1683   * @return the removed {@link ModifierSpeciesReference} object, or <code>null</code> if no 
1684   * {@link ModifierSpeciesReference} object with the given 'species' attribute @p 
1685   * species exists in this {@link Reaction}.
1686   */ public
1687 ModifierSpeciesReference removeModifier(String species) {
1688    long cPtr = libsbmlJNI.Reaction_removeModifier__SWIG_1(swigCPtr, this, species);
1689    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, true);
1690  }
1691
1692  public void connectToChild() {
1693    libsbmlJNI.Reaction_connectToChild(swigCPtr, this);
1694  }
1695
1696  
1697/** * @internal */ public
1698 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
1699    libsbmlJNI.Reaction_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
1700  }
1701
1702  
1703/**
1704   * Returns the libSBML type code for this SBML object.
1705   <p>
1706   * <p>
1707 * LibSBML attaches an identifying code to every kind of SBML object.  These
1708 * are integer constants known as <em>SBML type codes</em>.  The names of all
1709 * the codes begin with the characters <code>SBML_</code>.
1710 * In the Java language interface for libSBML, the
1711 * type codes are defined as static integer constants in the interface class
1712 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
1713 * package plug-ins may use overlapping type codes; to identify the package
1714 * to which a given object belongs, call the <code>getPackageName()</code>
1715 * method on the object.
1716   <p>
1717   * @return the SBML type code for this object:
1718   * {@link libsbmlConstants#SBML_REACTION SBML_REACTION} (default).
1719   <p>
1720   * <p>
1721 * @warning <span class='warning'>The specific integer values of the possible
1722 * type codes may be reused by different Level&nbsp;3 package plug-ins.
1723 * Thus, to identifiy the correct code, <strong>it is necessary to invoke
1724 * both getTypeCode() and getPackageName()</strong>.</span>
1725   <p>
1726   * @see #getElementName()
1727   * @see #getPackageName()
1728   */ public
1729 int getTypeCode() {
1730    return libsbmlJNI.Reaction_getTypeCode(swigCPtr, this);
1731  }
1732
1733  
1734/**
1735   * Returns the XML element name of this object, which for {@link Reaction}, is
1736   * always <code>'reaction'.</code>
1737   <p>
1738   * @return the name of this element, i.e., <code>'reaction'.</code>
1739   */ public
1740 String getElementName() {
1741    return libsbmlJNI.Reaction_getElementName(swigCPtr, this);
1742  }
1743
1744  
1745/**
1746   * Predicate returning <code>true</code> if all the required attributes for this
1747   * {@link Reaction} object have been set.
1748   <p>
1749   * The required attributes for a {@link Reaction} object are:
1750   * <ul>
1751   * <li> 'id' (or 'name' in SBML Level&nbsp;1)
1752   * <li> 'fast' (in Level&nbsp;3 only, where it is defined as a required attribute)
1753   * <li> 'reversible' (in Level&nbsp;3 only, where it is defined as a required attribute)
1754   *
1755   * </ul> <p>
1756   * @return <code>true</code> if the required attributes have been set, <code>false</code>
1757   * otherwise.
1758   */ public
1759 boolean hasRequiredAttributes() {
1760    return libsbmlJNI.Reaction_hasRequiredAttributes(swigCPtr, this);
1761  }
1762
1763}