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 * 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 * @return <code>true</code> if <code>term</code> is-a SBO <em>'quantiative parameter'</em>, <code>false</code> 211 * otherwise. 212 <p> 213 * 214 */ public 215 static boolean isQuantitativeParameter(long term) { 216 return libsbmlJNI.SBO_isQuantitativeParameter(term); 217 } 218 219 220/** 221 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 222 <p> 223 * @return <code>true</code> if <code>term</code> is-a SBO <em>'participant role'</em>, <code>false</code> otherwise. 224 <p> 225 * 226 */ public 227 static boolean isParticipantRole(long term) { 228 return libsbmlJNI.SBO_isParticipantRole(term); 229 } 230 231 232/** 233 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 234 <p> 235 * @return <code>true</code> if <code>term</code> is-a SBO <em>'modeling framework'</em>, <code>false</code> otherwise. 236 <p> 237 * 238 */ public 239 static boolean isModellingFramework(long term) { 240 return libsbmlJNI.SBO_isModellingFramework(term); 241 } 242 243 244/** 245 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 246 <p> 247 * @return <code>true</code> if <code>term</code> is-a SBO <em>'mathematical expression'</em>, <code>false</code> otherwise. 248 <p> 249 * 250 */ public 251 static boolean isMathematicalExpression(long term) { 252 return libsbmlJNI.SBO_isMathematicalExpression(term); 253 } 254 255 256/** 257 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 258 <p> 259 * @return <code>true</code> if <code>term</code> is-a SBO <em>'kinetic constant'</em>, <code>false</code> otherwise. 260 <p> 261 * 262 */ public 263 static boolean isKineticConstant(long term) { 264 return libsbmlJNI.SBO_isKineticConstant(term); 265 } 266 267 268/** 269 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 270 <p> 271 * @return <code>true</code> if <code>term</code> is-a SBO <em>'reactant'</em>, <code>false</code> otherwise. 272 <p> 273 * 274 */ public 275 static boolean isReactant(long term) { 276 return libsbmlJNI.SBO_isReactant(term); 277 } 278 279 280/** 281 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 282 <p> 283 * @return <code>true</code> if <code>term</code> is-a SBO <em>'product'</em>, <code>false</code> otherwise. 284 <p> 285 * 286 */ public 287 static boolean isProduct(long term) { 288 return libsbmlJNI.SBO_isProduct(term); 289 } 290 291 292/** 293 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 294 <p> 295 * @return <code>true</code> if <code>term</code> is-a SBO <em>'modifier'</em>, <code>false</code> otherwise. 296 <p> 297 * 298 */ public 299 static boolean isModifier(long term) { 300 return libsbmlJNI.SBO_isModifier(term); 301 } 302 303 304/** 305 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 306 <p> 307 * @return <code>true</code> if <code>term</code> is-a SBO <em>'rate law'</em>, <code>false</code> otherwise. 308 <p> 309 * 310 */ public 311 static boolean isRateLaw(long term) { 312 return libsbmlJNI.SBO_isRateLaw(term); 313 } 314 315 316/** 317 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 318 <p> 319 * @return <code>true</code> if <code>term</code> is-a SBO <em>'event'</em>, <code>false</code> otherwise. 320 <p> 321 * 322 */ public 323 static boolean isEvent(long term) { 324 return libsbmlJNI.SBO_isEvent(term); 325 } 326 327 328/** 329 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 330 <p> 331 * @return <code>true</code> if <code>term</code> is-a SBO <em>'physical participant</em>, <code>false</code> otherwise. 332 <p> 333 * 334 */ public 335 static boolean isPhysicalParticipant(long term) { 336 return libsbmlJNI.SBO_isPhysicalParticipant(term); 337 } 338 339 340/** 341 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 342 <p> 343 * @return <code>true</code> if <code>term</code> is-a SBO <em>'participant'</em>, <code>false</code> otherwise. 344 <p> 345 * 346 */ public 347 static boolean isParticipant(long term) { 348 return libsbmlJNI.SBO_isParticipant(term); 349 } 350 351 352/** 353 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 354 <p> 355 * @return <code>true</code> if <code>term</code> is-a SBO <em>'interaction'</em>, <code>false</code> otherwise. 356 <p> 357 * 358 */ public 359 static boolean isInteraction(long term) { 360 return libsbmlJNI.SBO_isInteraction(term); 361 } 362 363 364/** 365 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 366 <p> 367 * @return <code>true</code> if <code>term</code> is-a SBO <em>'entity'</em>, <code>false</code> otherwise. 368 <p> 369 * 370 */ public 371 static boolean isEntity(long term) { 372 return libsbmlJNI.SBO_isEntity(term); 373 } 374 375 376/** 377 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 378 <p> 379 * @return <code>true</code> if <code>term</code> is-a SBO <em>'functional entity'</em>, <code>false</code> otherwise. 380 <p> 381 * 382 */ public 383 static boolean isFunctionalEntity(long term) { 384 return libsbmlJNI.SBO_isFunctionalEntity(term); 385 } 386 387 388/** 389 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 390 <p> 391 * @return <code>true</code> if <code>term</code> is-a SBO <em>'material entity'</em>, <code>false</code> otherwise. 392 <p> 393 * 394 */ public 395 static boolean isMaterialEntity(long term) { 396 return libsbmlJNI.SBO_isMaterialEntity(term); 397 } 398 399 400/** 401 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 402 <p> 403 * @return <code>true</code> if <code>term</code> is-a SBO <em>'conservation law'</em>, <code>false</code> otherwise. 404 <p> 405 * 406 */ public 407 static boolean isConservationLaw(long term) { 408 return libsbmlJNI.SBO_isConservationLaw(term); 409 } 410 411 412/** 413 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 414 <p> 415 * @return <code>true</code> if <code>term</code> is-a SBO <em>'steady state expression'</em>, <code>false</code> otherwise. 416 <p> 417 * 418 */ public 419 static boolean isSteadyStateExpression(long term) { 420 return libsbmlJNI.SBO_isSteadyStateExpression(term); 421 } 422 423 424/** 425 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 426 <p> 427 * @return <code>true</code> if <code>term</code> is-a SBO <em>'functional compartment'</em>, <code>false</code> otherwise. 428 <p> 429 * 430 */ public 431 static boolean isFunctionalCompartment(long term) { 432 return libsbmlJNI.SBO_isFunctionalCompartment(term); 433 } 434 435 436/** 437 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 438 <p> 439 * @return <code>true</code> if <code>term</code> is-a SBO <em>'continuous framework'</em>, <code>false</code> otherwise. 440 <p> 441 * 442 */ public 443 static boolean isContinuousFramework(long term) { 444 return libsbmlJNI.SBO_isContinuousFramework(term); 445 } 446 447 448/** 449 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 450 <p> 451 * @return <code>true</code> if <code>term</code> is-a SBO <em>'discrete framework'</em>, <code>false</code> otherwise. 452 <p> 453 * 454 */ public 455 static boolean isDiscreteFramework(long term) { 456 return libsbmlJNI.SBO_isDiscreteFramework(term); 457 } 458 459 460/** 461 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 462 <p> 463 * @return <code>true</code> if <code>term</code> is-a SBO <em>'logical framework'</em>, <code>false</code> otherwise. 464 <p> 465 * 466 */ public 467 static boolean isLogicalFramework(long term) { 468 return libsbmlJNI.SBO_isLogicalFramework(term); 469 } 470 471 472/** 473 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 474 <p> 475 * @return <code>true</code> if <code>term</code> is-a SBO <em>'metadata representation'</em>, <code>false</code> otherwise. 476 <p> 477 * 478 */ public 479 static boolean isMetadataRepresentation(long term) { 480 return libsbmlJNI.SBO_isMetadataRepresentation(term); 481 } 482 483 484/** 485 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 486 <p> 487 * @return <code>true</code> if <code>term</code> is-a SBO <em>'occurring entity representation'</em>, <code>false</code> otherwise. 488 <p> 489 * 490 */ public 491 static boolean isOccurringEntityRepresentation(long term) { 492 return libsbmlJNI.SBO_isOccurringEntityRepresentation(term); 493 } 494 495 496/** 497 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 498 <p> 499 * @return <code>true</code> if <code>term</code> is-a SBO <em>'physical entity representation'</em>, <code>false</code> otherwise. 500 <p> 501 * 502 */ public 503 static boolean isPhysicalEntityRepresentation(long term) { 504 return libsbmlJNI.SBO_isPhysicalEntityRepresentation(term); 505 } 506 507 508/** 509 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 510 <p> 511 * @return <code>true</code> if <code>term</code> is-a SBO <em>'systems description parameter'</em>, <code>false</code> otherwise. 512 <p> 513 * 514 */ public 515 static boolean isSystemsDescriptionParameter(long term) { 516 return libsbmlJNI.SBO_isSystemsDescriptionParameter(term); 517 } 518 519 520/** 521 * Returns <code>true</code> if the given term identifier comes from the stated branch of SBO. 522 <p> 523 * @return <code>true</code> if <code>term</code> is-a SBO <em>'quantiative systems description parameter'</em>, <code>false</code> 524 * otherwise. 525 <p> 526 * 527 */ public 528 static boolean isQuantitativeSystemsDescriptionParameter(long term) { 529 return libsbmlJNI.SBO_isQuantitativeSystemsDescriptionParameter(term); 530 } 531 532 533/** 534 * Predicate for checking whether the given term is obsolete. 535 <p> 536 * @return <code>true</code> if <code>term</code> is-a SBO <em>'obsolete'</em> term, <code>false</code> otherwise. 537 <p> 538 * 539 */ public 540 static boolean isObselete(long term) { 541 return libsbmlJNI.SBO_isObselete(term); 542 } 543 544 545/** 546 * Returns the integer as a correctly formatted SBO identifier string. 547 <p> 548 * @return the given integer sboTerm as a zero-padded seven digit string. 549 <p> 550 * @note If the sboTerm is not in the correct range 551 * (0000000–9999999), an empty string is returned. 552 <p> 553 * 554 */ public 555 static String intToString(int sboTerm) { 556 return libsbmlJNI.SBO_intToString(sboTerm); 557 } 558 559 560/** 561 * Returns the string as a correctly formatted SBO integer portion. 562 <p> 563 * @return the given string sboTerm as an integer. If the sboTerm is not 564 * in the correct format (a zero-padded, seven digit string), <code>-1</code> is 565 * returned. 566 <p> 567 * 568 */ public 569 static int stringToInt(String sboTerm) { 570 return libsbmlJNI.SBO_stringToInt(sboTerm); 571 } 572 573 574/** 575 * Checks the format of the given SBO identifier string. 576 <p> 577 * @return <code>true</code> if sboTerm is in the correct format (a zero-padded, seven 578 * digit string), <code>false</code> otherwise. 579 <p> 580 * 581 */ public 582 static boolean checkTerm(String sboTerm) { 583 return libsbmlJNI.SBO_checkTerm__SWIG_0(sboTerm); 584 } 585 586 587/** 588 * Checks the format of the given SBO identifier, given in the form of 589 * the integer portion alone. 590 <p> 591 * @return <code>true</code> if sboTerm is in the range (0000000–9999999), <code>false</code> 592 * otherwise. 593 <p> 594 * 595 */ public 596 static boolean checkTerm(int sboTerm) { 597 return libsbmlJNI.SBO_checkTerm__SWIG_1(sboTerm); 598 } 599 600 601/** * @internal */ public 602 static long getParentBranch(long term) { 603 return libsbmlJNI.SBO_getParentBranch(term); 604 } 605 606 public SBO() { 607 this(libsbmlJNI.new_SBO(), true); 608 } 609 610}