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 * Stochiometry expressions in SBML Level 2 reactions. 013 <p> 014 * <h2>Stoichiometries in SBML Level 2</h2> 015 <p> 016 * In SBML Level 2, product and reactant stoichiometries can be specified 017 * using <em>either</em> the 'stoichiometry' attribute or a 'stoichiometryMath' 018 * element in a {@link SpeciesReference} object. The 'stoichiometry' attribute is 019 * of type <code>double</code> and should contain values greater than zero (0). The 020 * 'stoichiometryMath' element is implemented as an element containing a 021 * MathML expression. These two are mutually exclusive; only one of 022 * 'stoichiometry' or 'stoichiometryMath' should be defined in a given 023 * {@link SpeciesReference} instance. When neither the attribute nor the element 024 * is present, the value of 'stoichiometry' in the enclosing 025 * {@link SpeciesReference} instance defaults to <code>1.</code> 026 <p> 027 * For maximum interoperability, {@link SpeciesReference}'s 'stoichiometry' 028 * attribute should be used in preference to 'stoichiometryMath' when a 029 * species' stoichiometry is a simple scalar number (integer or decimal). 030 * When the stoichiometry is a rational number, or when it is a more 031 * complicated formula, 'stoichiometryMath' must be used. The MathML 032 * expression in 'stoichiometryMath' may also refer to identifiers of 033 * entities in a model (except reaction identifiers). However, the only 034 * species identifiers that can be used in 'stoichiometryMath' are those 035 * referenced in the enclosing {@link Reaction}'s list of reactants, products and 036 * modifiers. 037 <p> 038 * The 'stoichiometry' attribute and the 'stoichiometryMath' element, when 039 * either is used, is each interpreted as a factor applied to the reaction 040 * rate to produce the rate of change of the species identified by the 041 * 'species' attribute in the enclosing {@link SpeciesReference}. This is the 042 * normal interpretation of a stoichiometry, but in SBML, one additional 043 * consideration has to be taken into account. The reaction rate, which is 044 * the result of the {@link KineticLaw}'s 'math' element, is always in the model's 045 * <em>substance</em> per <em>time</em> units. However, the rate of change of the 046 * species will involve the species' <em>substance</em> units (i.e., the units 047 * identified by the {@link Species} object's 'substanceUnits' attribute), and 048 * these units may be different from the model's default <em>substance</em> 049 * units. If the units <em>are</em> different, the stoichiometry must 050 * incorporate a conversion factor for converting the model's <em>substance</em> 051 * units to the species' <em>substance</em> units. The conversion factor is 052 * assumed to be included in the scalar value of the 'stoichiometry' 053 * attribute if 'stoichiometry' is used. If instead 'stoichiometryMath' is 054 * used, then the product of the model's 'substance' units times the 055 * 'stoichiometryMath' units must match the <em>substance</em> units of the 056 * species. Note that in either case, if the species' units and the 057 * model's default <em>substance</em> units are the same, the stoichiometry ends 058 * up being a dimensionless number and equivalent to the standard chemical 059 * stoichiometry found in textbooks. Examples and more explanations of 060 * this are given in the SBML specification. 061 <p> 062 * The following is a simple example of a species reference for species 063 * <code>'X0'</code>, with stoichiometry <code>2</code>, in a list of reactants within a reaction 064 * having the identifier <code>'J1':</code> 065 * <pre class='fragment'> 066 <model> 067 ... 068 <listOfReactions> 069 <reaction id='J1'> 070 <listOfReactants> 071 <speciesReference species='X0' stoichiometry='2'> 072 </listOfReactants> 073 ... 074 </reaction> 075 ... 076 </listOfReactions> 077 ... 078 </model> 079 </pre> 080 <p> 081 * The following is a more complex example of a species reference for 082 * species <code>'X0'</code>, with a stoichiometry formula consisting of 083 * a rational number: 084 * <pre class='fragment'> 085 <model> 086 ... 087 <listOfReactions> 088 <reaction id='J1'> 089 <listOfReactants> 090 <speciesReference species='X0'> 091 <stoichiometryMath> 092 <math xmlns='http://www.w3.org/1998/Math/MathML'> 093 <cn type='rational'> 3 <sep/> 2 </cn> 094 </math> 095 </stoichiometryMath> 096 </speciesReference> 097 </listOfReactants> 098 ... 099 </reaction> 100 ... 101 </listOfReactions> 102 ... 103 </model> 104 </pre> 105 <p> 106 * Additional discussions of stoichiometries and implications for species 107 * and reactions are included in the documentation of {@link SpeciesReference} 108 * class. 109 <p> 110 * <h2>Stoichiometries in SBML Level 3</h2> 111 <p> 112 * The {@link StoichiometryMath} construct is not defined in SBML Level 3 113 * Version 1 Core. Instead, Level 3 defines the identifier of 114 * {@link SpeciesReference} objects as a stand-in for the stoichiometry of the 115 * reactant or product being referenced, and allows that identifier to be 116 * used elsewhere in SBML models, including (for example) {@link InitialAssignment} 117 * objects. This makes it possible to achieve the same effect as 118 * {@link StoichiometryMath}, but with other SBML objects. For instance, to 119 * produce a stoichiometry value that is a rational number, a model can use 120 * {@link InitialAssignment} to assign the identifier of a {@link SpeciesReference} object 121 * to a MathML expression evaluating to a rational number. This is 122 * analogous to the same way that, in Level 2, the model would use 123 * {@link StoichiometryMath} with a MathML expression evaluating to a rational 124 * number. 125 <p> 126 * In SBML Level 2, the stoichiometry of a reactant or product is a 127 * combination of both a <em>biochemical stoichiometry</em> (meaning, the 128 * standard stoichiometry of a species in a reaction) and any necessary 129 * unit conversion factors. The introduction of an explicit attribute on 130 * the {@link Species} object for a conversion factor allows Level 3 to avoid 131 * having to overload the meaning of stoichiometry. In Level 3, the 132 * stoichiometry given by a {@link SpeciesReference} object in a reaction is a 133 * 'proper' biochemical stoichiometry, meaning a dimensionless number free 134 * of unit conversions. 135 <p> 136 * @see SpeciesReference 137 * @see Reaction 138 */ 139 140public class StoichiometryMath extends SBase { 141 private long swigCPtr; 142 143 protected StoichiometryMath(long cPtr, boolean cMemoryOwn) 144 { 145 super(libsbmlJNI.StoichiometryMath_SWIGUpcast(cPtr), cMemoryOwn); 146 swigCPtr = cPtr; 147 } 148 149 protected static long getCPtr(StoichiometryMath obj) 150 { 151 return (obj == null) ? 0 : obj.swigCPtr; 152 } 153 154 protected static long getCPtrAndDisown (StoichiometryMath obj) 155 { 156 long ptr = 0; 157 158 if (obj != null) 159 { 160 ptr = obj.swigCPtr; 161 obj.swigCMemOwn = false; 162 } 163 164 return ptr; 165 } 166 167 protected void finalize() { 168 delete(); 169 } 170 171 public synchronized void delete() { 172 if (swigCPtr != 0) { 173 if (swigCMemOwn) { 174 swigCMemOwn = false; 175 libsbmlJNI.delete_StoichiometryMath(swigCPtr); 176 } 177 swigCPtr = 0; 178 } 179 super.delete(); 180 } 181 182 183/** 184 * Creates a new {@link StoichiometryMath} object using the given SBML <code>level</code> 185 * values. 186 <p> 187 * @param level a long integer, the SBML Level to assign to this {@link StoichiometryMath} 188 <p> 189 * @param version a long integer, the SBML Version to assign to this 190 * {@link StoichiometryMath} 191 <p> 192 * <p> 193 * @throws SBMLConstructorException 194 * Thrown if the given <code>level</code> and <code>version</code> combination are invalid 195 * or if this object is incompatible with the given level and version. 196 <p> 197 * <p> 198 * @note The {@link StoichiometryMath} construct exists only in SBML Level 2. 199 * It is an optional construct available for defining the stoichiometries of 200 * reactants and products in {@link Reaction} objects. Note that a different 201 * mechanism is used in SBML Level 3, where {@link StoichiometryMath} is not 202 * available. Please consult the top of this libSBML {@link StoichiometryMath} 203 * documentation for more information about the differences between SBML 204 * Level 2 and 3 with respect to stoichiometries. 205 <p> 206 * <p> 207 * @note Attempting to add an object to an {@link SBMLDocument} having a different 208 * combination of SBML Level, Version and XML namespaces than the object 209 * itself will result in an error at the time a caller attempts to make the 210 * addition. A parent object must have compatible Level, Version and XML 211 * namespaces. (Strictly speaking, a parent may also have more XML 212 * namespaces than a child, but the reverse is not permitted.) The 213 * restriction is necessary to ensure that an SBML model has a consistent 214 * overall structure. This requires callers to manage their objects 215 * carefully, but the benefit is increased flexibility in how models can be 216 * created by permitting callers to create objects bottom-up if desired. In 217 * situations where objects are not yet attached to parents (e.g., 218 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 219 * libSBML determine such things as whether it is valid to assign a 220 * particular value to an attribute. 221 */ public 222 StoichiometryMath(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 223 this(libsbmlJNI.new_StoichiometryMath__SWIG_0(level, version), true); 224 } 225 226 227/** 228 * Creates a new {@link StoichiometryMath} object using the given {@link SBMLNamespaces} object 229 * <code>sbmlns</code>. 230 <p> 231 * <p> 232 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces 233 * information. It is used to communicate the SBML Level, Version, and (in 234 * Level 3) packages used in addition to SBML Level 3 Core. A 235 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an 236 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object 237 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments. 238 <p> 239 * @param sbmlns an {@link SBMLNamespaces} object. 240 <p> 241 * <p> 242 * @throws SBMLConstructorException 243 * Thrown if the given <code>sbmlns</code> is inconsistent or incompatible 244 * with this object. 245 <p> 246 * <p> 247 * @note The {@link StoichiometryMath} construct exists only in SBML Level 2. 248 * It is an optional construct available for defining the stoichiometries of 249 * reactants and products in {@link Reaction} objects. Note that a different 250 * mechanism is used in SBML Level 3, where {@link StoichiometryMath} is not 251 * available. Please consult the top of this libSBML {@link StoichiometryMath} 252 * documentation for more information about the differences between SBML 253 * Level 2 and 3 with respect to stoichiometries. 254 <p> 255 * <p> 256 * @note Attempting to add an object to an {@link SBMLDocument} having a different 257 * combination of SBML Level, Version and XML namespaces than the object 258 * itself will result in an error at the time a caller attempts to make the 259 * addition. A parent object must have compatible Level, Version and XML 260 * namespaces. (Strictly speaking, a parent may also have more XML 261 * namespaces than a child, but the reverse is not permitted.) The 262 * restriction is necessary to ensure that an SBML model has a consistent 263 * overall structure. This requires callers to manage their objects 264 * carefully, but the benefit is increased flexibility in how models can be 265 * created by permitting callers to create objects bottom-up if desired. In 266 * situations where objects are not yet attached to parents (e.g., 267 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 268 * libSBML determine such things as whether it is valid to assign a 269 * particular value to an attribute. 270 */ public 271 StoichiometryMath(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException { 272 this(libsbmlJNI.new_StoichiometryMath__SWIG_1(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true); 273 } 274 275 276/** 277 * Copy constructor; creates a copy of this {@link StoichiometryMath}. 278 <p> 279 * @param orig the object to copy. 280 */ public 281 StoichiometryMath(StoichiometryMath orig) throws org.sbml.libsbml.SBMLConstructorException { 282 this(libsbmlJNI.new_StoichiometryMath__SWIG_2(StoichiometryMath.getCPtr(orig), orig), true); 283 } 284 285 286/** 287 * Creates and returns a deep copy of this {@link StoichiometryMath} object. 288 <p> 289 * @return the (deep) copy of this {@link StoichiometryMath} object. 290 */ public 291 StoichiometryMath cloneObject() { 292 long cPtr = libsbmlJNI.StoichiometryMath_cloneObject(swigCPtr, this); 293 return (cPtr == 0) ? null : new StoichiometryMath(cPtr, true); 294 } 295 296 297/** 298 * Retrieves the mathematical formula within this {@link StoichiometryMath} and 299 * return it as an AST. 300 <p> 301 * @return the math of this {@link StoichiometryMath}. 302 <p> 303 * <p> 304 * @note The {@link StoichiometryMath} construct exists only in SBML Level 2. 305 * It is an optional construct available for defining the stoichiometries of 306 * reactants and products in {@link Reaction} objects. Note that a different 307 * mechanism is used in SBML Level 3, where {@link StoichiometryMath} is not 308 * available. Please consult the top of this libSBML {@link StoichiometryMath} 309 * documentation for more information about the differences between SBML 310 * Level 2 and 3 with respect to stoichiometries. 311 */ public 312 ASTNode getMath() { 313 long cPtr = libsbmlJNI.StoichiometryMath_getMath(swigCPtr, this); 314 return (cPtr == 0) ? null : new ASTNode(cPtr, false); 315 } 316 317 318/** 319 * Predicate to test whether the math for this {@link StoichiometryMath} object 320 * is set. 321 <p> 322 * @return <code>true</code> if the formula (meaning the <code>math</code> subelement) of 323 * this {@link StoichiometryMath} is set, <code>false</code> otherwise. 324 <p> 325 * <p> 326 * @note The {@link StoichiometryMath} construct exists only in SBML Level 2. 327 * It is an optional construct available for defining the stoichiometries of 328 * reactants and products in {@link Reaction} objects. Note that a different 329 * mechanism is used in SBML Level 3, where {@link StoichiometryMath} is not 330 * available. Please consult the top of this libSBML {@link StoichiometryMath} 331 * documentation for more information about the differences between SBML 332 * Level 2 and 3 with respect to stoichiometries. 333 */ public 334 boolean isSetMath() { 335 return libsbmlJNI.StoichiometryMath_isSetMath(swigCPtr, this); 336 } 337 338 339/** 340 * Sets the 'math' expression of this {@link StoichiometryMath} instance to a 341 * copy of the given {@link ASTNode}. 342 <p> 343 * @param math an {@link ASTNode} representing a formula tree. 344 <p> 345 * <p> 346 * @return integer value indicating success/failure of the 347 * function. The possible values 348 * returned by this function are: 349 * <ul> 350 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 351 * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT} 352 * 353 * </ul> <p> 354 * <p> 355 * @note The {@link StoichiometryMath} construct exists only in SBML Level 2. 356 * It is an optional construct available for defining the stoichiometries of 357 * reactants and products in {@link Reaction} objects. Note that a different 358 * mechanism is used in SBML Level 3, where {@link StoichiometryMath} is not 359 * available. Please consult the top of this libSBML {@link StoichiometryMath} 360 * documentation for more information about the differences between SBML 361 * Level 2 and 3 with respect to stoichiometries. 362 */ public 363 int setMath(ASTNode math) { 364 return libsbmlJNI.StoichiometryMath_setMath(swigCPtr, this, ASTNode.getCPtr(math), math); 365 } 366 367 368/** 369 * Calculates and returns a {@link UnitDefinition} object that expresses the 370 * units returned by the math expression in this {@link StoichiometryMath} 371 * object. 372 <p> 373 * The units are calculated based on the mathematical expression in the 374 * {@link StoichiometryMath} and the model quantities referenced by 375 * <code><ci></code> elements used within that expression. The 376 * {@link StoichiometryMath#getDerivedUnitDefinition()} method returns the 377 * calculated units. 378 <p> 379 * Note that the functionality that facilitates unit analysis depends 380 * on the model as a whole. Thus, in cases where the object has not 381 * been added to a model or the model itself is incomplete, 382 * unit analysis is not possible and this method will return <code>null.</code> 383 <p> 384 * @return a {@link UnitDefinition} that expresses the units of the math, 385 * or <code>null</code> if one cannot be constructed. 386 <p> 387 * @warning <span class='warning'>Note that it is possible the 'math' 388 * expression in the {@link StoichiometryMath} instance contains literal numbers or 389 * parameters with undeclared units. In those cases, it is not possible to 390 * calculate the units of the overall expression without making 391 * assumptions. LibSBML does not make assumptions about the units, and 392 * {@link StoichiometryMath#getDerivedUnitDefinition()} only returns the units as 393 * far as it is able to determine them. For example, in an expression 394 * <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and 395 * <em>Y</em> does not, it will return the units of <em>X</em>. When using 396 * this method, <strong>it is critical that callers also invoke the 397 * method</strong> {@link StoichiometryMath#containsUndeclaredUnits()} <strong>to 398 * determine whether this situation holds</strong>. Callers should take 399 * suitable action in those situations.</span> 400 <p> 401 * @see #containsUndeclaredUnits() 402 */ public 403 UnitDefinition getDerivedUnitDefinition() { 404 long cPtr = libsbmlJNI.StoichiometryMath_getDerivedUnitDefinition__SWIG_0(swigCPtr, this); 405 return (cPtr == 0) ? null : new UnitDefinition(cPtr, false); 406 } 407 408 409/** 410 * Predicate returning <code>true</code> if the math 411 * expression of this {@link StoichiometryMath} object contains literal numbers 412 * or parameters with undeclared units. 413 <p> 414 * The {@link StoichiometryMath#getDerivedUnitDefinition()} method returns what 415 * libSBML computes the units of the Stoichiometry to be, to the extent 416 * that libSBML can compute them. However, if the expression contains 417 * literal numbers or parameters with undeclared units, libSBML may not 418 * be able to compute the full units of the expression and will only 419 * return what it can compute. Callers should always use 420 * {@link StoichiometryMath#containsUndeclaredUnits()} when using 421 * {@link StoichiometryMath#getDerivedUnitDefinition()} to decide whether the 422 * returned units may be incomplete. 423 <p> 424 * @return <code>true</code> if the math expression of this {@link StoichiometryMath} 425 * includes numbers/parameters with undeclared units, <code>false</code> otherwise. 426 <p> 427 * @note A return value of <code>true</code> indicates that the {@link UnitDefinition} 428 * returned by {@link StoichiometryMath#getDerivedUnitDefinition()} may not 429 * accurately represent the units of the expression. 430 <p> 431 * @see #getDerivedUnitDefinition() 432 */ public 433 boolean containsUndeclaredUnits() { 434 return libsbmlJNI.StoichiometryMath_containsUndeclaredUnits__SWIG_0(swigCPtr, this); 435 } 436 437 438/** 439 * Returns the libSBML type code of this object instance. 440 <p> 441 * <p> 442 * LibSBML attaches an identifying code to every kind of SBML object. These 443 * are integer constants known as <em>SBML type codes</em>. The names of all 444 * the codes begin with the characters <code>SBML_</code>. 445 * In the Java language interface for libSBML, the 446 * type codes are defined as static integer constants in the interface class 447 * {@link libsbmlConstants}. Note that different Level 3 448 * package plug-ins may use overlapping type codes; to identify the package 449 * to which a given object belongs, call the <code>getPackageName()</code> 450 * method on the object. 451 <p> 452 * @return the SBML type code for this object: 453 * {@link libsbmlConstants#SBML_STOICHIOMETRY_MATH SBML_STOICHIOMETRY_MATH} (default). 454 <p> 455 * <p> 456 * @warning <span class='warning'>The specific integer values of the possible 457 * type codes may be reused by different libSBML plug-ins for SBML Level 3. 458 * packages, To fully identify the correct code, <strong>it is necessary to 459 * invoke both getTypeCode() and getPackageName()</strong>.</span> 460 <p> 461 * @see #getElementName() 462 * @see #getPackageName() 463 */ public 464 int getTypeCode() { 465 return libsbmlJNI.StoichiometryMath_getTypeCode(swigCPtr, this); 466 } 467 468 469/** 470 * Returns the XML element name of this object, which for {@link StoichiometryMath}, is 471 * always <code>'stoichiometryMath'.</code> 472 <p> 473 * @return the name of this element, i.e., <code>'stoichiometryMath'.</code> 474 */ public 475 String getElementName() { 476 return libsbmlJNI.StoichiometryMath_getElementName(swigCPtr, this); 477 } 478 479 480/** 481 * Predicate returning <code>true</code> if 482 * all the required elements for this {@link StoichiometryMath} object 483 * have been set. 484 <p> 485 * @note The required elements for a {@link StoichiometryMath} object are: 486 * <ul> 487 * <li> 'math' 488 * 489 * </ul> <p> 490 * @return a boolean value indicating whether all the required 491 * elements for this object have been defined. 492 */ public 493 boolean hasRequiredElements() { 494 return libsbmlJNI.StoichiometryMath_hasRequiredElements(swigCPtr, this); 495 } 496 497 498/** 499 * Finds this {@link StoichiometryMath}'s {@link SpeciesReference} parent and calls 500 * unsetStoichiometryMath() on it, indirectly deleting itself. 501 <p> 502 * Overridden from the {@link SBase} function since the parent is not a {@link ListOf}. 503 <p> 504 * <p> 505 * @return integer value indicating success/failure of the 506 * function. The possible values 507 * returned by this function are: 508 * <ul> 509 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 510 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 511 * </ul> 512 */ public 513 int removeFromParentAndDelete() { 514 return libsbmlJNI.StoichiometryMath_removeFromParentAndDelete(swigCPtr, this); 515 } 516 517 518/** 519 * <p> 520 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another 521 * value. 522 <p> 523 * <p> 524 * In SBML, object identifiers are of a data type called <code>SId</code>. 525 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 526 * introduced for attribute values that refer to <code>SId</code> values; in 527 * previous Levels of SBML, this data type did not exist and attributes were 528 * simply described to as 'referring to an identifier', but the effective 529 * data type was the same as <code>SIdRef</code>in Level 3. These and 530 * other methods of libSBML refer to the type <code>SIdRef</code> for all 531 * Levels of SBML, even if the corresponding SBML specification did not 532 * explicitly name the data type. 533 <p> 534 * This method works by looking at all attributes and (if appropriate) 535 * mathematical formulas in MathML content, comparing the referenced 536 * identifiers to the value of <code>oldid</code>. If any matches are found, the 537 * matching values are replaced with <code>newid</code>. The method does <em>not</em> 538 * descend into child elements. 539 <p> 540 * @param oldid the old identifier 541 * @param newid the new identifier 542 */ public 543 void renameSIdRefs(String oldid, String newid) { 544 libsbmlJNI.StoichiometryMath_renameSIdRefs(swigCPtr, this, oldid, newid); 545 } 546 547 548/** 549 * <p> 550 * Replaces all uses of a given <code>UnitSIdRef</code> type attribute value with 551 * another value. 552 <p> 553 * <p> 554 * In SBML, unit definitions have identifiers of type <code>UnitSId</code>. In 555 * SBML Level 3, an explicit data type called <code>UnitSIdRef</code> was 556 * introduced for attribute values that refer to <code>UnitSId</code> values; in 557 * previous Levels of SBML, this data type did not exist and attributes were 558 * simply described to as 'referring to a unit identifier', but the effective 559 * data type was the same as <code>UnitSIdRef</code> in Level 3. These and 560 * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all 561 * Levels of SBML, even if the corresponding SBML specification did not 562 * explicitly name the data type. 563 <p> 564 * This method works by looking at all unit identifier attribute values 565 * (including, if appropriate, inside mathematical formulas), comparing the 566 * referenced unit identifiers to the value of <code>oldid</code>. If any matches 567 * are found, the matching values are replaced with <code>newid</code>. The method 568 * does <em>not</em> descend into child elements. 569 <p> 570 * @param oldid the old identifier 571 * @param newid the new identifier 572 */ public 573 void renameUnitSIdRefs(String oldid, String newid) { 574 libsbmlJNI.StoichiometryMath_renameUnitSIdRefs(swigCPtr, this, oldid, newid); 575 } 576 577 578/** * @internal */ public 579 void replaceSIDWithFunction(String id, ASTNode function) { 580 libsbmlJNI.StoichiometryMath_replaceSIDWithFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function); 581 } 582 583}