001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.12 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011/** 012 * Facilities for using the Systems Biology Ontology. 013 <p> 014 * <p style='color: #777; font-style: italic'> 015This class of objects is defined by libSBML only and has no direct 016equivalent in terms of SBML components. This class is not prescribed by 017the SBML specifications, although it is used to implement features 018defined in SBML. 019</p> 020 021 <p> 022 * The values of 'id' attributes on SBML components allow the components to 023 * be cross-referenced within a model. The values of 'name' attributes on 024 * SBML components provide the opportunity to assign them meaningful labels 025 * suitable for display to humans. The specific identifiers and labels 026 * used in a model necessarily must be unrestricted by SBML, so that 027 * software and users are free to pick whatever they need. However, this 028 * freedom makes it more difficult for software tools to determine, without 029 * additional human intervention, the semantics of models more precisely 030 * than the semantics provided by the SBML object classes defined in other 031 * sections of this document. For example, there is nothing inherent in a 032 * parameter with identifier <code>k</code> that would indicate to a 033 * software tool it is a first-order rate constant (if that's what 034 * <code>k</code> happened to be in some given model). However, one may 035 * need to convert a model between different representations (e.g., 036 * Henri-Michaelis-Menten versus elementary steps), or to use it with 037 * different modeling approaches (discrete or continuous). One may also 038 * need to relate the model components with other description formats such 039 * as SBGN (<a target='_blank' 040 * href='http://www.sbgn.org/'>http://www.sbgn.org/</a>) using deeper 041 * semantics. Although an advanced software tool <em>might</em> be able to 042 * deduce the semantics of some model components through detailed analysis 043 * of the kinetic rate expressions and other parts of the model, this 044 * quickly becomes infeasible for any but the simplest of models. 045 <p> 046 * An approach to solving this problem is to associate model components 047 * with terms from carefully curated controlled vocabularies (CVs). This 048 * is the purpose of the optional 'sboTerm' attribute provided on the SBML 049 * class {@link SBase}. The 'sboTerm' attribute always refers to terms belonging 050 * to the Systems Biology Ontology (SBO). 051 <p> 052 * <h2>Use of {@link SBO}</h2> 053 <p> 054 * Labeling model components with terms from shared controlled vocabularies 055 * allows a software tool to identify each component using identifiers that 056 * are not tool-specific. An example of where this is useful is the desire 057 * by many software developers to provide users with meaningful names for 058 * reaction rate equations. Software tools with editing interfaces 059 * frequently provide these names in menus or lists of choices for users. 060 * However, without a standardized set of names or identifiers shared 061 * between developers, a given software package cannot reliably interpret 062 * the names or identifiers of reactions used in models written by other 063 * tools. 064 <p> 065 * The first solution that might come to mind is to stipulate that certain 066 * common reactions always have the same name (e.g., 'Michaelis-Menten'), but 067 * this is simply impossible to do: not only do humans often disagree on 068 * the names themselves, but it would not allow for correction of errors or 069 * updates to the list of predefined names except by issuing new releases 070 * of the SBML specification—to say nothing of many other limitations 071 * with this approach. Moreover, the parameters and variables that appear 072 * in rate expressions also need to be identified in a way that software 073 * tools can interpret mechanically, implying that the names of these 074 * entities would also need to be regulated. 075 <p> 076 * The Systems Biology Ontology (SBO) provides terms for identifying most 077 * elements of SBML. The relationship implied by an 'sboTerm' on an SBML 078 * model component is <em>is-a</em> between the characteristic of the 079 * component meant to be described by SBO on this element and the SBO 080 * term identified by the value of the 'sboTerm'. By adding SBO term 081 * references on the components of a model, a software tool can provide 082 * additional details using independent, shared vocabularies that can 083 * enable <em>other</em> software tools to recognize precisely what the 084 * component is meant to be. Those tools can then act on that information. 085 * For example, if the SBO identifier <code>'SBO:0000049'</code> is assigned 086 * to the concept of 'first-order irreversible mass-action kinetics, 087 * continuous framework', and a given {@link KineticLaw} object in a model has an 088 * 'sboTerm' attribute with this value, then regardless of the identifier 089 * and name given to the reaction itself, a software tool could use this to 090 * inform users that the reaction is a first-order irreversible mass-action 091 * reaction. This kind of reverse engineering of the meaning of reactions 092 * in a model would be difficult to do otherwise, especially for more 093 * complex reaction types. 094 <p> 095 * The presence of SBO labels on {@link Compartment}, {@link Species}, and {@link Reaction} 096 * objects in SBML can help map those entities to equivalent concepts in 097 * other standards, such as (but not limited to) BioPAX (<a target='_blank' 098 * href='http://www.biopax.org/'>http://www.biopax.org/</a>), PSI-MI (<a 099 * target='_blank' 100 * href='http://www.psidev.info/index.php?q=node/60'>http://www.psidev.info</a>), 101 * or the Systems Biology Graphical Notation (SBGN, <a target='_blank' 102 * href='http://www.sbgn.org/'>http://www.sbgn.org/</a>). Such mappings 103 * can be used in conversion procedures, or to build interfaces, with SBO 104 * becoming a kind of 'glue' between standards of representation. 105 <p> 106 * The presence of the label on a kinetic expression can also allow 107 * software tools to make more intelligent decisions about reaction rate 108 * expressions. For example, an application could recognize certain types 109 * of reaction formulas as being ones it knows how to solve with optimized 110 * procedures. The application could then use internal, optimized code 111 * implementing the rate formula indexed by identifiers such as 112 * <code>'SBO:0000049'</code> appearing in SBML models. 113 <p> 114 * Finally, SBO labels may be very valuable when it comes to model 115 * integration, by helping identify interfaces, convert mathematical 116 * expressions and parameters etc. 117 <p> 118 * Although the use of SBO can be beneficial, it is critical to keep in 119 * mind that the presence of an 'sboTerm' value on an object <em>must not 120 * change the fundamental mathematical meaning</em> of the model. An SBML 121 * model must be defined such that it stands on its own and does not depend 122 * on additional information added by SBO terms for a correct mathematical 123 * interpretation. SBO term definitions will not imply any alternative 124 * mathematical semantics for any SBML object labeled with that term. Two 125 * important reasons motivate this principle. First, it would be too 126 * limiting to require all software tools to be able to understand the SBO 127 * vocabularies in addition to understanding SBML. Supporting SBO is not 128 * only additional work for the software developer; for some kinds of 129 * applications, it may not make sense. If SBO terms on a model are 130 * optional, it follows that the SBML model <em>must</em> remain 131 * unambiguous and fully interpretable without them, because an application 132 * reading the model may ignore the terms. Second, we believe allowing the 133 * use of 'sboTerm' to alter the mathematical meaning of a model would 134 * allow too much leeway to shoehorn inconsistent concepts into SBML 135 * objects, ultimately reducing the interoperability of the models. 136 <p> 137 * <h2>Relationships between {@link SBO} and SBML</h2> 138 <p> 139 * The goal of SBO labeling for SBML is to clarify to the fullest extent 140 * possible the nature of each element in a model. The approach taken in 141 * SBO begins with a hierarchically-structured set of controlled 142 * vocabularies with six main divisions: (1) entity, (2) participant role, 143 * (3) quantitative parameter, (4) modeling framework, (5) mathematical 144 * expression, and (6) interaction. The web site for SBO (<a 145 * target='_blank' 146 * href='http://biomodels.net/sbo'>http://biomodels.net</a>) should be 147 * consulted for the current version of the ontology. 148 <p> 149 * The Systems Biology Ontology (SBO) is not part of SBML; it is being 150 * developed separately, to allow the modeling community to evolve the 151 * ontology independently of SBML. However, the terms in the ontology are 152 * being designed keeping SBML components in mind, and are classified into 153 * subsets that can be directly related with SBML components such as 154 * reaction rate expressions, parameters, and others. The use of 'sboTerm' 155 * attributes is optional, and the presence of 'sboTerm' on an element does 156 * not change the way the model is <em>interpreted</em>. Annotating SBML 157 * elements with SBO terms adds additional semantic information that may 158 * be used to <em>convert</em> the model into another model, or another 159 * format. Although SBO support provides an important source of 160 * information to understand the meaning of a model, software does not need 161 * to support 'sboTerm' to be considered SBML-compliant. 162 */ 163 164public class SBO { 165 private long swigCPtr; 166 protected boolean swigCMemOwn; 167 168 protected SBO(long cPtr, boolean cMemoryOwn) 169 { 170 swigCMemOwn = cMemoryOwn; 171 swigCPtr = cPtr; 172 } 173 174 protected static long getCPtr(SBO obj) 175 { 176 return (obj == null) ? 0 : obj.swigCPtr; 177 } 178 179 protected static long getCPtrAndDisown (SBO obj) 180 { 181 long ptr = 0; 182 183 if (obj != null) 184 { 185 ptr = obj.swigCPtr; 186 obj.swigCMemOwn = false; 187 } 188 189 return ptr; 190 } 191 192 protected void finalize() { 193 delete(); 194 } 195 196 public synchronized void delete() { 197 if (swigCPtr != 0) { 198 if (swigCMemOwn) { 199 swigCMemOwn = false; 200 libsbmlJNI.delete_SBO(swigCPtr); 201 } 202 swigCPtr = 0; 203 } 204 } 205 206 207/** 208 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 209 <p> 210 * @note The <em>'quantitative</em> parameter' {@link SBO} term is now known as 'systems description parameter'. 211 <p> 212 * @return <code>true</code> if <code>term</code> is-a SBO <em>'quantiative parameter'</em>, <code>false</code> 213 * otherwise. 214 <p> 215 * 216 */ public 217 static boolean isQuantitativeParameter(long term) { 218 return libsbmlJNI.SBO_isQuantitativeParameter(term); 219 } 220 221 222/** 223 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 224 <p> 225 * @return <code>true</code> if <code>term</code> is-a SBO <em>'participant role'</em>, <code>false</code> otherwise. 226 <p> 227 * 228 */ public 229 static boolean isParticipantRole(long term) { 230 return libsbmlJNI.SBO_isParticipantRole(term); 231 } 232 233 234/** 235 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 236 <p> 237 * @return <code>true</code> if <code>term</code> is-a SBO <em>'modeling framework'</em>, <code>false</code> otherwise. 238 <p> 239 * 240 */ public 241 static boolean isModellingFramework(long term) { 242 return libsbmlJNI.SBO_isModellingFramework(term); 243 } 244 245 246/** 247 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 248 <p> 249 * @return <code>true</code> if <code>term</code> is-a SBO <em>'mathematical expression'</em>, <code>false</code> otherwise. 250 <p> 251 * 252 */ public 253 static boolean isMathematicalExpression(long term) { 254 return libsbmlJNI.SBO_isMathematicalExpression(term); 255 } 256 257 258/** 259 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 260 <p> 261 * @return <code>true</code> if <code>term</code> is-a SBO <em>'kinetic constant'</em>, <code>false</code> otherwise. 262 <p> 263 * 264 */ public 265 static boolean isKineticConstant(long term) { 266 return libsbmlJNI.SBO_isKineticConstant(term); 267 } 268 269 270/** 271 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 272 <p> 273 * @return <code>true</code> if <code>term</code> is-a SBO <em>'reactant'</em>, <code>false</code> otherwise. 274 <p> 275 * 276 */ public 277 static boolean isReactant(long term) { 278 return libsbmlJNI.SBO_isReactant(term); 279 } 280 281 282/** 283 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 284 <p> 285 * @return <code>true</code> if <code>term</code> is-a SBO <em>'product'</em>, <code>false</code> otherwise. 286 <p> 287 * 288 */ public 289 static boolean isProduct(long term) { 290 return libsbmlJNI.SBO_isProduct(term); 291 } 292 293 294/** 295 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 296 <p> 297 * @return <code>true</code> if <code>term</code> is-a SBO <em>'modifier'</em>, <code>false</code> otherwise. 298 <p> 299 * 300 */ public 301 static boolean isModifier(long term) { 302 return libsbmlJNI.SBO_isModifier(term); 303 } 304 305 306/** 307 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 308 <p> 309 * @return <code>true</code> if <code>term</code> is-a SBO <em>'rate law'</em>, <code>false</code> otherwise. 310 <p> 311 * 312 */ public 313 static boolean isRateLaw(long term) { 314 return libsbmlJNI.SBO_isRateLaw(term); 315 } 316 317 318/** 319 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 320 <p> 321 * @return <code>true</code> if <code>term</code> is-a SBO <em>'event'</em>, <code>false</code> otherwise. 322 <p> 323 * 324 */ public 325 static boolean isEvent(long term) { 326 return libsbmlJNI.SBO_isEvent(term); 327 } 328 329 330/** 331 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 332 <p> 333 * @return <code>true</code> if <code>term</code> is-a SBO <em>'physical participant</em>, <code>false</code> otherwise. 334 <p> 335 * 336 */ public 337 static boolean isPhysicalParticipant(long term) { 338 return libsbmlJNI.SBO_isPhysicalParticipant(term); 339 } 340 341 342/** 343 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 344 <p> 345 * @return <code>true</code> if <code>term</code> is-a SBO <em>'participant'</em>, <code>false</code> otherwise. 346 <p> 347 * 348 */ public 349 static boolean isParticipant(long term) { 350 return libsbmlJNI.SBO_isParticipant(term); 351 } 352 353 354/** 355 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 356 <p> 357 * @note The <em>'interaction'</em> {@link SBO} term is now known as 'occurring entity representation'. 358 <p> 359 * @return <code>true</code> if <code>term</code> is-a SBO <em>'interaction'</em>, <code>false</code> otherwise. 360 <p> 361 * 362 */ public 363 static boolean isInteraction(long term) { 364 return libsbmlJNI.SBO_isInteraction(term); 365 } 366 367 368/** 369 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 370 <p> 371 * @note The <em>'entity'</em> {@link SBO} term is now known as 'physical entity representation'. 372 <p> 373 * @return <code>true</code> if <code>term</code> is-a SBO <em>'entity'</em>, <code>false</code> otherwise. 374 <p> 375 * 376 */ public 377 static boolean isEntity(long term) { 378 return libsbmlJNI.SBO_isEntity(term); 379 } 380 381 382/** 383 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 384 <p> 385 * @return <code>true</code> if <code>term</code> is-a SBO <em>'functional entity'</em>, <code>false</code> otherwise. 386 <p> 387 * 388 */ public 389 static boolean isFunctionalEntity(long term) { 390 return libsbmlJNI.SBO_isFunctionalEntity(term); 391 } 392 393 394/** 395 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 396 <p> 397 * @return <code>true</code> if <code>term</code> is-a SBO <em>'material entity'</em>, <code>false</code> otherwise. 398 <p> 399 * 400 */ public 401 static boolean isMaterialEntity(long term) { 402 return libsbmlJNI.SBO_isMaterialEntity(term); 403 } 404 405 406/** 407 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 408 <p> 409 * @return <code>true</code> if <code>term</code> is-a SBO <em>'conservation law'</em>, <code>false</code> otherwise. 410 <p> 411 * 412 */ public 413 static boolean isConservationLaw(long term) { 414 return libsbmlJNI.SBO_isConservationLaw(term); 415 } 416 417 418/** 419 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 420 <p> 421 * @return <code>true</code> if <code>term</code> is-a SBO <em>'steady state expression'</em>, <code>false</code> otherwise. 422 <p> 423 * 424 */ public 425 static boolean isSteadyStateExpression(long term) { 426 return libsbmlJNI.SBO_isSteadyStateExpression(term); 427 } 428 429 430/** 431 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 432 <p> 433 * @return <code>true</code> if <code>term</code> is-a SBO <em>'functional compartment'</em>, <code>false</code> otherwise. 434 <p> 435 * 436 */ public 437 static boolean isFunctionalCompartment(long term) { 438 return libsbmlJNI.SBO_isFunctionalCompartment(term); 439 } 440 441 442/** 443 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 444 <p> 445 * @return <code>true</code> if <code>term</code> is-a SBO <em>'continuous framework'</em>, <code>false</code> otherwise. 446 <p> 447 * 448 */ public 449 static boolean isContinuousFramework(long term) { 450 return libsbmlJNI.SBO_isContinuousFramework(term); 451 } 452 453 454/** 455 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 456 <p> 457 * @return <code>true</code> if <code>term</code> is-a SBO <em>'discrete framework'</em>, <code>false</code> otherwise. 458 <p> 459 * 460 */ public 461 static boolean isDiscreteFramework(long term) { 462 return libsbmlJNI.SBO_isDiscreteFramework(term); 463 } 464 465 466/** 467 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 468 <p> 469 * @return <code>true</code> if <code>term</code> is-a SBO <em>'logical framework'</em>, <code>false</code> otherwise. 470 <p> 471 * 472 */ public 473 static boolean isLogicalFramework(long term) { 474 return libsbmlJNI.SBO_isLogicalFramework(term); 475 } 476 477 478/** 479 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 480 <p> 481 * @return <code>true</code> if <code>term</code> is-a SBO <em>'metadata representation'</em>, <code>false</code> otherwise. 482 <p> 483 * 484 */ public 485 static boolean isMetadataRepresentation(long term) { 486 return libsbmlJNI.SBO_isMetadataRepresentation(term); 487 } 488 489 490/** 491 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 492 <p> 493 * @return <code>true</code> if <code>term</code> is-a SBO <em>'occurring entity representation'</em>, <code>false</code> otherwise. 494 <p> 495 * 496 */ public 497 static boolean isOccurringEntityRepresentation(long term) { 498 return libsbmlJNI.SBO_isOccurringEntityRepresentation(term); 499 } 500 501 502/** 503 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 504 <p> 505 * @return <code>true</code> if <code>term</code> is-a SBO <em>'physical entity representation'</em>, <code>false</code> otherwise. 506 <p> 507 * 508 */ public 509 static boolean isPhysicalEntityRepresentation(long term) { 510 return libsbmlJNI.SBO_isPhysicalEntityRepresentation(term); 511 } 512 513 514/** 515 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 516 <p> 517 * @return <code>true</code> if <code>term</code> is-a SBO <em>'systems description parameter'</em>, <code>false</code> otherwise. 518 <p> 519 * 520 */ public 521 static boolean isSystemsDescriptionParameter(long term) { 522 return libsbmlJNI.SBO_isSystemsDescriptionParameter(term); 523 } 524 525 526/** 527 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 528 <p> 529 * @return <code>true</code> if <code>term</code> is-a SBO <em>'quantiative systems description parameter'</em>, <code>false</code> 530 * otherwise. 531 <p> 532 * 533 */ public 534 static boolean isQuantitativeSystemsDescriptionParameter(long term) { 535 return libsbmlJNI.SBO_isQuantitativeSystemsDescriptionParameter(term); 536 } 537 538 539/** 540 * Predicate for checking whether the given term is obsolete. 541 <p> 542 * @return <code>true</code> if <code>term</code> is-a SBO <em>'obsolete'</em> term, <code>false</code> otherwise. 543 <p> 544 * 545 */ public 546 static boolean isObselete(long term) { 547 return libsbmlJNI.SBO_isObselete(term); 548 } 549 550 551/** 552 * Returns the integer as a correctly formatted SBO identifier string. 553 <p> 554 * @return the given integer sboTerm as a zero-padded seven digit string. 555 <p> 556 * @note If the sboTerm is not in the correct range 557 * (0000000–9999999), an empty string is returned. 558 <p> 559 * 560 */ public 561 static String intToString(int sboTerm) { 562 return libsbmlJNI.SBO_intToString(sboTerm); 563 } 564 565 566/** 567 * Returns the string as a correctly formatted SBO integer portion. 568 <p> 569 * @return the given string sboTerm as an integer. If the sboTerm is not 570 * in the correct format (a zero-padded, seven digit string), <code>-1</code> is 571 * returned. 572 <p> 573 * 574 */ public 575 static int stringToInt(String sboTerm) { 576 return libsbmlJNI.SBO_stringToInt(sboTerm); 577 } 578 579 580/** 581 * Checks the format of the given SBO identifier string. 582 <p> 583 * @return <code>true</code> if sboTerm is in the correct format (a zero-padded, seven 584 * digit string), <code>false</code> otherwise. 585 <p> 586 * 587 */ public 588 static boolean checkTerm(String sboTerm) { 589 return libsbmlJNI.SBO_checkTerm__SWIG_0(sboTerm); 590 } 591 592 593/** 594 * Checks the format of the given SBO identifier, given in the form of 595 * the integer portion alone. 596 <p> 597 * @return <code>true</code> if sboTerm is in the range (0000000–9999999), <code>false</code> 598 * otherwise. 599 <p> 600 * 601 */ public 602 static boolean checkTerm(int sboTerm) { 603 return libsbmlJNI.SBO_checkTerm__SWIG_1(sboTerm); 604 } 605 606 607/** * @internal */ public 608 static long getParentBranch(long term) { 609 return libsbmlJNI.SBO_getParentBranch(term); 610 } 611 612 public SBO() { 613 this(libsbmlJNI.new_SBO(), true); 614 } 615 616}