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 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  return (Reaction) libsbml.DowncastSBase(libsbmlJNI.Reaction_cloneObject(swigCPtr, this), true);
265}
266
267  
268/**
269   * Returns the first child element found that has the given <code>id</code> in the
270   * model-wide SId namespace, or <code>null</code> if no such object is found.
271   <p>
272   * @param id string representing the id of objects to find.
273   <p>
274   * @return pointer to the first element found with the given <code>id</code>.
275   */ public
276 SBase getElementBySId(String id) {
277  return libsbml.DowncastSBase(libsbmlJNI.Reaction_getElementBySId(swigCPtr, this, id), false);
278}
279
280  
281/**
282   * Returns the first child element it can find with the given <code>metaid</code>, or
283   * <code>null</code> if no such object is found.
284   <p>
285   * @param metaid string representing the metaid of objects to find
286   <p>
287   * @return pointer to the first element found with the given <code>metaid</code>.
288   */ public
289 SBase getElementByMetaId(String metaid) {
290  return libsbml.DowncastSBase(libsbmlJNI.Reaction_getElementByMetaId(swigCPtr, this, metaid), false);
291}
292
293  
294/**
295   * <p>
296 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another
297 * value.
298 <p>
299 * <p>
300 * In SBML, object identifiers are of a data type called <code>SId</code>.
301 * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
302 * introduced for attribute values that refer to <code>SId</code> values; in
303 * previous Levels of SBML, this data type did not exist and attributes were
304 * simply described to as 'referring to an identifier', but the effective
305 * data type was the same as <code>SIdRef</code>in Level&nbsp;3.  These and
306 * other methods of libSBML refer to the type <code>SIdRef</code> for all
307 * Levels of SBML, even if the corresponding SBML specification did not
308 * explicitly name the data type.
309 <p>
310 * This method works by looking at all attributes and (if appropriate)
311 * mathematical formulas in MathML content, comparing the referenced
312 * identifiers to the value of <code>oldid</code>.  If any matches are found, the
313 * matching values are replaced with <code>newid</code>.  The method does <em>not</em>
314 * descend into child elements.
315 <p>
316 * @param oldid the old identifier
317 * @param newid the new identifier
318   */ public
319 void renameSIdRefs(String oldid, String newid) {
320    libsbmlJNI.Reaction_renameSIdRefs(swigCPtr, this, oldid, newid);
321  }
322
323  
324/**
325   * Initializes the fields of this {@link Reaction} object to 'typical' default
326   * values.
327   <p>
328   * The SBML {@link Reaction} component has slightly different aspects and
329   * default attribute values in different SBML Levels and Versions.
330   * This method sets the values to certain common defaults, based
331   * mostly on what they are in SBML Level&nbsp;2.  Specifically:
332   <p>
333   * <ul>
334   * <li> Sets the 'reversible' attribute to <code>true</code>
335   * <li> Sets the 'fast' attribute to <code>false</code>
336   * <li> Marks the 'fast' attribute as <em>not</em> having been set
337   *
338   * </ul> <p>
339   * <p>
340 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
341 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
342 * 'fast' attribute if they did not implement support for the corresponding
343 * concept; however, further research in SBML has revealed that this is not
344 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
345 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
346 * therefore stipulate that if a model has any reactions with 'fast' set to
347 * <code>true</code>, a software tool must be able to respect the attribute or else
348 * indicate to the user that it does not have the capacity to do so.  Readers
349 * are directed to the SBML specifications, which provides more detail about
350 * the conditions under which a reaction can be considered to be fast in this
351 * sense.</span>
352   */ public
353 void initDefaults() {
354    libsbmlJNI.Reaction_initDefaults(swigCPtr, this);
355  }
356
357  
358/**
359   * Returns the value of the 'id' attribute of this {@link Reaction}.
360   <p>
361   * @return the id of this {@link Reaction}.
362   */ public
363 String getId() {
364    return libsbmlJNI.Reaction_getId(swigCPtr, this);
365  }
366
367  
368/**
369   * Returns the value of the 'name' attribute of this {@link Reaction}.
370   <p>
371   * @return the name of this {@link Reaction}.
372   */ public
373 String getName() {
374    return libsbmlJNI.Reaction_getName(swigCPtr, this);
375  }
376
377  
378/**
379   * Returns the {@link KineticLaw} object contained in this {@link Reaction}.
380   <p>
381   * @return the {@link KineticLaw} instance.
382   */ public
383 KineticLaw getKineticLaw() {
384    long cPtr = libsbmlJNI.Reaction_getKineticLaw__SWIG_0(swigCPtr, this);
385    return (cPtr == 0) ? null : new KineticLaw(cPtr, false);
386  }
387
388  
389/**
390   * Returns the value of the 'reversible' attribute on the {@link Reaction} as a
391   * boolean value.
392   <p>
393   * @return the reversibility status of this {@link Reaction}.
394   */ public
395 boolean getReversible() {
396    return libsbmlJNI.Reaction_getReversible(swigCPtr, this);
397  }
398
399  
400/**
401   * Returns the value of the 'fast' attribute of this {@link Reaction}.
402   <p>
403   * @return the 'fast' status of this {@link Reaction}.
404   <p>
405   * <p>
406 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
407 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
408 * 'fast' attribute if they did not implement support for the corresponding
409 * concept; however, further research in SBML has revealed that this is not
410 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
411 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
412 * therefore stipulate that if a model has any reactions with 'fast' set to
413 * <code>true</code>, a software tool must be able to respect the attribute or else
414 * indicate to the user that it does not have the capacity to do so.  Readers
415 * are directed to the SBML specifications, which provides more detail about
416 * the conditions under which a reaction can be considered to be fast in this
417 * sense.</span>
418   */ public
419 boolean getFast() {
420    return libsbmlJNI.Reaction_getFast(swigCPtr, this);
421  }
422
423  
424/**
425   * (SBML Level&nbsp;3 only) Returns the value of the 'compartment'
426   * attribute on the {@link Reaction}.
427   <p>
428   * @return the compartment of this {@link Reaction}.
429   <p>
430   * @note The 'compartment' attribute is available in SBML Level&nbsp;3
431   * Version&nbsp;1 Core, but is not present on {@link Reaction} in lower Levels of
432   * SBML.
433   */ public
434 String getCompartment() {
435    return libsbmlJNI.Reaction_getCompartment(swigCPtr, this);
436  }
437
438  
439/**
440   * Predicate returning <code>true</code> if this
441   * {@link Reaction}'s 'id' attribute is set.
442   <p>
443   * @return <code>true</code> if the 'id' attribute of this {@link Reaction} is
444   * set, <code>false</code> otherwise.
445   */ public
446 boolean isSetId() {
447    return libsbmlJNI.Reaction_isSetId(swigCPtr, this);
448  }
449
450  
451/**
452   * Predicate returning <code>true</code> if this
453   * {@link Reaction}'s 'name' attribute is set.
454   <p>
455   * @return <code>true</code> if the 'name' attribute of this {@link Reaction} is
456   * set, <code>false</code> otherwise.
457   */ public
458 boolean isSetName() {
459    return libsbmlJNI.Reaction_isSetName(swigCPtr, this);
460  }
461
462  
463/**
464   * Predicate returning <code>true</code> if this
465   * {@link Reaction} contains a kinetic law object.
466   <p>
467   * @return <code>true</code> if a {@link KineticLaw} is present in this {@link Reaction},, <code>false</code>
468   * otherwise.
469   */ public
470 boolean isSetKineticLaw() {
471    return libsbmlJNI.Reaction_isSetKineticLaw(swigCPtr, this);
472  }
473
474  
475/**
476   * Predicate returning <code>true</code> if the value of
477   * the 'fast' attribute on this {@link Reaction}.
478   <p>
479   * @return <code>true</code> if the 'fast' attribute is true, <code>false</code> otherwise.
480   <p>
481   * <p>
482 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
483 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
484 * 'fast' attribute if they did not implement support for the corresponding
485 * concept; however, further research in SBML has revealed that this is not
486 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
487 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
488 * therefore stipulate that if a model has any reactions with 'fast' set to
489 * <code>true</code>, a software tool must be able to respect the attribute or else
490 * indicate to the user that it does not have the capacity to do so.  Readers
491 * are directed to the SBML specifications, which provides more detail about
492 * the conditions under which a reaction can be considered to be fast in this
493 * sense.</span>
494   */ public
495 boolean isSetFast() {
496    return libsbmlJNI.Reaction_isSetFast(swigCPtr, this);
497  }
498
499  
500/**
501   * Predicate returning <code>true</code> if this
502   * {@link Reaction}'s 'compartment' attribute is set.
503   <p>
504   * @return <code>true</code> if the 'compartment' attribute of this {@link Reaction} is
505   * set, <code>false</code> otherwise.
506   <p>
507   * @note The 'compartment' attribute is available in SBML
508   * Level&nbsp;3 Version&nbsp;1 Core, but is not present on {@link Reaction} in
509   * lower Levels of SBML.
510   */ public
511 boolean isSetCompartment() {
512    return libsbmlJNI.Reaction_isSetCompartment(swigCPtr, this);
513  }
514
515  
516/**
517   * Predicate returning <code>true</code> if this
518   * {@link Reaction}'s 'reversible' attribute is set.
519   <p>
520   * @return <code>true</code> if the 'reversible' attribute of this {@link Reaction} is
521   * set, <code>false</code> otherwise.
522   */ public
523 boolean isSetReversible() {
524    return libsbmlJNI.Reaction_isSetReversible(swigCPtr, this);
525  }
526
527  
528/**
529   * Sets the value of the 'id' attribute of this {@link Reaction}.
530   <p>
531   * The string <code>sid</code> is copied.
532   <p>
533   * <p>
534 * SBML has strict requirements for the syntax of identifiers, that is, the
535 * values of the 'id' attribute present on most types of SBML objects.
536 * The following is a summary of the definition of the SBML identifier type
537 * <code>SId</code>, which defines the permitted syntax of identifiers.  We
538 * express the syntax using an extended form of BNF notation:
539 * <pre style='margin-left: 2em; border: none; font-weight: bold; font-size: 13px; color: black'>
540 * letter .= 'a'..'z','A'..'Z'
541 * digit  .= '0'..'9'
542 * idChar .= letter | digit | '_'
543 * SId    .= ( letter | '_' ) idChar*</pre>
544 * The characters <code>(</code> and <code>)</code> are used for grouping, the
545 * character <code>*</code> 'zero or more times', and the character
546 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
547 * determined by an exact character sequence match; i.e., comparisons must be
548 * performed in a case-sensitive manner.  In addition, there are a few
549 * conditions for the uniqueness of identifiers in an SBML model.  Please
550 * consult the SBML specifications for the exact details of the uniqueness
551 * requirements.
552   <p>
553   * @param sid the string to use as the identifier of this {@link Reaction}
554   <p>
555   * <p>
556 * @return integer value indicating success/failure of the
557 * function.   The possible values
558 * returned by this function are:
559   * <ul>
560   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
561   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
562   * </ul>
563   */ public
564 int setId(String sid) {
565    return libsbmlJNI.Reaction_setId(swigCPtr, this, sid);
566  }
567
568  
569/**
570   * Sets the value of the 'name' attribute of this {@link Reaction}.
571   <p>
572   * The string in <code>name</code> is copied.
573   <p>
574   * @param name the new name for the {@link Reaction}
575   <p>
576   * <p>
577 * @return integer value indicating success/failure of the
578 * function.   The possible values
579 * returned by this function are:
580   * <ul>
581   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
582   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
583   * </ul>
584   */ public
585 int setName(String name) {
586    return libsbmlJNI.Reaction_setName(swigCPtr, this, name);
587  }
588
589  
590/**
591   * Sets the 'kineticLaw' subelement of this {@link Reaction} to a copy of the
592   * given {@link KineticLaw} object.
593   <p>
594   * @param kl the {@link KineticLaw} object to use.
595   <p>
596   * <p>
597 * @return integer value indicating success/failure of the
598 * function.   The possible values
599 * returned by this function are:
600   * <ul>
601   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
602   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
603   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
604   * </ul>
605  */ public
606 int setKineticLaw(KineticLaw kl) {
607    return libsbmlJNI.Reaction_setKineticLaw(swigCPtr, this, KineticLaw.getCPtr(kl), kl);
608  }
609
610  
611/**
612   * Sets the value of the 'reversible' attribute of this {@link Reaction}.
613   <p>
614   * @param value the value of the 'reversible' attribute.
615   <p>
616   * <p>
617 * @return integer value indicating success/failure of the
618 * function.   The possible values
619 * returned by this function are:
620   * <ul>
621   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
622   * </ul>
623   */ public
624 int setReversible(boolean value) {
625    return libsbmlJNI.Reaction_setReversible(swigCPtr, this, value);
626  }
627
628  
629/**
630   * Sets the value of the 'fast' attribute of this {@link Reaction}.
631   <p>
632   * @param value the value of the 'fast' attribute.
633   <p>
634   * <p>
635 * @return integer value indicating success/failure of the
636 * function.   The possible values
637 * returned by this function are:
638   * <ul>
639   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
640   *
641   * </ul> <p>
642   * <p>
643 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
644 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
645 * 'fast' attribute if they did not implement support for the corresponding
646 * concept; however, further research in SBML has revealed that this is not
647 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
648 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
649 * therefore stipulate that if a model has any reactions with 'fast' set to
650 * <code>true</code>, a software tool must be able to respect the attribute or else
651 * indicate to the user that it does not have the capacity to do so.  Readers
652 * are directed to the SBML specifications, which provides more detail about
653 * the conditions under which a reaction can be considered to be fast in this
654 * sense.</span>
655   */ public
656 int setFast(boolean value) {
657    return libsbmlJNI.Reaction_setFast(swigCPtr, this, value);
658  }
659
660  
661/**
662   * Sets the value of the 'compartment' attribute of this {@link Reaction}.
663   <p>
664   * The string <code>sid</code> is copied.  
665   <p>
666   * @param sid the string to use as the compartment of this {@link Reaction}
667   <p>
668   * <p>
669 * @return integer value indicating success/failure of the
670 * function.   The possible values
671 * returned by this function are:
672   * <ul>
673   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
674   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
675   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
676   *
677   * </ul> <p>
678   * @note The 'compartment' attribute is available in SBML
679   * Level&nbsp;3 Version&nbsp;1 Core, but is not present on {@link Reaction} in
680   * lower Levels of SBML.
681   */ public
682 int setCompartment(String sid) {
683    return libsbmlJNI.Reaction_setCompartment(swigCPtr, this, sid);
684  }
685
686  
687/**
688   * Unsets the value of the 'name' attribute of this {@link Reaction}.
689   <p>
690   * <p>
691 * @return integer value indicating success/failure of the
692 * function.   The possible values
693 * returned by this function are:
694   * <ul>
695   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
696   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
697   * </ul>
698   */ public
699 int unsetName() {
700    return libsbmlJNI.Reaction_unsetName(swigCPtr, this);
701  }
702
703  
704/**
705   * Unsets the 'kineticLaw' subelement of this {@link Reaction}.
706   <p>
707   * <p>
708 * @return integer value indicating success/failure of the
709 * function.   The possible values
710 * returned by this function are:
711   * <ul>
712   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
713   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
714   * </ul>
715   */ public
716 int unsetKineticLaw() {
717    return libsbmlJNI.Reaction_unsetKineticLaw(swigCPtr, this);
718  }
719
720  
721/**
722   * Unsets the value of the 'fast' attribute of this {@link Reaction}.
723   <p>
724   * <p>
725 * @return integer value indicating success/failure of the
726 * function.   The possible values
727 * returned by this function are:
728   * <ul>
729   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
730   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
731   *
732   * </ul> <p>
733   * <p>
734 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
735 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
736 * 'fast' attribute if they did not implement support for the corresponding
737 * concept; however, further research in SBML has revealed that this is not
738 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
739 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
740 * therefore stipulate that if a model has any reactions with 'fast' set to
741 * <code>true</code>, a software tool must be able to respect the attribute or else
742 * indicate to the user that it does not have the capacity to do so.  Readers
743 * are directed to the SBML specifications, which provides more detail about
744 * the conditions under which a reaction can be considered to be fast in this
745 * sense.</span>
746   */ public
747 int unsetFast() {
748    return libsbmlJNI.Reaction_unsetFast(swigCPtr, this);
749  }
750
751  
752/**
753   * Unsets the value of the 'compartment' attribute of this {@link Reaction}.
754   <p>
755   * <p>
756 * @return integer value indicating success/failure of the
757 * function.   The possible values
758 * returned by this function are:
759   * <ul>
760   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
761   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
762   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
763   *
764   * </ul> <p>
765   * @note The 'compartment' attribute is available in SBML
766   * Level&nbsp;3 Version&nbsp;1 Core, but is not present on {@link Reaction} in
767   * lower Levels of SBML.
768   */ public
769 int unsetCompartment() {
770    return libsbmlJNI.Reaction_unsetCompartment(swigCPtr, this);
771  }
772
773  
774/**
775   * Unsets the value of the 'reversible' attribute of this {@link Reaction}.
776   <p>
777   * <p>
778 * @return integer value indicating success/failure of the
779 * function.   The possible values
780 * returned by this function are:
781   * <ul>
782   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
783   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
784   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
785   * </ul>
786   */ public
787 int unsetReversible() {
788    return libsbmlJNI.Reaction_unsetReversible(swigCPtr, this);
789  }
790
791  
792/**
793   * Adds a given {@link SpeciesReference} object as a reactant in this {@link Reaction}.
794   <p>
795   * The {@link SpeciesReference} instance in <code>sr</code> is copied.
796   <p>
797   * @param sr a {@link SpeciesReference} object referring to a {@link Species} in the
798   * enclosing {@link Model}
799   <p>
800   * <p>
801 * @return integer value indicating success/failure of the
802 * function.   The possible values
803 * returned by this function are:
804   * <ul>
805   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
806   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
807   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
808   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
809   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
810   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
811   *
812   * </ul> <p>
813   * <p>
814 * @note This method should be used with some caution.  The fact that this
815 * method <em>copies</em> the object passed to it means that the caller will be
816 * left holding a physically different object instance than the one contained
817 * inside this object.  Changes made to the original object instance (such as
818 * resetting attribute values) will <em>not affect the instance in this
819 * object</em>.  In addition, the caller should make sure to free the
820 * original object if it is no longer being used, or else a memory leak will
821 * result.  Please see other methods on this class (particularly a
822 * corresponding method whose name begins with the word <code>create</code>)
823 * for alternatives that do not lead to these issues. 
824   <p>
825   * @see #createReactant()
826   */ public
827 int addReactant(SpeciesReference sr) {
828    return libsbmlJNI.Reaction_addReactant__SWIG_0(swigCPtr, this, SpeciesReference.getCPtr(sr), sr);
829  }
830
831  
832/**
833   * Adds the given species as a reactant with the given stoichiometry
834   <p>
835   * @param species the species to be added as reactant
836   <p>
837   * @param stoichiometry an optional parameter specifying the
838   *        stoichiometry of the product (defaulting to 1)
839   <p>
840   * @param id an optional id to be given to the species reference that will
841   *        be created. (defaulting to empty string, i.e. not set)
842   <p>
843   * @param constant an attribute specifying whether the species reference is
844   *        constant or not (defaulting to true)
845   <p>
846   * <p>
847 * @return integer value indicating success/failure of the
848 * function.   The possible values
849 * returned by this function are:
850   * <ul>
851   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
852   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
853   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
854   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
855   *
856   * </ul> <p>
857   * <p>
858 * @note This method should be used with some caution.  The fact that this
859 * method <em>copies</em> the object passed to it means that the caller will be
860 * left holding a physically different object instance than the one contained
861 * inside this object.  Changes made to the original object instance (such as
862 * resetting attribute values) will <em>not affect the instance in this
863 * object</em>.  In addition, the caller should make sure to free the
864 * original object if it is no longer being used, or else a memory leak will
865 * result.  Please see other methods on this class (particularly a
866 * corresponding method whose name begins with the word <code>create</code>)
867 * for alternatives that do not lead to these issues.
868   <p>
869   * @note the {@link Species} object itself is NOT added to the model
870   <p>
871   * @see #createProduct()
872   */ public
873 int addReactant(Species species, double stoichiometry, String id, boolean constant) {
874    return libsbmlJNI.Reaction_addReactant__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id, constant);
875  }
876
877  
878/**
879   * Adds the given species as a reactant with the given stoichiometry
880   <p>
881   * @param species the species to be added as reactant
882   <p>
883   * @param stoichiometry an optional parameter specifying the
884   *        stoichiometry of the product (defaulting to 1)
885   <p>
886   * @param id an optional id to be given to the species reference that will
887   *        be created. (defaulting to empty string, i.e. not set)
888   <p>
889   * @param constant an attribute specifying whether the species reference is
890   *        constant or not (defaulting to true)
891   <p>
892   * <p>
893 * @return integer value indicating success/failure of the
894 * function.   The possible values
895 * returned by this function are:
896   * <ul>
897   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
898   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
899   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
900   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
901   *
902   * </ul> <p>
903   * <p>
904 * @note This method should be used with some caution.  The fact that this
905 * method <em>copies</em> the object passed to it means that the caller will be
906 * left holding a physically different object instance than the one contained
907 * inside this object.  Changes made to the original object instance (such as
908 * resetting attribute values) will <em>not affect the instance in this
909 * object</em>.  In addition, the caller should make sure to free the
910 * original object if it is no longer being used, or else a memory leak will
911 * result.  Please see other methods on this class (particularly a
912 * corresponding method whose name begins with the word <code>create</code>)
913 * for alternatives that do not lead to these issues.
914   <p>
915   * @note the {@link Species} object itself is NOT added to the model
916   <p>
917   * @see #createProduct()
918   */ public
919 int addReactant(Species species, double stoichiometry, String id) {
920    return libsbmlJNI.Reaction_addReactant__SWIG_2(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id);
921  }
922
923  
924/**
925   * Adds the given species as a reactant with the given stoichiometry
926   <p>
927   * @param species the species to be added as reactant
928   <p>
929   * @param stoichiometry an optional parameter specifying the
930   *        stoichiometry of the product (defaulting to 1)
931   <p>
932   * @param id an optional id to be given to the species reference that will
933   *        be created. (defaulting to empty string, i.e. not set)
934   <p>
935   * @param constant an attribute specifying whether the species reference is
936   *        constant or not (defaulting to true)
937   <p>
938   * <p>
939 * @return integer value indicating success/failure of the
940 * function.   The possible values
941 * returned by this function are:
942   * <ul>
943   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
944   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
945   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
946   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
947   *
948   * </ul> <p>
949   * <p>
950 * @note This method should be used with some caution.  The fact that this
951 * method <em>copies</em> the object passed to it means that the caller will be
952 * left holding a physically different object instance than the one contained
953 * inside this object.  Changes made to the original object instance (such as
954 * resetting attribute values) will <em>not affect the instance in this
955 * object</em>.  In addition, the caller should make sure to free the
956 * original object if it is no longer being used, or else a memory leak will
957 * result.  Please see other methods on this class (particularly a
958 * corresponding method whose name begins with the word <code>create</code>)
959 * for alternatives that do not lead to these issues.
960   <p>
961   * @note the {@link Species} object itself is NOT added to the model
962   <p>
963   * @see #createProduct()
964   */ public
965 int addReactant(Species species, double stoichiometry) {
966    return libsbmlJNI.Reaction_addReactant__SWIG_3(swigCPtr, this, Species.getCPtr(species), species, stoichiometry);
967  }
968
969  
970/**
971   * Adds the given species as a reactant with the given stoichiometry
972   <p>
973   * @param species the species to be added as reactant
974   <p>
975   * @param stoichiometry an optional parameter specifying the
976   *        stoichiometry of the product (defaulting to 1)
977   <p>
978   * @param id an optional id to be given to the species reference that will
979   *        be created. (defaulting to empty string, i.e. not set)
980   <p>
981   * @param constant an attribute specifying whether the species reference is
982   *        constant or not (defaulting to true)
983   <p>
984   * <p>
985 * @return integer value indicating success/failure of the
986 * function.   The possible values
987 * returned by this function are:
988   * <ul>
989   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
990   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
991   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
992   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
993   *
994   * </ul> <p>
995   * <p>
996 * @note This method should be used with some caution.  The fact that this
997 * method <em>copies</em> the object passed to it means that the caller will be
998 * left holding a physically different object instance than the one contained
999 * inside this object.  Changes made to the original object instance (such as
1000 * resetting attribute values) will <em>not affect the instance in this
1001 * object</em>.  In addition, the caller should make sure to free the
1002 * original object if it is no longer being used, or else a memory leak will
1003 * result.  Please see other methods on this class (particularly a
1004 * corresponding method whose name begins with the word <code>create</code>)
1005 * for alternatives that do not lead to these issues.
1006   <p>
1007   * @note the {@link Species} object itself is NOT added to the model
1008   <p>
1009   * @see #createProduct()
1010   */ public
1011 int addReactant(Species species) {
1012    return libsbmlJNI.Reaction_addReactant__SWIG_4(swigCPtr, this, Species.getCPtr(species), species);
1013  }
1014
1015  
1016/**
1017   * Adds a given {@link SpeciesReference} object as a product in this {@link Reaction}.
1018   <p>
1019   * The {@link SpeciesReference} instance in <code>sr</code> is copied.
1020   <p>
1021   * @param sr a {@link SpeciesReference} object referring to a {@link Species} in the
1022   * enclosing {@link Model}
1023   <p>
1024   * <p>
1025 * @return integer value indicating success/failure of the
1026 * function.   The possible values
1027 * returned by this function are:
1028   * <ul>
1029   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1030   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
1031   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
1032   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1033   *
1034   * </ul> <p>
1035   * <p>
1036 * @note This method should be used with some caution.  The fact that this
1037 * method <em>copies</em> the object passed to it means that the caller will be
1038 * left holding a physically different object instance than the one contained
1039 * inside this object.  Changes made to the original object instance (such as
1040 * resetting attribute values) will <em>not affect the instance in this
1041 * object</em>.  In addition, the caller should make sure to free the
1042 * original object if it is no longer being used, or else a memory leak will
1043 * result.  Please see other methods on this class (particularly a
1044 * corresponding method whose name begins with the word <code>create</code>)
1045 * for alternatives that do not lead to these issues. 
1046   <p>
1047   * @see #createProduct()
1048   */ public
1049 int addProduct(SpeciesReference sr) {
1050    return libsbmlJNI.Reaction_addProduct__SWIG_0(swigCPtr, this, SpeciesReference.getCPtr(sr), sr);
1051  }
1052
1053  
1054/**
1055   * Adds the given species as a product with the given stoichiometry
1056   <p>
1057   * @param species the species to be added as product
1058   <p>
1059   * @param stoichiometry an optional parameter specifying the
1060   *        stoichiometry of the product (defaulting to 1)
1061   <p>
1062   * @param id an optional id to be given to the species reference that will
1063   *        be created. (defaulting to empty string, i.e. not set)
1064   <p>
1065   * @param constant an attribute specifying whether the species reference is
1066   *        constant or not (defaulting to true)
1067   <p>
1068   * <p>
1069 * @return integer value indicating success/failure of the
1070 * function.   The possible values
1071 * returned by this function are:
1072   * <ul>
1073   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1074   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1075   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1076   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1077   *
1078   * </ul> <p>
1079   * <p>
1080 * @note This method should be used with some caution.  The fact that this
1081 * method <em>copies</em> the object passed to it means that the caller will be
1082 * left holding a physically different object instance than the one contained
1083 * inside this object.  Changes made to the original object instance (such as
1084 * resetting attribute values) will <em>not affect the instance in this
1085 * object</em>.  In addition, the caller should make sure to free the
1086 * original object if it is no longer being used, or else a memory leak will
1087 * result.  Please see other methods on this class (particularly a
1088 * corresponding method whose name begins with the word <code>create</code>)
1089 * for alternatives that do not lead to these issues.
1090   <p>
1091   * @note the {@link Species} object itself is NOT added to the model
1092   <p>
1093   * @see #createProduct()
1094   */ public
1095 int addProduct(Species species, double stoichiometry, String id, boolean constant) {
1096    return libsbmlJNI.Reaction_addProduct__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id, constant);
1097  }
1098
1099  
1100/**
1101   * Adds the given species as a product with the given stoichiometry
1102   <p>
1103   * @param species the species to be added as product
1104   <p>
1105   * @param stoichiometry an optional parameter specifying the
1106   *        stoichiometry of the product (defaulting to 1)
1107   <p>
1108   * @param id an optional id to be given to the species reference that will
1109   *        be created. (defaulting to empty string, i.e. not set)
1110   <p>
1111   * @param constant an attribute specifying whether the species reference is
1112   *        constant or not (defaulting to true)
1113   <p>
1114   * <p>
1115 * @return integer value indicating success/failure of the
1116 * function.   The possible values
1117 * returned by this function are:
1118   * <ul>
1119   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1120   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1121   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1122   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1123   *
1124   * </ul> <p>
1125   * <p>
1126 * @note This method should be used with some caution.  The fact that this
1127 * method <em>copies</em> the object passed to it means that the caller will be
1128 * left holding a physically different object instance than the one contained
1129 * inside this object.  Changes made to the original object instance (such as
1130 * resetting attribute values) will <em>not affect the instance in this
1131 * object</em>.  In addition, the caller should make sure to free the
1132 * original object if it is no longer being used, or else a memory leak will
1133 * result.  Please see other methods on this class (particularly a
1134 * corresponding method whose name begins with the word <code>create</code>)
1135 * for alternatives that do not lead to these issues.
1136   <p>
1137   * @note the {@link Species} object itself is NOT added to the model
1138   <p>
1139   * @see #createProduct()
1140   */ public
1141 int addProduct(Species species, double stoichiometry, String id) {
1142    return libsbmlJNI.Reaction_addProduct__SWIG_2(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id);
1143  }
1144
1145  
1146/**
1147   * Adds the given species as a product with the given stoichiometry
1148   <p>
1149   * @param species the species to be added as product
1150   <p>
1151   * @param stoichiometry an optional parameter specifying the
1152   *        stoichiometry of the product (defaulting to 1)
1153   <p>
1154   * @param id an optional id to be given to the species reference that will
1155   *        be created. (defaulting to empty string, i.e. not set)
1156   <p>
1157   * @param constant an attribute specifying whether the species reference is
1158   *        constant or not (defaulting to true)
1159   <p>
1160   * <p>
1161 * @return integer value indicating success/failure of the
1162 * function.   The possible values
1163 * returned by this function are:
1164   * <ul>
1165   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1166   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1167   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1168   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1169   *
1170   * </ul> <p>
1171   * <p>
1172 * @note This method should be used with some caution.  The fact that this
1173 * method <em>copies</em> the object passed to it means that the caller will be
1174 * left holding a physically different object instance than the one contained
1175 * inside this object.  Changes made to the original object instance (such as
1176 * resetting attribute values) will <em>not affect the instance in this
1177 * object</em>.  In addition, the caller should make sure to free the
1178 * original object if it is no longer being used, or else a memory leak will
1179 * result.  Please see other methods on this class (particularly a
1180 * corresponding method whose name begins with the word <code>create</code>)
1181 * for alternatives that do not lead to these issues.
1182   <p>
1183   * @note the {@link Species} object itself is NOT added to the model
1184   <p>
1185   * @see #createProduct()
1186   */ public
1187 int addProduct(Species species, double stoichiometry) {
1188    return libsbmlJNI.Reaction_addProduct__SWIG_3(swigCPtr, this, Species.getCPtr(species), species, stoichiometry);
1189  }
1190
1191  
1192/**
1193   * Adds the given species as a product with the given stoichiometry
1194   <p>
1195   * @param species the species to be added as product
1196   <p>
1197   * @param stoichiometry an optional parameter specifying the
1198   *        stoichiometry of the product (defaulting to 1)
1199   <p>
1200   * @param id an optional id to be given to the species reference that will
1201   *        be created. (defaulting to empty string, i.e. not set)
1202   <p>
1203   * @param constant an attribute specifying whether the species reference is
1204   *        constant or not (defaulting to true)
1205   <p>
1206   * <p>
1207 * @return integer value indicating success/failure of the
1208 * function.   The possible values
1209 * returned by this function are:
1210   * <ul>
1211   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1212   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1213   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1214   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1215   *
1216   * </ul> <p>
1217   * <p>
1218 * @note This method should be used with some caution.  The fact that this
1219 * method <em>copies</em> the object passed to it means that the caller will be
1220 * left holding a physically different object instance than the one contained
1221 * inside this object.  Changes made to the original object instance (such as
1222 * resetting attribute values) will <em>not affect the instance in this
1223 * object</em>.  In addition, the caller should make sure to free the
1224 * original object if it is no longer being used, or else a memory leak will
1225 * result.  Please see other methods on this class (particularly a
1226 * corresponding method whose name begins with the word <code>create</code>)
1227 * for alternatives that do not lead to these issues.
1228   <p>
1229   * @note the {@link Species} object itself is NOT added to the model
1230   <p>
1231   * @see #createProduct()
1232   */ public
1233 int addProduct(Species species) {
1234    return libsbmlJNI.Reaction_addProduct__SWIG_4(swigCPtr, this, Species.getCPtr(species), species);
1235  }
1236
1237  
1238/**
1239   * Adds a given {@link ModifierSpeciesReference} object as a product in this
1240   * {@link Reaction}.
1241   <p>
1242   * The {@link ModifierSpeciesReference} instance in <code>msr</code> is copied.
1243   <p>
1244   * @param msr a {@link ModifierSpeciesReference} object referring to a {@link Species} in
1245   * the enclosing {@link Model}
1246   <p>
1247   * <p>
1248 * @return integer value indicating success/failure of the
1249 * function.   The possible values
1250 * returned by this function are:
1251   * <ul>
1252   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1253   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1254   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
1255   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1256   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
1257   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1258   *
1259   * </ul> <p>
1260   * <p>
1261 * @note This method should be used with some caution.  The fact that this
1262 * method <em>copies</em> the object passed to it means that the caller will be
1263 * left holding a physically different object instance than the one contained
1264 * inside this object.  Changes made to the original object instance (such as
1265 * resetting attribute values) will <em>not affect the instance in this
1266 * object</em>.  In addition, the caller should make sure to free the
1267 * original object if it is no longer being used, or else a memory leak will
1268 * result.  Please see other methods on this class (particularly a
1269 * corresponding method whose name begins with the word <code>create</code>)
1270 * for alternatives that do not lead to these issues. 
1271   <p>
1272   * @see #createModifier()
1273   */ public
1274 int addModifier(ModifierSpeciesReference msr) {
1275    return libsbmlJNI.Reaction_addModifier__SWIG_0(swigCPtr, this, ModifierSpeciesReference.getCPtr(msr), msr);
1276  }
1277
1278  
1279/**
1280   * Adds the given species as a modifier to this reaction
1281   <p>
1282   * @param species the species to be added as modifier
1283   <p>
1284   * @param id an optional id to be given to the species reference that will
1285   *        be created. (defaulting to empty string, i.e. not set)
1286   <p>
1287   * <p>
1288 * @return integer value indicating success/failure of the
1289 * function.   The possible values
1290 * returned by this function are:
1291   * <ul>
1292   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1293   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1294   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1295   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1296   *
1297   * </ul> <p>
1298   * <p>
1299 * @note This method should be used with some caution.  The fact that this
1300 * method <em>copies</em> the object passed to it means that the caller will be
1301 * left holding a physically different object instance than the one contained
1302 * inside this object.  Changes made to the original object instance (such as
1303 * resetting attribute values) will <em>not affect the instance in this
1304 * object</em>.  In addition, the caller should make sure to free the
1305 * original object if it is no longer being used, or else a memory leak will
1306 * result.  Please see other methods on this class (particularly a
1307 * corresponding method whose name begins with the word <code>create</code>)
1308 * for alternatives that do not lead to these issues.
1309   <p>
1310   * @note the {@link Species} object itself is NOT added to the model
1311   <p>
1312   * @see #createModifier()
1313   */ public
1314 int addModifier(Species species, String id) {
1315    return libsbmlJNI.Reaction_addModifier__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, id);
1316  }
1317
1318  
1319/**
1320   * Adds the given species as a modifier to this reaction
1321   <p>
1322   * @param species the species to be added as modifier
1323   <p>
1324   * @param id an optional id to be given to the species reference that will
1325   *        be created. (defaulting to empty string, i.e. not set)
1326   <p>
1327   * <p>
1328 * @return integer value indicating success/failure of the
1329 * function.   The possible values
1330 * returned by this function are:
1331   * <ul>
1332   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1333   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1334   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1335   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1336   *
1337   * </ul> <p>
1338   * <p>
1339 * @note This method should be used with some caution.  The fact that this
1340 * method <em>copies</em> the object passed to it means that the caller will be
1341 * left holding a physically different object instance than the one contained
1342 * inside this object.  Changes made to the original object instance (such as
1343 * resetting attribute values) will <em>not affect the instance in this
1344 * object</em>.  In addition, the caller should make sure to free the
1345 * original object if it is no longer being used, or else a memory leak will
1346 * result.  Please see other methods on this class (particularly a
1347 * corresponding method whose name begins with the word <code>create</code>)
1348 * for alternatives that do not lead to these issues.
1349   <p>
1350   * @note the {@link Species} object itself is NOT added to the model
1351   <p>
1352   * @see #createModifier()
1353   */ public
1354 int addModifier(Species species) {
1355    return libsbmlJNI.Reaction_addModifier__SWIG_2(swigCPtr, this, Species.getCPtr(species), species);
1356  }
1357
1358  
1359/**
1360   * Creates a new {@link SpeciesReference}, adds it to this {@link Reaction}'s list of
1361   * reactants, and returns it.
1362   <p>
1363   * @return a new {@link SpeciesReference} object.
1364   */ public
1365 SpeciesReference createReactant() {
1366    long cPtr = libsbmlJNI.Reaction_createReactant(swigCPtr, this);
1367    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1368  }
1369
1370  
1371/**
1372   * Creates a new {@link SpeciesReference}, adds it to this {@link Reaction}'s list of
1373   * products, and returns it.
1374   <p>
1375   * @return a new {@link SpeciesReference} object.
1376   */ public
1377 SpeciesReference createProduct() {
1378    long cPtr = libsbmlJNI.Reaction_createProduct(swigCPtr, this);
1379    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1380  }
1381
1382  
1383/**
1384   * Creates a new {@link ModifierSpeciesReference}, adds it to this {@link Reaction}'s
1385   * list of modifiers and returns it.
1386   <p>
1387   * @return a new {@link ModifierSpeciesReference} object.
1388   */ public
1389 ModifierSpeciesReference createModifier() {
1390    long cPtr = libsbmlJNI.Reaction_createModifier(swigCPtr, this);
1391    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1392  }
1393
1394  
1395/**
1396   * Creates a new {@link KineticLaw} object, installs it as this {@link Reaction}'s
1397   * 'kineticLaw' subelement, and returns it.
1398   <p>
1399   * If this {@link Reaction} had a previous {@link KineticLaw}, it will be destroyed.
1400   <p>
1401   * @return the new {@link KineticLaw} object
1402   */ public
1403 KineticLaw createKineticLaw() {
1404    long cPtr = libsbmlJNI.Reaction_createKineticLaw(swigCPtr, this);
1405    return (cPtr == 0) ? null : new KineticLaw(cPtr, false);
1406  }
1407
1408  
1409/**
1410   * Returns the list of reactants in this {@link Reaction} object.
1411   <p>
1412   * @return the {@link ListOfSpeciesReferences} containing the references to the
1413   * species acting as reactants in this reaction
1414   */ public
1415 ListOfSpeciesReferences getListOfReactants() {
1416    long cPtr = libsbmlJNI.Reaction_getListOfReactants__SWIG_0(swigCPtr, this);
1417    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1418  }
1419
1420  
1421/**
1422   * Returns the list of products in this {@link Reaction} object.
1423   <p>
1424   * @return the {@link ListOfSpeciesReferences} containing the references to the
1425   * species acting as products in this reaction
1426   */ public
1427 ListOfSpeciesReferences getListOfProducts() {
1428    long cPtr = libsbmlJNI.Reaction_getListOfProducts__SWIG_0(swigCPtr, this);
1429    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1430  }
1431
1432  
1433/**
1434   * Returns the list of modifiers in this {@link Reaction} object.
1435   <p>
1436   * @return the {@link ListOfSpeciesReferences} containing the references to the
1437   * species acting as modifiers in this reaction
1438   */ public
1439 ListOfSpeciesReferences getListOfModifiers() {
1440    long cPtr = libsbmlJNI.Reaction_getListOfModifiers__SWIG_0(swigCPtr, this);
1441    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1442  }
1443
1444  
1445/**
1446   * Returns the nth reactant species (as a {@link SpeciesReference} object) in 
1447   * the list of reactants in this {@link Reaction}.
1448   <p>
1449   * Callers should first call getNumReactants() to find out how many
1450   * reactants there are, to avoid using an invalid index number.
1451   <p>
1452   * @param n the index of the reactant sought.
1453   <p>
1454   * @return the nth reactant (as a {@link SpeciesReference} object) of this
1455   * {@link Reaction}.
1456   */ public
1457 SpeciesReference getReactant(long n) {
1458    long cPtr = libsbmlJNI.Reaction_getReactant__SWIG_0(swigCPtr, this, n);
1459    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1460  }
1461
1462  
1463/**
1464   * Returns the reactant species (as a {@link SpeciesReference} object) having 
1465   * a specific identifier in this {@link Reaction}.
1466   <p>
1467   * @param species the identifier of the reactant {@link Species} ('species' 
1468   * attribute of the reactant {@link SpeciesReference} object)
1469   <p>
1470   * @return a {@link SpeciesReference} object, or <code>null</code> if no species with the
1471   * given identifier <code>species</code> appears as a reactant in this {@link Reaction}.
1472   */ public
1473 SpeciesReference getReactant(String species) {
1474    long cPtr = libsbmlJNI.Reaction_getReactant__SWIG_2(swigCPtr, this, species);
1475    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1476  }
1477
1478  
1479/**
1480   * Returns the nth product species (as a {@link SpeciesReference} object) in 
1481   * the list of products in this {@link Reaction}.
1482   <p>
1483   * Callers should first call getNumProducts() to find out how many
1484   * products there are, to avoid using an invalid index number.
1485   <p>
1486   * @param n the index of the product sought.
1487   <p>
1488   * @return the nth product (as a {@link SpeciesReference} object) of this
1489   * {@link Reaction}.
1490   */ public
1491 SpeciesReference getProduct(long n) {
1492    long cPtr = libsbmlJNI.Reaction_getProduct__SWIG_0(swigCPtr, this, n);
1493    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1494  }
1495
1496  
1497/**
1498   * Returns the product species (as a {@link SpeciesReference} object) having 
1499   * a specific identifier in this {@link Reaction}.
1500   <p>
1501   * @param species the identifier of the product {@link Species} ('species'
1502   * attribute of the product {@link SpeciesReference} object)
1503   <p>
1504   * @return a {@link SpeciesReference} object, or <code>null</code> if no species with the
1505   * given identifier <code>species</code> appears as a product in this {@link Reaction}.
1506   */ public
1507 SpeciesReference getProduct(String species) {
1508    long cPtr = libsbmlJNI.Reaction_getProduct__SWIG_2(swigCPtr, this, species);
1509    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1510  }
1511
1512  
1513/**
1514   * Returns the nth modifier species (as a {@link ModifierSpeciesReference} object) 
1515   * in the list of modifiers of this {@link Reaction}.
1516   <p>
1517   * Callers should first call getNumModifiers() to find out how many
1518   * modifiers there are, to avoid using an invalid index number.
1519   <p>
1520   * @param n the index of the modifier species sought
1521   <p>
1522   * @return the nth modifier (as a {@link ModifierSpeciesReference} object) of
1523   * this {@link Reaction}.
1524   */ public
1525 ModifierSpeciesReference getModifier(long n) {
1526    long cPtr = libsbmlJNI.Reaction_getModifier__SWIG_0(swigCPtr, this, n);
1527    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1528  }
1529
1530  
1531/**
1532   * Returns the modifier species (as a {@link ModifierSpeciesReference} object) 
1533   * having a specific identifier in this {@link Reaction}.
1534   <p>
1535   * @param species the identifier of the modifier {@link Species} ('species' 
1536   * attribute of the {@link ModifierSpeciesReference} object)
1537   <p>
1538   * @return a {@link ModifierSpeciesReference} object, or <code>null</code> if no species with
1539   * the given identifier <code>species</code> appears as a modifier in this
1540   * {@link Reaction}.
1541   */ public
1542 ModifierSpeciesReference getModifier(String species) {
1543    long cPtr = libsbmlJNI.Reaction_getModifier__SWIG_2(swigCPtr, this, species);
1544    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1545  }
1546
1547  
1548/**
1549   * Returns the number of reactant species in this {@link Reaction}.
1550   <p>
1551   * @return the number of reactants in this {@link Reaction}.
1552   */ public
1553 long getNumReactants() {
1554    return libsbmlJNI.Reaction_getNumReactants(swigCPtr, this);
1555  }
1556
1557  
1558/**
1559   * Returns the number of product species in this {@link Reaction}.
1560   <p>
1561   * @return the number of products in this {@link Reaction}.
1562   */ public
1563 long getNumProducts() {
1564    return libsbmlJNI.Reaction_getNumProducts(swigCPtr, this);
1565  }
1566
1567  
1568/**
1569   * Returns the number of modifier species in this {@link Reaction}.
1570   <p>
1571   * @return the number of modifiers in this {@link Reaction}.
1572   */ public
1573 long getNumModifiers() {
1574    return libsbmlJNI.Reaction_getNumModifiers(swigCPtr, this);
1575  }
1576
1577  
1578/**
1579   * Removes the nth reactant species (SpeciesReference object) in the list of 
1580   * reactants in this {@link Reaction} and returns a pointer to it.
1581   <p>
1582   * The caller owns the returned object and is responsible for deleting it.
1583   * The caller should first call getNumReactants() to find out how many
1584   * reactants there are, to avoid using an invalid index number.
1585   <p>
1586   * @param n the index of the reactant {@link SpeciesReference} object to remove
1587   <p>
1588   * @return the removed reactant {@link SpeciesReference} object, or <code>null</code> if the 
1589   * given index is out of range.
1590   */ public
1591 SpeciesReference removeReactant(long n) {
1592    long cPtr = libsbmlJNI.Reaction_removeReactant__SWIG_0(swigCPtr, this, n);
1593    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1594  }
1595
1596  
1597/**
1598   * Removes the reactant species (SpeciesReference object) having the given  
1599   * 'species' attribute in this {@link Reaction} and returns a pointer to it.
1600   <p>
1601   * The caller owns the returned object and is responsible for deleting it.
1602   <p>
1603   * @param species the 'species' attribute of the reactant {@link SpeciesReference} 
1604   * object
1605   <p>
1606   * @return the removed reactant {@link SpeciesReference} object, or <code>null</code> if no 
1607   * reactant {@link SpeciesReference} object with the given 'species' attribute 
1608   * <code>species</code> exists in this {@link Reaction}.
1609   */ public
1610 SpeciesReference removeReactant(String species) {
1611    long cPtr = libsbmlJNI.Reaction_removeReactant__SWIG_1(swigCPtr, this, species);
1612    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1613  }
1614
1615  
1616/**
1617   * Removes the nth product species (SpeciesReference object) in the list of 
1618   * products in this {@link Reaction} and returns a pointer to it.
1619   <p>
1620   * The caller owns the returned object and is responsible for deleting it.
1621   * The caller should first call getNumProducts() to find out how many
1622   * products there are, to avoid using an invalid index number.
1623   <p>
1624   * @param n the index of the product {@link SpeciesReference} object to remove
1625   <p>
1626   * @return the removed product {@link SpeciesReference} object, or <code>null</code> if the 
1627   * given index is out of range.
1628   */ public
1629 SpeciesReference removeProduct(long n) {
1630    long cPtr = libsbmlJNI.Reaction_removeProduct__SWIG_0(swigCPtr, this, n);
1631    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1632  }
1633
1634  
1635/**
1636   * Removes the product species (SpeciesReference object) having the given  
1637   * 'species' attribute in this {@link Reaction} and returns a pointer to it.
1638   <p>
1639   * The caller owns the returned object and is responsible for deleting it.
1640   <p>
1641   * @param species the 'species' attribute of the product {@link SpeciesReference} 
1642   * object
1643   <p>
1644   * @return the removed product {@link SpeciesReference} object, or <code>null</code> if no 
1645   * product {@link SpeciesReference} object with the given 'species' attribute 
1646   * <code>species</code> exists in this {@link Reaction}.
1647   */ public
1648 SpeciesReference removeProduct(String species) {
1649    long cPtr = libsbmlJNI.Reaction_removeProduct__SWIG_1(swigCPtr, this, species);
1650    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
1651  }
1652
1653  
1654/**
1655   * Removes the nth modifier species (ModifierSpeciesReference object) in 
1656   * the list of  modifiers in this {@link Reaction} and returns a pointer to it.
1657   <p>
1658   * The caller owns the returned object and is responsible for deleting it.
1659   * The caller should first call getNumModifiers() to find out how many
1660   * modifiers there are, to avoid using an invalid index number.
1661   <p>
1662   * @param n the index of the {@link ModifierSpeciesReference} object to remove
1663   <p>
1664   * @return the removed {@link ModifierSpeciesReference} object, or <code>null</code> if the 
1665   * given index is out of range.
1666   */ public
1667 ModifierSpeciesReference removeModifier(long n) {
1668    long cPtr = libsbmlJNI.Reaction_removeModifier__SWIG_0(swigCPtr, this, n);
1669    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, true);
1670  }
1671
1672  
1673/**
1674   * Removes the modifier species (ModifierSpeciesReference object) having 
1675   * the given 'species' attribute in this {@link Reaction} and returns a pointer to it.
1676   <p>
1677   * The caller owns the returned object and is responsible for deleting it.
1678   <p>
1679   * @param species the 'species' attribute of the {@link ModifierSpeciesReference} 
1680   * object
1681   <p>
1682   * @return the removed {@link ModifierSpeciesReference} object, or <code>null</code> if no 
1683   * {@link ModifierSpeciesReference} object with the given 'species' attribute @p 
1684   * species exists in this {@link Reaction}.
1685   */ public
1686 ModifierSpeciesReference removeModifier(String species) {
1687    long cPtr = libsbmlJNI.Reaction_removeModifier__SWIG_1(swigCPtr, this, species);
1688    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, true);
1689  }
1690
1691  public void connectToChild() {
1692    libsbmlJNI.Reaction_connectToChild(swigCPtr, this);
1693  }
1694
1695  
1696/** * @internal */ public
1697 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
1698    libsbmlJNI.Reaction_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
1699  }
1700
1701  
1702/**
1703   * Returns the libSBML type code for this SBML object.
1704   <p>
1705   * <p>
1706 * LibSBML attaches an identifying code to every kind of SBML object.  These
1707 * are integer constants known as <em>SBML type codes</em>.  The names of all
1708 * the codes begin with the characters <code>SBML_</code>.
1709 * In the Java language interface for libSBML, the
1710 * type codes are defined as static integer constants in the interface class
1711 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
1712 * package plug-ins may use overlapping type codes; to identify the package
1713 * to which a given object belongs, call the <code>getPackageName()</code>
1714 * method on the object.
1715   <p>
1716   * @return the SBML type code for this object:
1717   * {@link libsbmlConstants#SBML_REACTION SBML_REACTION} (default).
1718   <p>
1719   * <p>
1720 * @warning <span class='warning'>The specific integer values of the possible
1721 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
1722 * packages,  To fully identify the correct code, <strong>it is necessary to
1723 * invoke both getTypeCode() and getPackageName()</strong>.</span>
1724   <p>
1725   * @see #getElementName()
1726   * @see #getPackageName()
1727   */ public
1728 int getTypeCode() {
1729    return libsbmlJNI.Reaction_getTypeCode(swigCPtr, this);
1730  }
1731
1732  
1733/**
1734   * Returns the XML element name of this object, which for {@link Reaction}, is
1735   * always <code>'reaction'.</code>
1736   <p>
1737   * @return the name of this element, i.e., <code>'reaction'.</code>
1738   */ public
1739 String getElementName() {
1740    return libsbmlJNI.Reaction_getElementName(swigCPtr, this);
1741  }
1742
1743  
1744/**
1745   * Predicate returning <code>true</code> if all the required attributes for this
1746   * {@link Reaction} object have been set.
1747   <p>
1748   * The required attributes for a {@link Reaction} object are:
1749   * <ul>
1750   * <li> 'id' (or 'name' in SBML Level&nbsp;1)
1751   * <li> 'fast' (in Level&nbsp;3 only, where it is defined as a required attribute)
1752   * <li> 'reversible' (in Level&nbsp;3 only, where it is defined as a required attribute)
1753   *
1754   * </ul> <p>
1755   * @return <code>true</code> if the required attributes have been set, <code>false</code>
1756   * otherwise.
1757   */ public
1758 boolean hasRequiredAttributes() {
1759    return libsbmlJNI.Reaction_hasRequiredAttributes(swigCPtr, this);
1760  }
1761
1762}