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 Output} class for the Qualitative Models package. 015 <p> 016 * Each {@link Output} refers to a {@link QualitativeSpecies} that participates in (is 017 * affected by) the corresponding {@link Transition}. In Petri net models these are 018 * the output places of the transition. 019 <p> 020 * In a logical model, a {@link QualitativeSpecies} should be referenced in at most 021 * one {@link ListOfOutputs}, (that of the {@link Transition} defining the evolution of this 022 * species). When a {@link Transition} has several outputs, it is because the 023 * referenced species share the same regulators and the same logical rules. 024 */ 025 026public class Output extends SBase { 027 private long swigCPtr; 028 029 protected Output(long cPtr, boolean cMemoryOwn) 030 { 031 super(libsbmlJNI.Output_SWIGUpcast(cPtr), cMemoryOwn); 032 swigCPtr = cPtr; 033 } 034 035 protected static long getCPtr(Output obj) 036 { 037 return (obj == null) ? 0 : obj.swigCPtr; 038 } 039 040 protected static long getCPtrAndDisown (Output 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_Output(swigCPtr); 062 } 063 swigCPtr = 0; 064 } 065 super.delete(); 066 } 067 068 069/** 070 * Creates a new {@link Output} with the given level, version, and package version. 071 <p> 072 * @param level a long integer, the SBML Level to assign to this {@link Output} 073 <p> 074 * @param version a long integer, the SBML Version to assign to this {@link Output} 075 <p> 076 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output} 077 */ public 078 Output(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 079 this(libsbmlJNI.new_Output__SWIG_0(level, version, pkgVersion), true); 080 } 081 082 083/** 084 * Creates a new {@link Output} with the given level, version, and package version. 085 <p> 086 * @param level a long integer, the SBML Level to assign to this {@link Output} 087 <p> 088 * @param version a long integer, the SBML Version to assign to this {@link Output} 089 <p> 090 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output} 091 */ public 092 Output(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 093 this(libsbmlJNI.new_Output__SWIG_1(level, version), true); 094 } 095 096 097/** 098 * Creates a new {@link Output} with the given level, version, and package version. 099 <p> 100 * @param level a long integer, the SBML Level to assign to this {@link Output} 101 <p> 102 * @param version a long integer, the SBML Version to assign to this {@link Output} 103 <p> 104 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output} 105 */ public 106 Output(long level) throws org.sbml.libsbml.SBMLConstructorException { 107 this(libsbmlJNI.new_Output__SWIG_2(level), true); 108 } 109 110 111/** 112 * Creates a new {@link Output} with the given level, version, and package version. 113 <p> 114 * @param level a long integer, the SBML Level to assign to this {@link Output} 115 <p> 116 * @param version a long integer, the SBML Version to assign to this {@link Output} 117 <p> 118 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Output} 119 */ public 120 Output() throws org.sbml.libsbml.SBMLConstructorException { 121 this(libsbmlJNI.new_Output__SWIG_3(), true); 122 } 123 124 125/** 126 * Creates a new {@link Output} with the given {@link QualPkgNamespaces} object. 127 <p> 128 * @param qualns the {@link QualPkgNamespaces} object 129 */ public 130 Output(QualPkgNamespaces qualns) throws org.sbml.libsbml.SBMLConstructorException { 131 this(libsbmlJNI.new_Output__SWIG_4(QualPkgNamespaces.getCPtr(qualns), qualns), true); 132 } 133 134 135/** 136 * Copy constructor for {@link Output}. 137 <p> 138 * @param orig the {@link Output} instance to copy. 139 */ public 140 Output(Output orig) throws org.sbml.libsbml.SBMLConstructorException { 141 this(libsbmlJNI.new_Output__SWIG_5(Output.getCPtr(orig), orig), true); 142 } 143 144 145/** 146 * Creates and returns a deep copy of this {@link Output} object. 147 <p> 148 * @return a (deep) copy of this {@link Output} object. 149 */ public 150 Output cloneObject() { 151 long cPtr = libsbmlJNI.Output_cloneObject(swigCPtr, this); 152 return (cPtr == 0) ? null : new Output(cPtr, true); 153 } 154 155 156/** 157 * Returns the value of the 'id' attribute of this {@link Output}. 158 <p> 159 * @return the value of the 'id' attribute of this {@link Output} as a string. 160 */ public 161 String getId() { 162 return libsbmlJNI.Output_getId(swigCPtr, this); 163 } 164 165 166/** 167 * Returns the value of the 'qualitativeSpecies' attribute of this {@link Output}. 168 <p> 169 * @return the value of the 'qualitativeSpecies' attribute of this {@link Output} as a string. 170 */ public 171 String getQualitativeSpecies() { 172 return libsbmlJNI.Output_getQualitativeSpecies(swigCPtr, this); 173 } 174 175 176/** 177 * Returns the value of the 'transitionEffect' attribute of this {@link Output}. 178 <p> 179 * @return the value of the 'transitionEffect' attribute of this {@link Output} as a string. 180 */ public 181 int getTransitionEffect() { 182 return libsbmlJNI.Output_getTransitionEffect(swigCPtr, this); 183 } 184 185 186/** 187 * Returns the value of the 'name' attribute of this {@link Output}. 188 <p> 189 * @return the value of the 'name' attribute of this {@link Output} as a string. 190 */ public 191 String getName() { 192 return libsbmlJNI.Output_getName(swigCPtr, this); 193 } 194 195 196/** 197 * Returns the value of the 'outputLevel' attribute of this {@link Output}. 198 <p> 199 * @return the value of the 'outputLevel' attribute of this {@link Output} as a integer. 200 */ public 201 int getOutputLevel() { 202 return libsbmlJNI.Output_getOutputLevel(swigCPtr, this); 203 } 204 205 206/** 207 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 208 * {@link Output}'s 'id' attribute has been set. 209 <p> 210 * @return <code>true</code> if this {@link Output}'s 'id' attribute has been set, 211 * otherwise <code>false</code> is returned. 212 */ public 213 boolean isSetId() { 214 return libsbmlJNI.Output_isSetId(swigCPtr, this); 215 } 216 217 218/** 219 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 220 * {@link Output}'s 'qualitativeSpecies' attribute has been set. 221 <p> 222 * @return <code>true</code> if this {@link Output}'s 'qualitativeSpecies' attribute has been set, 223 * otherwise <code>false</code> is returned. 224 */ public 225 boolean isSetQualitativeSpecies() { 226 return libsbmlJNI.Output_isSetQualitativeSpecies(swigCPtr, this); 227 } 228 229 230/** 231 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 232 * {@link Output}'s 'transitionEffect' attribute has been set. 233 <p> 234 * @return <code>true</code> if this {@link Output}'s 'transitionEffect' attribute has been set, 235 * otherwise <code>false</code> is returned. 236 */ public 237 boolean isSetTransitionEffect() { 238 return libsbmlJNI.Output_isSetTransitionEffect(swigCPtr, this); 239 } 240 241 242/** 243 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 244 * {@link Output}'s 'name' attribute has been set. 245 <p> 246 * @return <code>true</code> if this {@link Output}'s 'name' attribute has been set, 247 * otherwise <code>false</code> is returned. 248 */ public 249 boolean isSetName() { 250 return libsbmlJNI.Output_isSetName(swigCPtr, this); 251 } 252 253 254/** 255 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 256 * {@link Output}'s 'outputLevel' attribute has been set. 257 <p> 258 * @return <code>true</code> if this {@link Output}'s 'outputLevel' attribute has been set, 259 * otherwise <code>false</code> is returned. 260 */ public 261 boolean isSetOutputLevel() { 262 return libsbmlJNI.Output_isSetOutputLevel(swigCPtr, this); 263 } 264 265 266/** 267 * Sets the value of the 'id' attribute of this {@link Output}. 268 <p> 269 * @param id String value of the 'id' attribute to be set 270 <p> 271 * @return integer value indicating success/failure of the 272 * operation. The possible return values 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 setId(String id) { 279 return libsbmlJNI.Output_setId(swigCPtr, this, id); 280 } 281 282 283/** 284 * Sets the value of the 'qualitativeSpecies' attribute of this {@link Output}. 285 <p> 286 * @param qualitativeSpecies String value of the 'qualitativeSpecies' attribute to be set 287 <p> 288 * @return integer value indicating success/failure of the 289 * operation. The possible return values are: 290 * <ul> 291 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 292 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 293 * </ul> 294 */ public 295 int setQualitativeSpecies(String qualitativeSpecies) { 296 return libsbmlJNI.Output_setQualitativeSpecies(swigCPtr, this, qualitativeSpecies); 297 } 298 299 300/** 301 * Sets the value of the 'transitionEffect' attribute of this {@link Output}. 302 <p> 303 * @param transitionEffect String value of the 'transitionEffect' attribute to be set 304 <p> 305 * @return integer value indicating success/failure of the 306 * operation. The possible return values are: 307 * <ul> 308 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 309 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 310 * </ul> 311 */ public 312 int setTransitionEffect(int transitionEffect) { 313 return libsbmlJNI.Output_setTransitionEffect(swigCPtr, this, transitionEffect); 314 } 315 316 317/** 318 * Sets the value of the 'name' attribute of this {@link Output}. 319 <p> 320 * @param name String value of the 'name' attribute to be set 321 <p> 322 * @return integer value indicating success/failure of the 323 * operation. The possible return values are: 324 * <ul> 325 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 326 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 327 * </ul> 328 */ public 329 int setName(String name) { 330 return libsbmlJNI.Output_setName(swigCPtr, this, name); 331 } 332 333 334/** 335 * Sets the value of the 'outputLevel' attribute of this {@link Output}. 336 <p> 337 * @param outputLevel int value of the 'outputLevel' attribute to be set 338 <p> 339 * @return integer value indicating success/failure of the 340 * operation. The possible return values are: 341 * <ul> 342 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 343 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE } 344 * </ul> 345 */ public 346 int setOutputLevel(int outputLevel) { 347 return libsbmlJNI.Output_setOutputLevel(swigCPtr, this, outputLevel); 348 } 349 350 351/** 352 * Unsets the value of the 'id' attribute of this {@link Output}. 353 <p> 354 * @return integer value indicating success/failure of the 355 * operation. The possible return values are: 356 * <ul> 357 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 358 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 359 * </ul> 360 */ public 361 int unsetId() { 362 return libsbmlJNI.Output_unsetId(swigCPtr, this); 363 } 364 365 366/** 367 * Unsets the value of the 'qualitativeSpecies' attribute of this {@link Output}. 368 <p> 369 * @return integer value indicating success/failure of the 370 * operation. The possible return values are: 371 * <ul> 372 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 373 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 374 * </ul> 375 */ public 376 int unsetQualitativeSpecies() { 377 return libsbmlJNI.Output_unsetQualitativeSpecies(swigCPtr, this); 378 } 379 380 381/** 382 * Unsets the value of the 'transitionEffect' attribute of this {@link Output}. 383 <p> 384 * @return integer value indicating success/failure of the 385 * operation. The possible return values are: 386 * <ul> 387 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 388 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 389 * </ul> 390 */ public 391 int unsetTransitionEffect() { 392 return libsbmlJNI.Output_unsetTransitionEffect(swigCPtr, this); 393 } 394 395 396/** 397 * Unsets the value of the 'name' attribute of this {@link Output}. 398 <p> 399 * @return integer value indicating success/failure of the 400 * operation. The possible return values are: 401 * <ul> 402 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 403 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 404 * </ul> 405 */ public 406 int unsetName() { 407 return libsbmlJNI.Output_unsetName(swigCPtr, this); 408 } 409 410 411/** 412 * Unsets the value of the 'outputLevel' attribute of this {@link Output}. 413 <p> 414 * @return integer value indicating success/failure of the 415 * operation. The possible return values are: 416 * <ul> 417 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 418 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 419 * </ul> 420 */ public 421 int unsetOutputLevel() { 422 return libsbmlJNI.Output_unsetOutputLevel(swigCPtr, this); 423 } 424 425 426/** 427 * Renames all the <code>SIdRef</code> attributes on this element, including any 428 * found in MathML content (if such exists). 429 <p> 430 * This method works by looking at all attributes and (if appropriate) 431 * mathematical formulas, comparing the identifiers to the value of @p 432 * oldid. If any matches are found, the matching identifiers are replaced 433 * with <code>newid</code>. The method does <em>not</em> descend into child elements. 434 <p> 435 * @param oldid the old identifier 436 * @param newid the new identifier 437 */ public 438 void renameSIdRefs(String oldid, String newid) { 439 libsbmlJNI.Output_renameSIdRefs(swigCPtr, this, oldid, newid); 440 } 441 442 443/** 444 * Returns the XML element name of this object, which for {@link Output}, is 445 * always <code>'output'.</code> 446 <p> 447 * @return the name of this element, i.e. <code>'output'.</code> 448 */ public 449 String getElementName() { 450 return libsbmlJNI.Output_getElementName(swigCPtr, this); 451 } 452 453 454/** 455 * Returns the libSBML type code of this object instance. 456 <p> 457 * <p> 458 * LibSBML attaches an identifying code to every kind of SBML object. These 459 * are integer constants known as <em>SBML type codes</em>. The names of all 460 * the codes begin with the characters “<code>SBML_</code>”. 461 * In the Java language interface for libSBML, the 462 * type codes are defined as static integer constants in the interface class 463 * {@link libsbmlConstants}. Note that different Level 3 464 * package plug-ins may use overlapping type codes; to identify the package 465 * to which a given object belongs, call the <code>getPackageName()</code> 466 * method on the object. 467 <p> 468 * @return the SBML type code for this object: 469 * {@link libsbmlConstants#SBML_QUAL_OUTPUT SBML_QUAL_OUTPUT} 470 <p> 471 * <p> 472 * @warning <span class='warning'>The specific integer values of the possible 473 * type codes may be reused by different Level 3 package plug-ins. 474 * Thus, to identifiy the correct code, <strong>it is necessary to invoke 475 * both getTypeCode() and getPackageName()</strong>.</span> 476 <p> 477 * @see #getElementName() 478 * @see #getPackageName() 479 */ public 480 int getTypeCode() { 481 return libsbmlJNI.Output_getTypeCode(swigCPtr, this); 482 } 483 484 485/** 486 * Predicate returning <code>true</code> if all the required attributes 487 * for this {@link Output} object have been set. 488 <p> 489 * @note The required attributes for a {@link Output} object are: 490 * <ul> 491 * <li> 'qualitativeSpecies' 492 * <li> 'transitionEffect' 493 * 494 * </ul> <p> 495 * @return a boolean value indicating whether all the required 496 * attributes for this object have been defined. 497 */ public 498 boolean hasRequiredAttributes() { 499 return libsbmlJNI.Output_hasRequiredAttributes(swigCPtr, this); 500 } 501 502 503/** 504 * Enables/Disables the given package with this element. 505 * @internal 506 */ public 507 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 508 libsbmlJNI.Output_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 509 } 510 511}