001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.7 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 input to a {@link QualitativeSpecies}. 015 <p> 016 * Each {@link Input} refers to a {@link QualitativeSpecies} that participates in the 017 * corresponding {@link Transition}. In Petri nets, these are the input places of the 018 * transition. In logical models, they are the regulators of the species 019 * whose behaviour is defined by the transition. 020 */ 021 022public class Input extends SBase { 023 private long swigCPtr; 024 025 protected Input(long cPtr, boolean cMemoryOwn) 026 { 027 super(libsbmlJNI.Input_SWIGUpcast(cPtr), cMemoryOwn); 028 swigCPtr = cPtr; 029 } 030 031 protected static long getCPtr(Input obj) 032 { 033 return (obj == null) ? 0 : obj.swigCPtr; 034 } 035 036 protected static long getCPtrAndDisown (Input obj) 037 { 038 long ptr = 0; 039 040 if (obj != null) 041 { 042 ptr = obj.swigCPtr; 043 obj.swigCMemOwn = false; 044 } 045 046 return ptr; 047 } 048 049 protected void finalize() { 050 delete(); 051 } 052 053 public synchronized void delete() { 054 if (swigCPtr != 0) { 055 if (swigCMemOwn) { 056 swigCMemOwn = false; 057 libsbmlJNI.delete_Input(swigCPtr); 058 } 059 swigCPtr = 0; 060 } 061 super.delete(); 062 } 063 064 065/** 066 * Creates a new {@link Input} with the given level, version, and package version. 067 <p> 068 * @param level a long integer, the SBML Level to assign to this {@link Input} 069 <p> 070 * @param version a long integer, the SBML Version to assign to this {@link Input} 071 <p> 072 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Input} 073 */ public 074 Input(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 075 this(libsbmlJNI.new_Input__SWIG_0(level, version, pkgVersion), true); 076 } 077 078 079/** 080 * Creates a new {@link Input} with the given level, version, and package version. 081 <p> 082 * @param level a long integer, the SBML Level to assign to this {@link Input} 083 <p> 084 * @param version a long integer, the SBML Version to assign to this {@link Input} 085 <p> 086 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Input} 087 */ public 088 Input(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 089 this(libsbmlJNI.new_Input__SWIG_1(level, version), true); 090 } 091 092 093/** 094 * Creates a new {@link Input} with the given level, version, and package version. 095 <p> 096 * @param level a long integer, the SBML Level to assign to this {@link Input} 097 <p> 098 * @param version a long integer, the SBML Version to assign to this {@link Input} 099 <p> 100 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Input} 101 */ public 102 Input(long level) throws org.sbml.libsbml.SBMLConstructorException { 103 this(libsbmlJNI.new_Input__SWIG_2(level), true); 104 } 105 106 107/** 108 * Creates a new {@link Input} with the given level, version, and package version. 109 <p> 110 * @param level a long integer, the SBML Level to assign to this {@link Input} 111 <p> 112 * @param version a long integer, the SBML Version to assign to this {@link Input} 113 <p> 114 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Input} 115 */ public 116 Input() throws org.sbml.libsbml.SBMLConstructorException { 117 this(libsbmlJNI.new_Input__SWIG_3(), true); 118 } 119 120 121/** 122 * Creates a new {@link Input} with the given {@link QualPkgNamespaces} object. 123 <p> 124 * @param qualns the {@link QualPkgNamespaces} object 125 */ public 126 Input(QualPkgNamespaces qualns) throws org.sbml.libsbml.SBMLConstructorException { 127 this(libsbmlJNI.new_Input__SWIG_4(QualPkgNamespaces.getCPtr(qualns), qualns), true); 128 } 129 130 131/** 132 * Copy constructor for {@link Input}. 133 <p> 134 * @param orig the {@link Input} instance to copy. 135 */ public 136 Input(Input orig) throws org.sbml.libsbml.SBMLConstructorException { 137 this(libsbmlJNI.new_Input__SWIG_5(Input.getCPtr(orig), orig), true); 138 } 139 140 141/** 142 * Creates and returns a deep copy of this {@link Input} object. 143 <p> 144 * @return a (deep) copy of this {@link Input} object. 145 */ public 146 Input cloneObject() { 147 long cPtr = libsbmlJNI.Input_cloneObject(swigCPtr, this); 148 return (cPtr == 0) ? null : new Input(cPtr, true); 149 } 150 151 152/** 153 * Returns the value of the 'id' attribute of this {@link Input}. 154 <p> 155 * @return the value of the 'id' attribute of this {@link Input} as a string. 156 */ public 157 String getId() { 158 return libsbmlJNI.Input_getId(swigCPtr, this); 159 } 160 161 162/** 163 * Returns the value of the 'qualitativeSpecies' attribute of this {@link Input}. 164 <p> 165 * @return the value of the 'qualitativeSpecies' attribute of this {@link Input} as a string. 166 */ public 167 String getQualitativeSpecies() { 168 return libsbmlJNI.Input_getQualitativeSpecies(swigCPtr, this); 169 } 170 171 172/** 173 * Returns the value of the 'transitionEffect' attribute of this {@link Input}. 174 <p> 175 * @return the value of the 'transitionEffect' attribute of this {@link Input} as a string. 176 */ public 177 int getTransitionEffect() { 178 return libsbmlJNI.Input_getTransitionEffect(swigCPtr, this); 179 } 180 181 182/** 183 * Returns the value of the 'name' attribute of this {@link Input}. 184 <p> 185 * @return the value of the 'name' attribute of this {@link Input} as a string. 186 */ public 187 String getName() { 188 return libsbmlJNI.Input_getName(swigCPtr, this); 189 } 190 191 192/** 193 * Returns the value of the 'sign' attribute of this {@link Input}. 194 <p> 195 * @return the value of the 'sign' attribute of this {@link Input} as a string. 196 */ public 197 int getSign() { 198 return libsbmlJNI.Input_getSign(swigCPtr, this); 199 } 200 201 202/** 203 * Returns the value of the 'thresholdLevel' attribute of this {@link Input}. 204 <p> 205 * @return the value of the 'thresholdLevel' attribute of this {@link Input} as a integer. 206 */ public 207 int getThresholdLevel() { 208 return libsbmlJNI.Input_getThresholdLevel(swigCPtr, this); 209 } 210 211 212/** 213 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 214 * {@link Input}'s 'id' attribute has been set. 215 <p> 216 * @return <code>true</code> if this {@link Input}'s 'id' attribute has been set, 217 * otherwise <code>false</code> is returned. 218 */ public 219 boolean isSetId() { 220 return libsbmlJNI.Input_isSetId(swigCPtr, this); 221 } 222 223 224/** 225 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 226 * {@link Input}'s 'qualitativeSpecies' attribute has been set. 227 <p> 228 * @return <code>true</code> if this {@link Input}'s 'qualitativeSpecies' attribute has been set, 229 * otherwise <code>false</code> is returned. 230 */ public 231 boolean isSetQualitativeSpecies() { 232 return libsbmlJNI.Input_isSetQualitativeSpecies(swigCPtr, this); 233 } 234 235 236/** 237 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 238 * {@link Input}'s 'transitionEffect' attribute has been set. 239 <p> 240 * @return <code>true</code> if this {@link Input}'s 'transitionEffect' attribute has been set, 241 * otherwise <code>false</code> is returned. 242 */ public 243 boolean isSetTransitionEffect() { 244 return libsbmlJNI.Input_isSetTransitionEffect(swigCPtr, this); 245 } 246 247 248/** 249 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 250 * {@link Input}'s 'name' attribute has been set. 251 <p> 252 * @return <code>true</code> if this {@link Input}'s 'name' attribute has been set, 253 * otherwise <code>false</code> is returned. 254 */ public 255 boolean isSetName() { 256 return libsbmlJNI.Input_isSetName(swigCPtr, this); 257 } 258 259 260/** 261 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 262 * {@link Input}'s 'sign' attribute has been set. 263 <p> 264 * @return <code>true</code> if this {@link Input}'s 'sign' attribute has been set, 265 * otherwise <code>false</code> is returned. 266 */ public 267 boolean isSetSign() { 268 return libsbmlJNI.Input_isSetSign(swigCPtr, this); 269 } 270 271 272/** 273 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 274 * {@link Input}'s 'thresholdLevel' attribute has been set. 275 <p> 276 * @return <code>true</code> if this {@link Input}'s 'thresholdLevel' attribute has been set, 277 * otherwise <code>false</code> is returned. 278 */ public 279 boolean isSetThresholdLevel() { 280 return libsbmlJNI.Input_isSetThresholdLevel(swigCPtr, this); 281 } 282 283 284/** 285 * Sets the value of the 'id' attribute of this {@link Input}. 286 <p> 287 * @param id String value of the 'id' attribute to be set 288 <p> 289 * <p> 290 * @return integer value indicating success/failure of the 291 * function. The possible values 292 * returned by this function are: 293 * <ul> 294 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 295 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 296 * </ul> 297 */ public 298 int setId(String id) { 299 return libsbmlJNI.Input_setId(swigCPtr, this, id); 300 } 301 302 303/** 304 * Sets the value of the 'qualitativeSpecies' attribute of this {@link Input}. 305 <p> 306 * @param qualitativeSpecies String value of the 'qualitativeSpecies' attribute to be set 307 <p> 308 * <p> 309 * @return integer value indicating success/failure of the 310 * function. The possible values 311 * returned by this function are: 312 * <ul> 313 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 314 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 315 * </ul> 316 */ public 317 int setQualitativeSpecies(String qualitativeSpecies) { 318 return libsbmlJNI.Input_setQualitativeSpecies(swigCPtr, this, qualitativeSpecies); 319 } 320 321 322/** 323 * Sets the value of the 'transitionEffect' attribute of this {@link Input}. 324 <p> 325 * @param transitionEffect String value of the 'transitionEffect' attribute to be set 326 <p> 327 * <p> 328 * @return integer value indicating success/failure of the 329 * function. The possible values 330 * returned by this function are: 331 * <ul> 332 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 333 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 334 * </ul> 335 */ public 336 int setTransitionEffect(int transitionEffect) { 337 return libsbmlJNI.Input_setTransitionEffect(swigCPtr, this, transitionEffect); 338 } 339 340 341/** 342 * Sets the value of the 'name' attribute of this {@link Input}. 343 <p> 344 * @param name String value of the 'name' attribute to be set 345 <p> 346 * <p> 347 * @return integer value indicating success/failure of the 348 * function. The possible values 349 * returned by this function are: 350 * <ul> 351 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 352 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 353 * </ul> 354 */ public 355 int setName(String name) { 356 return libsbmlJNI.Input_setName(swigCPtr, this, name); 357 } 358 359 360/** 361 * Sets the value of the 'sign' attribute of this {@link Input}. 362 <p> 363 * @param sign String value of the 'sign' attribute to be set 364 <p> 365 * <p> 366 * @return integer value indicating success/failure of the 367 * function. The possible values 368 * returned by this function are: 369 * <ul> 370 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 371 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 372 * </ul> 373 */ public 374 int setSign(int sign) { 375 return libsbmlJNI.Input_setSign(swigCPtr, this, sign); 376 } 377 378 379/** 380 * Sets the value of the 'thresholdLevel' attribute of this {@link Input}. 381 <p> 382 * @param thresholdLevel int value of the 'thresholdLevel' attribute to be set 383 <p> 384 * <p> 385 * @return integer value indicating success/failure of the 386 * function. The possible values 387 * returned by this function are: 388 * <ul> 389 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 390 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 391 * </ul> 392 */ public 393 int setThresholdLevel(int thresholdLevel) { 394 return libsbmlJNI.Input_setThresholdLevel(swigCPtr, this, thresholdLevel); 395 } 396 397 398/** 399 * Unsets the value of the 'id' attribute of this {@link Input}. 400 <p> 401 * <p> 402 * @return integer value indicating success/failure of the 403 * function. The possible values 404 * returned by this function are: 405 * <ul> 406 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 407 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 408 * </ul> 409 */ public 410 int unsetId() { 411 return libsbmlJNI.Input_unsetId(swigCPtr, this); 412 } 413 414 415/** 416 * Unsets the value of the 'qualitativeSpecies' attribute of this {@link Input}. 417 <p> 418 * <p> 419 * @return integer value indicating success/failure of the 420 * function. The possible values 421 * returned by this function are: 422 * <ul> 423 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 424 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 425 * </ul> 426 */ public 427 int unsetQualitativeSpecies() { 428 return libsbmlJNI.Input_unsetQualitativeSpecies(swigCPtr, this); 429 } 430 431 432/** 433 * Unsets the value of the 'transitionEffect' attribute of this {@link Input}. 434 <p> 435 * <p> 436 * @return integer value indicating success/failure of the 437 * function. The possible values 438 * returned by this function are: 439 * <ul> 440 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 441 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 442 * </ul> 443 */ public 444 int unsetTransitionEffect() { 445 return libsbmlJNI.Input_unsetTransitionEffect(swigCPtr, this); 446 } 447 448 449/** 450 * Unsets the value of the 'name' attribute of this {@link Input}. 451 <p> 452 * <p> 453 * @return integer value indicating success/failure of the 454 * function. The possible values 455 * returned by this function are: 456 * <ul> 457 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 458 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 459 * </ul> 460 */ public 461 int unsetName() { 462 return libsbmlJNI.Input_unsetName(swigCPtr, this); 463 } 464 465 466/** 467 * Unsets the value of the 'sign' attribute of this {@link Input}. 468 <p> 469 * <p> 470 * @return integer value indicating success/failure of the 471 * function. The possible values 472 * returned by this function are: 473 * <ul> 474 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 475 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 476 * </ul> 477 */ public 478 int unsetSign() { 479 return libsbmlJNI.Input_unsetSign(swigCPtr, this); 480 } 481 482 483/** 484 * Unsets the value of the 'thresholdLevel' attribute of this {@link Input}. 485 <p> 486 * <p> 487 * @return integer value indicating success/failure of the 488 * function. The possible values 489 * returned by this function are: 490 * <ul> 491 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 492 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 493 * </ul> 494 */ public 495 int unsetThresholdLevel() { 496 return libsbmlJNI.Input_unsetThresholdLevel(swigCPtr, this); 497 } 498 499 500/** 501 * <p> 502 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another 503 * value. 504 <p> 505 * <p> 506 * In SBML, object identifiers are of a data type called <code>SId</code>. 507 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 508 * introduced for attribute values that refer to <code>SId</code> values; in 509 * previous Levels of SBML, this data type did not exist and attributes were 510 * simply described to as 'referring to an identifier', but the effective 511 * data type was the same as <code>SIdRef</code>in Level 3. These and 512 * other methods of libSBML refer to the type <code>SIdRef</code> for all 513 * Levels of SBML, even if the corresponding SBML specification did not 514 * explicitly name the data type. 515 <p> 516 * This method works by looking at all attributes and (if appropriate) 517 * mathematical formulas in MathML content, comparing the referenced 518 * identifiers to the value of <code>oldid</code>. If any matches are found, the 519 * matching values are replaced with <code>newid</code>. The method does <em>not</em> 520 * descend into child elements. 521 <p> 522 * @param oldid the old identifier 523 * @param newid the new identifier 524 */ public 525 void renameSIdRefs(String oldid, String newid) { 526 libsbmlJNI.Input_renameSIdRefs(swigCPtr, this, oldid, newid); 527 } 528 529 530/** 531 * Returns the XML name of this object. 532 <p> 533 * @return the name of this element. 534 */ public 535 String getElementName() { 536 return libsbmlJNI.Input_getElementName(swigCPtr, this); 537 } 538 539 540/** 541 * Returns the libSBML type code of this object instance. 542 <p> 543 * <p> 544 * LibSBML attaches an identifying code to every kind of SBML object. These 545 * are integer constants known as <em>SBML type codes</em>. The names of all 546 * the codes begin with the characters <code>SBML_</code>. 547 * In the Java language interface for libSBML, the 548 * type codes are defined as static integer constants in the interface class 549 * {@link libsbmlConstants}. Note that different Level 3 550 * package plug-ins may use overlapping type codes; to identify the package 551 * to which a given object belongs, call the <code>getPackageName()</code> 552 * method on the object. 553 <p> 554 * @return the SBML type code for this object: 555 * {@link libsbmlConstants#SBML_QUAL_INPUT SBML_QUAL_INPUT} 556 <p> 557 * <p> 558 * @warning <span class='warning'>The specific integer values of the possible 559 * type codes may be reused by different Level 3 package plug-ins. 560 * Thus, to identifiy the correct code, <strong>it is necessary to invoke 561 * both getTypeCode() and getPackageName()</strong>.</span> 562 <p> 563 * @see #getElementName() 564 * @see #getPackageName() 565 */ public 566 int getTypeCode() { 567 return libsbmlJNI.Input_getTypeCode(swigCPtr, this); 568 } 569 570 571/** 572 * Predicate returning <code>true</code> if all the required attributes 573 * for this {@link Input} object have been set. 574 <p> 575 * @note The required attributes for a {@link Input} object are: 576 * <ul> 577 * <li> 'qualitativeSpecies' 578 * <li> 'transitionEffect' 579 * 580 * </ul> <p> 581 * @return a boolean value indicating whether all the required 582 * attributes for this object have been defined. 583 */ public 584 boolean hasRequiredAttributes() { 585 return libsbmlJNI.Input_hasRequiredAttributes(swigCPtr, this); 586 } 587 588 589/** * @internal */ public 590 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 591 libsbmlJNI.Input_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 592 } 593 594}