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-qual"><a href="group__qual.html">qual</a></span>
013
014 The {@link DefaultTerm} class for the Qualitative Models package.
015 <p>
016 * The {@link DefaultTerm} defines the default result of a {@link Transition}. This term is
017 * used if there are no other {@link FunctionTerm} elements or if none of the Math
018 * elements of the {@link FunctionTerm} elements evaluates to <code>true.</code>
019 */
020
021public class DefaultTerm extends SBase {
022   private long swigCPtr;
023
024   protected DefaultTerm(long cPtr, boolean cMemoryOwn)
025   {
026     super(libsbmlJNI.DefaultTerm_SWIGUpcast(cPtr), cMemoryOwn);
027     swigCPtr = cPtr;
028   }
029
030   protected static long getCPtr(DefaultTerm obj)
031   {
032     return (obj == null) ? 0 : obj.swigCPtr;
033   }
034
035   protected static long getCPtrAndDisown (DefaultTerm obj)
036   {
037     long ptr = 0;
038
039     if (obj != null)
040     {
041       ptr             = obj.swigCPtr;
042       obj.swigCMemOwn = false;
043     }
044
045     return ptr;
046   }
047
048  protected void finalize() {
049    delete();
050  }
051
052  public synchronized void delete() {
053    if (swigCPtr != 0) {
054      if (swigCMemOwn) {
055        swigCMemOwn = false;
056        libsbmlJNI.delete_DefaultTerm(swigCPtr);
057      }
058      swigCPtr = 0;
059    }
060    super.delete();
061  }
062
063  
064/**
065   * Creates a new {@link DefaultTerm} with the given level, version, and package version.
066   <p>
067   * @param level a long integer, the SBML Level to assign to this {@link DefaultTerm}
068   <p>
069   * @param version a long integer, the SBML Version to assign to this {@link DefaultTerm}
070   <p>
071   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link DefaultTerm}
072   */ public
073 DefaultTerm(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_DefaultTerm__SWIG_0(level, version, pkgVersion), true);
075  }
076
077  
078/**
079   * Creates a new {@link DefaultTerm} with the given level, version, and package version.
080   <p>
081   * @param level a long integer, the SBML Level to assign to this {@link DefaultTerm}
082   <p>
083   * @param version a long integer, the SBML Version to assign to this {@link DefaultTerm}
084   <p>
085   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link DefaultTerm}
086   */ public
087 DefaultTerm(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
088    this(libsbmlJNI.new_DefaultTerm__SWIG_1(level, version), true);
089  }
090
091  
092/**
093   * Creates a new {@link DefaultTerm} with the given level, version, and package version.
094   <p>
095   * @param level a long integer, the SBML Level to assign to this {@link DefaultTerm}
096   <p>
097   * @param version a long integer, the SBML Version to assign to this {@link DefaultTerm}
098   <p>
099   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link DefaultTerm}
100   */ public
101 DefaultTerm(long level) throws org.sbml.libsbml.SBMLConstructorException {
102    this(libsbmlJNI.new_DefaultTerm__SWIG_2(level), true);
103  }
104
105  
106/**
107   * Creates a new {@link DefaultTerm} with the given level, version, and package version.
108   <p>
109   * @param level a long integer, the SBML Level to assign to this {@link DefaultTerm}
110   <p>
111   * @param version a long integer, the SBML Version to assign to this {@link DefaultTerm}
112   <p>
113   * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link DefaultTerm}
114   */ public
115 DefaultTerm() throws org.sbml.libsbml.SBMLConstructorException {
116    this(libsbmlJNI.new_DefaultTerm__SWIG_3(), true);
117  }
118
119  
120/**
121   * Creates a new {@link DefaultTerm} with the given {@link QualPkgNamespaces} object.
122   <p>
123   * @param qualns the {@link QualPkgNamespaces} object
124   */ public
125 DefaultTerm(QualPkgNamespaces qualns) throws org.sbml.libsbml.SBMLConstructorException {
126    this(libsbmlJNI.new_DefaultTerm__SWIG_4(QualPkgNamespaces.getCPtr(qualns), qualns), true);
127  }
128
129  
130/**
131   * Copy constructor for {@link DefaultTerm}.
132   <p>
133   * @param orig the {@link DefaultTerm} instance to copy.
134   */ public
135 DefaultTerm(DefaultTerm orig) throws org.sbml.libsbml.SBMLConstructorException {
136    this(libsbmlJNI.new_DefaultTerm__SWIG_5(DefaultTerm.getCPtr(orig), orig), true);
137  }
138
139  
140/**
141   * Creates and returns a deep copy of this {@link DefaultTerm} object.
142   <p>
143   * @return a (deep) copy of this {@link DefaultTerm} object.
144   */ public
145 DefaultTerm cloneObject() {
146    long cPtr = libsbmlJNI.DefaultTerm_cloneObject(swigCPtr, this);
147    return (cPtr == 0) ? null : new DefaultTerm(cPtr, true);
148  }
149
150  
151/**
152   * Returns the value of the 'resultLevel' attribute of this {@link DefaultTerm}.
153   <p>
154   * @return the value of the 'resultLevel' attribute of this {@link DefaultTerm} as a integer.
155   */ public
156 int getResultLevel() {
157    return libsbmlJNI.DefaultTerm_getResultLevel(swigCPtr, this);
158  }
159
160  
161/**
162   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
163   * {@link DefaultTerm}'s 'resultLevel' attribute has been set.
164   <p>
165   * @return <code>true</code> if this {@link DefaultTerm}'s 'resultLevel' attribute has been set,
166   * otherwise <code>false</code> is returned.
167   */ public
168 boolean isSetResultLevel() {
169    return libsbmlJNI.DefaultTerm_isSetResultLevel(swigCPtr, this);
170  }
171
172  
173/**
174   * Sets the value of the 'resultLevel' attribute of this {@link DefaultTerm}.
175   <p>
176   * @param resultLevel int value of the 'resultLevel' attribute to be set
177   <p>
178   * @return integer value indicating success/failure of the
179   * operation. The possible return values are:
180   * <ul>
181   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
182   * <li> {@link  libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
183   * </ul>
184   */ public
185 int setResultLevel(int resultLevel) {
186    return libsbmlJNI.DefaultTerm_setResultLevel(swigCPtr, this, resultLevel);
187  }
188
189  
190/**
191   * Unsets the value of the 'resultLevel' attribute of this {@link DefaultTerm}.
192   <p>
193   * @return integer value indicating success/failure of the
194   * operation. The possible return values are:
195   * <ul>
196   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
197   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
198   * </ul>
199   */ public
200 int unsetResultLevel() {
201    return libsbmlJNI.DefaultTerm_unsetResultLevel(swigCPtr, this);
202  }
203
204  
205/**
206   * Returns the XML element name of this object, which for {@link DefaultTerm}, is
207   * always <code>'defaultTerm'.</code>
208   <p>
209   * @return the name of this element, i.e. <code>'defaultTerm'.</code>
210   */ public
211 String getElementName() {
212    return libsbmlJNI.DefaultTerm_getElementName(swigCPtr, this);
213  }
214
215  
216/**
217   * Returns the libSBML type code of this object instance.
218   <p>
219   * <p>
220 * LibSBML attaches an identifying code to every kind of SBML object.  These
221 * are integer constants known as <em>SBML type codes</em>.  The names of all
222 * the codes begin with the characters &ldquo;<code>SBML_</code>&rdquo;. 
223 * In the Java language interface for libSBML, the
224 * type codes are defined as static integer constants in the interface class
225 * {@link libsbmlConstants}.    Note that different Level&nbsp;3 
226 * package plug-ins may use overlapping type codes; to identify the package
227 * to which a given object belongs, call the <code>getPackageName()</code>
228 * method on the object.
229   <p>
230   * @return the SBML type code for this object:
231   * {@link  libsbmlConstants#SBML_QUAL_DEFAULT_TERM SBML_QUAL_DEFAULT_TERM}
232   <p>
233   * <p>
234 * @warning <span class='warning'>The specific integer values of the possible
235 * type codes may be reused by different Level&nbsp;3 package plug-ins.
236 * Thus, to identifiy the correct code, <strong>it is necessary to invoke
237 * both getTypeCode() and getPackageName()</strong>.</span>
238   <p>
239   * @see #getElementName()
240   * @see #getPackageName()
241   */ public
242 int getTypeCode() {
243    return libsbmlJNI.DefaultTerm_getTypeCode(swigCPtr, this);
244  }
245
246  
247/**
248   * Predicate returning <code>true</code> if all the required attributes
249   * for this {@link DefaultTerm} object have been set.
250   <p>
251   * @note The required attributes for a {@link DefaultTerm} object are:
252   <p>
253   * @return a boolean value indicating whether all the required
254   * attributes for this object have been defined.
255   */ public
256 boolean hasRequiredAttributes() {
257    return libsbmlJNI.DefaultTerm_hasRequiredAttributes(swigCPtr, this);
258  }
259
260  
261/**
262   * Enables/Disables the given package with this element.
263   * @internal
264   */ public
265 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
266    libsbmlJNI.DefaultTerm_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
267  }
268
269}