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 FluxBound extends SBase {
012   private long swigCPtr;
013
014   protected FluxBound(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.FluxBound_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(FluxBound obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (FluxBound 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_FluxBound(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  public FluxBound(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
054    this(libsbmlJNI.new_FluxBound__SWIG_0(level, version, pkgVersion), true);
055  }
056
057  public FluxBound(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
058    this(libsbmlJNI.new_FluxBound__SWIG_1(level, version), true);
059  }
060
061  public FluxBound(long level) throws org.sbml.libsbml.SBMLConstructorException {
062    this(libsbmlJNI.new_FluxBound__SWIG_2(level), true);
063  }
064
065  public FluxBound() throws org.sbml.libsbml.SBMLConstructorException {
066    this(libsbmlJNI.new_FluxBound__SWIG_3(), true);
067  }
068
069  public FluxBound(FbcPkgNamespaces fbcns) throws org.sbml.libsbml.SBMLConstructorException {
070    this(libsbmlJNI.new_FluxBound__SWIG_4(FbcPkgNamespaces.getCPtr(fbcns), fbcns), true);
071  }
072
073  public FluxBound(FluxBound source) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_FluxBound__SWIG_5(FluxBound.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&mdash;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.FluxBound_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&mdash;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.FluxBound_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&nbsp;2, model history annotations were only
145   * permitted on the {@link Model} element.  In SBML Level&nbsp;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.FluxBound_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.FluxBound_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&mdash;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.FluxBound_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&mdash;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.FluxBound_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&nbsp;2, model history annotations were only
256   * permitted on the {@link Model} element.  In SBML Level&nbsp;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.FluxBound_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.FluxBound_unsetName(swigCPtr, this);
310  }
311
312  public String getReaction() {
313    return libsbmlJNI.FluxBound_getReaction(swigCPtr, this);
314  }
315
316  public boolean isSetReaction() {
317    return libsbmlJNI.FluxBound_isSetReaction(swigCPtr, this);
318  }
319
320  public int setReaction(String reaction) {
321    return libsbmlJNI.FluxBound_setReaction(swigCPtr, this, reaction);
322  }
323
324  public int unsetReaction() {
325    return libsbmlJNI.FluxBound_unsetReaction(swigCPtr, this);
326  }
327
328  public String getOperation() {
329    return libsbmlJNI.FluxBound_getOperation(swigCPtr, this);
330  }
331
332  public int getFluxBoundOperation() {
333    return libsbmlJNI.FluxBound_getFluxBoundOperation(swigCPtr, this);
334  }
335
336  public boolean isSetOperation() {
337    return libsbmlJNI.FluxBound_isSetOperation(swigCPtr, this);
338  }
339
340  public int setOperation(String operation) {
341    return libsbmlJNI.FluxBound_setOperation__SWIG_0(swigCPtr, this, operation);
342  }
343
344  public int setOperation(int operation) {
345    return libsbmlJNI.FluxBound_setOperation__SWIG_1(swigCPtr, this, operation);
346  }
347
348  public int unsetOperation() {
349    return libsbmlJNI.FluxBound_unsetOperation(swigCPtr, this);
350  }
351
352  public double getValue() {
353    return libsbmlJNI.FluxBound_getValue(swigCPtr, this);
354  }
355
356  public boolean isSetValue() {
357    return libsbmlJNI.FluxBound_isSetValue(swigCPtr, this);
358  }
359
360  public int setValue(double value) {
361    return libsbmlJNI.FluxBound_setValue(swigCPtr, this, value);
362  }
363
364  public int unsetValue() {
365    return libsbmlJNI.FluxBound_unsetValue(swigCPtr, this);
366  }
367
368  
369/**
370   * Returns the XML element name of this object.
371   * <p>
372   * This is overridden by subclasses to return a string appropriate to the
373   * SBML component.  For example, {@link Model} defines it as returning 
374   * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
375   * and so on.
376   */ public
377 String getElementName() {
378    return libsbmlJNI.FluxBound_getElementName(swigCPtr, this);
379  }
380
381  
382/**
383   * Creates and returns a deep copy of this {@link SBase} object.
384   * <p>
385   * @return a (deep) copy of this {@link SBase} object.
386   */ public
387 FluxBound cloneObject() {
388    long cPtr = libsbmlJNI.FluxBound_cloneObject(swigCPtr, this);
389    return (cPtr == 0) ? null : new FluxBound(cPtr, true);
390  }
391
392  
393/**
394   * Returns the libSBML type code for this object.
395   * <p>
396   * This method may return the type code of this SBML object, or it may
397   * return {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}.  This
398   * is because subclasses of {@link SBase} are not required to implement this
399   * method to return a type code.  This method is meant primarily for the
400   * LibSBML C interface, in which class and subclass information is not
401   * readily available.
402   * <p>
403   * @return the SBML object type code
404   * of this SBML object or
405   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).
406   * <p>
407   * @see #getElementName()
408   * @see #getPackageName()
409   */ public
410 int getTypeCode() {
411    return libsbmlJNI.FluxBound_getTypeCode(swigCPtr, this);
412  }
413
414  
415/**
416   * Sets this SBML object to child SBML objects (if any).
417   * (Creates a child-parent relationship by the parent)
418   * <p>
419   * Subclasses must override this function if they define
420   * one ore more child elements.
421   * Basically, this function needs to be called in
422   * constructor, copy constructor, assignment operator.
423   * <p>
424   * <p>
425   * @internal
426   */ public
427 void connectToChild() {
428    libsbmlJNI.FluxBound_connectToChild(swigCPtr, this);
429  }
430
431  
432/**
433   * Enables/Disables the given package with this element and child
434   * elements (if any).
435   * (This is an internal implementation for enablePackage function)
436   * <p>
437   * @note Subclasses in which one or more child elements are defined 
438   * must override this function.
439   * <p>
440   * <p>
441   * @see #connectToChild()
442   * @internal
443   */ public
444 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
445    libsbmlJNI.FluxBound_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
446  }
447
448  
449/**
450   * Subclasses should override this method to write out their contained
451   * SBML objects as XML elements.  Be sure to call your parents
452   * implementation of this method as well.  For example:
453   * @internal
454   */ public
455 boolean hasRequiredElements() {
456    return libsbmlJNI.FluxBound_hasRequiredElements(swigCPtr, this);
457  }
458
459  public boolean acceptFbc(SWIGTYPE_p_FbcVisitor v) {
460    return libsbmlJNI.FluxBound_acceptFbc(swigCPtr, this, SWIGTYPE_p_FbcVisitor.getCPtr(v));
461  }
462
463}