001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.12
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 reaction 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> For SBML Levels 1, 2, and SBML Level&nbsp;3 Version&nbsp;1, a 
050 * reaction definition can contain an empty list of reactants
051 * <em>or</em> an empty list of products, but it must have at least one
052 * reactant or product; in other words, a reaction without any reactant or
053 * product species is not permitted.  (This restriction does not apply to
054 * modifier species, which remain optional in all cases.)  In SBML 
055 * Level&nbsp;3 Version&nbsp;2, this requirement was dropped, allowing 
056 * the creation of reactions with neither reactants nor products.
057 * </ul>
058 <p>
059 * A reaction can contain up to one {@link KineticLaw} object in a subelement named
060 * 'kineticLaw'.  It defines the speed at which the process defined by the
061 * reaction takes place.  The description of {@link KineticLaw} provides more
062 * details about its use.  Note that although the inclusion of a {@link KineticLaw}
063 * object in an instance of a {@link Reaction} component is optional, there is no
064 * useful default that can be substituted in place of a missing rate
065 * expression in a reaction.  Moreover, a reaction's rate cannot be defined
066 * in any other way in SBML&mdash;{@link InitialAssignment}, {@link AssignmentRule},
067 * {@link RateRule}, {@link AlgebraicRule}, {@link Event}, and other constructs in SBML cannot be
068 * used to set the reaction rate separately.  Nevertheless, for some
069 * modeling applications, reactions without any defined rate can be
070 * perfectly acceptable.
071 <p>
072 * {@link Reaction} also has a boolean attribute named 'reversible' for indicating
073 * whether the reaction is reversible.  This attribute is optional in SBML
074 * Level&nbsp;2, with a default of <code>true</code>; it is mandatory in SBML
075 * Level&nbsp;3 (with no default value).  To say that a reaction is 
076 * <em>reversible</em> is to say it can proceed in either the forward or the reverse
077 * direction.  Although the reversibility of a reaction can sometimes be
078 * deduced by inspecting its rate expression, this is not always the case,
079 * especially for complicated expressions.  Moreover, the need in SBML to
080 * allow rate expressions (i.e., {@link KineticLaw}) to be optional leads to the
081 * need for a separate flag indicating reversibility.  Note that labeling a
082 * reaction as irreversible is an assertion that the reaction always
083 * proceeds in the given forward direction.  (Why else would it be flagged
084 * as irreversible?)  This implies the rate expression in the {@link KineticLaw}
085 * always has a non-negative value during simulations.  Software tools
086 * could provide a means of optionally testing that this condition holds.
087 * The presence of reversibility information in two places (i.e., the rate
088 * expression and the 'reversible' attribute on {@link Reaction}) leaves open the
089 * possibility that a model could contain contradictory information, but
090 * the creation of such a model would be an error on the part of the
091 * software generating it.
092 <p>
093 * The {@link Reaction} object class has another boolean attribute called 'fast'.
094 * This attribute is optional in SBML Level&nbsp;2, with a default of
095 * <code>false</code>; it is mandatory in SBML Level&nbsp;3 (with no default value).  
096 * In SBML Level&nbsp;3 Version&nbsp;2, a value of <code>true</code> for the 'fast'
097 * attribute is deprecated in favor of all reactions having a 'fast' value 
098 * of <code>false.</code>  It
099 * is used to indicate that a reaction occurs on a vastly faster time scale
100 * than others in a system.  Readers are directed to the SBML Level&nbsp;2
101 * Version&nbsp;4 specification, which provides more detail about the
102 * conditions under which a reaction can be considered to be fast in this
103 * sense.  SBML Level&nbsp;1
104 * and Level&nbsp;2 Version&nbsp;1 incorrectly claimed that software tools
105 * could ignore this attribute if they did not implement support for the
106 * corresponding concept; however, further research in SBML has revealed
107 * that this is not true, and 'fast' <em>cannot be ignored</em> if it is
108 * set to <code>true.</code>  SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 therefore
109 * stipulate that if a model has any reactions with 'fast' set to <code>true</code>,
110 * a software tool must be able to respect the attribute or else indicate
111 * to the user that it does not have the capacity to do so.  Analysis
112 * software cannot ignore the value of the 'fast' attribute because doing
113 * so may lead to different results as compared to a software system that
114 * <em>does</em> make use of 'fast'.
115 <p>
116 * <p>
117 * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was 
118 * removed.  All reactions are assumed to be equivalent to reactions
119 * in previous levels/versions that have a 'fast' attribute value
120 * of <code>false.</code>  Users should be aware that even for previous
121 * levels/versions of the specification, 'fast' attribute values of
122 * <code>true</code> never achieved widespread support, and many software
123 * packages may ignore it.  To achieve the same or similar 
124 * effects as setting the fast attribute to <code>true</code> for a given 
125 * reaction, the {@link KineticLaw} attribute should be constructed to 
126 * produce a value in the desired time scale, or else the 
127 * reaction could be replaced with an {@link AssignmentRule} or 
128 * {@link AlgebraicRule}.
129 <p>
130 * In SBML Level&nbsp;3, the {@link Reaction} object has an
131 * additional optional attribute named 'compartment', whose value must be
132 * the identifier of a compartment defined in the enclosing {@link Model} object.
133 * The 'compartment' attribute can be used to indicate the compartment in
134 * which the reaction is assumed to take place.  If the attribute is
135 * present, its value must be the identifier of a {@link Compartment} object
136 * defined in the enclosing {@link Model} object.  Similar to the 'reversible'
137 * attribute, the value of the 'compartment' attribute has no direct impact
138 * on the construction of mathematical equations for the SBML model.  When
139 * a kinetic law is given for a reaction, the compartment location may
140 * already be implicit in the kinetic law (although this cannot always be
141 * guaranteed).  Nevertheless, software tools may find the 'compartment'
142 * attribute value useful for such purposes as analyzing the structure of
143 * the model, guiding the modeler in constructing correct rate formulas,
144 * and visualization purposes.
145 <p>
146 * Readers are urged to read the SBML specification for more details about
147 * the proper use of {@link Reaction}.
148 */
149
150public class Reaction extends SBase {
151   private long swigCPtr;
152
153   protected Reaction(long cPtr, boolean cMemoryOwn)
154   {
155     super(libsbmlJNI.Reaction_SWIGUpcast(cPtr), cMemoryOwn);
156     swigCPtr = cPtr;
157   }
158
159   protected static long getCPtr(Reaction obj)
160   {
161     return (obj == null) ? 0 : obj.swigCPtr;
162   }
163
164   protected static long getCPtrAndDisown (Reaction obj)
165   {
166     long ptr = 0;
167
168     if (obj != null)
169     {
170       ptr             = obj.swigCPtr;
171       obj.swigCMemOwn = false;
172     }
173
174     return ptr;
175   }
176
177  protected void finalize() {
178    delete();
179  }
180
181  public synchronized void delete() {
182    if (swigCPtr != 0) {
183      if (swigCMemOwn) {
184        swigCMemOwn = false;
185        libsbmlJNI.delete_Reaction(swigCPtr);
186      }
187      swigCPtr = 0;
188    }
189    super.delete();
190  }
191
192  
193/**
194   * Creates a new {@link Reaction} using the given SBML <code>level</code> and <code>version</code>
195   * values.
196   <p>
197   * @param level a long integer, the SBML Level to assign to this {@link Reaction}.
198   <p>
199   * @param version a long integer, the SBML Version to assign to this
200   * {@link Reaction}.
201   <p>
202   * <p>
203 * @throws SBMLConstructorException
204 * Thrown if the given <code>level</code> and <code>version</code> combination are invalid
205 * or if this object is incompatible with the given level and version.
206   <p>
207   * <p>
208 * @note Attempting to add an object to an {@link SBMLDocument} having a different
209 * combination of SBML Level, Version and XML namespaces than the object
210 * itself will result in an error at the time a caller attempts to make the
211 * addition.  A parent object must have compatible Level, Version and XML
212 * namespaces.  (Strictly speaking, a parent may also have more XML
213 * namespaces than a child, but the reverse is not permitted.)  The
214 * restriction is necessary to ensure that an SBML model has a consistent
215 * overall structure.  This requires callers to manage their objects
216 * carefully, but the benefit is increased flexibility in how models can be
217 * created by permitting callers to create objects bottom-up if desired.  In
218 * situations where objects are not yet attached to parents (e.g.,
219 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
220 * libSBML determine such things as whether it is valid to assign a
221 * particular value to an attribute.
222   */ public
223 Reaction(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
224    this(libsbmlJNI.new_Reaction__SWIG_0(level, version), true);
225  }
226
227  
228/**
229   * Creates a new {@link Reaction} using the given {@link SBMLNamespaces} object
230   * <code>sbmlns</code>.
231   <p>
232   * <p>
233 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
234 * information.  It is used to communicate the SBML Level, Version, and (in
235 * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
236 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
237 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
238 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments.
239   <p>
240   * @param sbmlns an {@link SBMLNamespaces} object.
241   <p>
242   * <p>
243 * @throws SBMLConstructorException
244 * Thrown if the given <code>sbmlns</code> is inconsistent or incompatible
245 * with this object.
246   <p>
247   * <p>
248 * @note Attempting to add an object to an {@link SBMLDocument} having a different
249 * combination of SBML Level, Version and XML namespaces than the object
250 * itself will result in an error at the time a caller attempts to make the
251 * addition.  A parent object must have compatible Level, Version and XML
252 * namespaces.  (Strictly speaking, a parent may also have more XML
253 * namespaces than a child, but the reverse is not permitted.)  The
254 * restriction is necessary to ensure that an SBML model has a consistent
255 * overall structure.  This requires callers to manage their objects
256 * carefully, but the benefit is increased flexibility in how models can be
257 * created by permitting callers to create objects bottom-up if desired.  In
258 * situations where objects are not yet attached to parents (e.g.,
259 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
260 * libSBML determine such things as whether it is valid to assign a
261 * particular value to an attribute.
262   */ public
263 Reaction(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException {
264    this(libsbmlJNI.new_Reaction__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
265  }
266
267  
268/**
269   * Copy constructor; creates a copy of this {@link Reaction}.
270   <p>
271   * @param orig the object to copy.
272   */ public
273 Reaction(Reaction orig) throws org.sbml.libsbml.SBMLConstructorException {
274    this(libsbmlJNI.new_Reaction__SWIG_2(Reaction.getCPtr(orig), orig), true);
275  }
276
277  
278/**
279   * Creates and returns a deep copy of this {@link Reaction} object.
280   <p>
281   * @return the (deep) copy of this {@link Reaction} object.
282   */ public
283 Reaction cloneObject() {
284  return (Reaction) libsbml.DowncastSBase(libsbmlJNI.Reaction_cloneObject(swigCPtr, this), true);
285}
286
287  
288/**
289   * Returns the first child element found that has the given <code>id</code> in the
290   * model-wide SId namespace, or <code>null</code> if no such object is found.
291   <p>
292   * @param id string representing the id of the object to find.
293   <p>
294   * @return pointer to the first element found with the given <code>id</code>.
295   */ public
296 SBase getElementBySId(String id) {
297  return libsbml.DowncastSBase(libsbmlJNI.Reaction_getElementBySId(swigCPtr, this, id), false);
298}
299
300  
301/**
302   * Returns the first child element it can find with the given <code>metaid</code>, or
303   * <code>null</code> if no such object is found.
304   <p>
305   * @param metaid string representing the metaid of the object to find.
306   <p>
307   * @return pointer to the first element found with the given <code>metaid</code>.
308   */ public
309 SBase getElementByMetaId(String metaid) {
310  return libsbml.DowncastSBase(libsbmlJNI.Reaction_getElementByMetaId(swigCPtr, this, metaid), false);
311}
312
313  
314/**
315   * <p>
316 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another
317 * value.
318 <p>
319 * <p>
320 * In SBML, object identifiers are of a data type called <code>SId</code>.
321 * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
322 * introduced for attribute values that refer to <code>SId</code> values; in
323 * previous Levels of SBML, this data type did not exist and attributes were
324 * simply described to as 'referring to an identifier', but the effective
325 * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
326 * other methods of libSBML refer to the type <code>SIdRef</code> for all
327 * Levels of SBML, even if the corresponding SBML specification did not
328 * explicitly name the data type.
329 <p>
330 * This method works by looking at all attributes and (if appropriate)
331 * mathematical formulas in MathML content, comparing the referenced
332 * identifiers to the value of <code>oldid</code>.  If any matches are found, the
333 * matching values are replaced with <code>newid</code>.  The method does <em>not</em>
334 * descend into child elements.
335 <p>
336 * @param oldid the old identifier.
337 * @param newid the new identifier.
338   */ public
339 void renameSIdRefs(String oldid, String newid) {
340    libsbmlJNI.Reaction_renameSIdRefs(swigCPtr, this, oldid, newid);
341  }
342
343  
344/**
345   * Initializes the fields of this {@link Reaction} object to 'typical' default
346   * values.
347   <p>
348   * The SBML {@link Reaction} component has slightly different aspects and
349   * default attribute values in different SBML Levels and Versions.
350   * This method sets the values to certain common defaults, based
351   * mostly on what they are in SBML Level&nbsp;2.  Specifically:
352   <p>
353   * <ul>
354   * <li> Sets the 'reversible' attribute to <code>true</code>
355   * <li> Sets the 'fast' attribute to <code>false</code>
356   * <li> Marks the 'fast' attribute as <em>not</em> having been set for
357   *     SBML Level&nbsp;2, but <em>as</em> having been set for
358   *     SBML Level&nbsp;1 and SBML Level&nbsp;3.
359   *
360   * </ul> <p>
361   * <p>
362 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
363 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
364 * 'fast' attribute if they did not implement support for the corresponding
365 * concept; however, further research in SBML has revealed that this is not
366 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
367 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
368 * therefore stipulate that if a model has any reactions with 'fast' set to
369 * <code>true</code>, a software tool must be able to respect the attribute or else
370 * indicate to the user that it does not have the capacity to do so.  Readers
371 * are directed to the SBML specifications, which provides more detail about
372 * the conditions under which a reaction can be considered to be fast in this
373 * sense.</span>
374   */ public
375 void initDefaults() {
376    libsbmlJNI.Reaction_initDefaults(swigCPtr, this);
377  }
378
379  
380/**
381   * Returns the value of the 'id' attribute of this {@link Reaction}.
382   <p>
383   * @note Because of the inconsistent behavior of this function with 
384   * respect to assignments and rules, it is now recommended to
385   * use the getIdAttribute() function instead.
386   <p>
387   * <p>
388 * The identifier given by an object's 'id' attribute value
389 * is used to identify the object within the SBML model definition.
390 * Other objects can refer to the component using this identifier.  The
391 * data type of 'id' is always <code>SId</code> or a type derived
392 * from that, such as <code>UnitSId</code>, depending on the object in 
393 * question.  All data types are defined as follows:
394 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
395 *   letter .= 'a'..'z','A'..'Z'
396 *   digit  .= '0'..'9'
397 *   idChar .= letter | digit | '_'
398 *   SId    .= ( letter | '_' ) idChar*
399 * </pre>
400 <p>
401 * The characters <code>(</code> and <code>)</code> are used for grouping, the
402 * character <code>*</code> 'zero or more times', and the character
403 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
404 * determined by an exact character sequence match; i.e., comparisons must be
405 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
406 * <code>SIdRef</code>, and derived types.
407 <p>
408 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
409 * moved to {@link SBase} directly, instead of being defined individually for many
410 * (but not all) objects.  Libsbml has for a long time provided functions
411 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
412 * would fail or otherwise return empty strings if executed on any object 
413 * for which those attributes were not defined.  Now that all {@link SBase} objects 
414 * define those attributes, those functions now succeed for any object with 
415 * the appropriate level and version.
416 <p>
417 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
418 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
419 * functions (though not the setId() or unsetId() functions) would instead 
420 * reference the value of the 'variable' attribute (for the rules and event 
421 * assignments) or the 'symbol' attribute (for initial assignments).  
422 * The {@link AlgebraicRule} fell into this category as well, though because it 
423 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
424 * always return an empty string, and isSetId() would always return <code>false.</code>
425 * For this reason, four new functions are now provided 
426 * (getIdAttribute(), setIdAttribute(String), 
427 * isSetIdAttribute(), and unsetIdAttribute()) that will always
428 * act on the actual 'id' attribute, regardless of the object's type.  The
429 * new functions should be used instead of the old ones unless the old behavior
430 * is somehow necessary.
431 <p>
432 * Regardless of the level and version of the SBML, these functions allow
433 * client applications to use more generalized code in some situations 
434 * (for instance, when manipulating objects that are all known to have 
435 * identifiers).  If the object in question does not posess an 'id' attribute 
436 * according to the SBML specification for the Level and Version in use,
437 * libSBML will not allow the identifier to be set, nor will it read or 
438 * write 'id' attributes for those objects.
439   <p>
440   * @return the id of this {@link Reaction}.
441   <p>
442   * @see #getIdAttribute()
443   * @see #setIdAttribute(String sid)
444   * @see #isSetIdAttribute()
445   * @see #unsetIdAttribute()
446   */ public
447 String getId() {
448    return libsbmlJNI.Reaction_getId(swigCPtr, this);
449  }
450
451  
452/**
453   * Returns the value of the 'name' attribute of this {@link Reaction} object.
454   <p>
455   * <p>
456 * <p>
457 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
458 * moved to {@link SBase} directly, instead of being defined individually for many
459 * (but not all) objects.  Libsbml has for a long time provided functions
460 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
461 * would fail or otherwise return empty strings if executed on any object 
462 * for which those attributes were not defined.  Now that all {@link SBase} objects 
463 * define those attributes, those functions now succeed for any object with 
464 * the appropriate level and version.
465 <p>
466 * The 'name' attribute is
467 * optional and is not intended to be used for cross-referencing purposes
468 * within a model.  Its purpose instead is to provide a human-readable
469 * label for the component.  The data type of 'name' is the type
470 * <code>string</code> defined in XML Schema.  SBML imposes no
471 * restrictions as to the content of 'name' attributes beyond those
472 * restrictions defined by the <code>string</code> type in XML Schema.
473 <p>
474 * The recommended practice for handling 'name' is as follows.  If a
475 * software tool has the capability for displaying the content of 'name'
476 * attributes, it should display this content to the user as a
477 * component's label instead of the component's 'id'.  If the user
478 * interface does not have this capability (e.g., because it cannot
479 * display or use special characters in symbol names), or if the 'name'
480 * attribute is missing on a given component, then the user interface
481 * should display the value of the 'id' attribute instead.  (Script
482 * language interpreters are especially likely to display 'id' instead of
483 * 'name'.)
484 <p>
485 * As a consequence of the above, authors of systems that automatically
486 * generate the values of 'id' attributes should be aware some systems
487 * may display the 'id''s to the user.  Authors therefore may wish to
488 * take some care to have their software create 'id' values that are: (a)
489 * reasonably easy for humans to type and read; and (b) likely to be
490 * meaningful, for example by making the 'id' attribute be an abbreviated
491 * form of the name attribute value.
492 <p>
493 * An additional point worth mentioning is although there are
494 * restrictions on the uniqueness of 'id' values, there are no
495 * restrictions on the uniqueness of 'name' values in a model.  This
496 * allows software applications leeway in assigning component identifiers.
497 <p>
498 * Regardless of the level and version of the SBML, these functions allow
499 * client applications to use more generalized code in some situations 
500 * (for instance, when manipulating objects that are all known to have 
501 * names).  If the object in question does not posess a 'name' attribute 
502 * according to the SBML specification for the Level and Version in use,
503 * libSBML will not allow the name to be set, nor will it read or 
504 * write 'name' attributes for those objects.
505 <p>
506 * @return the name of this SBML object, or the empty string if not set or unsettable.
507 <p>
508 * @see #getIdAttribute()
509 * @see #isSetName()
510 * @see #setName(String sid)
511 * @see #unsetName()
512   */ public
513 String getName() {
514    return libsbmlJNI.Reaction_getName(swigCPtr, this);
515  }
516
517  
518/**
519   * Returns the {@link KineticLaw} object contained in this {@link Reaction}.
520   <p>
521   * @return the {@link KineticLaw} instance.
522   */ public
523 KineticLaw getKineticLaw() {
524    long cPtr = libsbmlJNI.Reaction_getKineticLaw__SWIG_0(swigCPtr, this);
525    return (cPtr == 0) ? null : new KineticLaw(cPtr, false);
526  }
527
528  
529/**
530   * Returns the value of the 'reversible' attribute on the {@link Reaction} as a
531   * boolean value.
532   <p>
533   * @return the reversibility status of this {@link Reaction}.
534   */ public
535 boolean getReversible() {
536    return libsbmlJNI.Reaction_getReversible(swigCPtr, this);
537  }
538
539  
540/**
541   * Returns the value of the 'fast' attribute of this {@link Reaction}.
542   <p>
543   * <p>
544 * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was 
545 * removed.  All reactions are assumed to be equivalent to reactions
546 * in previous levels/versions that have a 'fast' attribute value
547 * of <code>false.</code>  Users should be aware that even for previous
548 * levels/versions of the specification, 'fast' attribute values of
549 * <code>true</code> never achieved widespread support, and many software
550 * packages may ignore it.  To achieve the same or similar 
551 * effects as setting the fast attribute to <code>true</code> for a given 
552 * reaction, the {@link KineticLaw} attribute should be constructed to 
553 * produce a value in the desired time scale, or else the 
554 * reaction could be replaced with an {@link AssignmentRule} or 
555 * {@link AlgebraicRule}.
556   <p>
557   * @return the 'fast' status of this {@link Reaction}.
558   <p>
559   * <p>
560 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
561 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
562 * 'fast' attribute if they did not implement support for the corresponding
563 * concept; however, further research in SBML has revealed that this is not
564 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
565 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
566 * therefore stipulate that if a model has any reactions with 'fast' set to
567 * <code>true</code>, a software tool must be able to respect the attribute or else
568 * indicate to the user that it does not have the capacity to do so.  Readers
569 * are directed to the SBML specifications, which provides more detail about
570 * the conditions under which a reaction can be considered to be fast in this
571 * sense.</span>
572   */ public
573 boolean getFast() {
574    return libsbmlJNI.Reaction_getFast(swigCPtr, this);
575  }
576
577  
578/**
579   * (SBML Level&nbsp;3 only) Returns the value of the 'compartment'
580   * attribute on the {@link Reaction}.
581   <p>
582   * @return the compartment of this {@link Reaction}.
583   <p>
584   * @note The 'compartment' attribute is available in SBML Level&nbsp;3,
585   * but is not present on {@link Reaction} in lower Levels of
586   * SBML.
587   */ public
588 String getCompartment() {
589    return libsbmlJNI.Reaction_getCompartment(swigCPtr, this);
590  }
591
592  
593/**
594   * Predicate returning <code>true</code> if this
595   * {@link Reaction}'s 'id' attribute is set.
596   <p>
597   * <p>
598 * @note Because of the inconsistent behavior of this function with 
599 * respect to assignments and rules, it is now recommended to
600 * use the isSetIdAttribute() function instead.
601 <p>
602 * <p>
603 * The identifier given by an object's 'id' attribute value
604 * is used to identify the object within the SBML model definition.
605 * Other objects can refer to the component using this identifier.  The
606 * data type of 'id' is always <code>SId</code> or a type derived
607 * from that, such as <code>UnitSId</code>, depending on the object in 
608 * question.  All data types are defined as follows:
609 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
610 *   letter .= 'a'..'z','A'..'Z'
611 *   digit  .= '0'..'9'
612 *   idChar .= letter | digit | '_'
613 *   SId    .= ( letter | '_' ) idChar*
614 * </pre>
615 <p>
616 * The characters <code>(</code> and <code>)</code> are used for grouping, the
617 * character <code>*</code> 'zero or more times', and the character
618 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
619 * determined by an exact character sequence match; i.e., comparisons must be
620 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
621 * <code>SIdRef</code>, and derived types.
622 <p>
623 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
624 * moved to {@link SBase} directly, instead of being defined individually for many
625 * (but not all) objects.  Libsbml has for a long time provided functions
626 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
627 * would fail or otherwise return empty strings if executed on any object 
628 * for which those attributes were not defined.  Now that all {@link SBase} objects 
629 * define those attributes, those functions now succeed for any object with 
630 * the appropriate level and version.
631 <p>
632 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
633 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
634 * functions (though not the setId() or unsetId() functions) would instead 
635 * reference the value of the 'variable' attribute (for the rules and event 
636 * assignments) or the 'symbol' attribute (for initial assignments).  
637 * The {@link AlgebraicRule} fell into this category as well, though because it 
638 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
639 * always return an empty string, and isSetId() would always return <code>false.</code>
640 * For this reason, four new functions are now provided 
641 * (getIdAttribute(), setIdAttribute(String), 
642 * isSetIdAttribute(), and unsetIdAttribute()) that will always
643 * act on the actual 'id' attribute, regardless of the object's type.  The
644 * new functions should be used instead of the old ones unless the old behavior
645 * is somehow necessary.
646 <p>
647 * Regardless of the level and version of the SBML, these functions allow
648 * client applications to use more generalized code in some situations 
649 * (for instance, when manipulating objects that are all known to have 
650 * identifiers).  If the object in question does not posess an 'id' attribute 
651 * according to the SBML specification for the Level and Version in use,
652 * libSBML will not allow the identifier to be set, nor will it read or 
653 * write 'id' attributes for those objects.
654 <p>
655 * @return <code>true</code> if the 'id' attribute of this SBML object is
656 * set, <code>false</code> otherwise.
657 <p>
658 * @see #getIdAttribute()
659 * @see #setIdAttribute(String sid)
660 * @see #unsetIdAttribute()
661 * @see #isSetIdAttribute()
662   */ public
663 boolean isSetId() {
664    return libsbmlJNI.Reaction_isSetId(swigCPtr, this);
665  }
666
667  
668/**
669   * Predicate returning <code>true</code> if this
670   * {@link Reaction}'s 'name' attribute is set.
671   <p>
672   * <p>
673 * <p>
674 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
675 * moved to {@link SBase} directly, instead of being defined individually for many
676 * (but not all) objects.  Libsbml has for a long time provided functions
677 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
678 * would fail or otherwise return empty strings if executed on any object 
679 * for which those attributes were not defined.  Now that all {@link SBase} objects 
680 * define those attributes, those functions now succeed for any object with 
681 * the appropriate level and version.
682 <p>
683 * The 'name' attribute is
684 * optional and is not intended to be used for cross-referencing purposes
685 * within a model.  Its purpose instead is to provide a human-readable
686 * label for the component.  The data type of 'name' is the type
687 * <code>string</code> defined in XML Schema.  SBML imposes no
688 * restrictions as to the content of 'name' attributes beyond those
689 * restrictions defined by the <code>string</code> type in XML Schema.
690 <p>
691 * The recommended practice for handling 'name' is as follows.  If a
692 * software tool has the capability for displaying the content of 'name'
693 * attributes, it should display this content to the user as a
694 * component's label instead of the component's 'id'.  If the user
695 * interface does not have this capability (e.g., because it cannot
696 * display or use special characters in symbol names), or if the 'name'
697 * attribute is missing on a given component, then the user interface
698 * should display the value of the 'id' attribute instead.  (Script
699 * language interpreters are especially likely to display 'id' instead of
700 * 'name'.)
701 <p>
702 * As a consequence of the above, authors of systems that automatically
703 * generate the values of 'id' attributes should be aware some systems
704 * may display the 'id''s to the user.  Authors therefore may wish to
705 * take some care to have their software create 'id' values that are: (a)
706 * reasonably easy for humans to type and read; and (b) likely to be
707 * meaningful, for example by making the 'id' attribute be an abbreviated
708 * form of the name attribute value.
709 <p>
710 * An additional point worth mentioning is although there are
711 * restrictions on the uniqueness of 'id' values, there are no
712 * restrictions on the uniqueness of 'name' values in a model.  This
713 * allows software applications leeway in assigning component identifiers.
714 <p>
715 * Regardless of the level and version of the SBML, these functions allow
716 * client applications to use more generalized code in some situations 
717 * (for instance, when manipulating objects that are all known to have 
718 * names).  If the object in question does not posess a 'name' attribute 
719 * according to the SBML specification for the Level and Version in use,
720 * libSBML will not allow the name to be set, nor will it read or 
721 * write 'name' attributes for those objects.
722 <p>
723 * @return <code>true</code> if the 'name' attribute of this SBML object is
724 * set, <code>false</code> otherwise.
725 <p>
726 * @see #getName()
727 * @see #setName(String sid)
728 * @see #unsetName()
729   */ public
730 boolean isSetName() {
731    return libsbmlJNI.Reaction_isSetName(swigCPtr, this);
732  }
733
734  
735/**
736   * Predicate returning <code>true</code> if this
737   * {@link Reaction} contains a kinetic law object.
738   <p>
739   * @return <code>true</code> if a {@link KineticLaw} is present in this {@link Reaction},, <code>false</code>
740   * otherwise.
741   */ public
742 boolean isSetKineticLaw() {
743    return libsbmlJNI.Reaction_isSetKineticLaw(swigCPtr, this);
744  }
745
746  
747/**
748   * Predicate returning <code>true</code> if the value of
749   * the 'fast' attribute on this {@link Reaction} is set.
750   <p>
751   * <p>
752 * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was 
753 * removed.  All reactions are assumed to be equivalent to reactions
754 * in previous levels/versions that have a 'fast' attribute value
755 * of <code>false.</code>  Users should be aware that even for previous
756 * levels/versions of the specification, 'fast' attribute values of
757 * <code>true</code> never achieved widespread support, and many software
758 * packages may ignore it.  To achieve the same or similar 
759 * effects as setting the fast attribute to <code>true</code> for a given 
760 * reaction, the {@link KineticLaw} attribute should be constructed to 
761 * produce a value in the desired time scale, or else the 
762 * reaction could be replaced with an {@link AssignmentRule} or 
763 * {@link AlgebraicRule}.
764   <p>
765   * @return <code>true</code> if the 'fast' attribute is set, <code>false</code> otherwise.
766   <p>
767   * <p>
768 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
769 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
770 * 'fast' attribute if they did not implement support for the corresponding
771 * concept; however, further research in SBML has revealed that this is not
772 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
773 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
774 * therefore stipulate that if a model has any reactions with 'fast' set to
775 * <code>true</code>, a software tool must be able to respect the attribute or else
776 * indicate to the user that it does not have the capacity to do so.  Readers
777 * are directed to the SBML specifications, which provides more detail about
778 * the conditions under which a reaction can be considered to be fast in this
779 * sense.</span>
780   */ public
781 boolean isSetFast() {
782    return libsbmlJNI.Reaction_isSetFast(swigCPtr, this);
783  }
784
785  
786/**
787   * Predicate returning <code>true</code> if this
788   * {@link Reaction}'s 'compartment' attribute is set.
789   <p>
790   * @return <code>true</code> if the 'compartment' attribute of this {@link Reaction} is
791   * set, <code>false</code> otherwise.
792   <p>
793   * @note The 'compartment' attribute is available in SBML
794   * Level&nbsp;3, but is not present on {@link Reaction} in
795   * lower Levels of SBML.
796   */ public
797 boolean isSetCompartment() {
798    return libsbmlJNI.Reaction_isSetCompartment(swigCPtr, this);
799  }
800
801  
802/**
803   * Predicate returning <code>true</code> if this
804   * {@link Reaction}'s 'reversible' attribute is set.
805   <p>
806   * @return <code>true</code> if the 'reversible' attribute of this {@link Reaction} is
807   * set, <code>false</code> otherwise.
808   */ public
809 boolean isSetReversible() {
810    return libsbmlJNI.Reaction_isSetReversible(swigCPtr, this);
811  }
812
813  
814/**
815   * Sets the value of the 'id' attribute of this {@link Reaction}.
816   <p>
817   * <p>
818 * The string <code>sid</code> is copied.
819 <p>
820 * <p>
821 * The identifier given by an object's 'id' attribute value
822 * is used to identify the object within the SBML model definition.
823 * Other objects can refer to the component using this identifier.  The
824 * data type of 'id' is always <code>SId</code> or a type derived
825 * from that, such as <code>UnitSId</code>, depending on the object in 
826 * question.  All data types are defined as follows:
827 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
828 *   letter .= 'a'..'z','A'..'Z'
829 *   digit  .= '0'..'9'
830 *   idChar .= letter | digit | '_'
831 *   SId    .= ( letter | '_' ) idChar*
832 * </pre>
833 <p>
834 * The characters <code>(</code> and <code>)</code> are used for grouping, the
835 * character <code>*</code> 'zero or more times', and the character
836 * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers is
837 * determined by an exact character sequence match; i.e., comparisons must be
838 * performed in a case-sensitive manner.  This applies to all uses of <code>SId</code>, 
839 * <code>SIdRef</code>, and derived types.
840 <p>
841 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
842 * moved to {@link SBase} directly, instead of being defined individually for many
843 * (but not all) objects.  Libsbml has for a long time provided functions
844 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 
845 * would fail or otherwise return empty strings if executed on any object 
846 * for which those attributes were not defined.  Now that all {@link SBase} objects 
847 * define those attributes, those functions now succeed for any object with 
848 * the appropriate level and version.
849 <p>
850 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 
851 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 
852 * functions (though not the setId() or unsetId() functions) would instead 
853 * reference the value of the 'variable' attribute (for the rules and event 
854 * assignments) or the 'symbol' attribute (for initial assignments).  
855 * The {@link AlgebraicRule} fell into this category as well, though because it 
856 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 
857 * always return an empty string, and isSetId() would always return <code>false.</code>
858 * For this reason, four new functions are now provided 
859 * (getIdAttribute(), setIdAttribute(String), 
860 * isSetIdAttribute(), and unsetIdAttribute()) that will always
861 * act on the actual 'id' attribute, regardless of the object's type.  The
862 * new functions should be used instead of the old ones unless the old behavior
863 * is somehow necessary.
864 <p>
865 * Regardless of the level and version of the SBML, these functions allow
866 * client applications to use more generalized code in some situations 
867 * (for instance, when manipulating objects that are all known to have 
868 * identifiers).  If the object in question does not posess an 'id' attribute 
869 * according to the SBML specification for the Level and Version in use,
870 * libSBML will not allow the identifier to be set, nor will it read or 
871 * write 'id' attributes for those objects.
872 <p>
873 * @param sid the string to use as the identifier of this object.
874 <p>
875 * <p>
876 * @return integer value indicating success/failure of the
877 * function.   The possible values
878 * returned by this function are:
879 * <ul>
880 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
881 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
882 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
883 *
884 * </ul> <p>
885 * @see #getIdAttribute()
886 * @see #setIdAttribute(String sid)
887 * @see #isSetIdAttribute()
888 * @see #unsetIdAttribute()
889   */ public
890 int setId(String sid) {
891    return libsbmlJNI.Reaction_setId(swigCPtr, this, sid);
892  }
893
894  
895/**
896   * Sets the value of the 'name' attribute of this {@link Reaction}.
897   <p>
898   * <p>
899 * The string in <code>name</code> is copied.
900 <p>
901 * @param name the new name for the SBML object.
902 <p>
903 * <p>
904 * @return integer value indicating success/failure of the
905 * function.   The possible values
906 * returned by this function are:
907 * <ul>
908 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
909 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
910 *
911 * </ul>
912   */ public
913 int setName(String name) {
914    return libsbmlJNI.Reaction_setName(swigCPtr, this, name);
915  }
916
917  
918/**
919   * Sets the 'kineticLaw' subelement of this {@link Reaction} to a copy of the
920   * given {@link KineticLaw} object.
921   <p>
922   * @param kl the {@link KineticLaw} object to use.
923   <p>
924   * <p>
925 * @return integer value indicating success/failure of the
926 * function.   The possible values
927 * returned by this function are:
928   * <ul>
929   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
930   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
931   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
932   * </ul>
933  */ public
934 int setKineticLaw(KineticLaw kl) {
935    return libsbmlJNI.Reaction_setKineticLaw(swigCPtr, this, KineticLaw.getCPtr(kl), kl);
936  }
937
938  
939/**
940   * Sets the value of the 'reversible' attribute of this {@link Reaction}.
941   <p>
942   * @param value the value of the 'reversible' attribute.
943   <p>
944   * <p>
945 * @return integer value indicating success/failure of the
946 * function.   The possible values
947 * returned by this function are:
948   * <ul>
949   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
950   * </ul>
951   */ public
952 int setReversible(boolean value) {
953    return libsbmlJNI.Reaction_setReversible(swigCPtr, this, value);
954  }
955
956  
957/**
958   * Sets the value of the 'fast' attribute of this {@link Reaction}.
959   <p>
960   * <p>
961 * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was 
962 * removed.  All reactions are assumed to be equivalent to reactions
963 * in previous levels/versions that have a 'fast' attribute value
964 * of <code>false.</code>  Users should be aware that even for previous
965 * levels/versions of the specification, 'fast' attribute values of
966 * <code>true</code> never achieved widespread support, and many software
967 * packages may ignore it.  To achieve the same or similar 
968 * effects as setting the fast attribute to <code>true</code> for a given 
969 * reaction, the {@link KineticLaw} attribute should be constructed to 
970 * produce a value in the desired time scale, or else the 
971 * reaction could be replaced with an {@link AssignmentRule} or 
972 * {@link AlgebraicRule}.
973   <p>
974   * Calling this function with an argument of <code>true</code> for an
975   * SBML Level&nbsp;3 Version&nbsp;2 {@link Reaction} will not set
976   * the value, as the attribute does not exist for that level/version.
977   * <ul>
978   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
979   *
980   * </ul> <p>
981   * @param value the value of the 'fast' attribute.
982   <p>
983   * <p>
984 * @return integer value indicating success/failure of the
985 * function.   The possible values
986 * returned by this function are:
987   * <ul>
988   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
989   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
990   *
991   * </ul> <p>
992   * <p>
993 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
994 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
995 * 'fast' attribute if they did not implement support for the corresponding
996 * concept; however, further research in SBML has revealed that this is not
997 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
998 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
999 * therefore stipulate that if a model has any reactions with 'fast' set to
1000 * <code>true</code>, a software tool must be able to respect the attribute or else
1001 * indicate to the user that it does not have the capacity to do so.  Readers
1002 * are directed to the SBML specifications, which provides more detail about
1003 * the conditions under which a reaction can be considered to be fast in this
1004 * sense.</span>
1005   */ public
1006 int setFast(boolean value) {
1007    return libsbmlJNI.Reaction_setFast(swigCPtr, this, value);
1008  }
1009
1010  
1011/**
1012   * Sets the value of the 'compartment' attribute of this {@link Reaction}.
1013   <p>
1014   * The string <code>sid</code> is copied.  
1015   <p>
1016   * @param sid the string to use as the compartment of this {@link Reaction}.
1017   <p>
1018   * <p>
1019 * @return integer value indicating success/failure of the
1020 * function.   The possible values
1021 * returned by this function are:
1022   * <ul>
1023   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1024   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1025   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1026   *
1027   * </ul> <p>
1028   * @note The 'compartment' attribute is available in SBML
1029   * Level&nbsp;3, but is not present on {@link Reaction} in
1030   * lower Levels of SBML.
1031   */ public
1032 int setCompartment(String sid) {
1033    return libsbmlJNI.Reaction_setCompartment(swigCPtr, this, sid);
1034  }
1035
1036  
1037/**
1038   * Unsets the value of the 'name' attribute of this {@link Reaction}.
1039   <p>
1040   * <p>
1041 * <p>
1042 * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
1043 * moved to {@link SBase} directly, instead of being defined individually for many
1044 * (but not all) objects.  Libsbml has for a long time provided functions
1045 * defined on {@link SBase} itself to get, set, and unset those attributes, which 
1046 * would fail or otherwise return empty strings if executed on any object 
1047 * for which those attributes were not defined.  Now that all {@link SBase} objects 
1048 * define those attributes, those functions now succeed for any object with 
1049 * the appropriate level and version.
1050 <p>
1051 * The 'name' attribute is
1052 * optional and is not intended to be used for cross-referencing purposes
1053 * within a model.  Its purpose instead is to provide a human-readable
1054 * label for the component.  The data type of 'name' is the type
1055 * <code>string</code> defined in XML Schema.  SBML imposes no
1056 * restrictions as to the content of 'name' attributes beyond those
1057 * restrictions defined by the <code>string</code> type in XML Schema.
1058 <p>
1059 * The recommended practice for handling 'name' is as follows.  If a
1060 * software tool has the capability for displaying the content of 'name'
1061 * attributes, it should display this content to the user as a
1062 * component's label instead of the component's 'id'.  If the user
1063 * interface does not have this capability (e.g., because it cannot
1064 * display or use special characters in symbol names), or if the 'name'
1065 * attribute is missing on a given component, then the user interface
1066 * should display the value of the 'id' attribute instead.  (Script
1067 * language interpreters are especially likely to display 'id' instead of
1068 * 'name'.)
1069 <p>
1070 * As a consequence of the above, authors of systems that automatically
1071 * generate the values of 'id' attributes should be aware some systems
1072 * may display the 'id''s to the user.  Authors therefore may wish to
1073 * take some care to have their software create 'id' values that are: (a)
1074 * reasonably easy for humans to type and read; and (b) likely to be
1075 * meaningful, for example by making the 'id' attribute be an abbreviated
1076 * form of the name attribute value.
1077 <p>
1078 * An additional point worth mentioning is although there are
1079 * restrictions on the uniqueness of 'id' values, there are no
1080 * restrictions on the uniqueness of 'name' values in a model.  This
1081 * allows software applications leeway in assigning component identifiers.
1082 <p>
1083 * Regardless of the level and version of the SBML, these functions allow
1084 * client applications to use more generalized code in some situations 
1085 * (for instance, when manipulating objects that are all known to have 
1086 * names).  If the object in question does not posess a 'name' attribute 
1087 * according to the SBML specification for the Level and Version in use,
1088 * libSBML will not allow the name to be set, nor will it read or 
1089 * write 'name' attributes for those objects.
1090 <p>
1091 * <p>
1092 * @return integer value indicating success/failure of the
1093 * function.   The possible values
1094 * returned by this function are:
1095 * <ul>
1096 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1097 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1098 *
1099 * </ul> <p>
1100 * @see #getName()
1101 * @see #setName(String sid)
1102 * @see #isSetName()
1103   */ public
1104 int unsetName() {
1105    return libsbmlJNI.Reaction_unsetName(swigCPtr, this);
1106  }
1107
1108  
1109/**
1110   * Unsets the 'kineticLaw' subelement of this {@link Reaction}.
1111   <p>
1112   * <p>
1113 * @return integer value indicating success/failure of the
1114 * function.   The possible values
1115 * returned by this function are:
1116   * <ul>
1117   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1118   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1119   * </ul>
1120   */ public
1121 int unsetKineticLaw() {
1122    return libsbmlJNI.Reaction_unsetKineticLaw(swigCPtr, this);
1123  }
1124
1125  
1126/**
1127   * Unsets the value of the 'fast' attribute of this {@link Reaction}.
1128   <p>
1129   * <p>
1130 * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was 
1131 * removed.  All reactions are assumed to be equivalent to reactions
1132 * in previous levels/versions that have a 'fast' attribute value
1133 * of <code>false.</code>  Users should be aware that even for previous
1134 * levels/versions of the specification, 'fast' attribute values of
1135 * <code>true</code> never achieved widespread support, and many software
1136 * packages may ignore it.  To achieve the same or similar 
1137 * effects as setting the fast attribute to <code>true</code> for a given 
1138 * reaction, the {@link KineticLaw} attribute should be constructed to 
1139 * produce a value in the desired time scale, or else the 
1140 * reaction could be replaced with an {@link AssignmentRule} or 
1141 * {@link AlgebraicRule}.
1142   <p>
1143   * <p>
1144 * @return integer value indicating success/failure of the
1145 * function.   The possible values
1146 * returned by this function are:
1147   * <ul>
1148   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1149   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1150   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1151   *
1152   * </ul> <p>
1153   * <p>
1154 * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
1155 * Version&nbsp;2 incorrectly indicated that software tools could ignore the
1156 * 'fast' attribute if they did not implement support for the corresponding
1157 * concept; however, further research in SBML has revealed that this is not
1158 * true, and 'fast' <em>cannot be ignored</em> if it is set to <code>true.</code>
1159 * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
1160 * therefore stipulate that if a model has any reactions with 'fast' set to
1161 * <code>true</code>, a software tool must be able to respect the attribute or else
1162 * indicate to the user that it does not have the capacity to do so.  Readers
1163 * are directed to the SBML specifications, which provides more detail about
1164 * the conditions under which a reaction can be considered to be fast in this
1165 * sense.</span>
1166   */ public
1167 int unsetFast() {
1168    return libsbmlJNI.Reaction_unsetFast(swigCPtr, this);
1169  }
1170
1171  
1172/**
1173   * Unsets the value of the 'compartment' attribute of this {@link Reaction}.
1174   <p>
1175   * <p>
1176 * @return integer value indicating success/failure of the
1177 * function.   The possible values
1178 * returned by this function are:
1179   * <ul>
1180   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1181   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1182   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1183   *
1184   * </ul> <p>
1185   * @note The 'compartment' attribute is available in SBML
1186   * Level&nbsp;3, but is not present on {@link Reaction} in
1187   * lower Levels of SBML.
1188   */ public
1189 int unsetCompartment() {
1190    return libsbmlJNI.Reaction_unsetCompartment(swigCPtr, this);
1191  }
1192
1193  
1194/**
1195   * Unsets the value of the 'reversible' attribute of this {@link Reaction}.
1196   <p>
1197   * <p>
1198 * @return integer value indicating success/failure of the
1199 * function.   The possible values
1200 * returned by this function are:
1201   * <ul>
1202   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1203   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1204   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1205   * </ul>
1206   */ public
1207 int unsetReversible() {
1208    return libsbmlJNI.Reaction_unsetReversible(swigCPtr, this);
1209  }
1210
1211  
1212/**
1213   * Adds a given {@link SpeciesReference} object as a reactant in this {@link Reaction}.
1214   <p>
1215   * The {@link SpeciesReference} instance in <code>sr</code> is copied.
1216   <p>
1217   * @param sr a {@link SpeciesReference} object referring to a {@link Species} in the
1218   * enclosing {@link Model}.
1219   <p>
1220   * <p>
1221 * @return integer value indicating success/failure of the
1222 * function.   The possible values
1223 * returned by this function are:
1224   * <ul>
1225   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1226   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
1227   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
1228   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1229   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1230   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1231   *
1232   * </ul> <p>
1233   * <p>
1234 * @note This method should be used with some caution.  The fact that this
1235 * method <em>copies</em> the object passed to it means that the caller will be
1236 * left holding a physically different object instance than the one contained
1237 * inside this object.  Changes made to the original object instance (such as
1238 * resetting attribute values) will <em>not affect the instance in this
1239 * object</em>.  In addition, the caller should make sure to free the
1240 * original object if it is no longer being used, or else a memory leak will
1241 * result.  Please see other methods on this class (particularly a
1242 * corresponding method whose name begins with the word <code>create</code>)
1243 * for alternatives that do not lead to these issues. 
1244   <p>
1245   * @see #createReactant()
1246   */ public
1247 int addReactant(SpeciesReference sr) {
1248    return libsbmlJNI.Reaction_addReactant__SWIG_0(swigCPtr, this, SpeciesReference.getCPtr(sr), sr);
1249  }
1250
1251  
1252/**
1253   * Adds the given species as a reactant with the given stoichiometry
1254   <p>
1255   * @param species the species to be added as reactant.
1256   <p>
1257   * @param stoichiometry an optional parameter specifying the
1258   *        stoichiometry of the added reactant (defaulting to 1).
1259   <p>
1260   * @param id an optional id to be given to the species reference that will
1261   *        be created. (defaulting to empty string, i.e. not set).
1262   <p>
1263   * @param constant an attribute specifying whether the species reference is
1264   *        constant or not (defaulting to true).
1265   <p>
1266   * <p>
1267 * @return integer value indicating success/failure of the
1268 * function.   The possible values
1269 * returned by this function are:
1270   * <ul>
1271   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1272   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1273   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1274   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1275   *
1276   * </ul> <p>
1277   * <p>
1278 * @note This method should be used with some caution.  The fact that this
1279 * method <em>copies</em> the object passed to it means that the caller will be
1280 * left holding a physically different object instance than the one contained
1281 * inside this object.  Changes made to the original object instance (such as
1282 * resetting attribute values) will <em>not affect the instance in this
1283 * object</em>.  In addition, the caller should make sure to free the
1284 * original object if it is no longer being used, or else a memory leak will
1285 * result.  Please see other methods on this class (particularly a
1286 * corresponding method whose name begins with the word <code>create</code>)
1287 * for alternatives that do not lead to these issues.
1288   <p>
1289   * @note the {@link Species} object itself is NOT added to the model
1290   <p>
1291   * @see #createProduct()
1292   */ public
1293 int addReactant(Species species, double stoichiometry, String id, boolean constant) {
1294    return libsbmlJNI.Reaction_addReactant__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id, constant);
1295  }
1296
1297  
1298/**
1299   * Adds the given species as a reactant with the given stoichiometry
1300   <p>
1301   * @param species the species to be added as reactant.
1302   <p>
1303   * @param stoichiometry an optional parameter specifying the
1304   *        stoichiometry of the added reactant (defaulting to 1).
1305   <p>
1306   * @param id an optional id to be given to the species reference that will
1307   *        be created. (defaulting to empty string, i.e. not set).
1308   <p>
1309   * @param constant an attribute specifying whether the species reference is
1310   *        constant or not (defaulting to true).
1311   <p>
1312   * <p>
1313 * @return integer value indicating success/failure of the
1314 * function.   The possible values
1315 * returned by this function are:
1316   * <ul>
1317   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1318   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1319   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1320   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1321   *
1322   * </ul> <p>
1323   * <p>
1324 * @note This method should be used with some caution.  The fact that this
1325 * method <em>copies</em> the object passed to it means that the caller will be
1326 * left holding a physically different object instance than the one contained
1327 * inside this object.  Changes made to the original object instance (such as
1328 * resetting attribute values) will <em>not affect the instance in this
1329 * object</em>.  In addition, the caller should make sure to free the
1330 * original object if it is no longer being used, or else a memory leak will
1331 * result.  Please see other methods on this class (particularly a
1332 * corresponding method whose name begins with the word <code>create</code>)
1333 * for alternatives that do not lead to these issues.
1334   <p>
1335   * @note the {@link Species} object itself is NOT added to the model
1336   <p>
1337   * @see #createProduct()
1338   */ public
1339 int addReactant(Species species, double stoichiometry, String id) {
1340    return libsbmlJNI.Reaction_addReactant__SWIG_2(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id);
1341  }
1342
1343  
1344/**
1345   * Adds the given species as a reactant with the given stoichiometry
1346   <p>
1347   * @param species the species to be added as reactant.
1348   <p>
1349   * @param stoichiometry an optional parameter specifying the
1350   *        stoichiometry of the added reactant (defaulting to 1).
1351   <p>
1352   * @param id an optional id to be given to the species reference that will
1353   *        be created. (defaulting to empty string, i.e. not set).
1354   <p>
1355   * @param constant an attribute specifying whether the species reference is
1356   *        constant or not (defaulting to true).
1357   <p>
1358   * <p>
1359 * @return integer value indicating success/failure of the
1360 * function.   The possible values
1361 * returned by this function are:
1362   * <ul>
1363   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1364   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1365   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1366   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1367   *
1368   * </ul> <p>
1369   * <p>
1370 * @note This method should be used with some caution.  The fact that this
1371 * method <em>copies</em> the object passed to it means that the caller will be
1372 * left holding a physically different object instance than the one contained
1373 * inside this object.  Changes made to the original object instance (such as
1374 * resetting attribute values) will <em>not affect the instance in this
1375 * object</em>.  In addition, the caller should make sure to free the
1376 * original object if it is no longer being used, or else a memory leak will
1377 * result.  Please see other methods on this class (particularly a
1378 * corresponding method whose name begins with the word <code>create</code>)
1379 * for alternatives that do not lead to these issues.
1380   <p>
1381   * @note the {@link Species} object itself is NOT added to the model
1382   <p>
1383   * @see #createProduct()
1384   */ public
1385 int addReactant(Species species, double stoichiometry) {
1386    return libsbmlJNI.Reaction_addReactant__SWIG_3(swigCPtr, this, Species.getCPtr(species), species, stoichiometry);
1387  }
1388
1389  
1390/**
1391   * Adds the given species as a reactant with the given stoichiometry
1392   <p>
1393   * @param species the species to be added as reactant.
1394   <p>
1395   * @param stoichiometry an optional parameter specifying the
1396   *        stoichiometry of the added reactant (defaulting to 1).
1397   <p>
1398   * @param id an optional id to be given to the species reference that will
1399   *        be created. (defaulting to empty string, i.e. not set).
1400   <p>
1401   * @param constant an attribute specifying whether the species reference is
1402   *        constant or not (defaulting to true).
1403   <p>
1404   * <p>
1405 * @return integer value indicating success/failure of the
1406 * function.   The possible values
1407 * returned by this function are:
1408   * <ul>
1409   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1410   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1411   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1412   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1413   *
1414   * </ul> <p>
1415   * <p>
1416 * @note This method should be used with some caution.  The fact that this
1417 * method <em>copies</em> the object passed to it means that the caller will be
1418 * left holding a physically different object instance than the one contained
1419 * inside this object.  Changes made to the original object instance (such as
1420 * resetting attribute values) will <em>not affect the instance in this
1421 * object</em>.  In addition, the caller should make sure to free the
1422 * original object if it is no longer being used, or else a memory leak will
1423 * result.  Please see other methods on this class (particularly a
1424 * corresponding method whose name begins with the word <code>create</code>)
1425 * for alternatives that do not lead to these issues.
1426   <p>
1427   * @note the {@link Species} object itself is NOT added to the model
1428   <p>
1429   * @see #createProduct()
1430   */ public
1431 int addReactant(Species species) {
1432    return libsbmlJNI.Reaction_addReactant__SWIG_4(swigCPtr, this, Species.getCPtr(species), species);
1433  }
1434
1435  
1436/**
1437   * Adds a given {@link SpeciesReference} object as a product in this {@link Reaction}.
1438   <p>
1439   * The {@link SpeciesReference} instance in <code>sr</code> is copied.
1440   <p>
1441   * @param sr a {@link SpeciesReference} object referring to a {@link Species} in the
1442   * enclosing {@link Model}.
1443   <p>
1444   * <p>
1445 * @return integer value indicating success/failure of the
1446 * function.   The possible values
1447 * returned by this function are:
1448   * <ul>
1449   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1450   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
1451   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
1452   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1453   *
1454   * </ul> <p>
1455   * <p>
1456 * @note This method should be used with some caution.  The fact that this
1457 * method <em>copies</em> the object passed to it means that the caller will be
1458 * left holding a physically different object instance than the one contained
1459 * inside this object.  Changes made to the original object instance (such as
1460 * resetting attribute values) will <em>not affect the instance in this
1461 * object</em>.  In addition, the caller should make sure to free the
1462 * original object if it is no longer being used, or else a memory leak will
1463 * result.  Please see other methods on this class (particularly a
1464 * corresponding method whose name begins with the word <code>create</code>)
1465 * for alternatives that do not lead to these issues. 
1466   <p>
1467   * @see #createProduct()
1468   */ public
1469 int addProduct(SpeciesReference sr) {
1470    return libsbmlJNI.Reaction_addProduct__SWIG_0(swigCPtr, this, SpeciesReference.getCPtr(sr), sr);
1471  }
1472
1473  
1474/**
1475   * Adds the given species as a product with the given stoichiometry
1476   <p>
1477   * @param species the species to be added as product.
1478   <p>
1479   * @param stoichiometry an optional parameter specifying the
1480   *        stoichiometry of the added product (defaulting to 1).
1481   <p>
1482   * @param id an optional id to be given to the species reference that will
1483   *        be created. (defaulting to empty string, i.e. not set).
1484   <p>
1485   * @param constant an attribute specifying whether the species reference is
1486   *        constant or not (defaulting to true).
1487   <p>
1488   * <p>
1489 * @return integer value indicating success/failure of the
1490 * function.   The possible values
1491 * returned by this function are:
1492   * <ul>
1493   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1494   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1495   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1496   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1497   *
1498   * </ul> <p>
1499   * <p>
1500 * @note This method should be used with some caution.  The fact that this
1501 * method <em>copies</em> the object passed to it means that the caller will be
1502 * left holding a physically different object instance than the one contained
1503 * inside this object.  Changes made to the original object instance (such as
1504 * resetting attribute values) will <em>not affect the instance in this
1505 * object</em>.  In addition, the caller should make sure to free the
1506 * original object if it is no longer being used, or else a memory leak will
1507 * result.  Please see other methods on this class (particularly a
1508 * corresponding method whose name begins with the word <code>create</code>)
1509 * for alternatives that do not lead to these issues.
1510   <p>
1511   * @note the {@link Species} object itself is NOT added to the model
1512   <p>
1513   * @see #createProduct()
1514   */ public
1515 int addProduct(Species species, double stoichiometry, String id, boolean constant) {
1516    return libsbmlJNI.Reaction_addProduct__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id, constant);
1517  }
1518
1519  
1520/**
1521   * Adds the given species as a product with the given stoichiometry
1522   <p>
1523   * @param species the species to be added as product.
1524   <p>
1525   * @param stoichiometry an optional parameter specifying the
1526   *        stoichiometry of the added product (defaulting to 1).
1527   <p>
1528   * @param id an optional id to be given to the species reference that will
1529   *        be created. (defaulting to empty string, i.e. not set).
1530   <p>
1531   * @param constant an attribute specifying whether the species reference is
1532   *        constant or not (defaulting to true).
1533   <p>
1534   * <p>
1535 * @return integer value indicating success/failure of the
1536 * function.   The possible values
1537 * returned by this function are:
1538   * <ul>
1539   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1540   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1541   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1542   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1543   *
1544   * </ul> <p>
1545   * <p>
1546 * @note This method should be used with some caution.  The fact that this
1547 * method <em>copies</em> the object passed to it means that the caller will be
1548 * left holding a physically different object instance than the one contained
1549 * inside this object.  Changes made to the original object instance (such as
1550 * resetting attribute values) will <em>not affect the instance in this
1551 * object</em>.  In addition, the caller should make sure to free the
1552 * original object if it is no longer being used, or else a memory leak will
1553 * result.  Please see other methods on this class (particularly a
1554 * corresponding method whose name begins with the word <code>create</code>)
1555 * for alternatives that do not lead to these issues.
1556   <p>
1557   * @note the {@link Species} object itself is NOT added to the model
1558   <p>
1559   * @see #createProduct()
1560   */ public
1561 int addProduct(Species species, double stoichiometry, String id) {
1562    return libsbmlJNI.Reaction_addProduct__SWIG_2(swigCPtr, this, Species.getCPtr(species), species, stoichiometry, id);
1563  }
1564
1565  
1566/**
1567   * Adds the given species as a product with the given stoichiometry
1568   <p>
1569   * @param species the species to be added as product.
1570   <p>
1571   * @param stoichiometry an optional parameter specifying the
1572   *        stoichiometry of the added product (defaulting to 1).
1573   <p>
1574   * @param id an optional id to be given to the species reference that will
1575   *        be created. (defaulting to empty string, i.e. not set).
1576   <p>
1577   * @param constant an attribute specifying whether the species reference is
1578   *        constant or not (defaulting to true).
1579   <p>
1580   * <p>
1581 * @return integer value indicating success/failure of the
1582 * function.   The possible values
1583 * returned by this function are:
1584   * <ul>
1585   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1586   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1587   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1588   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1589   *
1590   * </ul> <p>
1591   * <p>
1592 * @note This method should be used with some caution.  The fact that this
1593 * method <em>copies</em> the object passed to it means that the caller will be
1594 * left holding a physically different object instance than the one contained
1595 * inside this object.  Changes made to the original object instance (such as
1596 * resetting attribute values) will <em>not affect the instance in this
1597 * object</em>.  In addition, the caller should make sure to free the
1598 * original object if it is no longer being used, or else a memory leak will
1599 * result.  Please see other methods on this class (particularly a
1600 * corresponding method whose name begins with the word <code>create</code>)
1601 * for alternatives that do not lead to these issues.
1602   <p>
1603   * @note the {@link Species} object itself is NOT added to the model
1604   <p>
1605   * @see #createProduct()
1606   */ public
1607 int addProduct(Species species, double stoichiometry) {
1608    return libsbmlJNI.Reaction_addProduct__SWIG_3(swigCPtr, this, Species.getCPtr(species), species, stoichiometry);
1609  }
1610
1611  
1612/**
1613   * Adds the given species as a product with the given stoichiometry
1614   <p>
1615   * @param species the species to be added as product.
1616   <p>
1617   * @param stoichiometry an optional parameter specifying the
1618   *        stoichiometry of the added product (defaulting to 1).
1619   <p>
1620   * @param id an optional id to be given to the species reference that will
1621   *        be created. (defaulting to empty string, i.e. not set).
1622   <p>
1623   * @param constant an attribute specifying whether the species reference is
1624   *        constant or not (defaulting to true).
1625   <p>
1626   * <p>
1627 * @return integer value indicating success/failure of the
1628 * function.   The possible values
1629 * returned by this function are:
1630   * <ul>
1631   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1632   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1633   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1634   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1635   *
1636   * </ul> <p>
1637   * <p>
1638 * @note This method should be used with some caution.  The fact that this
1639 * method <em>copies</em> the object passed to it means that the caller will be
1640 * left holding a physically different object instance than the one contained
1641 * inside this object.  Changes made to the original object instance (such as
1642 * resetting attribute values) will <em>not affect the instance in this
1643 * object</em>.  In addition, the caller should make sure to free the
1644 * original object if it is no longer being used, or else a memory leak will
1645 * result.  Please see other methods on this class (particularly a
1646 * corresponding method whose name begins with the word <code>create</code>)
1647 * for alternatives that do not lead to these issues.
1648   <p>
1649   * @note the {@link Species} object itself is NOT added to the model
1650   <p>
1651   * @see #createProduct()
1652   */ public
1653 int addProduct(Species species) {
1654    return libsbmlJNI.Reaction_addProduct__SWIG_4(swigCPtr, this, Species.getCPtr(species), species);
1655  }
1656
1657  
1658/**
1659   * Adds a given {@link ModifierSpeciesReference} object as a product in this
1660   * {@link Reaction}.
1661   <p>
1662   * The {@link ModifierSpeciesReference} instance in <code>msr</code> is copied.
1663   <p>
1664   * @param msr a {@link ModifierSpeciesReference} object referring to a {@link Species} in
1665   * the enclosing {@link Model}.
1666   <p>
1667   * <p>
1668 * @return integer value indicating success/failure of the
1669 * function.   The possible values
1670 * returned by this function are:
1671   * <ul>
1672   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1673   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1674   * <li> {@link libsbmlConstants#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH}
1675   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1676   * <li> {@link libsbmlConstants#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH}
1677   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1678   *
1679   * </ul> <p>
1680   * <p>
1681 * @note This method should be used with some caution.  The fact that this
1682 * method <em>copies</em> the object passed to it means that the caller will be
1683 * left holding a physically different object instance than the one contained
1684 * inside this object.  Changes made to the original object instance (such as
1685 * resetting attribute values) will <em>not affect the instance in this
1686 * object</em>.  In addition, the caller should make sure to free the
1687 * original object if it is no longer being used, or else a memory leak will
1688 * result.  Please see other methods on this class (particularly a
1689 * corresponding method whose name begins with the word <code>create</code>)
1690 * for alternatives that do not lead to these issues. 
1691   <p>
1692   * @see #createModifier()
1693   */ public
1694 int addModifier(ModifierSpeciesReference msr) {
1695    return libsbmlJNI.Reaction_addModifier__SWIG_0(swigCPtr, this, ModifierSpeciesReference.getCPtr(msr), msr);
1696  }
1697
1698  
1699/**
1700   * Adds the given species as a modifier to this reaction
1701   <p>
1702   * @param species the species to be added as modifier.
1703   <p>
1704   * @param id an optional id to be given to the species reference that will
1705   *        be created. (defaulting to empty string, i.e. not set).
1706   <p>
1707   * <p>
1708 * @return integer value indicating success/failure of the
1709 * function.   The possible values
1710 * returned by this function are:
1711   * <ul>
1712   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1713   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1714   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1715   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1716   *
1717   * </ul> <p>
1718   * <p>
1719 * @note This method should be used with some caution.  The fact that this
1720 * method <em>copies</em> the object passed to it means that the caller will be
1721 * left holding a physically different object instance than the one contained
1722 * inside this object.  Changes made to the original object instance (such as
1723 * resetting attribute values) will <em>not affect the instance in this
1724 * object</em>.  In addition, the caller should make sure to free the
1725 * original object if it is no longer being used, or else a memory leak will
1726 * result.  Please see other methods on this class (particularly a
1727 * corresponding method whose name begins with the word <code>create</code>)
1728 * for alternatives that do not lead to these issues.
1729   <p>
1730   * @note the {@link Species} object itself is NOT added to the model
1731   <p>
1732   * @see #createModifier()
1733   */ public
1734 int addModifier(Species species, String id) {
1735    return libsbmlJNI.Reaction_addModifier__SWIG_1(swigCPtr, this, Species.getCPtr(species), species, id);
1736  }
1737
1738  
1739/**
1740   * Adds the given species as a modifier to this reaction
1741   <p>
1742   * @param species the species to be added as modifier.
1743   <p>
1744   * @param id an optional id to be given to the species reference that will
1745   *        be created. (defaulting to empty string, i.e. not set).
1746   <p>
1747   * <p>
1748 * @return integer value indicating success/failure of the
1749 * function.   The possible values
1750 * returned by this function are:
1751   * <ul>
1752   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1753   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1754   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1755   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID}
1756   *
1757   * </ul> <p>
1758   * <p>
1759 * @note This method should be used with some caution.  The fact that this
1760 * method <em>copies</em> the object passed to it means that the caller will be
1761 * left holding a physically different object instance than the one contained
1762 * inside this object.  Changes made to the original object instance (such as
1763 * resetting attribute values) will <em>not affect the instance in this
1764 * object</em>.  In addition, the caller should make sure to free the
1765 * original object if it is no longer being used, or else a memory leak will
1766 * result.  Please see other methods on this class (particularly a
1767 * corresponding method whose name begins with the word <code>create</code>)
1768 * for alternatives that do not lead to these issues.
1769   <p>
1770   * @note the {@link Species} object itself is NOT added to the model
1771   <p>
1772   * @see #createModifier()
1773   */ public
1774 int addModifier(Species species) {
1775    return libsbmlJNI.Reaction_addModifier__SWIG_2(swigCPtr, this, Species.getCPtr(species), species);
1776  }
1777
1778  
1779/**
1780   * Creates a new {@link SpeciesReference}, adds it to this {@link Reaction}'s list of
1781   * reactants, and returns it.
1782   <p>
1783   * @return a new {@link SpeciesReference} object.
1784   */ public
1785 SpeciesReference createReactant() {
1786    long cPtr = libsbmlJNI.Reaction_createReactant(swigCPtr, this);
1787    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1788  }
1789
1790  
1791/**
1792   * Creates a new {@link SpeciesReference}, adds it to this {@link Reaction}'s list of
1793   * products, and returns it.
1794   <p>
1795   * @return a new {@link SpeciesReference} object.
1796   */ public
1797 SpeciesReference createProduct() {
1798    long cPtr = libsbmlJNI.Reaction_createProduct(swigCPtr, this);
1799    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1800  }
1801
1802  
1803/**
1804   * Creates a new {@link ModifierSpeciesReference}, adds it to this {@link Reaction}'s
1805   * list of modifiers and returns it.
1806   <p>
1807   * @return a new {@link ModifierSpeciesReference} object.
1808   */ public
1809 ModifierSpeciesReference createModifier() {
1810    long cPtr = libsbmlJNI.Reaction_createModifier(swigCPtr, this);
1811    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1812  }
1813
1814  
1815/**
1816   * Creates a new {@link KineticLaw} object, installs it as this {@link Reaction}'s
1817   * 'kineticLaw' subelement, and returns it.
1818   <p>
1819   * If this {@link Reaction} had a previous {@link KineticLaw}, it will be destroyed.
1820   <p>
1821   * @return the new {@link KineticLaw} object.
1822   */ public
1823 KineticLaw createKineticLaw() {
1824    long cPtr = libsbmlJNI.Reaction_createKineticLaw(swigCPtr, this);
1825    return (cPtr == 0) ? null : new KineticLaw(cPtr, false);
1826  }
1827
1828  
1829/**
1830   * Returns the list of reactants in this {@link Reaction} object.
1831   <p>
1832   * @return the {@link ListOfSpeciesReferences} containing the references to the
1833   * species acting as reactants in this reaction.
1834   */ public
1835 ListOfSpeciesReferences getListOfReactants() {
1836    long cPtr = libsbmlJNI.Reaction_getListOfReactants__SWIG_0(swigCPtr, this);
1837    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1838  }
1839
1840  
1841/**
1842   * Returns the list of products in this {@link Reaction} object.
1843   <p>
1844   * @return the {@link ListOfSpeciesReferences} containing the references to the
1845   * species acting as products in this reaction.
1846   */ public
1847 ListOfSpeciesReferences getListOfProducts() {
1848    long cPtr = libsbmlJNI.Reaction_getListOfProducts__SWIG_0(swigCPtr, this);
1849    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1850  }
1851
1852  
1853/**
1854   * Returns the list of modifiers in this {@link Reaction} object.
1855   <p>
1856   * @return the {@link ListOfSpeciesReferences} containing the references to the
1857   * species acting as modifiers in this reaction.
1858   */ public
1859 ListOfSpeciesReferences getListOfModifiers() {
1860    long cPtr = libsbmlJNI.Reaction_getListOfModifiers__SWIG_0(swigCPtr, this);
1861    return (cPtr == 0) ? null : new ListOfSpeciesReferences(cPtr, false);
1862  }
1863
1864  
1865/**
1866   * Returns the nth reactant species (as a {@link SpeciesReference} object) in 
1867   * the list of reactants in this {@link Reaction}.
1868   <p>
1869   * Callers should first call getNumReactants() to find out how many
1870   * reactants there are, to avoid using an invalid index number.
1871   <p>
1872   * @param n the index of the reactant sought.
1873   <p>
1874   * @return the nth reactant (as a {@link SpeciesReference} object) of this
1875   * {@link Reaction}.
1876   */ public
1877 SpeciesReference getReactant(long n) {
1878    long cPtr = libsbmlJNI.Reaction_getReactant__SWIG_0(swigCPtr, this, n);
1879    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1880  }
1881
1882  
1883/**
1884   * Returns the reactant species (as a {@link SpeciesReference} object) having 
1885   * a specific identifier in this {@link Reaction}.
1886   <p>
1887   * @param species the identifier of the reactant {@link Species} ('species' 
1888   * attribute of the reactant {@link SpeciesReference} object).
1889   <p>
1890   * @return a {@link SpeciesReference} object, or <code>null</code> if no species with the
1891   * given identifier <code>species</code> appears as a reactant in this {@link Reaction}.
1892   */ public
1893 SpeciesReference getReactant(String species) {
1894    long cPtr = libsbmlJNI.Reaction_getReactant__SWIG_2(swigCPtr, this, species);
1895    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1896  }
1897
1898  
1899/**
1900   * Returns the nth product species (as a {@link SpeciesReference} object) in 
1901   * the list of products in this {@link Reaction}.
1902   <p>
1903   * Callers should first call getNumProducts() to find out how many
1904   * products there are, to avoid using an invalid index number.
1905   <p>
1906   * @param n the index of the product sought.
1907   <p>
1908   * @return the nth product (as a {@link SpeciesReference} object) of this
1909   * {@link Reaction}.
1910   */ public
1911 SpeciesReference getProduct(long n) {
1912    long cPtr = libsbmlJNI.Reaction_getProduct__SWIG_0(swigCPtr, this, n);
1913    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1914  }
1915
1916  
1917/**
1918   * Returns the product species (as a {@link SpeciesReference} object) having 
1919   * a specific identifier in this {@link Reaction}.
1920   <p>
1921   * @param species the identifier of the product {@link Species} ('species'
1922   * attribute of the product {@link SpeciesReference} object).
1923   <p>
1924   * @return a {@link SpeciesReference} object, or <code>null</code> if no species with the
1925   * given identifier <code>species</code> appears as a product in this {@link Reaction}.
1926   */ public
1927 SpeciesReference getProduct(String species) {
1928    long cPtr = libsbmlJNI.Reaction_getProduct__SWIG_2(swigCPtr, this, species);
1929    return (cPtr == 0) ? null : new SpeciesReference(cPtr, false);
1930  }
1931
1932  
1933/**
1934   * Returns the nth modifier species (as a {@link ModifierSpeciesReference} object) 
1935   * in the list of modifiers of this {@link Reaction}.
1936   <p>
1937   * Callers should first call getNumModifiers() to find out how many
1938   * modifiers there are, to avoid using an invalid index number.
1939   <p>
1940   * @param n the index of the modifier species sought.
1941   <p>
1942   * @return the nth modifier (as a {@link ModifierSpeciesReference} object) of
1943   * this {@link Reaction}.
1944   */ public
1945 ModifierSpeciesReference getModifier(long n) {
1946    long cPtr = libsbmlJNI.Reaction_getModifier__SWIG_0(swigCPtr, this, n);
1947    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1948  }
1949
1950  
1951/**
1952   * Returns the modifier species (as a {@link ModifierSpeciesReference} object) 
1953   * having a specific identifier in this {@link Reaction}.
1954   <p>
1955   * @param species the identifier of the modifier {@link Species} ('species' 
1956   * attribute of the {@link ModifierSpeciesReference} object).
1957   <p>
1958   * @return a {@link ModifierSpeciesReference} object, or <code>null</code> if no species with
1959   * the given identifier <code>species</code> appears as a modifier in this
1960   * {@link Reaction}.
1961   */ public
1962 ModifierSpeciesReference getModifier(String species) {
1963    long cPtr = libsbmlJNI.Reaction_getModifier__SWIG_2(swigCPtr, this, species);
1964    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, false);
1965  }
1966
1967  
1968/**
1969   * Returns the number of reactant species in this {@link Reaction}.
1970   <p>
1971   * @return the number of reactants in this {@link Reaction}.
1972   */ public
1973 long getNumReactants() {
1974    return libsbmlJNI.Reaction_getNumReactants(swigCPtr, this);
1975  }
1976
1977  
1978/**
1979   * Returns the number of product species in this {@link Reaction}.
1980   <p>
1981   * @return the number of products in this {@link Reaction}.
1982   */ public
1983 long getNumProducts() {
1984    return libsbmlJNI.Reaction_getNumProducts(swigCPtr, this);
1985  }
1986
1987  
1988/**
1989   * Returns the number of modifier species in this {@link Reaction}.
1990   <p>
1991   * @return the number of modifiers in this {@link Reaction}.
1992   */ public
1993 long getNumModifiers() {
1994    return libsbmlJNI.Reaction_getNumModifiers(swigCPtr, this);
1995  }
1996
1997  
1998/**
1999   * Removes the nth reactant species (SpeciesReference object) in the list of 
2000   * reactants in this {@link Reaction} and returns a pointer to it.
2001   <p>
2002   * The caller owns the returned object and is responsible for deleting it.
2003   * The caller should first call getNumReactants() to find out how many
2004   * reactants there are, to avoid using an invalid index number.
2005   <p>
2006   * @param n the index of the reactant {@link SpeciesReference} object to remove.
2007   <p>
2008   * @return the removed reactant {@link SpeciesReference} object, or <code>null</code> if the 
2009   * given index is out of range.
2010   */ public
2011 SpeciesReference removeReactant(long n) {
2012    long cPtr = libsbmlJNI.Reaction_removeReactant__SWIG_0(swigCPtr, this, n);
2013    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
2014  }
2015
2016  
2017/**
2018   * Removes the reactant species (SpeciesReference object) having the given  
2019   * 'species' attribute in this {@link Reaction} and returns a pointer to it.
2020   <p>
2021   * The caller owns the returned object and is responsible for deleting it.
2022   <p>
2023   * @param species the 'species' attribute of the reactant {@link SpeciesReference} 
2024   * object.
2025   <p>
2026   * @return the removed reactant {@link SpeciesReference} object, or <code>null</code> if no 
2027   * reactant {@link SpeciesReference} object with the given 'species' attribute 
2028   * <code>species</code> exists in this {@link Reaction}.
2029   */ public
2030 SpeciesReference removeReactant(String species) {
2031    long cPtr = libsbmlJNI.Reaction_removeReactant__SWIG_1(swigCPtr, this, species);
2032    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
2033  }
2034
2035  
2036/**
2037   * Removes the nth product species (SpeciesReference object) in the list of 
2038   * products in this {@link Reaction} and returns a pointer to it.
2039   <p>
2040   * The caller owns the returned object and is responsible for deleting it.
2041   * The caller should first call getNumProducts() to find out how many
2042   * products there are, to avoid using an invalid index number.
2043   <p>
2044   * @param n the index of the product {@link SpeciesReference} object to remove.
2045   <p>
2046   * @return the removed product {@link SpeciesReference} object, or <code>null</code> if the 
2047   * given index is out of range.
2048   */ public
2049 SpeciesReference removeProduct(long n) {
2050    long cPtr = libsbmlJNI.Reaction_removeProduct__SWIG_0(swigCPtr, this, n);
2051    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
2052  }
2053
2054  
2055/**
2056   * Removes the product species (SpeciesReference object) having the given  
2057   * 'species' attribute in this {@link Reaction} and returns a pointer to it.
2058   <p>
2059   * The caller owns the returned object and is responsible for deleting it.
2060   <p>
2061   * @param species the 'species' attribute of the product {@link SpeciesReference} 
2062   * object.
2063   <p>
2064   * @return the removed product {@link SpeciesReference} object, or <code>null</code> if no 
2065   * product {@link SpeciesReference} object with the given 'species' attribute 
2066   * <code>species</code> exists in this {@link Reaction}.
2067   */ public
2068 SpeciesReference removeProduct(String species) {
2069    long cPtr = libsbmlJNI.Reaction_removeProduct__SWIG_1(swigCPtr, this, species);
2070    return (cPtr == 0) ? null : new SpeciesReference(cPtr, true);
2071  }
2072
2073  
2074/**
2075   * Removes the nth modifier species (ModifierSpeciesReference object) in 
2076   * the list of  modifiers in this {@link Reaction} and returns a pointer to it.
2077   <p>
2078   * The caller owns the returned object and is responsible for deleting it.
2079   * The caller should first call getNumModifiers() to find out how many
2080   * modifiers there are, to avoid using an invalid index number.
2081   <p>
2082   * @param n the index of the {@link ModifierSpeciesReference} object to remove.
2083   <p>
2084   * @return the removed {@link ModifierSpeciesReference} object, or <code>null</code> if the 
2085   * given index is out of range.
2086   */ public
2087 ModifierSpeciesReference removeModifier(long n) {
2088    long cPtr = libsbmlJNI.Reaction_removeModifier__SWIG_0(swigCPtr, this, n);
2089    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, true);
2090  }
2091
2092  
2093/**
2094   * Removes the modifier species (ModifierSpeciesReference object) having 
2095   * the given 'species' attribute in this {@link Reaction} and returns a pointer to it.
2096   <p>
2097   * The caller owns the returned object and is responsible for deleting it.
2098   <p>
2099   * @param species the 'species' attribute of the {@link ModifierSpeciesReference} 
2100   * object.
2101   <p>
2102   * @return the removed {@link ModifierSpeciesReference} object, or <code>null</code> if no 
2103   * {@link ModifierSpeciesReference} object with the given 'species' attribute @p 
2104   * species exists in this {@link Reaction}.
2105   */ public
2106 ModifierSpeciesReference removeModifier(String species) {
2107    long cPtr = libsbmlJNI.Reaction_removeModifier__SWIG_1(swigCPtr, this, species);
2108    return (cPtr == 0) ? null : new ModifierSpeciesReference(cPtr, true);
2109  }
2110
2111  public void connectToChild() {
2112    libsbmlJNI.Reaction_connectToChild(swigCPtr, this);
2113  }
2114
2115  
2116/** * @internal */ public
2117 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
2118    libsbmlJNI.Reaction_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
2119  }
2120
2121  
2122/**
2123   * Returns the libSBML type code for this SBML object.
2124   <p>
2125   * <p>
2126 * LibSBML attaches an identifying code to every kind of SBML object.  These
2127 * are integer constants known as <em>SBML type codes</em>.  The names of all
2128 * the codes begin with the characters <code>SBML_</code>.
2129 * In the Java language interface for libSBML, the
2130 * type codes are defined as static integer constants in the interface class
2131 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
2132 * package plug-ins may use overlapping type codes; to identify the package
2133 * to which a given object belongs, call the 
2134 * <code>{@link SBase#getPackageName()}
2135 * </code>
2136 * method on the object.
2137   <p>
2138   * @return the SBML type code for this object:
2139   * {@link libsbmlConstants#SBML_REACTION SBML_REACTION} (default).
2140   <p>
2141   * <p>
2142 * @warning <span class='warning'>The specific integer values of the possible
2143 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
2144 * packages,  To fully identify the correct code, <strong>it is necessary to
2145 * invoke both getTypeCode() and getPackageName()</strong>.</span>
2146   <p>
2147   * @see #getElementName()
2148   * @see #getPackageName()
2149   */ public
2150 int getTypeCode() {
2151    return libsbmlJNI.Reaction_getTypeCode(swigCPtr, this);
2152  }
2153
2154  
2155/**
2156   * Returns the XML element name of this object, which for {@link Reaction}, is
2157   * always <code>'reaction'.</code>
2158   <p>
2159   * @return the name of this element, i.e., <code>'reaction'.</code>
2160   */ public
2161 String getElementName() {
2162    return libsbmlJNI.Reaction_getElementName(swigCPtr, this);
2163  }
2164
2165  
2166/**
2167   * Predicate returning <code>true</code> if all the required attributes for this
2168   * {@link Reaction} object have been set.
2169   <p>
2170   * The required attributes for a {@link Reaction} object are:
2171   * <ul>
2172   * <li> 'id' (or 'name' in SBML Level&nbsp;1)
2173   * <li> 'fast' (in Level&nbsp;3 Version&nbsp;1 only, where it is defined as a required attribute)
2174   * <li> 'reversible' (in Level&nbsp;3 only, where it is defined as a required attribute)
2175   *
2176   * </ul> <p>
2177   * @return <code>true</code> if the required attributes have been set, <code>false</code>
2178   * otherwise.
2179   */ public
2180 boolean hasRequiredAttributes() {
2181    return libsbmlJNI.Reaction_hasRequiredAttributes(swigCPtr, this);
2182  }
2183
2184}