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