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 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 <p> 074 * <p> 075 * @note Attempting to add an object to an {@link SBMLDocument} having a different 076 * combination of SBML Level, Version and XML namespaces than the object 077 * itself will result in an error at the time a caller attempts to make the 078 * addition. A parent object must have compatible Level, Version and XML 079 * namespaces. (Strictly speaking, a parent may also have more XML 080 * namespaces than a child, but the reverse is not permitted.) The 081 * restriction is necessary to ensure that an SBML model has a consistent 082 * overall structure. This requires callers to manage their objects 083 * carefully, but the benefit is increased flexibility in how models can be 084 * created by permitting callers to create objects bottom-up if desired. In 085 * situations where objects are not yet attached to parents (e.g., 086 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 087 * libSBML determine such things as whether it is valid to assign a 088 * particular value to an attribute. For packages, this means that the 089 * parent object to which this package element is being added must have 090 * been created with the package namespace, or that the package namespace 091 * was added to it, even if that parent is not a package object itself. 092 */ public 093 Input(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 094 this(libsbmlJNI.new_Input__SWIG_0(level, version, pkgVersion), true); 095 } 096 097 098/** 099 * Creates a new {@link Input} with the given level, version, and package version. 100 <p> 101 * @param level a long integer, the SBML Level to assign to this {@link Input}. 102 <p> 103 * @param version a long integer, the SBML Version to assign to this {@link Input}. 104 <p> 105 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Input}. 106 <p> 107 * <p> 108 * @note Attempting to add an object to an {@link SBMLDocument} having a different 109 * combination of SBML Level, Version and XML namespaces than the object 110 * itself will result in an error at the time a caller attempts to make the 111 * addition. A parent object must have compatible Level, Version and XML 112 * namespaces. (Strictly speaking, a parent may also have more XML 113 * namespaces than a child, but the reverse is not permitted.) The 114 * restriction is necessary to ensure that an SBML model has a consistent 115 * overall structure. This requires callers to manage their objects 116 * carefully, but the benefit is increased flexibility in how models can be 117 * created by permitting callers to create objects bottom-up if desired. In 118 * situations where objects are not yet attached to parents (e.g., 119 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 120 * libSBML determine such things as whether it is valid to assign a 121 * particular value to an attribute. For packages, this means that the 122 * parent object to which this package element is being added must have 123 * been created with the package namespace, or that the package namespace 124 * was added to it, even if that parent is not a package object itself. 125 */ public 126 Input(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 127 this(libsbmlJNI.new_Input__SWIG_1(level, version), true); 128 } 129 130 131/** 132 * Creates a new {@link Input} with the given level, version, and package version. 133 <p> 134 * @param level a long integer, the SBML Level to assign to this {@link Input}. 135 <p> 136 * @param version a long integer, the SBML Version to assign to this {@link Input}. 137 <p> 138 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Input}. 139 <p> 140 * <p> 141 * @note Attempting to add an object to an {@link SBMLDocument} having a different 142 * combination of SBML Level, Version and XML namespaces than the object 143 * itself will result in an error at the time a caller attempts to make the 144 * addition. A parent object must have compatible Level, Version and XML 145 * namespaces. (Strictly speaking, a parent may also have more XML 146 * namespaces than a child, but the reverse is not permitted.) The 147 * restriction is necessary to ensure that an SBML model has a consistent 148 * overall structure. This requires callers to manage their objects 149 * carefully, but the benefit is increased flexibility in how models can be 150 * created by permitting callers to create objects bottom-up if desired. In 151 * situations where objects are not yet attached to parents (e.g., 152 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 153 * libSBML determine such things as whether it is valid to assign a 154 * particular value to an attribute. For packages, this means that the 155 * parent object to which this package element is being added must have 156 * been created with the package namespace, or that the package namespace 157 * was added to it, even if that parent is not a package object itself. 158 */ public 159 Input(long level) throws org.sbml.libsbml.SBMLConstructorException { 160 this(libsbmlJNI.new_Input__SWIG_2(level), true); 161 } 162 163 164/** 165 * Creates a new {@link Input} with the given level, version, and package version. 166 <p> 167 * @param level a long integer, the SBML Level to assign to this {@link Input}. 168 <p> 169 * @param version a long integer, the SBML Version to assign to this {@link Input}. 170 <p> 171 * @param pkgVersion a long integer, the SBML Qual Version to assign to this {@link Input}. 172 <p> 173 * <p> 174 * @note Attempting to add an object to an {@link SBMLDocument} having a different 175 * combination of SBML Level, Version and XML namespaces than the object 176 * itself will result in an error at the time a caller attempts to make the 177 * addition. A parent object must have compatible Level, Version and XML 178 * namespaces. (Strictly speaking, a parent may also have more XML 179 * namespaces than a child, but the reverse is not permitted.) The 180 * restriction is necessary to ensure that an SBML model has a consistent 181 * overall structure. This requires callers to manage their objects 182 * carefully, but the benefit is increased flexibility in how models can be 183 * created by permitting callers to create objects bottom-up if desired. In 184 * situations where objects are not yet attached to parents (e.g., 185 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 186 * libSBML determine such things as whether it is valid to assign a 187 * particular value to an attribute. For packages, this means that the 188 * parent object to which this package element is being added must have 189 * been created with the package namespace, or that the package namespace 190 * was added to it, even if that parent is not a package object itself. 191 */ public 192 Input() throws org.sbml.libsbml.SBMLConstructorException { 193 this(libsbmlJNI.new_Input__SWIG_3(), true); 194 } 195 196 197/** 198 * Creates a new {@link Input} with the given {@link QualPkgNamespaces} object. 199 <p> 200 * <p> 201 * The package namespaces object used in this constructor is derived from a 202 * {@link SBMLNamespaces} object, which encapsulates SBML Level/Version/namespaces 203 * information. It is used to communicate the SBML Level, Version, and 204 * package version and name information used in addition to SBML Level 3 Core. A 205 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an 206 * package namespace object somewhere in a program once, then hand that object 207 * as needed to object constructors of that package that accept it as and 208 * argument, such as this one. 209 <p> 210 * @param qualns the {@link QualPkgNamespaces} object. 211 <p> 212 * <p> 213 * @note Attempting to add an object to an {@link SBMLDocument} having a different 214 * combination of SBML Level, Version and XML namespaces than the object 215 * itself will result in an error at the time a caller attempts to make the 216 * addition. A parent object must have compatible Level, Version and XML 217 * namespaces. (Strictly speaking, a parent may also have more XML 218 * namespaces than a child, but the reverse is not permitted.) The 219 * restriction is necessary to ensure that an SBML model has a consistent 220 * overall structure. This requires callers to manage their objects 221 * carefully, but the benefit is increased flexibility in how models can be 222 * created by permitting callers to create objects bottom-up if desired. In 223 * situations where objects are not yet attached to parents (e.g., 224 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help 225 * libSBML determine such things as whether it is valid to assign a 226 * particular value to an attribute. For packages, this means that the 227 * parent object to which this package element is being added must have 228 * been created with the package namespace, or that the package namespace 229 * was added to it, even if that parent is not a package object itself. 230 */ public 231 Input(QualPkgNamespaces qualns) throws org.sbml.libsbml.SBMLConstructorException { 232 this(libsbmlJNI.new_Input__SWIG_4(QualPkgNamespaces.getCPtr(qualns), qualns), true); 233 } 234 235 236/** 237 * Copy constructor for {@link Input}. 238 <p> 239 * @param orig the {@link Input} instance to copy. 240 */ public 241 Input(Input orig) throws org.sbml.libsbml.SBMLConstructorException { 242 this(libsbmlJNI.new_Input__SWIG_5(Input.getCPtr(orig), orig), true); 243 } 244 245 246/** 247 * Creates and returns a deep copy of this {@link Input} object. 248 <p> 249 * @return a (deep) copy of this {@link Input} object. 250 */ public 251 Input cloneObject() { 252 long cPtr = libsbmlJNI.Input_cloneObject(swigCPtr, this); 253 return (cPtr == 0) ? null : new Input(cPtr, true); 254 } 255 256 257/** 258 * Returns the value of the 'id' attribute of this {@link Input}. 259 <p> 260 * @note Because of the inconsistent behavior of this function with 261 * respect to assignments and rules, it is now recommended to 262 * use the getIdAttribute() function instead. 263 <p> 264 * <p> 265 * The identifier given by an object's 'id' attribute value 266 * is used to identify the object within the SBML model definition. 267 * Other objects can refer to the component using this identifier. The 268 * data type of 'id' is always <code>SId</code> or a type derived 269 * from that, such as <code>UnitSId</code>, depending on the object in 270 * question. All data types are defined as follows: 271 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'> 272 * letter .= 'a'..'z','A'..'Z' 273 * digit .= '0'..'9' 274 * idChar .= letter | digit | '_' 275 * SId .= ( letter | '_' ) idChar* 276 * </pre> 277 <p> 278 * The characters <code>(</code> and <code>)</code> are used for grouping, the 279 * character <code>*</code> 'zero or more times', and the character 280 * <code>|</code> indicates logical 'or'. The equality of SBML identifiers is 281 * determined by an exact character sequence match; i.e., comparisons must be 282 * performed in a case-sensitive manner. This applies to all uses of <code>SId</code>, 283 * <code>SIdRef</code>, and derived types. 284 <p> 285 * In SBML Level 3 Version 2, the 'id' and 'name' attributes were 286 * moved to {@link SBase} directly, instead of being defined individually for many 287 * (but not all) objects. Libsbml has for a long time provided functions 288 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 289 * would fail or otherwise return empty strings if executed on any object 290 * for which those attributes were not defined. Now that all {@link SBase} objects 291 * define those attributes, those functions now succeed for any object with 292 * the appropriate level and version. 293 <p> 294 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 295 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 296 * functions (though not the setId() or unsetId() functions) would instead 297 * reference the value of the 'variable' attribute (for the rules and event 298 * assignments) or the 'symbol' attribute (for initial assignments). 299 * The {@link AlgebraicRule} fell into this category as well, though because it 300 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 301 * always return an empty string, and isSetId() would always return <code>false.</code> 302 * For this reason, four new functions are now provided 303 * (getIdAttribute(), setIdAttribute(String), 304 * isSetIdAttribute(), and unsetIdAttribute()) that will always 305 * act on the actual 'id' attribute, regardless of the object's type. The 306 * new functions should be used instead of the old ones unless the old behavior 307 * is somehow necessary. 308 <p> 309 * Regardless of the level and version of the SBML, these functions allow 310 * client applications to use more generalized code in some situations 311 * (for instance, when manipulating objects that are all known to have 312 * identifiers). If the object in question does not posess an 'id' attribute 313 * according to the SBML specification for the Level and Version in use, 314 * libSBML will not allow the identifier to be set, nor will it read or 315 * write 'id' attributes for those objects. 316 <p> 317 * @return the id of this {@link Input}. 318 <p> 319 * @see #getIdAttribute() 320 * @see #setIdAttribute(String sid) 321 * @see #isSetIdAttribute() 322 * @see #unsetIdAttribute() 323 */ public 324 String getId() { 325 return libsbmlJNI.Input_getId(swigCPtr, this); 326 } 327 328 329/** 330 * Returns the value of the 'qualitativeSpecies' attribute of this {@link Input}. 331 <p> 332 * @return the value of the 'qualitativeSpecies' attribute of this {@link Input} as a string. 333 */ public 334 String getQualitativeSpecies() { 335 return libsbmlJNI.Input_getQualitativeSpecies(swigCPtr, this); 336 } 337 338 339/** 340 * Returns the value of the 'transitionEffect' attribute of this {@link Input}. 341 <p> 342 * @return the value of the 'transitionEffect' attribute of this {@link Input} as a string. 343 */ public 344 int getTransitionEffect() { 345 return libsbmlJNI.Input_getTransitionEffect(swigCPtr, this); 346 } 347 348 349/** 350 * Returns the value of the 'name' attribute of this {@link Input} object. 351 <p> 352 * <p> 353 * <p> 354 * In SBML Level 3 Version 2, the 'id' and 'name' attributes were 355 * moved to {@link SBase} directly, instead of being defined individually for many 356 * (but not all) objects. Libsbml has for a long time provided functions 357 * defined on {@link SBase} itself to get, set, and unset those attributes, which 358 * would fail or otherwise return empty strings if executed on any object 359 * for which those attributes were not defined. Now that all {@link SBase} objects 360 * define those attributes, those functions now succeed for any object with 361 * the appropriate level and version. 362 <p> 363 * The 'name' attribute is 364 * optional and is not intended to be used for cross-referencing purposes 365 * within a model. Its purpose instead is to provide a human-readable 366 * label for the component. The data type of 'name' is the type 367 * <code>string</code> defined in XML Schema. SBML imposes no 368 * restrictions as to the content of 'name' attributes beyond those 369 * restrictions defined by the <code>string</code> type in XML Schema. 370 <p> 371 * The recommended practice for handling 'name' is as follows. If a 372 * software tool has the capability for displaying the content of 'name' 373 * attributes, it should display this content to the user as a 374 * component's label instead of the component's 'id'. If the user 375 * interface does not have this capability (e.g., because it cannot 376 * display or use special characters in symbol names), or if the 'name' 377 * attribute is missing on a given component, then the user interface 378 * should display the value of the 'id' attribute instead. (Script 379 * language interpreters are especially likely to display 'id' instead of 380 * 'name'.) 381 <p> 382 * As a consequence of the above, authors of systems that automatically 383 * generate the values of 'id' attributes should be aware some systems 384 * may display the 'id''s to the user. Authors therefore may wish to 385 * take some care to have their software create 'id' values that are: (a) 386 * reasonably easy for humans to type and read; and (b) likely to be 387 * meaningful, for example by making the 'id' attribute be an abbreviated 388 * form of the name attribute value. 389 <p> 390 * An additional point worth mentioning is although there are 391 * restrictions on the uniqueness of 'id' values, there are no 392 * restrictions on the uniqueness of 'name' values in a model. This 393 * allows software applications leeway in assigning component identifiers. 394 <p> 395 * Regardless of the level and version of the SBML, these functions allow 396 * client applications to use more generalized code in some situations 397 * (for instance, when manipulating objects that are all known to have 398 * names). If the object in question does not posess a 'name' attribute 399 * according to the SBML specification for the Level and Version in use, 400 * libSBML will not allow the name to be set, nor will it read or 401 * write 'name' attributes for those objects. 402 <p> 403 * @return the name of this SBML object, or the empty string if not set or unsettable. 404 <p> 405 * @see #getIdAttribute() 406 * @see #isSetName() 407 * @see #setName(String sid) 408 * @see #unsetName() 409 */ public 410 String getName() { 411 return libsbmlJNI.Input_getName(swigCPtr, this); 412 } 413 414 415/** 416 * Returns the value of the 'sign' attribute of this {@link Input}. 417 <p> 418 * @return the value of the 'sign' attribute of this {@link Input} as a string. 419 */ public 420 int getSign() { 421 return libsbmlJNI.Input_getSign(swigCPtr, this); 422 } 423 424 425/** 426 * Returns the value of the 'thresholdLevel' attribute of this {@link Input}. 427 <p> 428 * @return the value of the 'thresholdLevel' attribute of this {@link Input} as a integer. 429 */ public 430 int getThresholdLevel() { 431 return libsbmlJNI.Input_getThresholdLevel(swigCPtr, this); 432 } 433 434 435/** 436 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 437 * {@link Input}'s 'id' attribute has been set. 438 <p> 439 * <p> 440 * @note Because of the inconsistent behavior of this function with 441 * respect to assignments and rules, it is now recommended to 442 * use the isSetIdAttribute() function instead. 443 <p> 444 * <p> 445 * The identifier given by an object's 'id' attribute value 446 * is used to identify the object within the SBML model definition. 447 * Other objects can refer to the component using this identifier. The 448 * data type of 'id' is always <code>SId</code> or a type derived 449 * from that, such as <code>UnitSId</code>, depending on the object in 450 * question. All data types are defined as follows: 451 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'> 452 * letter .= 'a'..'z','A'..'Z' 453 * digit .= '0'..'9' 454 * idChar .= letter | digit | '_' 455 * SId .= ( letter | '_' ) idChar* 456 * </pre> 457 <p> 458 * The characters <code>(</code> and <code>)</code> are used for grouping, the 459 * character <code>*</code> 'zero or more times', and the character 460 * <code>|</code> indicates logical 'or'. The equality of SBML identifiers is 461 * determined by an exact character sequence match; i.e., comparisons must be 462 * performed in a case-sensitive manner. This applies to all uses of <code>SId</code>, 463 * <code>SIdRef</code>, and derived types. 464 <p> 465 * In SBML Level 3 Version 2, the 'id' and 'name' attributes were 466 * moved to {@link SBase} directly, instead of being defined individually for many 467 * (but not all) objects. Libsbml has for a long time provided functions 468 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 469 * would fail or otherwise return empty strings if executed on any object 470 * for which those attributes were not defined. Now that all {@link SBase} objects 471 * define those attributes, those functions now succeed for any object with 472 * the appropriate level and version. 473 <p> 474 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 475 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 476 * functions (though not the setId() or unsetId() functions) would instead 477 * reference the value of the 'variable' attribute (for the rules and event 478 * assignments) or the 'symbol' attribute (for initial assignments). 479 * The {@link AlgebraicRule} fell into this category as well, though because it 480 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 481 * always return an empty string, and isSetId() would always return <code>false.</code> 482 * For this reason, four new functions are now provided 483 * (getIdAttribute(), setIdAttribute(String), 484 * isSetIdAttribute(), and unsetIdAttribute()) that will always 485 * act on the actual 'id' attribute, regardless of the object's type. The 486 * new functions should be used instead of the old ones unless the old behavior 487 * is somehow necessary. 488 <p> 489 * Regardless of the level and version of the SBML, these functions allow 490 * client applications to use more generalized code in some situations 491 * (for instance, when manipulating objects that are all known to have 492 * identifiers). If the object in question does not posess an 'id' attribute 493 * according to the SBML specification for the Level and Version in use, 494 * libSBML will not allow the identifier to be set, nor will it read or 495 * write 'id' attributes for those objects. 496 <p> 497 * @return <code>true</code> if the 'id' attribute of this SBML object is 498 * set, <code>false</code> otherwise. 499 <p> 500 * @see #getIdAttribute() 501 * @see #setIdAttribute(String sid) 502 * @see #unsetIdAttribute() 503 * @see #isSetIdAttribute() 504 */ public 505 boolean isSetId() { 506 return libsbmlJNI.Input_isSetId(swigCPtr, this); 507 } 508 509 510/** 511 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 512 * {@link Input}'s 'qualitativeSpecies' attribute has been set. 513 <p> 514 * @return <code>true</code> if this {@link Input}'s 'qualitativeSpecies' attribute has been set, 515 * otherwise <code>false</code> is returned. 516 */ public 517 boolean isSetQualitativeSpecies() { 518 return libsbmlJNI.Input_isSetQualitativeSpecies(swigCPtr, this); 519 } 520 521 522/** 523 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 524 * {@link Input}'s 'transitionEffect' attribute has been set. 525 <p> 526 * @return <code>true</code> if this {@link Input}'s 'transitionEffect' attribute has been set, 527 * otherwise <code>false</code> is returned. 528 */ public 529 boolean isSetTransitionEffect() { 530 return libsbmlJNI.Input_isSetTransitionEffect(swigCPtr, this); 531 } 532 533 534/** 535 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 536 * {@link Input}'s 'name' attribute has been set. 537 <p> 538 * <p> 539 * <p> 540 * In SBML Level 3 Version 2, the 'id' and 'name' attributes were 541 * moved to {@link SBase} directly, instead of being defined individually for many 542 * (but not all) objects. Libsbml has for a long time provided functions 543 * defined on {@link SBase} itself to get, set, and unset those attributes, which 544 * would fail or otherwise return empty strings if executed on any object 545 * for which those attributes were not defined. Now that all {@link SBase} objects 546 * define those attributes, those functions now succeed for any object with 547 * the appropriate level and version. 548 <p> 549 * The 'name' attribute is 550 * optional and is not intended to be used for cross-referencing purposes 551 * within a model. Its purpose instead is to provide a human-readable 552 * label for the component. The data type of 'name' is the type 553 * <code>string</code> defined in XML Schema. SBML imposes no 554 * restrictions as to the content of 'name' attributes beyond those 555 * restrictions defined by the <code>string</code> type in XML Schema. 556 <p> 557 * The recommended practice for handling 'name' is as follows. If a 558 * software tool has the capability for displaying the content of 'name' 559 * attributes, it should display this content to the user as a 560 * component's label instead of the component's 'id'. If the user 561 * interface does not have this capability (e.g., because it cannot 562 * display or use special characters in symbol names), or if the 'name' 563 * attribute is missing on a given component, then the user interface 564 * should display the value of the 'id' attribute instead. (Script 565 * language interpreters are especially likely to display 'id' instead of 566 * 'name'.) 567 <p> 568 * As a consequence of the above, authors of systems that automatically 569 * generate the values of 'id' attributes should be aware some systems 570 * may display the 'id''s to the user. Authors therefore may wish to 571 * take some care to have their software create 'id' values that are: (a) 572 * reasonably easy for humans to type and read; and (b) likely to be 573 * meaningful, for example by making the 'id' attribute be an abbreviated 574 * form of the name attribute value. 575 <p> 576 * An additional point worth mentioning is although there are 577 * restrictions on the uniqueness of 'id' values, there are no 578 * restrictions on the uniqueness of 'name' values in a model. This 579 * allows software applications leeway in assigning component identifiers. 580 <p> 581 * Regardless of the level and version of the SBML, these functions allow 582 * client applications to use more generalized code in some situations 583 * (for instance, when manipulating objects that are all known to have 584 * names). If the object in question does not posess a 'name' attribute 585 * according to the SBML specification for the Level and Version in use, 586 * libSBML will not allow the name to be set, nor will it read or 587 * write 'name' attributes for those objects. 588 <p> 589 * @return <code>true</code> if the 'name' attribute of this SBML object is 590 * set, <code>false</code> otherwise. 591 <p> 592 * @see #getName() 593 * @see #setName(String sid) 594 * @see #unsetName() 595 */ public 596 boolean isSetName() { 597 return libsbmlJNI.Input_isSetName(swigCPtr, this); 598 } 599 600 601/** 602 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 603 * {@link Input}'s 'sign' attribute has been set. 604 <p> 605 * @return <code>true</code> if this {@link Input}'s 'sign' attribute has been set, 606 * otherwise <code>false</code> is returned. 607 */ public 608 boolean isSetSign() { 609 return libsbmlJNI.Input_isSetSign(swigCPtr, this); 610 } 611 612 613/** 614 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 615 * {@link Input}'s 'thresholdLevel' attribute has been set. 616 <p> 617 * @return <code>true</code> if this {@link Input}'s 'thresholdLevel' attribute has been set, 618 * otherwise <code>false</code> is returned. 619 */ public 620 boolean isSetThresholdLevel() { 621 return libsbmlJNI.Input_isSetThresholdLevel(swigCPtr, this); 622 } 623 624 625/** 626 * Sets the value of the 'id' attribute of this obInputject. 627 <p> 628 * <p> 629 * The string <code>sid</code> is copied. 630 <p> 631 * <p> 632 * The identifier given by an object's 'id' attribute value 633 * is used to identify the object within the SBML model definition. 634 * Other objects can refer to the component using this identifier. The 635 * data type of 'id' is always <code>SId</code> or a type derived 636 * from that, such as <code>UnitSId</code>, depending on the object in 637 * question. All data types are defined as follows: 638 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'> 639 * letter .= 'a'..'z','A'..'Z' 640 * digit .= '0'..'9' 641 * idChar .= letter | digit | '_' 642 * SId .= ( letter | '_' ) idChar* 643 * </pre> 644 <p> 645 * The characters <code>(</code> and <code>)</code> are used for grouping, the 646 * character <code>*</code> 'zero or more times', and the character 647 * <code>|</code> indicates logical 'or'. The equality of SBML identifiers is 648 * determined by an exact character sequence match; i.e., comparisons must be 649 * performed in a case-sensitive manner. This applies to all uses of <code>SId</code>, 650 * <code>SIdRef</code>, and derived types. 651 <p> 652 * In SBML Level 3 Version 2, the 'id' and 'name' attributes were 653 * moved to {@link SBase} directly, instead of being defined individually for many 654 * (but not all) objects. Libsbml has for a long time provided functions 655 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 656 * would fail or otherwise return empty strings if executed on any object 657 * for which those attributes were not defined. Now that all {@link SBase} objects 658 * define those attributes, those functions now succeed for any object with 659 * the appropriate level and version. 660 <p> 661 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 662 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 663 * functions (though not the setId() or unsetId() functions) would instead 664 * reference the value of the 'variable' attribute (for the rules and event 665 * assignments) or the 'symbol' attribute (for initial assignments). 666 * The {@link AlgebraicRule} fell into this category as well, though because it 667 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 668 * always return an empty string, and isSetId() would always return <code>false.</code> 669 * For this reason, four new functions are now provided 670 * (getIdAttribute(), setIdAttribute(String), 671 * isSetIdAttribute(), and unsetIdAttribute()) that will always 672 * act on the actual 'id' attribute, regardless of the object's type. The 673 * new functions should be used instead of the old ones unless the old behavior 674 * is somehow necessary. 675 <p> 676 * Regardless of the level and version of the SBML, these functions allow 677 * client applications to use more generalized code in some situations 678 * (for instance, when manipulating objects that are all known to have 679 * identifiers). If the object in question does not posess an 'id' attribute 680 * according to the SBML specification for the Level and Version in use, 681 * libSBML will not allow the identifier to be set, nor will it read or 682 * write 'id' attributes for those objects. 683 <p> 684 * @param sid the string to use as the identifier of this object. 685 <p> 686 * <p> 687 * @return integer value indicating success/failure of the 688 * function. The possible values 689 * returned by this function are: 690 * <ul> 691 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 692 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 693 * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE} 694 * 695 * </ul> <p> 696 * @see #getIdAttribute() 697 * @see #setIdAttribute(String sid) 698 * @see #isSetIdAttribute() 699 * @see #unsetIdAttribute() 700 */ public 701 int setId(String sid) { 702 return libsbmlJNI.Input_setId(swigCPtr, this, sid); 703 } 704 705 706/** 707 * Sets the value of the 'qualitativeSpecies' attribute of this {@link Input}. 708 <p> 709 * @param qualitativeSpecies the value of the 'qualitativeSpecies' attribute to be set. 710 <p> 711 * <p> 712 * @return integer value indicating success/failure of the 713 * function. The possible values 714 * returned by this function are: 715 * <ul> 716 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 717 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 718 * </ul> 719 */ public 720 int setQualitativeSpecies(String qualitativeSpecies) { 721 return libsbmlJNI.Input_setQualitativeSpecies(swigCPtr, this, qualitativeSpecies); 722 } 723 724 725/** 726 * Sets the value of the 'transitionEffect' attribute of this {@link Input}. 727 <p> 728 * @param transitionEffect the value of the 'transitionEffect' attribute to be set. 729 <p> 730 * <p> 731 * @return integer value indicating success/failure of the 732 * function. The possible values 733 * returned by this function are: 734 * <ul> 735 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 736 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 737 * </ul> 738 */ public 739 int setTransitionEffect(int transitionEffect) { 740 return libsbmlJNI.Input_setTransitionEffect(swigCPtr, this, transitionEffect); 741 } 742 743 744/** 745 * Sets the value of the 'name' attribute of this {@link Input}. 746 <p> 747 * <p> 748 * The string in <code>name</code> is copied. 749 <p> 750 * @param name the new name for the SBML object. 751 <p> 752 * <p> 753 * @return integer value indicating success/failure of the 754 * function. The possible values 755 * returned by this function are: 756 * <ul> 757 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 758 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 759 * 760 * </ul> 761 */ public 762 int setName(String name) { 763 return libsbmlJNI.Input_setName(swigCPtr, this, name); 764 } 765 766 767/** 768 * Sets the value of the 'sign' attribute of this {@link Input}. 769 <p> 770 * @param sign the value of the 'sign' attribute to be set. 771 <p> 772 * <p> 773 * @return integer value indicating success/failure of the 774 * function. The possible values 775 * returned by this function are: 776 * <ul> 777 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 778 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 779 * </ul> 780 */ public 781 int setSign(int sign) { 782 return libsbmlJNI.Input_setSign(swigCPtr, this, sign); 783 } 784 785 786/** 787 * Sets the value of the 'thresholdLevel' attribute of this {@link Input}. 788 <p> 789 * @param thresholdLevel int value of the 'thresholdLevel' attribute to be set. 790 <p> 791 * <p> 792 * @return integer value indicating success/failure of the 793 * function. The possible values 794 * returned by this function are: 795 * <ul> 796 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 797 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 798 * </ul> 799 */ public 800 int setThresholdLevel(int thresholdLevel) { 801 return libsbmlJNI.Input_setThresholdLevel(swigCPtr, this, thresholdLevel); 802 } 803 804 805/** 806 * Unsets the value of the 'id' attribute of this {@link Input}. 807 <p> 808 * <p> 809 * <p> 810 * The identifier given by an object's 'id' attribute value 811 * is used to identify the object within the SBML model definition. 812 * Other objects can refer to the component using this identifier. The 813 * data type of 'id' is always <code>SId</code> or a type derived 814 * from that, such as <code>UnitSId</code>, depending on the object in 815 * question. All data types are defined as follows: 816 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'> 817 * letter .= 'a'..'z','A'..'Z' 818 * digit .= '0'..'9' 819 * idChar .= letter | digit | '_' 820 * SId .= ( letter | '_' ) idChar* 821 * </pre> 822 <p> 823 * The characters <code>(</code> and <code>)</code> are used for grouping, the 824 * character <code>*</code> 'zero or more times', and the character 825 * <code>|</code> indicates logical 'or'. The equality of SBML identifiers is 826 * determined by an exact character sequence match; i.e., comparisons must be 827 * performed in a case-sensitive manner. This applies to all uses of <code>SId</code>, 828 * <code>SIdRef</code>, and derived types. 829 <p> 830 * In SBML Level 3 Version 2, the 'id' and 'name' attributes were 831 * moved to {@link SBase} directly, instead of being defined individually for many 832 * (but not all) objects. Libsbml has for a long time provided functions 833 * defined on {@link SBase} itself to get, set, check, and unset those attributes, which 834 * would fail or otherwise return empty strings if executed on any object 835 * for which those attributes were not defined. Now that all {@link SBase} objects 836 * define those attributes, those functions now succeed for any object with 837 * the appropriate level and version. 838 <p> 839 * The exception to this rule is that for {@link InitialAssignment}, {@link EventAssignment}, 840 * {@link AssignmentRule}, and {@link RateRule} objects, the getId() function and the isSetId() 841 * functions (though not the setId() or unsetId() functions) would instead 842 * reference the value of the 'variable' attribute (for the rules and event 843 * assignments) or the 'symbol' attribute (for initial assignments). 844 * The {@link AlgebraicRule} fell into this category as well, though because it 845 * contained neither a 'variable' nor a 'symbol' attribute, getId() would 846 * always return an empty string, and isSetId() would always return <code>false.</code> 847 * For this reason, four new functions are now provided 848 * (getIdAttribute(), setIdAttribute(String), 849 * isSetIdAttribute(), and unsetIdAttribute()) that will always 850 * act on the actual 'id' attribute, regardless of the object's type. The 851 * new functions should be used instead of the old ones unless the old behavior 852 * is somehow necessary. 853 <p> 854 * Regardless of the level and version of the SBML, these functions allow 855 * client applications to use more generalized code in some situations 856 * (for instance, when manipulating objects that are all known to have 857 * identifiers). If the object in question does not posess an 'id' attribute 858 * according to the SBML specification for the Level and Version in use, 859 * libSBML will not allow the identifier to be set, nor will it read or 860 * write 'id' attributes for those objects. 861 <p> 862 * <p> 863 * @return integer value indicating success/failure of the 864 * function. The possible values 865 * returned by this function are: 866 * <ul> 867 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 868 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 869 * 870 * </ul> <p> 871 * @see #getIdAttribute() 872 * @see #setIdAttribute(String sid) 873 * @see #isSetIdAttribute() 874 * @see #unsetIdAttribute() 875 */ public 876 int unsetId() { 877 return libsbmlJNI.Input_unsetId(swigCPtr, this); 878 } 879 880 881/** 882 * Unsets the value of the 'qualitativeSpecies' attribute of this {@link Input}. 883 <p> 884 * <p> 885 * @return integer value indicating success/failure of the 886 * function. The possible values 887 * returned by this function are: 888 * <ul> 889 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 890 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 891 * </ul> 892 */ public 893 int unsetQualitativeSpecies() { 894 return libsbmlJNI.Input_unsetQualitativeSpecies(swigCPtr, this); 895 } 896 897 898/** 899 * Unsets the value of the 'transitionEffect' attribute of this {@link Input}. 900 <p> 901 * <p> 902 * @return integer value indicating success/failure of the 903 * function. The possible values 904 * returned by this function are: 905 * <ul> 906 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 907 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 908 * </ul> 909 */ public 910 int unsetTransitionEffect() { 911 return libsbmlJNI.Input_unsetTransitionEffect(swigCPtr, this); 912 } 913 914 915/** 916 * Unsets the value of the 'name' attribute of this {@link Input}. 917 <p> 918 * <p> 919 * <p> 920 * In SBML Level 3 Version 2, the 'id' and 'name' attributes were 921 * moved to {@link SBase} directly, instead of being defined individually for many 922 * (but not all) objects. Libsbml has for a long time provided functions 923 * defined on {@link SBase} itself to get, set, and unset those attributes, which 924 * would fail or otherwise return empty strings if executed on any object 925 * for which those attributes were not defined. Now that all {@link SBase} objects 926 * define those attributes, those functions now succeed for any object with 927 * the appropriate level and version. 928 <p> 929 * The 'name' attribute is 930 * optional and is not intended to be used for cross-referencing purposes 931 * within a model. Its purpose instead is to provide a human-readable 932 * label for the component. The data type of 'name' is the type 933 * <code>string</code> defined in XML Schema. SBML imposes no 934 * restrictions as to the content of 'name' attributes beyond those 935 * restrictions defined by the <code>string</code> type in XML Schema. 936 <p> 937 * The recommended practice for handling 'name' is as follows. If a 938 * software tool has the capability for displaying the content of 'name' 939 * attributes, it should display this content to the user as a 940 * component's label instead of the component's 'id'. If the user 941 * interface does not have this capability (e.g., because it cannot 942 * display or use special characters in symbol names), or if the 'name' 943 * attribute is missing on a given component, then the user interface 944 * should display the value of the 'id' attribute instead. (Script 945 * language interpreters are especially likely to display 'id' instead of 946 * 'name'.) 947 <p> 948 * As a consequence of the above, authors of systems that automatically 949 * generate the values of 'id' attributes should be aware some systems 950 * may display the 'id''s to the user. Authors therefore may wish to 951 * take some care to have their software create 'id' values that are: (a) 952 * reasonably easy for humans to type and read; and (b) likely to be 953 * meaningful, for example by making the 'id' attribute be an abbreviated 954 * form of the name attribute value. 955 <p> 956 * An additional point worth mentioning is although there are 957 * restrictions on the uniqueness of 'id' values, there are no 958 * restrictions on the uniqueness of 'name' values in a model. This 959 * allows software applications leeway in assigning component identifiers. 960 <p> 961 * Regardless of the level and version of the SBML, these functions allow 962 * client applications to use more generalized code in some situations 963 * (for instance, when manipulating objects that are all known to have 964 * names). If the object in question does not posess a 'name' attribute 965 * according to the SBML specification for the Level and Version in use, 966 * libSBML will not allow the name to be set, nor will it read or 967 * write 'name' attributes for those objects. 968 <p> 969 * <p> 970 * @return integer value indicating success/failure of the 971 * function. The possible values 972 * returned by this function are: 973 * <ul> 974 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 975 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 976 * 977 * </ul> <p> 978 * @see #getName() 979 * @see #setName(String sid) 980 * @see #isSetName() 981 */ public 982 int unsetName() { 983 return libsbmlJNI.Input_unsetName(swigCPtr, this); 984 } 985 986 987/** 988 * Unsets the value of the 'sign' attribute of this {@link Input}. 989 <p> 990 * <p> 991 * @return integer value indicating success/failure of the 992 * function. The possible values 993 * returned by this function are: 994 * <ul> 995 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 996 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 997 * </ul> 998 */ public 999 int unsetSign() { 1000 return libsbmlJNI.Input_unsetSign(swigCPtr, this); 1001 } 1002 1003 1004/** 1005 * Unsets the value of the 'thresholdLevel' attribute of this {@link Input}. 1006 <p> 1007 * <p> 1008 * @return integer value indicating success/failure of the 1009 * function. The possible values 1010 * returned by this function are: 1011 * <ul> 1012 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1013 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 1014 * </ul> 1015 */ public 1016 int unsetThresholdLevel() { 1017 return libsbmlJNI.Input_unsetThresholdLevel(swigCPtr, this); 1018 } 1019 1020 1021/** 1022 * <p> 1023 * Replaces all uses of a given <code>SIdRef</code> type attribute value with another 1024 * value. 1025 <p> 1026 * <p> 1027 * In SBML, object identifiers are of a data type called <code>SId</code>. 1028 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 1029 * introduced for attribute values that refer to <code>SId</code> values; in 1030 * previous Levels of SBML, this data type did not exist and attributes were 1031 * simply described to as 'referring to an identifier', but the effective 1032 * data type was the same as <code>SIdRef</code> in Level 3. These and 1033 * other methods of libSBML refer to the type <code>SIdRef</code> for all 1034 * Levels of SBML, even if the corresponding SBML specification did not 1035 * explicitly name the data type. 1036 <p> 1037 * This method works by looking at all attributes and (if appropriate) 1038 * mathematical formulas in MathML content, comparing the referenced 1039 * identifiers to the value of <code>oldid</code>. If any matches are found, the 1040 * matching values are replaced with <code>newid</code>. The method does <em>not</em> 1041 * descend into child elements. 1042 <p> 1043 * @param oldid the old identifier. 1044 * @param newid the new identifier. 1045 */ public 1046 void renameSIdRefs(String oldid, String newid) { 1047 libsbmlJNI.Input_renameSIdRefs(swigCPtr, this, oldid, newid); 1048 } 1049 1050 1051/** 1052 * Returns the XML name of this object. 1053 <p> 1054 * @return the name of this element. 1055 */ public 1056 String getElementName() { 1057 return libsbmlJNI.Input_getElementName(swigCPtr, this); 1058 } 1059 1060 1061/** 1062 * Returns the libSBML type code of this object instance. 1063 <p> 1064 * <p> 1065 * LibSBML attaches an identifying code to every kind of SBML object. These 1066 * are integer constants known as <em>SBML type codes</em>. The names of all 1067 * the codes begin with the characters <code>SBML_</code>. 1068 * In the Java language interface for libSBML, the 1069 * type codes are defined as static integer constants in the interface class 1070 * {@link libsbmlConstants}. Note that different Level 3 1071 * package plug-ins may use overlapping type codes; to identify the package 1072 * to which a given object belongs, call the <code>getPackageName()</code> 1073 * method on the object. 1074 <p> 1075 * @return the SBML type code for this object: 1076 * {@link libsbmlConstants#SBML_QUAL_INPUT SBML_QUAL_INPUT} 1077 <p> 1078 * <p> 1079 * @warning <span class='warning'>The specific integer values of the possible 1080 * type codes may be reused by different libSBML plug-ins for SBML Level 3. 1081 * packages, To fully identify the correct code, <strong>it is necessary to 1082 * invoke both getTypeCode() and getPackageName()</strong>.</span> 1083 <p> 1084 * @see #getElementName() 1085 * @see #getPackageName() 1086 */ public 1087 int getTypeCode() { 1088 return libsbmlJNI.Input_getTypeCode(swigCPtr, this); 1089 } 1090 1091 1092/** 1093 * Predicate returning <code>true</code> if all the required attributes 1094 * for this {@link Input} object have been set. 1095 <p> 1096 * @note The required attributes for a {@link Input} object are: 1097 * <ul> 1098 * <li> 'qualitativeSpecies' 1099 * <li> 'transitionEffect' 1100 * 1101 * </ul> <p> 1102 * @return a boolean value indicating whether all the required 1103 * attributes for this object have been defined. 1104 */ public 1105 boolean hasRequiredAttributes() { 1106 return libsbmlJNI.Input_hasRequiredAttributes(swigCPtr, this); 1107 } 1108 1109 1110/** * @internal */ public 1111 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 1112 libsbmlJNI.Input_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 1113 } 1114 1115}