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-qual"><a href="group__qual.html">qual</a></span> 013 014 The default result of a {@link Transition}. 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 * <p> 179 * @return integer value indicating success/failure of the 180 * function. The possible values 181 * returned by this function are: 182 * <ul> 183 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 184 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 185 * </ul> 186 */ public 187 int setResultLevel(int resultLevel) { 188 return libsbmlJNI.DefaultTerm_setResultLevel(swigCPtr, this, resultLevel); 189 } 190 191 192/** 193 * Unsets the value of the 'resultLevel' attribute of this {@link DefaultTerm}. 194 <p> 195 * <p> 196 * @return integer value indicating success/failure of the 197 * function. The possible values 198 * returned by this function are: 199 * <ul> 200 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 201 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 202 * </ul> 203 */ public 204 int unsetResultLevel() { 205 return libsbmlJNI.DefaultTerm_unsetResultLevel(swigCPtr, this); 206 } 207 208 209/** 210 * Returns the XML name of this object. 211 <p> 212 * @return the name of this element. 213 */ public 214 String getElementName() { 215 return libsbmlJNI.DefaultTerm_getElementName(swigCPtr, this); 216 } 217 218 219/** 220 * Returns the libSBML type code of this object instance. 221 <p> 222 * <p> 223 * LibSBML attaches an identifying code to every kind of SBML object. These 224 * are integer constants known as <em>SBML type codes</em>. The names of all 225 * the codes begin with the characters <code>SBML_</code>. 226 * In the Java language interface for libSBML, the 227 * type codes are defined as static integer constants in the interface class 228 * {@link libsbmlConstants}. Note that different Level 3 229 * package plug-ins may use overlapping type codes; to identify the package 230 * to which a given object belongs, call the <code>getPackageName()</code> 231 * method on the object. 232 <p> 233 * @return the SBML type code for this object: 234 * {@link libsbmlConstants#SBML_QUAL_DEFAULT_TERM SBML_QUAL_DEFAULT_TERM} 235 <p> 236 * <p> 237 * @warning <span class='warning'>The specific integer values of the possible 238 * type codes may be reused by different libSBML plug-ins for SBML Level 3. 239 * packages, To fully identify the correct code, <strong>it is necessary to 240 * invoke both getTypeCode() and getPackageName()</strong>.</span> 241 <p> 242 * @see #getElementName() 243 * @see #getPackageName() 244 */ public 245 int getTypeCode() { 246 return libsbmlJNI.DefaultTerm_getTypeCode(swigCPtr, this); 247 } 248 249 250/** 251 * Predicate returning <code>true</code> if all the required attributes 252 * for this {@link DefaultTerm} object have been set. 253 <p> 254 * @note The required attributes for a {@link DefaultTerm} object are: 255 <p> 256 * @return a boolean value indicating whether all the required 257 * attributes for this object have been defined. 258 */ public 259 boolean hasRequiredAttributes() { 260 return libsbmlJNI.DefaultTerm_hasRequiredAttributes(swigCPtr, this); 261 } 262 263 264/** * @internal */ public 265 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 266 libsbmlJNI.DefaultTerm_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 267 } 268 269}