001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 2.0.11 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 011public class FluxObjective extends SBase { 012 private long swigCPtr; 013 014 protected FluxObjective(long cPtr, boolean cMemoryOwn) 015 { 016 super(libsbmlJNI.FluxObjective_SWIGUpcast(cPtr), cMemoryOwn); 017 swigCPtr = cPtr; 018 } 019 020 protected static long getCPtr(FluxObjective obj) 021 { 022 return (obj == null) ? 0 : obj.swigCPtr; 023 } 024 025 protected static long getCPtrAndDisown (FluxObjective obj) 026 { 027 long ptr = 0; 028 029 if (obj != null) 030 { 031 ptr = obj.swigCPtr; 032 obj.swigCMemOwn = false; 033 } 034 035 return ptr; 036 } 037 038 protected void finalize() { 039 delete(); 040 } 041 042 public synchronized void delete() { 043 if (swigCPtr != 0) { 044 if (swigCMemOwn) { 045 swigCMemOwn = false; 046 libsbmlJNI.delete_FluxObjective(swigCPtr); 047 } 048 swigCPtr = 0; 049 } 050 super.delete(); 051 } 052 053 public FluxObjective(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 054 this(libsbmlJNI.new_FluxObjective__SWIG_0(level, version, pkgVersion), true); 055 } 056 057 public FluxObjective(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 058 this(libsbmlJNI.new_FluxObjective__SWIG_1(level, version), true); 059 } 060 061 public FluxObjective(long level) throws org.sbml.libsbml.SBMLConstructorException { 062 this(libsbmlJNI.new_FluxObjective__SWIG_2(level), true); 063 } 064 065 public FluxObjective() throws org.sbml.libsbml.SBMLConstructorException { 066 this(libsbmlJNI.new_FluxObjective__SWIG_3(), true); 067 } 068 069 public FluxObjective(FbcPkgNamespaces fbcns) throws org.sbml.libsbml.SBMLConstructorException { 070 this(libsbmlJNI.new_FluxObjective__SWIG_4(FbcPkgNamespaces.getCPtr(fbcns), fbcns), true); 071 } 072 073 public FluxObjective(FluxObjective source) throws org.sbml.libsbml.SBMLConstructorException { 074 this(libsbmlJNI.new_FluxObjective__SWIG_5(FluxObjective.getCPtr(source), source), true); 075 } 076 077 078/** 079 * Returns the value of the 'metaid' attribute of this object. 080 * <p> 081 * The optional attribute named 'metaid', present on every major SBML 082 * component type, is for supporting metadata annotations using RDF 083 * (Resource Description Format). The attribute value has the data type 084 * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML 085 * identifier type, which means each 'metaid' value must be globally 086 * unique within an SBML file. (Importantly, this uniqueness criterion 087 * applies across any attribute with type <a 088 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the 089 * 'metaid' attribute used by SBML—something to be aware of if your 090 * application-specific XML content inside the 'annotation' subelement 091 * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.) 092 * The 'metaid' value serves to identify a model 093 * component for purposes such as referencing that component from 094 * metadata placed within 'annotation' subelements. 095 * <p> 096 * @return the meta-identifier of this SBML object, as a string. 097 * <p> 098 * @see #isSetMetaId() 099 * @see #setMetaId(String metaid) 100 * @internal 101 */ public 102 String getId() { 103 return libsbmlJNI.FluxObjective_getId(swigCPtr, this); 104 } 105 106 107/** 108 * Predicate returning <code>true</code> if this object's 'metaid' attribute is set. 109 * <p> 110 * The optional attribute named 'metaid', present on every major SBML 111 * component type, is for supporting metadata annotations using RDF 112 * (Resource Description Format). The attribute value has the data type 113 * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML 114 * identifier type, which means each 'metaid' value must be globally 115 * unique within an SBML file. (Importantly, this uniqueness criterion 116 * applies across any attribute with type <a 117 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the 118 * 'metaid' attribute used by SBML—something to be aware of if your 119 * application-specific XML content inside the 'annotation' subelement 120 * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.) 121 * The 'metaid' value serves to identify a model component for purposes 122 * such as referencing that component from metadata placed within 123 * 'annotation' subelements. 124 * <p> 125 * @return <code>true</code> if the 'metaid' attribute of this SBML object is 126 * set, <code>false</code> otherwise. 127 * <p> 128 * @see #getMetaId() 129 * @see #setMetaId(String metaid) 130 * @internal 131 */ public 132 boolean isSetId() { 133 return libsbmlJNI.FluxObjective_isSetId(swigCPtr, this); 134 } 135 136 137/** 138 * Predicate returning <code>true</code> if this 139 * object has a {@link ModelHistory} object attached to it. 140 * <p> 141 * @return <code>true</code> if the {@link ModelHistory} of this object is set, 142 * <code>false</code> otherwise. 143 * <p> 144 * @note In SBML Level 2, model history annotations were only 145 * permitted on the {@link Model} element. In SBML Level 3, they are 146 * permitted on all SBML components derived from {@link SBase}. 147 * @internal 148 */ public 149 int setId(String id) { 150 return libsbmlJNI.FluxObjective_setId(swigCPtr, this, id); 151 } 152 153 154/** 155 * Unsets the value of the 'id' attribute of this SBML object. 156 * <p> 157 * Most (but not all) objects in SBML include two common attributes: 'id' 158 * and 'name'. The identifier given by an object's 'id' attribute value 159 * is used to identify the object within the SBML model definition. 160 * Other objects can refer to the component using this identifier. The 161 * data type of 'id' is always either <code>Sid</code> or 162 * <code>UnitSId</code>, depending on the object in question. Both 163 * data types are defined as follows: 164 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'> 165 * letter .= 'a'..'z','A'..'Z' 166 * digit .= '0'..'9' 167 * idChar .= letter | digit | '_' 168 * SId .= ( letter | '_' ) idChar* 169 * </pre> 170 * <p> 171 * The equality of <code>SId</code> and <code>UnitSId</code> type values 172 * in SBML is determined by an exact character sequence match; i.e., 173 * comparisons of these identifiers must be performed in a case-sensitive 174 * manner. This applies to all uses of <code>SId</code> and 175 * <code>UnitSId</code>. 176 * <p> 177 * @return integer value indicating success/failure of the 178 * function. The possible values returned by this function are: 179 * <ul> 180 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 181 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 182 * </ul> 183 */ public 184 int unsetId() { 185 return libsbmlJNI.FluxObjective_unsetId(swigCPtr, this); 186 } 187 188 189/** 190 * Returns the value of the 'metaid' attribute of this object. 191 * <p> 192 * The optional attribute named 'metaid', present on every major SBML 193 * component type, is for supporting metadata annotations using RDF 194 * (Resource Description Format). The attribute value has the data type 195 * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML 196 * identifier type, which means each 'metaid' value must be globally 197 * unique within an SBML file. (Importantly, this uniqueness criterion 198 * applies across any attribute with type <a 199 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the 200 * 'metaid' attribute used by SBML—something to be aware of if your 201 * application-specific XML content inside the 'annotation' subelement 202 * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.) 203 * The 'metaid' value serves to identify a model 204 * component for purposes such as referencing that component from 205 * metadata placed within 'annotation' subelements. 206 * <p> 207 * @return the meta-identifier of this SBML object, as a string. 208 * <p> 209 * @see #isSetMetaId() 210 * @see #setMetaId(String metaid) 211 * @internal 212 */ public 213 String getName() { 214 return libsbmlJNI.FluxObjective_getName(swigCPtr, this); 215 } 216 217 218/** 219 * Predicate returning <code>true</code> if this object's 'metaid' attribute is set. 220 * <p> 221 * The optional attribute named 'metaid', present on every major SBML 222 * component type, is for supporting metadata annotations using RDF 223 * (Resource Description Format). The attribute value has the data type 224 * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML 225 * identifier type, which means each 'metaid' value must be globally 226 * unique within an SBML file. (Importantly, this uniqueness criterion 227 * applies across any attribute with type <a 228 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the 229 * 'metaid' attribute used by SBML—something to be aware of if your 230 * application-specific XML content inside the 'annotation' subelement 231 * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.) 232 * The 'metaid' value serves to identify a model component for purposes 233 * such as referencing that component from metadata placed within 234 * 'annotation' subelements. 235 * <p> 236 * @return <code>true</code> if the 'metaid' attribute of this SBML object is 237 * set, <code>false</code> otherwise. 238 * <p> 239 * @see #getMetaId() 240 * @see #setMetaId(String metaid) 241 * @internal 242 */ public 243 boolean isSetName() { 244 return libsbmlJNI.FluxObjective_isSetName(swigCPtr, this); 245 } 246 247 248/** 249 * Predicate returning <code>true</code> if this 250 * object has a {@link ModelHistory} object attached to it. 251 * <p> 252 * @return <code>true</code> if the {@link ModelHistory} of this object is set, 253 * <code>false</code> otherwise. 254 * <p> 255 * @note In SBML Level 2, model history annotations were only 256 * permitted on the {@link Model} element. In SBML Level 3, they are 257 * permitted on all SBML components derived from {@link SBase}. 258 * @internal 259 */ public 260 int setName(String name) { 261 return libsbmlJNI.FluxObjective_setName(swigCPtr, this, name); 262 } 263 264 265/** 266 * Unsets the value of the 'name' attribute of this SBML object. 267 * <p> 268 * Most (but not all) objects in SBML include two common attributes: 'id' 269 * and 'name'. In contrast to the 'id' attribute, the 'name' attribute is 270 * optional and is not intended to be used for cross-referencing purposes 271 * within a model. Its purpose instead is to provide a human-readable 272 * label for the component. The data type of 'name' is the type 273 * <code>string</code> defined in XML Schema. SBML imposes no 274 * restrictions as to the content of 'name' attributes beyond those 275 * restrictions defined by the <code>string</code> type in XML Schema. 276 * <p> 277 * The recommended practice for handling 'name' is as follows. If a 278 * software tool has the capability for displaying the content of 'name' 279 * attributes, it should display this content to the user as a 280 * component's label instead of the component's 'id'. If the user 281 * interface does not have this capability (e.g., because it cannot 282 * display or use special characters in symbol names), or if the 'name' 283 * attribute is missing on a given component, then the user interface 284 * should display the value of the 'id' attribute instead. (Script 285 * language interpreters are especially likely to display 'id' instead of 286 * 'name'.) 287 * <p> 288 * As a consequence of the above, authors of systems that automatically 289 * generate the values of 'id' attributes should be aware some systems 290 * may display the 'id''s to the user. Authors therefore may wish to 291 * take some care to have their software create 'id' values that are: (a) 292 * reasonably easy for humans to type and read; and (b) likely to be 293 * meaningful, for example by making the 'id' attribute be an abbreviated 294 * form of the name attribute value. 295 * <p> 296 * An additional point worth mentioning is although there are 297 * restrictions on the uniqueness of 'id' values, there are no 298 * restrictions on the uniqueness of 'name' values in a model. This 299 * allows software applications leeway in assigning component identifiers. 300 * <p> 301 * @return integer value indicating success/failure of the 302 * function. The possible values returned by this function are: 303 * <ul> 304 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 305 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 306 * </ul> 307 */ public 308 int unsetName() { 309 return libsbmlJNI.FluxObjective_unsetName(swigCPtr, this); 310 } 311 312 public String getReaction() { 313 return libsbmlJNI.FluxObjective_getReaction(swigCPtr, this); 314 } 315 316 public boolean isSetReaction() { 317 return libsbmlJNI.FluxObjective_isSetReaction(swigCPtr, this); 318 } 319 320 public int setReaction(String reaction) { 321 return libsbmlJNI.FluxObjective_setReaction(swigCPtr, this, reaction); 322 } 323 324 public int unsetReaction() { 325 return libsbmlJNI.FluxObjective_unsetReaction(swigCPtr, this); 326 } 327 328 public double getCoefficient() { 329 return libsbmlJNI.FluxObjective_getCoefficient(swigCPtr, this); 330 } 331 332 public boolean isSetCoefficient() { 333 return libsbmlJNI.FluxObjective_isSetCoefficient(swigCPtr, this); 334 } 335 336 public int setCoefficient(double coefficient) { 337 return libsbmlJNI.FluxObjective_setCoefficient(swigCPtr, this, coefficient); 338 } 339 340 public int unsetCoefficient() { 341 return libsbmlJNI.FluxObjective_unsetCoefficient(swigCPtr, this); 342 } 343 344 345/** 346 * Returns the XML element name of this object. 347 * <p> 348 * This is overridden by subclasses to return a string appropriate to the 349 * SBML component. For example, {@link Model} defines it as returning 350 * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>, 351 * and so on. 352 */ public 353 String getElementName() { 354 return libsbmlJNI.FluxObjective_getElementName(swigCPtr, this); 355 } 356 357 358/** 359 * Creates and returns a deep copy of this {@link SBase} object. 360 * <p> 361 * @return a (deep) copy of this {@link SBase} object. 362 */ public 363 FluxObjective cloneObject() { 364 long cPtr = libsbmlJNI.FluxObjective_cloneObject(swigCPtr, this); 365 return (cPtr == 0) ? null : new FluxObjective(cPtr, true); 366 } 367 368 369/** 370 * Returns the libSBML type code for this object. 371 * <p> 372 * This method may return the type code of this SBML object, or it may 373 * return {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}. This 374 * is because subclasses of {@link SBase} are not required to implement this 375 * method to return a type code. This method is meant primarily for the 376 * LibSBML C interface, in which class and subclass information is not 377 * readily available. 378 * <p> 379 * @return the SBML object type code 380 * of this SBML object or 381 * {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default). 382 * <p> 383 * @see #getElementName() 384 * @see #getPackageName() 385 */ public 386 int getTypeCode() { 387 return libsbmlJNI.FluxObjective_getTypeCode(swigCPtr, this); 388 } 389 390 public boolean acceptFbc(SWIGTYPE_p_FbcVisitor v) { 391 return libsbmlJNI.FluxObjective_acceptFbc(swigCPtr, this, SWIGTYPE_p_FbcVisitor.getCPtr(v)); 392 } 393 394}