001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.12 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011/** 012 * <span class="pkg-marker pkg-color-fbc"><a href="group__fbc.html">fbc</a></span> 013 Extension of {@link Reaction} by the “fbc” package. 014 <p> 015 * The {@link FbcReactionPlugin} class inherits from the {@link SBasePlugin} class, and 016 * codifies the extentions to the {@link Reaction} class defined in the <a href='../../../extensions-summary.html#fbc'>Flux Balance Constraints</a> 017 * package (“fbc”). This extention allows the modeler to define 018 * (in Version 2 of the “fbc” package) an upper and lower 019 * flux bound, with the 'upperFluxBound' and 'lowerFluxBound' attributes, 020 * as well as a way to reference any {@link GeneProduct} associated with 021 * this {@link Reaction}, through the {@link GeneProductAssociation} child. 022 <p> 023 * @note In Version 1 of “fbc”, the {@link FluxBound} element is 024 * used instead of the 'upperFluxBound' and 'lowerFluxBound' attributes. 025 * There is no equivalent of the {@link GeneProductAssociation}, which was added 026 * in Version 2. 027 */ 028 029public class FbcReactionPlugin extends SBasePlugin { 030 private long swigCPtr; 031 032 protected FbcReactionPlugin(long cPtr, boolean cMemoryOwn) 033 { 034 super(libsbmlJNI.FbcReactionPlugin_SWIGUpcast(cPtr), cMemoryOwn); 035 swigCPtr = cPtr; 036 } 037 038 protected static long getCPtr(FbcReactionPlugin obj) 039 { 040 return (obj == null) ? 0 : obj.swigCPtr; 041 } 042 043 protected static long getCPtrAndDisown (FbcReactionPlugin obj) 044 { 045 long ptr = 0; 046 047 if (obj != null) 048 { 049 ptr = obj.swigCPtr; 050 obj.swigCMemOwn = false; 051 } 052 053 return ptr; 054 } 055 056 protected void finalize() { 057 delete(); 058 } 059 060 public synchronized void delete() { 061 if (swigCPtr != 0) { 062 if (swigCMemOwn) { 063 swigCMemOwn = false; 064 libsbmlJNI.delete_FbcReactionPlugin(swigCPtr); 065 } 066 swigCPtr = 0; 067 } 068 super.delete(); 069 } 070 071 072/** 073 * Creates a new {@link FbcReactionPlugin} object using the given parameters. 074 <p> 075 * <p> 076 * In the XML representation of an SBML document, XML namespaces are used to 077 * identify the origin of each XML construct used. XML namespaces are 078 * identified by their unique resource identifiers (URIs). The core SBML 079 * specifications stipulate the namespaces that must be used for core SBML 080 * constructs; for example, all XML elements that belong to SBML Level 3 081 * Version 1 Core must be placed in the XML namespace identified by the URI 082 * <code>'http://www.sbml.org/sbml/level3/version1/core'</code>. Individual 083 * SBML Level 3 packages define their own XML namespaces; for example, 084 * all elements belonging to the SBML Level 3 Layout Version 1 085 * package must be placed in the XML namespace 086 * <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>. 087 <p> 088 * <p> 089 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces 090 * information. It is used to communicate the SBML Level, Version, and (in 091 * Level 3) packages used in addition to SBML Level 3 Core. A 092 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an 093 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object 094 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments. 095 <p> 096 * @param uri the URI of the SBML Level 3 package implemented by 097 * this libSBML package extension. 098 <p> 099 * @param prefix the XML namespace prefix being used for the package. 100 <p> 101 * @param fbcns the namespaces object for the package. 102 */ public 103 FbcReactionPlugin(String uri, String prefix, FbcPkgNamespaces fbcns) { 104 this(libsbmlJNI.new_FbcReactionPlugin__SWIG_0(uri, prefix, FbcPkgNamespaces.getCPtr(fbcns), fbcns), true); 105 } 106 107 108/** 109 * Copy constructor for {@link FbcReactionPlugin}. 110 <p> 111 * @param orig the {@link FbcReactionPlugin} instance to copy. 112 */ public 113 FbcReactionPlugin(FbcReactionPlugin orig) { 114 this(libsbmlJNI.new_FbcReactionPlugin__SWIG_1(FbcReactionPlugin.getCPtr(orig), orig), true); 115 } 116 117 118/** 119 * Creates and returns a deep copy of this {@link FbcReactionPlugin} object. 120 <p> 121 * @return a (deep) copy of this {@link FbcReactionPlugin} object. 122 */ public 123 SBasePlugin cloneObject() { 124 long cPtr = libsbmlJNI.FbcReactionPlugin_cloneObject(swigCPtr, this); 125 return (cPtr == 0) ? null : new FbcReactionPlugin(cPtr, true); 126 } 127 128 129/** * @internal */ public 130 SBase createObject(XMLInputStream stream) { 131 return libsbml.DowncastSBase(libsbmlJNI.FbcReactionPlugin_createObject(swigCPtr, this, XMLInputStream.getCPtr(stream), stream), false); 132} 133 134 135/** * @internal */ public 136 void addExpectedAttributes(SWIGTYPE_p_ExpectedAttributes attributes) { 137 libsbmlJNI.FbcReactionPlugin_addExpectedAttributes(swigCPtr, this, SWIGTYPE_p_ExpectedAttributes.getCPtr(attributes)); 138 } 139 140 141/** 142 * <p> 143 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another 144 * value. 145 <p> 146 * <p> 147 * In SBML, object identifiers are of a data type called <code>SId</code>. 148 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 149 * introduced for attribute values that refer to <code>SId</code> values; in 150 * previous Levels of SBML, this data type did not exist and attributes were 151 * simply described to as 'referring to an identifier', but the effective 152 * data type was the same as <code>SIdRef</code> in Level 3. These and 153 * other methods of libSBML refer to the type <code>SIdRef</code> for all 154 * Levels of SBML, even if the corresponding SBML specification did not 155 * explicitly name the data type. 156 <p> 157 * This method works by looking at all attributes and (if appropriate) 158 * mathematical formulas in MathML content, comparing the referenced 159 * identifiers to the value of <code>oldid</code>. If any matches are found, the 160 * matching values are replaced with <code>newid</code>. The method does <em>not</em> 161 * descend into child elements. 162 <p> 163 * @param oldid the old identifier. 164 * @param newid the new identifier. 165 */ public 166 void renameSIdRefs(String oldid, String newid) { 167 libsbmlJNI.FbcReactionPlugin_renameSIdRefs(swigCPtr, this, oldid, newid); 168 } 169 170 171/** * @internal */ public 172 void readAttributes(XMLAttributes attributes, SWIGTYPE_p_ExpectedAttributes expectedAttributes) { 173 libsbmlJNI.FbcReactionPlugin_readAttributes(swigCPtr, this, XMLAttributes.getCPtr(attributes), attributes, SWIGTYPE_p_ExpectedAttributes.getCPtr(expectedAttributes)); 174 } 175 176 177/** * @internal */ public 178 void writeAttributes(XMLOutputStream stream) { 179 libsbmlJNI.FbcReactionPlugin_writeAttributes(swigCPtr, this, XMLOutputStream.getCPtr(stream), stream); 180 } 181 182 183/** 184 * Returns the {@link GeneProductAssociation} from this {@link FbcReactionPlugin} object. 185 <p> 186 * <p> 187 * @note {@link GeneProduct} objects are only defined for version 2 188 * of the 'Flux Balance Constraints' specification, and have no 189 * equivalent in version 1 of the specification. 190 <p> 191 * @return the {@link GeneProductAssociation} from object in this {@link FbcReactionPlugin} object. 192 */ public 193 GeneProductAssociation getGeneProductAssociation() { 194 long cPtr = libsbmlJNI.FbcReactionPlugin_getGeneProductAssociation__SWIG_0(swigCPtr, this); 195 return (cPtr == 0) ? null : new GeneProductAssociation(cPtr, false); 196 } 197 198 199/** 200 * Predicate returning <code>true</code> if this {@link FbcReactionPlugin}'s 201 * 'GeneProductAssociation' element has been set. 202 <p> 203 * <p> 204 * @note {@link GeneProduct} objects are only defined for version 2 205 * of the 'Flux Balance Constraints' specification, and have no 206 * equivalent in version 1 of the specification. 207 <p> 208 * @return <code>true</code> if the 'GeneProductAssociation' element has been set, 209 * otherwise <code>false</code> is returned. 210 */ public 211 boolean isSetGeneProductAssociation() { 212 return libsbmlJNI.FbcReactionPlugin_isSetGeneProductAssociation(swigCPtr, this); 213 } 214 215 216/** 217 * Sets the {@link GeneProductAssociation} element in this {@link FbcReactionPlugin} object. 218 <p> 219 * <p> 220 * @note {@link GeneProduct} objects are only defined for version 2 221 * of the 'Flux Balance Constraints' specification, and have no 222 * equivalent in version 1 of the specification. 223 <p> 224 * @param geneProductAssociation the geneProductAssociation to be set. 225 <p> 226 * <p> 227 * @return integer value indicating success/failure of the 228 * function. The possible values 229 * returned by this function are: 230 * <ul> 231 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 232 * </ul> 233 */ public 234 int setGeneProductAssociation(GeneProductAssociation geneProductAssociation) { 235 return libsbmlJNI.FbcReactionPlugin_setGeneProductAssociation(swigCPtr, this, GeneProductAssociation.getCPtr(geneProductAssociation), geneProductAssociation); 236 } 237 238 239/** 240 * Creates a new {@link GeneProductAssociation} object and adds it to the {@link FbcReactionPlugin} object. 241 <p> 242 * <p> 243 * @note {@link GeneProduct} objects are only defined for version 2 244 * of the 'Flux Balance Constraints' specification, and have no 245 * equivalent in version 1 of the specification. 246 <p> 247 * @return the newly created {@link GeneProductAssociation} object. 248 */ public 249 GeneProductAssociation createGeneProductAssociation() { 250 long cPtr = libsbmlJNI.FbcReactionPlugin_createGeneProductAssociation(swigCPtr, this); 251 return (cPtr == 0) ? null : new GeneProductAssociation(cPtr, false); 252 } 253 254 255/** 256 * Returns the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin}. 257 <p> 258 * <p> 259 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 260 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 261 * Balance Constraints' specification. In version 1, this information 262 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 263 <p> 264 * @return the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin} as a string. 265 */ public 266 String getLowerFluxBound() { 267 return libsbmlJNI.FbcReactionPlugin_getLowerFluxBound(swigCPtr, this); 268 } 269 270 271/** 272 * Returns the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin}. 273 <p> 274 * <p> 275 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 276 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 277 * Balance Constraints' specification. In version 1, this information 278 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 279 <p> 280 * @return the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin} as a string. 281 */ public 282 String getUpperFluxBound() { 283 return libsbmlJNI.FbcReactionPlugin_getUpperFluxBound(swigCPtr, this); 284 } 285 286 287/** 288 * Predicate returning <code>true</code> if this {@link FbcReactionPlugin}'s 'lowerFluxBound' 289 * attribute is set. 290 <p> 291 * <p> 292 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 293 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 294 * Balance Constraints' specification. In version 1, this information 295 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 296 <p> 297 * @return <code>true</code> if this {@link FbcReactionPlugin}'s 'lowerFluxBound' attribute has been set, 298 * otherwise <code>false</code> is returned. 299 */ public 300 boolean isSetLowerFluxBound() { 301 return libsbmlJNI.FbcReactionPlugin_isSetLowerFluxBound(swigCPtr, this); 302 } 303 304 305/** 306 * Predicate returning <code>true</code> if this {@link FbcReactionPlugin}'s 'upperFluxBound' 307 * attribute is set. 308 <p> 309 * <p> 310 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 311 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 312 * Balance Constraints' specification. In version 1, this information 313 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 314 <p> 315 * @return <code>true</code> if this {@link FbcReactionPlugin}'s 'upperFluxBound' attribute has been set, 316 * otherwise <code>false</code> is returned. 317 */ public 318 boolean isSetUpperFluxBound() { 319 return libsbmlJNI.FbcReactionPlugin_isSetUpperFluxBound(swigCPtr, this); 320 } 321 322 323/** 324 * Sets the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin}. 325 <p> 326 * <p> 327 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 328 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 329 * Balance Constraints' specification. In version 1, this information 330 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 331 <p> 332 * @param lowerFluxBound the value of the 'lowerFluxBound' attribute to be set. 333 <p> 334 * <p> 335 * @return integer value indicating success/failure of the 336 * function. The possible values 337 * returned by this function are: 338 * <ul> 339 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 340 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 341 * </ul> 342 */ public 343 int setLowerFluxBound(String lowerFluxBound) { 344 return libsbmlJNI.FbcReactionPlugin_setLowerFluxBound(swigCPtr, this, lowerFluxBound); 345 } 346 347 348/** 349 * Sets the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin}. 350 <p> 351 * <p> 352 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 353 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 354 * Balance Constraints' specification. In version 1, this information 355 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 356 <p> 357 * @param upperFluxBound the value of the 'upperFluxBound' attribute to be set. 358 <p> 359 * <p> 360 * @return integer value indicating success/failure of the 361 * function. The possible values 362 * returned by this function are: 363 * <ul> 364 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 365 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 366 * </ul> 367 */ public 368 int setUpperFluxBound(String upperFluxBound) { 369 return libsbmlJNI.FbcReactionPlugin_setUpperFluxBound(swigCPtr, this, upperFluxBound); 370 } 371 372 373/** 374 * Unsets the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin}. 375 <p> 376 * <p> 377 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 378 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 379 * Balance Constraints' specification. In version 1, this information 380 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 381 <p> 382 * <p> 383 * @return integer value indicating success/failure of the 384 * function. The possible values 385 * returned by this function are: 386 * <ul> 387 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 388 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 389 * </ul> 390 */ public 391 int unsetLowerFluxBound() { 392 return libsbmlJNI.FbcReactionPlugin_unsetLowerFluxBound(swigCPtr, this); 393 } 394 395 396/** 397 * Unsets the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin}. 398 <p> 399 * <p> 400 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 401 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 402 * Balance Constraints' specification. In version 1, this information 403 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 404 <p> 405 * <p> 406 * @return integer value indicating success/failure of the 407 * function. The possible values 408 * returned by this function are: 409 * <ul> 410 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 411 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 412 * </ul> 413 */ public 414 int unsetUpperFluxBound() { 415 return libsbmlJNI.FbcReactionPlugin_unsetUpperFluxBound(swigCPtr, this); 416 } 417 418 419/** 420 * Unsets the the 'geneProduct' element of this {@link FbcReactionPlugin}. 421 <p> 422 * <p> 423 * @note The 'upperFluxBound' and 'lowerFluxBound' attributes of the 424 * {@link FbcReactionPlugin} are only defined for version 2 of the 'Flux 425 * Balance Constraints' specification. In version 1, this information 426 * was encoded in the {@link FluxBound} children of the {@link FbcModelPlugin}. 427 <p> 428 * <p> 429 * @return integer value indicating success/failure of the 430 * function. The possible values 431 * returned by this function are: 432 * <ul> 433 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 434 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 435 * </ul> 436 */ public 437 int unsetGeneProductAssociation() { 438 return libsbmlJNI.FbcReactionPlugin_unsetGeneProductAssociation(swigCPtr, this); 439 } 440 441 442/** * @internal */ public 443 void connectToParent(SBase sbase) { 444 libsbmlJNI.FbcReactionPlugin_connectToParent(swigCPtr, this, SBase.getCPtr(sbase), sbase); 445 } 446 447 448/** * @internal */ public 449 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 450 libsbmlJNI.FbcReactionPlugin_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 451 } 452 453}