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