001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.7 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011/** 012 * <span class="pkg-marker pkg-color-fbc"><a href="group__fbc.html">fbc</a></span> 013 Max or min value for a reaction flux. 014 <p> 015 * The {@link FluxBound} object holds a single (in)equality that provides the maximum 016 * or minimum value that a reaction flux can obtain at steady state. 017 <p> 018 * @note This class is only defined for Version 1 of the 019 * “fbc” package specification. It was replaced in 020 * Version 2 by a {@link Parameter} referenced by the 'upperFluxBound' or 021 * 'lowerFluxBound' attributes on an {@link FbcReactionPlugin}. {@link FluxBound} is 022 * therefore not used for Version 2 “fbc” models. 023 */ 024 025public class FluxBound extends SBase { 026 private long swigCPtr; 027 028 protected FluxBound(long cPtr, boolean cMemoryOwn) 029 { 030 super(libsbmlJNI.FluxBound_SWIGUpcast(cPtr), cMemoryOwn); 031 swigCPtr = cPtr; 032 } 033 034 protected static long getCPtr(FluxBound obj) 035 { 036 return (obj == null) ? 0 : obj.swigCPtr; 037 } 038 039 protected static long getCPtrAndDisown (FluxBound obj) 040 { 041 long ptr = 0; 042 043 if (obj != null) 044 { 045 ptr = obj.swigCPtr; 046 obj.swigCMemOwn = false; 047 } 048 049 return ptr; 050 } 051 052 protected void finalize() { 053 delete(); 054 } 055 056 public synchronized void delete() { 057 if (swigCPtr != 0) { 058 if (swigCMemOwn) { 059 swigCMemOwn = false; 060 libsbmlJNI.delete_FluxBound(swigCPtr); 061 } 062 swigCPtr = 0; 063 } 064 super.delete(); 065 } 066 067 068/** 069 * Creates a new {@link FbcAssociation} with the given SBML Level, Version, and 070 * “fbc”package version. 071 <p> 072 * @param level a long integer, the SBML Level to assign to this 073 * {@link FluxObjective} 074 <p> 075 * @param version a long integer, the SBML Version to assign to this 076 * {@link FluxObjective} 077 <p> 078 * @param pkgVersion a long integer, the SBML Fbc Version to assign to 079 * this {@link FluxObjective} 080 */ public 081 FluxBound(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 082 this(libsbmlJNI.new_FluxBound__SWIG_0(level, version, pkgVersion), true); 083 } 084 085 086/** 087 * Creates a new {@link FbcAssociation} with the given SBML Level, Version, and 088 * “fbc”package version. 089 <p> 090 * @param level a long integer, the SBML Level to assign to this 091 * {@link FluxObjective} 092 <p> 093 * @param version a long integer, the SBML Version to assign to this 094 * {@link FluxObjective} 095 <p> 096 * @param pkgVersion a long integer, the SBML Fbc Version to assign to 097 * this {@link FluxObjective} 098 */ public 099 FluxBound(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 100 this(libsbmlJNI.new_FluxBound__SWIG_1(level, version), true); 101 } 102 103 104/** 105 * Creates a new {@link FbcAssociation} with the given SBML Level, Version, and 106 * “fbc”package version. 107 <p> 108 * @param level a long integer, the SBML Level to assign to this 109 * {@link FluxObjective} 110 <p> 111 * @param version a long integer, the SBML Version to assign to this 112 * {@link FluxObjective} 113 <p> 114 * @param pkgVersion a long integer, the SBML Fbc Version to assign to 115 * this {@link FluxObjective} 116 */ public 117 FluxBound(long level) throws org.sbml.libsbml.SBMLConstructorException { 118 this(libsbmlJNI.new_FluxBound__SWIG_2(level), true); 119 } 120 121 122/** 123 * Creates a new {@link FbcAssociation} with the given SBML Level, Version, and 124 * “fbc”package version. 125 <p> 126 * @param level a long integer, the SBML Level to assign to this 127 * {@link FluxObjective} 128 <p> 129 * @param version a long integer, the SBML Version to assign to this 130 * {@link FluxObjective} 131 <p> 132 * @param pkgVersion a long integer, the SBML Fbc Version to assign to 133 * this {@link FluxObjective} 134 */ public 135 FluxBound() throws org.sbml.libsbml.SBMLConstructorException { 136 this(libsbmlJNI.new_FluxBound__SWIG_3(), true); 137 } 138 139 140/** 141 * Creates a new {@link FluxBound} with the given {@link FbcPkgNamespaces} object. 142 */ public 143 FluxBound(FbcPkgNamespaces fbcns) throws org.sbml.libsbml.SBMLConstructorException { 144 this(libsbmlJNI.new_FluxBound__SWIG_4(FbcPkgNamespaces.getCPtr(fbcns), fbcns), true); 145 } 146 147 148/** 149 * Copy constructor. 150 */ public 151 FluxBound(FluxBound source) throws org.sbml.libsbml.SBMLConstructorException { 152 this(libsbmlJNI.new_FluxBound__SWIG_5(FluxBound.getCPtr(source), source), true); 153 } 154 155 156/** 157 * Returns the value of the 'id' attribute of this {@link FluxBound} object. 158 <p> 159 * @return the value of the 'id' attribute of this {@link FluxBound} object. 160 */ public 161 String getId() { 162 return libsbmlJNI.FluxBound_getId(swigCPtr, this); 163 } 164 165 166/** 167 * Predicate returning <code>true</code> if this {@link FluxBound}'s 'id' attribute is set. 168 <p> 169 * @return <code>true</code> if this {@link FluxBound} object's 'id' attribute has been set, 170 * otherwise <code>false</code> is returned. 171 */ public 172 boolean isSetId() { 173 return libsbmlJNI.FluxBound_isSetId(swigCPtr, this); 174 } 175 176 177/** 178 * Sets the value of the 'id' attribute of this {@link FluxBound} object. 179 <p> 180 * <p> 181 * @return integer value indicating success/failure of the 182 * function. The possible values 183 * returned by this function are: 184 * <ul> 185 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 186 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 187 * </ul> 188 */ public 189 int setId(String id) { 190 return libsbmlJNI.FluxBound_setId(swigCPtr, this, id); 191 } 192 193 194/** 195 * Unsets the value of the 'id' attribute of this {@link FluxBound} object. 196 <p> 197 * <p> 198 * @return integer value indicating success/failure of the 199 * function. The possible values 200 * returned by this function are: 201 * <ul> 202 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 203 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 204 * </ul> 205 */ public 206 int unsetId() { 207 return libsbmlJNI.FluxBound_unsetId(swigCPtr, this); 208 } 209 210 211/** 212 * Returns the value of the 'name' attribute of this {@link FluxBound} object. 213 <p> 214 * @return the value of the 'name' attribute of this {@link FluxBound} object. 215 */ public 216 String getName() { 217 return libsbmlJNI.FluxBound_getName(swigCPtr, this); 218 } 219 220 221/** 222 * Predicate returning <code>true</code> if this {@link FluxBound}'s 'name' attribute is set. 223 <p> 224 * @return <code>true</code> if this {@link FluxBound} object's 'id' attribute has been set, 225 * otherwise <code>false</code> is returned. 226 */ public 227 boolean isSetName() { 228 return libsbmlJNI.FluxBound_isSetName(swigCPtr, this); 229 } 230 231 232/** 233 * Sets the value of the 'name' attribute of this {@link FluxBound} object. 234 <p> 235 * <p> 236 * @return integer value indicating success/failure of the 237 * function. The possible values 238 * returned by this function are: 239 * <ul> 240 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 241 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 242 * </ul> 243 */ public 244 int setName(String name) { 245 return libsbmlJNI.FluxBound_setName(swigCPtr, this, name); 246 } 247 248 249/** 250 * Unsets the value of the 'name' attribute of this {@link FluxBound} object. 251 <p> 252 * <p> 253 * @return integer value indicating success/failure of the 254 * function. The possible values 255 * returned by this function are: 256 * <ul> 257 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 258 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 259 * </ul> 260 */ public 261 int unsetName() { 262 return libsbmlJNI.FluxBound_unsetName(swigCPtr, this); 263 } 264 265 266/** 267 * Returns the value of the 'reaction' attribute of this {@link FluxBound} object. 268 <p> 269 * @return the value of the 'reaction' attribute of this {@link FluxBound} object. 270 */ public 271 String getReaction() { 272 return libsbmlJNI.FluxBound_getReaction(swigCPtr, this); 273 } 274 275 276/** 277 * Predicate returning <code>true</code> if this {@link FluxBound}'s 'reaction' attribute is 278 * set. 279 <p> 280 * @return <code>true</code> if this {@link FluxBound} object's 'reaction' attribute has been 281 * set, otherwise <code>false</code> is returned. 282 */ public 283 boolean isSetReaction() { 284 return libsbmlJNI.FluxBound_isSetReaction(swigCPtr, this); 285 } 286 287 288/** 289 * Sets the value of the 'reaction' attribute of this {@link FluxBound} object. 290 <p> 291 * <p> 292 * @return integer value indicating success/failure of the 293 * function. The possible values 294 * returned by this function are: 295 * <ul> 296 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 297 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 298 * </ul> 299 */ public 300 int setReaction(String reaction) { 301 return libsbmlJNI.FluxBound_setReaction(swigCPtr, this, reaction); 302 } 303 304 305/** 306 * Unsets the value of the 'reaction' attribute of this {@link FluxBound} object. 307 <p> 308 * <p> 309 * @return integer value indicating success/failure of the 310 * function. The possible values 311 * returned by this function are: 312 * <ul> 313 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 314 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 315 * </ul> 316 */ public 317 int unsetReaction() { 318 return libsbmlJNI.FluxBound_unsetReaction(swigCPtr, this); 319 } 320 321 322/** 323 * Returns the value of the 'operation' attribute of this {@link FluxBound} object. 324 <p> 325 * @return the value of the 'operation' attribute of this {@link FluxBound} object. 326 */ public 327 String getOperation() { 328 return libsbmlJNI.FluxBound_getOperation(swigCPtr, this); 329 } 330 331 332/** 333 * Returns the value of the 'operation' attribute of this {@link FluxBound} object. 334 <p> 335 * @return the value of the 'operation' attribute of this {@link FluxBound} object. 336 */ public 337 int getFluxBoundOperation() { 338 return libsbmlJNI.FluxBound_getFluxBoundOperation(swigCPtr, this); 339 } 340 341 342/** 343 * Predicate returning <code>true</code> if this {@link FluxBound}'s 'operation' attribute is 344 * set. 345 <p> 346 * @return <code>true</code> if this {@link FluxBound} object's 'operation' attribute has been set, 347 * otherwise <code>false</code> is returned. 348 */ public 349 boolean isSetOperation() { 350 return libsbmlJNI.FluxBound_isSetOperation(swigCPtr, this); 351 } 352 353 354/** 355 * Sets the value of the 'operation' attribute of this {@link FluxBound} object. 356 <p> 357 * <p> 358 * @return integer value indicating success/failure of the 359 * function. The possible values 360 * returned by this function are: 361 * <ul> 362 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 363 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 364 * </ul> 365 */ public 366 int setOperation(String operation) { 367 return libsbmlJNI.FluxBound_setOperation__SWIG_0(swigCPtr, this, operation); 368 } 369 370 371/** 372 * Sets the value of the 'operation' attribute of this {@link FluxBound} object. 373 <p> 374 * <p> 375 * @return integer value indicating success/failure of the 376 * function. The possible values 377 * returned by this function are: 378 * <ul> 379 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 380 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 381 * </ul> 382 */ public 383 int setOperation(int operation) { 384 return libsbmlJNI.FluxBound_setOperation__SWIG_1(swigCPtr, this, operation); 385 } 386 387 388/** 389 * Unsets the value of the 'operation' attribute of this {@link FluxBound} object. 390 <p> 391 * <p> 392 * @return integer value indicating success/failure of the 393 * function. The possible values 394 * returned by this function are: 395 * <ul> 396 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 397 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 398 * </ul> 399 */ public 400 int unsetOperation() { 401 return libsbmlJNI.FluxBound_unsetOperation(swigCPtr, this); 402 } 403 404 405/** 406 * Returns the value of the 'value' attribute of this {@link FluxBound} object. 407 <p> 408 * @return the value of the 'value' attribute of this {@link FluxBound} object. 409 */ public 410 double getValue() { 411 return libsbmlJNI.FluxBound_getValue(swigCPtr, this); 412 } 413 414 415/** 416 * Predicate returning <code>true</code> if this {@link FluxBound}'s 'value' attribute is 417 * set. 418 <p> 419 * @return <code>true</code> if this {@link FluxBound} object's 'value' attribute has been set, 420 * otherwise <code>false</code> is returned. 421 */ public 422 boolean isSetValue() { 423 return libsbmlJNI.FluxBound_isSetValue(swigCPtr, this); 424 } 425 426 427/** 428 * Sets the value of the 'value' attribute of this {@link FluxBound} object. 429 <p> 430 * <p> 431 * @return integer value indicating success/failure of the 432 * function. The possible values 433 * returned by this function are: 434 * <ul> 435 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 436 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 437 * </ul> 438 */ public 439 int setValue(double value) { 440 return libsbmlJNI.FluxBound_setValue(swigCPtr, this, value); 441 } 442 443 444/** 445 * Unsets the value of the 'value' attribute of this {@link FluxBound} object. 446 <p> 447 * <p> 448 * @return integer value indicating success/failure of the 449 * function. The possible values 450 * returned by this function are: 451 * <ul> 452 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 453 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 454 * </ul> 455 */ public 456 int unsetValue() { 457 return libsbmlJNI.FluxBound_unsetValue(swigCPtr, this); 458 } 459 460 461/** 462 * <p> 463 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another 464 * value. 465 <p> 466 * <p> 467 * In SBML, object identifiers are of a data type called <code>SId</code>. 468 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 469 * introduced for attribute values that refer to <code>SId</code> values; in 470 * previous Levels of SBML, this data type did not exist and attributes were 471 * simply described to as 'referring to an identifier', but the effective 472 * data type was the same as <code>SIdRef</code>in Level 3. These and 473 * other methods of libSBML refer to the type <code>SIdRef</code> for all 474 * Levels of SBML, even if the corresponding SBML specification did not 475 * explicitly name the data type. 476 <p> 477 * This method works by looking at all attributes and (if appropriate) 478 * mathematical formulas in MathML content, comparing the referenced 479 * identifiers to the value of <code>oldid</code>. If any matches are found, the 480 * matching values are replaced with <code>newid</code>. The method does <em>not</em> 481 * descend into child elements. 482 <p> 483 * @param oldid the old identifier 484 * @param newid the new identifier 485 */ public 486 void renameSIdRefs(String oldid, String newid) { 487 libsbmlJNI.FluxBound_renameSIdRefs(swigCPtr, this, oldid, newid); 488 } 489 490 491/** 492 * Returns the XML element name of this object. 493 <p> 494 * For {@link FluxBound}, the XML element name is always <code>'fluxBound'.</code> 495 <p> 496 * @return the name of this element, i.e. <code>'fluxBound'.</code> 497 */ public 498 String getElementName() { 499 return libsbmlJNI.FluxBound_getElementName(swigCPtr, this); 500 } 501 502 503/** 504 * Creates and returns a deep copy of this {@link FluxBound} object. 505 <p> 506 * @return a (deep) copy of this {@link FluxBound} object. 507 */ public 508 FluxBound cloneObject() { 509 long cPtr = libsbmlJNI.FluxBound_cloneObject(swigCPtr, this); 510 return (cPtr == 0) ? null : new FluxBound(cPtr, true); 511 } 512 513 514/** 515 * Returns the libSBML type code of this object instance. 516 <p> 517 * <p> 518 * LibSBML attaches an identifying code to every kind of SBML object. These 519 * are integer constants known as <em>SBML type codes</em>. The names of all 520 * the codes begin with the characters <code>SBML_</code>. 521 * In the Java language interface for libSBML, the 522 * type codes are defined as static integer constants in the interface class 523 * {@link libsbmlConstants}. Note that different Level 3 524 * package plug-ins may use overlapping type codes; to identify the package 525 * to which a given object belongs, call the <code>getPackageName()</code> 526 * method on the object. 527 <p> 528 * @return the SBML type code for this object: 529 * {@link libsbmlConstants#SBML_FBC_FLUXBOUND SBML_FBC_FLUXBOUND} 530 <p> 531 * <p> 532 * @warning <span class='warning'>The specific integer values of the possible 533 * type codes may be reused by different Level 3 package plug-ins. 534 * Thus, to identifiy the correct code, <strong>it is necessary to invoke 535 * both getTypeCode() and getPackageName()</strong>.</span> 536 <p> 537 * @see #getElementName() 538 * @see #getPackageName() 539 */ public 540 int getTypeCode() { 541 return libsbmlJNI.FluxBound_getTypeCode(swigCPtr, this); 542 } 543 544 545/** * @internal */ public 546 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 547 libsbmlJNI.FluxBound_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 548 } 549 550 551/** * @internal */ public 552 boolean hasRequiredElements() { 553 return libsbmlJNI.FluxBound_hasRequiredElements(swigCPtr, this); 554 } 555 556}