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