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