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 * <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 extensions to the {@link Reaction} class defined in the <a href='../../../extensions-summary.html#fbc'>Flux Balance Constraints</a> 017 * package (“fbc”). This extension allows the modeler to define 018 * (in Version 2 of the “fbc” package) an upper and lower 019 * flux bound, as well as a way to reference any {@link GeneProduct} associated with 020 * this {@link Reaction}. 021 <p> 022 * @note In Version 1 of “fbc”, the {@link FluxBound} element is 023 * used instead of this object. 024 */ 025 026public class FbcReactionPlugin extends SBasePlugin { 027 private long swigCPtr; 028 029 protected FbcReactionPlugin(long cPtr, boolean cMemoryOwn) 030 { 031 super(libsbmlJNI.FbcReactionPlugin_SWIGUpcast(cPtr), cMemoryOwn); 032 swigCPtr = cPtr; 033 } 034 035 protected static long getCPtr(FbcReactionPlugin obj) 036 { 037 return (obj == null) ? 0 : obj.swigCPtr; 038 } 039 040 protected static long getCPtrAndDisown (FbcReactionPlugin obj) 041 { 042 long ptr = 0; 043 044 if (obj != null) 045 { 046 ptr = obj.swigCPtr; 047 obj.swigCMemOwn = false; 048 } 049 050 return ptr; 051 } 052 053 protected void finalize() { 054 delete(); 055 } 056 057 public synchronized void delete() { 058 if (swigCPtr != 0) { 059 if (swigCMemOwn) { 060 swigCMemOwn = false; 061 libsbmlJNI.delete_FbcReactionPlugin(swigCPtr); 062 } 063 swigCPtr = 0; 064 } 065 super.delete(); 066 } 067 068 069/** 070 * Creates a new {@link FbcReactionPlugin} 071 */ public 072 FbcReactionPlugin(String uri, String prefix, FbcPkgNamespaces fbcns) { 073 this(libsbmlJNI.new_FbcReactionPlugin__SWIG_0(uri, prefix, FbcPkgNamespaces.getCPtr(fbcns), fbcns), true); 074 } 075 076 077/** 078 * Copy constructor for {@link FbcReactionPlugin}. 079 <p> 080 * @param orig; the {@link FbcReactionPlugin} instance to copy. 081 */ public 082 FbcReactionPlugin(FbcReactionPlugin orig) { 083 this(libsbmlJNI.new_FbcReactionPlugin__SWIG_1(FbcReactionPlugin.getCPtr(orig), orig), true); 084 } 085 086 087/** 088 * Creates and returns a deep copy of this {@link FbcReactionPlugin} object. 089 <p> 090 * @return a (deep) copy of this {@link FbcReactionPlugin} object. 091 */ public 092 SBasePlugin cloneObject() { 093 long cPtr = libsbmlJNI.FbcReactionPlugin_cloneObject(swigCPtr, this); 094 return (cPtr == 0) ? null : new FbcReactionPlugin(cPtr, true); 095 } 096 097 098/** * @internal */ public 099 SBase createObject(XMLInputStream stream) { 100 return libsbml.DowncastSBase(libsbmlJNI.FbcReactionPlugin_createObject(swigCPtr, this, XMLInputStream.getCPtr(stream), stream), false); 101} 102 103 104/** * @internal */ public 105 void addExpectedAttributes(SWIGTYPE_p_ExpectedAttributes attributes) { 106 libsbmlJNI.FbcReactionPlugin_addExpectedAttributes(swigCPtr, this, SWIGTYPE_p_ExpectedAttributes.getCPtr(attributes)); 107 } 108 109 110/** 111 * <p> 112 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another 113 * value. 114 <p> 115 * <p> 116 * In SBML, object identifiers are of a data type called <code>SId</code>. 117 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 118 * introduced for attribute values that refer to <code>SId</code> values; in 119 * previous Levels of SBML, this data type did not exist and attributes were 120 * simply described to as 'referring to an identifier', but the effective 121 * data type was the same as <code>SIdRef</code>in Level 3. These and 122 * other methods of libSBML refer to the type <code>SIdRef</code> for all 123 * Levels of SBML, even if the corresponding SBML specification did not 124 * explicitly name the data type. 125 <p> 126 * This method works by looking at all attributes and (if appropriate) 127 * mathematical formulas in MathML content, comparing the referenced 128 * identifiers to the value of <code>oldid</code>. If any matches are found, the 129 * matching values are replaced with <code>newid</code>. The method does <em>not</em> 130 * descend into child elements. 131 <p> 132 * @param oldid the old identifier 133 * @param newid the new identifier 134 */ public 135 void renameSIdRefs(String oldid, String newid) { 136 libsbmlJNI.FbcReactionPlugin_renameSIdRefs(swigCPtr, this, oldid, newid); 137 } 138 139 140/** * @internal */ public 141 void readAttributes(XMLAttributes attributes, SWIGTYPE_p_ExpectedAttributes expectedAttributes) { 142 libsbmlJNI.FbcReactionPlugin_readAttributes(swigCPtr, this, XMLAttributes.getCPtr(attributes), attributes, SWIGTYPE_p_ExpectedAttributes.getCPtr(expectedAttributes)); 143 } 144 145 146/** * @internal */ public 147 void writeAttributes(XMLOutputStream stream) { 148 libsbmlJNI.FbcReactionPlugin_writeAttributes(swigCPtr, this, XMLOutputStream.getCPtr(stream), stream); 149 } 150 151 152/** 153 * Returns the {@link GeneProductAssociation} from this {@link FbcReactionPlugin} object. 154 <p> 155 * @return the {@link GeneProductAssociation} from object in this {@link FbcReactionPlugin} object. 156 */ public 157 GeneProductAssociation getGeneProductAssociation() { 158 long cPtr = libsbmlJNI.FbcReactionPlugin_getGeneProductAssociation__SWIG_0(swigCPtr, this); 159 return (cPtr == 0) ? null : new GeneProductAssociation(cPtr, false); 160 } 161 162 163/** 164 * Predicate returning <code>true</code> if this {@link FbcReactionPlugin}'s 165 * 'GeneProductAssociation' element has been set. 166 <p> 167 * @return <code>true</code> if the 'GeneProductAssociation' element has been set, 168 * otherwise <code>false</code> is returned. 169 */ public 170 boolean isSetGeneProductAssociation() { 171 return libsbmlJNI.FbcReactionPlugin_isSetGeneProductAssociation(swigCPtr, this); 172 } 173 174 175/** 176 * Sets the {@link GeneProductAssociation} element in this {@link FbcReactionPlugin} object. 177 <p> 178 * @param geneProductAssociation the geneProductAssociation to be set. 179 <p> 180 * @return integer value indicating success/failure of the 181 * function. The possible values 182 * returned by this function are: 183 * <ul> 184 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 185 * </ul> 186 */ public 187 int setGeneProductAssociation(GeneProductAssociation geneProductAssociation) { 188 return libsbmlJNI.FbcReactionPlugin_setGeneProductAssociation(swigCPtr, this, GeneProductAssociation.getCPtr(geneProductAssociation), geneProductAssociation); 189 } 190 191 192/** 193 * Creates a new {@link GeneProductAssociation} object and adds it to the {@link FbcReactionPlugin} object. 194 <p> 195 * @return the newly created {@link GeneProductAssociation} object. 196 */ public 197 GeneProductAssociation createGeneProductAssociation() { 198 long cPtr = libsbmlJNI.FbcReactionPlugin_createGeneProductAssociation(swigCPtr, this); 199 return (cPtr == 0) ? null : new GeneProductAssociation(cPtr, false); 200 } 201 202 203/** 204 * Returns the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin}. 205 <p> 206 * @return the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin} as a string. 207 */ public 208 String getLowerFluxBound() { 209 return libsbmlJNI.FbcReactionPlugin_getLowerFluxBound(swigCPtr, this); 210 } 211 212 213/** 214 * Returns the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin}. 215 <p> 216 * @return the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin} as a string. 217 */ public 218 String getUpperFluxBound() { 219 return libsbmlJNI.FbcReactionPlugin_getUpperFluxBound(swigCPtr, this); 220 } 221 222 223/** 224 * Predicate returning <code>true</code> if this {@link FbcReactionPlugin}'s 'lowerFluxBound' 225 * attribute is set. 226 <p> 227 * @return <code>true</code> if this {@link FbcReactionPlugin}'s 'lowerFluxBound' attribute has been set, 228 * otherwise <code>false</code> is returned. 229 */ public 230 boolean isSetLowerFluxBound() { 231 return libsbmlJNI.FbcReactionPlugin_isSetLowerFluxBound(swigCPtr, this); 232 } 233 234 235/** 236 * Predicate returning <code>true</code> if this {@link FbcReactionPlugin}'s 'upperFluxBound' 237 * attribute is set. 238 <p> 239 * @return <code>true</code> if this {@link FbcReactionPlugin}'s 'upperFluxBound' attribute has been set, 240 * otherwise <code>false</code> is returned. 241 */ public 242 boolean isSetUpperFluxBound() { 243 return libsbmlJNI.FbcReactionPlugin_isSetUpperFluxBound(swigCPtr, this); 244 } 245 246 247/** 248 * Sets the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin}. 249 <p> 250 * @param lowerFluxBound; String value of the 'lowerFluxBound' attribute to be set 251 <p> 252 * @return integer value indicating success/failure of the 253 * function. The possible values 254 * returned by this function are: 255 * <ul> 256 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 257 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 258 * </ul> 259 */ public 260 int setLowerFluxBound(String lowerFluxBound) { 261 return libsbmlJNI.FbcReactionPlugin_setLowerFluxBound(swigCPtr, this, lowerFluxBound); 262 } 263 264 265/** 266 * Sets the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin}. 267 <p> 268 * @param upperFluxBound; String value of the 'upperFluxBound' attribute to be set 269 <p> 270 * @return integer value indicating success/failure of the 271 * function. The possible values 272 * returned by this function are: 273 * <ul> 274 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 275 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 276 * </ul> 277 */ public 278 int setUpperFluxBound(String upperFluxBound) { 279 return libsbmlJNI.FbcReactionPlugin_setUpperFluxBound(swigCPtr, this, upperFluxBound); 280 } 281 282 283/** 284 * Unsets the value of the 'lowerFluxBound' attribute of this {@link FbcReactionPlugin}. 285 <p> 286 * @return integer value indicating success/failure of the 287 * function. The possible values 288 * returned by this function are: 289 * <ul> 290 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 291 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 292 * </ul> 293 */ public 294 int unsetLowerFluxBound() { 295 return libsbmlJNI.FbcReactionPlugin_unsetLowerFluxBound(swigCPtr, this); 296 } 297 298 299/** 300 * Unsets the value of the 'upperFluxBound' attribute of this {@link FbcReactionPlugin}. 301 <p> 302 * @return integer value indicating success/failure of the 303 * function. The possible values 304 * returned by this function are: 305 * <ul> 306 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 307 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 308 * </ul> 309 */ public 310 int unsetUpperFluxBound() { 311 return libsbmlJNI.FbcReactionPlugin_unsetUpperFluxBound(swigCPtr, this); 312 } 313 314 315/** 316 * Unsets the the 'geneProduct' element of this {@link FbcReactionPlugin}. 317 <p> 318 * @return integer value indicating success/failure of the 319 * function. The possible values 320 * returned by this function are: 321 * <ul> 322 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 323 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 324 * </ul> 325 */ public 326 int unsetGeneProductAssociation() { 327 return libsbmlJNI.FbcReactionPlugin_unsetGeneProductAssociation(swigCPtr, this); 328 } 329 330 331/** * @internal */ public 332 void connectToParent(SBase sbase) { 333 libsbmlJNI.FbcReactionPlugin_connectToParent(swigCPtr, this, SBase.getCPtr(sbase), sbase); 334 } 335 336 337/** * @internal */ public 338 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 339 libsbmlJNI.FbcReactionPlugin_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 340 } 341 342}