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 *  A MIRIAM-compliant controlled vocabulary term.
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 SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
023 * format for annotating models when (a) referring to controlled vocabulary
024 * terms and database identifiers that define and describe biological and
025 * biochemical entities, and (b) describing the creator of a model and the
026 * model's modification history.  This SBML format is a concrete syntax that
027 * conforms to the guidelines of MIRIAM (<a target='_blank'
028 * href='http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html'>'Minimum
029 * Information Requested in the Annotation of biochemical Models'</a>,
030 * <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005).  The format uses
031 * a subset of W3C RDF (<a target='_blank'
032 * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  In order
033 * to help application developers work with annotations in this format,
034 * libSBML provides several helper classes that provide higher-level
035 * interfaces to the data elements; these classes include {@link CVTerm},
036 * {@link ModelCreator}, {@link ModelHistory}, {@link RDFAnnotationParser}, and {@link Date}.
037 <p>
038 * <h2>Components of an SBML annotation</h2>
039 <p>
040 * The SBML annotation format consists of RDF-based content placed inside an
041 * <code>&lt;annotation&gt;</code> element attached to an SBML component such
042 * as {@link Species}, {@link Compartment}, etc.  A small change was introduced in SBML
043 * Level&nbsp;2 Version&nbsp;5 and SBML Level&nbsp;3 Version&nbsp;2 to permit
044 * nested annotations: lower Versions of the SBML specifications did not
045 * explicitly allow this.  We first describe the different parts of SBML
046 * annotations in XML form for SBML Level&nbsp;2 below Version&nbsp;5 and
047 * SBML Level&nbsp;3 below Version&nbsp;2:
048 <p>
049 <pre class='fragment'>
050 &lt;<span style='background-color: #bbb'>SBML_ELEMENT</span> <span style='background-color: #d0eed0'>+++</span> metaid=&quot;<span style='border-bottom: 1px solid black'>meta id</span>&quot; <span style='background-color: #d0eed0'>+++</span>&gt;
051   <span style='background-color: #d0eed0'>+++</span>
052   &lt;annotation&gt;
053     <span style='background-color: #d0eed0'>+++</span>
054     &lt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
055              xmlns:dcterm='http://purl.org/dc/terms/'
056              xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'
057              xmlns:bqbiol='http://biomodels.net/biology-qualifiers/'
058              xmlns:bqmodel='http://biomodels.net/model-qualifiers/' &gt;
059       &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
060         <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
061         &lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
062           &lt;rdf:Bag&gt;
063             &lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>URI</span>&quot; /&gt;
064             <span style='background-color: #edd'>...</span>
065           &lt;/rdf:Bag&gt;
066         &lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
067         <span style='background-color: #edd'>...</span>
068       &lt;/rdf:Description&gt;
069       <span style='background-color: #d0eed0'>+++</span>
070     &lt;/rdf:RDF&gt;
071     <span style='background-color: #d0eed0'>+++</span>
072   &lt;/annotation&gt;
073   <span style='background-color: #d0eed0'>+++</span>
074 &lt;/<span style='background-color: #bbb'>SBML_ELEMENT</span>&gt;
075 </pre>
076 <p>
077 * In the template above, the placeholder
078 * <span class='code' style='background-color: #bbb'>SBML_ELEMENT</span> stands for
079 * the XML tag name of an SBML model component (e.g., <code>model</code>,
080 * <code>reaction</code>, etc.) and the placeholder 
081 * <span class='code' style='border-bottom: 1px solid black'>meta id</span>
082 * stands for the element's meta identifier, which is a field available
083 * on all SBML components derived from the {@link SBase} base object class.
084 * The <span style='border-bottom: 2px dotted #888'>dotted</span>
085 * portions are optional, the symbol
086 * <span class='code' style='background-color: #d0eed0'>+++</span> is a placeholder
087 * for either no content or valid XML content that is not defined by
088 * this annotation scheme, and the ellipses
089 * <span class='code' style='background-color: #edd'>...</span>
090 * are placeholders for zero or more elements of the same form as the
091 * immediately preceding element.  The optional content
092 * <span class='code' style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
093 * is a creation and modification history; in libSBML, this is stored
094 * using {@link ModelHistory} objects.
095 <p>
096 * The placeholder <span class='code' style='background-color:
097 * #bbb'>RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
098 * name.  This is an element in either the XML namespace
099 * <code>'http://biomodels.net/model-qualifiers'</code> (for model
100 * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code> (for
101 * biological qualifier).  Note that these namespace URIs are only labels,
102 * and not actual Web locations, which means you cannot visit an address such
103 * as <code>'http://biomodels.net/model-qualifiers'</code> in your browser or
104 * try to have your application access it.  
105 <p>
106 * The <span class='code' style='background-color: #d0d0ee'>URI</span> is a
107 * required data value that uniquely identifies a resource and data within
108 * that resource to which the annotation refers.  Again, being URIs, these do
109 * not refer to physical Web locations; nevertheless, applications will often
110 * want a means of finding the resource to which a given <span class='code'
111 * style='background-color: #d0d0ee'>URI</span> refers.  Providing the
112 * facilities for this task is the purpose of MIRIAM Resources, described in
113 * detail online at <a target='_blank'
114 * href='http://biomodels.net/miriam'>http://biomodels.net/miriam</a>) and
115 * also in the paper <a target='_blank'
116 * href='http://www.biomedcentral.com/1752-0509/1/58'>'MIRIAM Resources: tools to generate and
117 * resolve robust cross-references in Systems Biology'</a>, <i>BMC Systems
118 * Biology</i>, 58(1), 2007.
119 <p>
120 * Finally, the following is the same template as above, but this time
121 * showing the nested content permitted by the most recent SBML
122 * specifications (SBML Level&nbsp;2 Version&nbsp;5 and Level&nbsp;3
123 * Version&nbsp;2):
124 <pre class='fragment'>
125 &lt;<span style='background-color: #bbb'>SBML_ELEMENT</span> <span style='background-color: #d0eed0'>+++</span> metaid=&quot;<span style='border-bottom: 1px solid black'>meta id</span>&quot; <span style='background-color: #d0eed0'>+++</span>&gt;
126   <span style='background-color: #d0eed0'>+++</span>
127   &lt;annotation&gt;
128     <span style='background-color: #d0eed0'>+++</span>
129     &lt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
130              xmlns:dcterm='http://purl.org/dc/terms/'
131              xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'
132              xmlns:bqbiol='http://biomodels.net/biology-qualifiers/'
133              xmlns:bqmodel='http://biomodels.net/model-qualifiers/' &gt;
134       &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
135         <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
136         &lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
137           &lt;rdf:Bag&gt;
138             &lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>URI</span>&quot; /&gt;
139             <span style='background-color: #fef'>NESTED_CONTENT</span>
140             <span style='background-color: #edd'>...</span>
141           &lt;/rdf:Bag&gt;
142         &lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
143         <span style='background-color: #edd'>...</span>
144       &lt;/rdf:Description&gt;
145       <span style='background-color: #d0eed0'>+++</span>
146     &lt;/rdf:RDF&gt;
147     <span style='background-color: #d0eed0'>+++</span>
148   &lt;/annotation&gt;
149   <span style='background-color: #d0eed0'>+++</span>
150 &lt;/<span style='background-color: #bbb'>SBML_ELEMENT</span>&gt;
151 </pre>
152 <p>
153 * The placeholder
154 * <span class='code' style='background-color: #fef'>NESTED_CONTENT</span>
155 * refers to other optional RDF elements such as
156 * <code>'bqbiol:isDescribedBy'</code> that describe a clarification or
157 * another annotation about the
158 * <span class='code' style='background-color: #bbb'>RELATION_ELEMENT</span>
159 * in which it appears.  Nested content allows one to, for example, describe
160 * protein modifications on species, or to add evidence codes for an
161 * annotation.  Nested content relates to its containing
162 * <span class='code' style='background-color: #bbb'>RELATION_ELEMENT</span>,
163 * not the other way around.  It qualifies it, but does not change its
164 * meaning.  As such, ignoring a
165 * <span class='code' style='background-color: #fef'>NESTED_CONTENT</span>
166 * does not affect the information provided by the containing
167 * <span class='code' style='background-color: #bbb'>RELATION_ELEMENT</span>.
168 <p>
169 * For more information about SBML annotations in general, please refer to
170 * Section&nbsp;6 in the SBML Level&nbsp;2 (Versions 2&ndash;4) or
171 * Level&nbsp;3 specification documents.
172 <p>
173 * <h2>The parts of a {@link CVTerm}</h2>
174 <p>
175 * Annotations that refer to controlled vocabularies are managed in libSBML
176 * using {@link CVTerm} objects.  The relation-resource pairs discussed in the
177 * previous section are the 'controlled vocabulary' terms that {@link CVTerm} is
178 * designed to store and manipulate.  A set of RDF-based annotations attached
179 * to a given SBML <code>&lt;annotation&gt;</code> element are read by
180 * {@link RDFAnnotationParser} and converted into a list of these {@link CVTerm} objects.
181 * Each {@link CVTerm} object instance stores the following components of an
182 * annotation:
183 <p>
184 * <ul>
185 <p>
186 * <li>The <em>qualifier</em>, which can be a BioModels.net 'biological
187 * qualifier', a BioModels.net 'model qualifier', or an unknown qualifier
188 * (as far as the {@link CVTerm} class is concerned).  Qualifiers are used in
189 * MIRIAM to indicate the nature of the relationship between the object
190 * being annotated and the resource.  In {@link CVTerm}, the qualifiers can be
191 * manipulated using the methods {@link CVTerm#getQualifierType()},
192 * {@link CVTerm#setQualifierType(int)}, and related methods.
193 <p>
194 * <li>The <em>resource</em>, represented by a URI (which, we must remind
195 * developers, is not the same as a URL).  In the {@link CVTerm} class, the
196 * resource component can be manipulated using the methods
197 * {@link CVTerm#addResource(String)} and
198 * {@link CVTerm#removeResource(String)}.
199 <p>
200 * </ul>
201 <p>
202 * Note that a {@link CVTerm} contains a single qualifier, but possibly more than
203 * one resource.  This corresponds to the possibility of an annotation that
204 * points to multiple resources, all of which are qualified by the same
205 * BioModels.net qualifier.  The {@link CVTerm} object class supports this by
206 * supporting a list of resources.
207 <p>
208 * Detailed explanations of the qualifiers defined by BioModels.net can be
209 * found at <a target='_blank'
210 * href='http://co.mbine.org/standards/qualifiers'>http://co.mbine.org/standards/qualifiers</a>.
211 */
212
213public class CVTerm {
214   private long swigCPtr;
215   protected boolean swigCMemOwn;
216
217   protected CVTerm(long cPtr, boolean cMemoryOwn)
218   {
219     swigCMemOwn = cMemoryOwn;
220     swigCPtr    = cPtr;
221   }
222
223   protected static long getCPtr(CVTerm obj)
224   {
225     return (obj == null) ? 0 : obj.swigCPtr;
226   }
227
228   protected static long getCPtrAndDisown (CVTerm obj)
229   {
230     long ptr = 0;
231
232     if (obj != null)
233     {
234       ptr             = obj.swigCPtr;
235       obj.swigCMemOwn = false;
236     }
237
238     return ptr;
239   }
240
241  protected void finalize() {
242    delete();
243  }
244
245  public synchronized void delete() {
246    if (swigCPtr != 0) {
247      if (swigCMemOwn) {
248        swigCMemOwn = false;
249        libsbmlJNI.delete_CVTerm(swigCPtr);
250      }
251      swigCPtr = 0;
252    }
253  }
254
255  /**
256   * Equality comparison method for CVTerm.
257   * <p>
258   * Because the Java methods for libSBML are actually wrappers around code
259   * implemented in C++ and C, certain operations will not behave as
260   * expected.  Equality comparison is one such case.  An instance of a
261   * libSBML object class is actually a <em>proxy object</em>
262   * wrapping the real underlying C/C++ object.  The normal <code>==</code>
263   * equality operator in Java will <em>only compare the Java proxy objects</em>,
264   * not the underlying native object.  The result is almost never what you
265   * want in practical situations.  Unfortunately, Java does not provide a
266   * way to override <code>==</code>.
267   *  <p>
268   * The alternative that must be followed is to use the
269   * <code>equals()</code> method.  The <code>equals</code> method on this
270   * class overrides the default java.lang.Object one, and performs an
271   * intelligent comparison of instances of objects of this class.  The
272   * result is an assessment of whether two libSBML Java objects are truly 
273   * the same underlying native-code objects.
274   *  <p>
275   * The use of this method in practice is the same as the use of any other
276   * Java <code>equals</code> method.  For example,
277   * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns
278   * <code>true</code> if <em>a</em> and <em>b</em> are references to the
279   * same underlying object.
280   *
281   * @param sb a reference to an object to which the current object
282   * instance will be compared
283   *
284   * @return <code>true</code> if <code>sb</code> refers to the same underlying 
285   * native object as this one, <code>false</code> otherwise
286   */
287  public boolean equals(Object sb)
288  {
289    if ( this == sb ) 
290    {
291      return true;
292    }
293    return swigCPtr == getCPtr((CVTerm)(sb));
294  }
295
296  /**
297   * Returns a hashcode for this CVTerm object.
298   *
299   * @return a hash code usable by Java methods that need them.
300   */
301  public int hashCode()
302  {
303    return (int)(swigCPtr^(swigCPtr>>>32));
304  }
305
306  
307/**
308   * Creates an empty {@link CVTerm}, optionally with the given
309   * qualifier <code>type</code>.
310   <p>
311   * <p>
312 * The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
313 * format for annotating models when (a) referring to controlled
314 * vocabulary terms and database identifiers that define and describe
315 * biological and other entities, and (b) describing the creator of a
316 * model and the model's modification history.  The annotation content is
317 * stored in <code>&lt;annotation&gt;</code> elements attached to
318 * individual SBML elements.  The format for storing the content inside
319 * SBML <code>&lt;annotation&gt;</code> elements is a subset of W3C RDF
320 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description
321 * Format</a>) expressed in XML.  The {@link CVTerm} class provides a programming
322 * interface for working directly with controlled vocabulary term ('CV
323 * term') objects without having to deal directly with the XML form.
324 * When libSBML reads in an SBML model containing RDF annotations, it
325 * parses those annotations into a list of {@link CVTerm} objects, and when
326 * writing a model, it parses the {@link CVTerm} objects back into the
327 * appropriate SBML <code>&lt;annotation&gt;</code> structure. 
328   <p>
329   * This method creates an empty {@link CVTerm} object.  The possible qualifier
330   * types usable as values of <code>type</code> are {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER} and {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER}.  If an explicit value for <code>type</code> is not given, this
331   * method defaults to using {@link libsbmlConstants#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER}.  The qualifier
332   * type can be set later using the
333   * {@link CVTerm#setQualifierType(int)} method.
334   <p>
335   * Different BioModels.net qualifier elements encode different types of
336   * relationships.  Please refer to the SBML specification or the <a
337   * target='_blank' href='http://co.mbine.org/standards/qualifiers/'>BioModels.net
338   * qualifiers web page</a> for an explanation of the meaning of these
339   * different qualifiers.
340   <p>
341   * @param type a qualifier type.
342   <p>
343   * 
344</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
345The native C++ implementation of this method defines a default argument
346value. In the documentation generated for different libSBML language
347bindings, you may or may not see corresponding arguments in the method
348declarations. For example, in Java and C#, a default argument is handled by
349declaring two separate methods, with one of them having the argument and
350the other one lacking the argument. However, the libSBML documentation will
351be <em>identical</em> for both methods. Consequently, if you are reading
352this and do not see an argument even though one is described, please look
353for descriptions of other variants of this method near where this one
354appears in the documentation.
355</dd></dl>
356 
357   */ public
358 CVTerm(int type) {
359    this(libsbmlJNI.new_CVTerm__SWIG_0(type), true);
360  }
361
362  
363/**
364   * Creates an empty {@link CVTerm}, optionally with the given
365   * qualifier <code>type</code>.
366   <p>
367   * <p>
368 * The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
369 * format for annotating models when (a) referring to controlled
370 * vocabulary terms and database identifiers that define and describe
371 * biological and other entities, and (b) describing the creator of a
372 * model and the model's modification history.  The annotation content is
373 * stored in <code>&lt;annotation&gt;</code> elements attached to
374 * individual SBML elements.  The format for storing the content inside
375 * SBML <code>&lt;annotation&gt;</code> elements is a subset of W3C RDF
376 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description
377 * Format</a>) expressed in XML.  The {@link CVTerm} class provides a programming
378 * interface for working directly with controlled vocabulary term ('CV
379 * term') objects without having to deal directly with the XML form.
380 * When libSBML reads in an SBML model containing RDF annotations, it
381 * parses those annotations into a list of {@link CVTerm} objects, and when
382 * writing a model, it parses the {@link CVTerm} objects back into the
383 * appropriate SBML <code>&lt;annotation&gt;</code> structure. 
384   <p>
385   * This method creates an empty {@link CVTerm} object.  The possible qualifier
386   * types usable as values of <code>type</code> are {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER} and {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER}.  If an explicit value for <code>type</code> is not given, this
387   * method defaults to using {@link libsbmlConstants#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER}.  The qualifier
388   * type can be set later using the
389   * {@link CVTerm#setQualifierType(int)} method.
390   <p>
391   * Different BioModels.net qualifier elements encode different types of
392   * relationships.  Please refer to the SBML specification or the <a
393   * target='_blank' href='http://co.mbine.org/standards/qualifiers/'>BioModels.net
394   * qualifiers web page</a> for an explanation of the meaning of these
395   * different qualifiers.
396   <p>
397   * @param type a qualifier type.
398   <p>
399   * 
400</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
401The native C++ implementation of this method defines a default argument
402value. In the documentation generated for different libSBML language
403bindings, you may or may not see corresponding arguments in the method
404declarations. For example, in Java and C#, a default argument is handled by
405declaring two separate methods, with one of them having the argument and
406the other one lacking the argument. However, the libSBML documentation will
407be <em>identical</em> for both methods. Consequently, if you are reading
408this and do not see an argument even though one is described, please look
409for descriptions of other variants of this method near where this one
410appears in the documentation.
411</dd></dl>
412 
413   */ public
414 CVTerm() {
415    this(libsbmlJNI.new_CVTerm__SWIG_1(), true);
416  }
417
418  
419/**
420   * Creates a new {@link CVTerm} from the given {@link XMLNode}.
421   <p>
422   * <p>
423 * The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
424 * format for annotating models when (a) referring to controlled
425 * vocabulary terms and database identifiers that define and describe
426 * biological and other entities, and (b) describing the creator of a
427 * model and the model's modification history.  The annotation content is
428 * stored in <code>&lt;annotation&gt;</code> elements attached to
429 * individual SBML elements.  The format for storing the content inside
430 * SBML <code>&lt;annotation&gt;</code> elements is a subset of W3C RDF
431 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description
432 * Format</a>) expressed in XML.  The {@link CVTerm} class provides a programming
433 * interface for working directly with controlled vocabulary term ('CV
434 * term') objects without having to deal directly with the XML form.
435 * When libSBML reads in an SBML model containing RDF annotations, it
436 * parses those annotations into a list of {@link CVTerm} objects, and when
437 * writing a model, it parses the {@link CVTerm} objects back into the
438 * appropriate SBML <code>&lt;annotation&gt;</code> structure.
439   <p>
440   * This method creates a {@link CVTerm} object from the given {@link XMLNode} object 
441   * <code>node</code>.  {@link XMLNode} is libSBML's representation of a node in an XML tree of
442   * elements, and each such element can be placed in a namespace.  This
443   * constructor looks for the element to be in the XML namespaces
444   * <code>'http://biomodels.net/model-qualifiers'</code> (for
445   * model qualifiers) and
446   * <code>'http://biomodels.net/biology-qualifiers'</code> (for
447   * biological qualifier), and if they are, creates {@link CVTerm} objects for
448   * the result.
449   <p>
450   * @param node an XMLNode representing a {@link CVTerm}.
451   <p>
452   * @note This method assumes that the given {@link XMLNode} object <code>node</code> is of
453   * the correct structural form.
454   */ public
455 CVTerm(XMLNode node) {
456    this(libsbmlJNI.new_CVTerm__SWIG_2(XMLNode.getCPtr(node), node), true);
457  }
458
459  
460/**
461   * Copy constructor; creates a copy of a {@link CVTerm} object.
462   <p>
463   * @param orig the {@link CVTerm} instance to copy.
464   */ public
465 CVTerm(CVTerm orig) {
466    this(libsbmlJNI.new_CVTerm__SWIG_3(CVTerm.getCPtr(orig), orig), true);
467  }
468
469  
470/**
471   * Creates and returns a deep copy of this {@link CVTerm} object.
472   <p>
473   * @return the (deep) copy of this {@link CVTerm} object.
474   */ public
475 CVTerm cloneObject() {
476    long cPtr = libsbmlJNI.CVTerm_cloneObject(swigCPtr, this);
477    return (cPtr == 0) ? null : new CVTerm(cPtr, true);
478  }
479
480  
481/**
482   * Returns the qualifier type of this {@link CVTerm} object.
483   <p>
484   * <p>
485 * The RDF element used in the SBML format for referring to external entities
486 * is <code>&lt;rdf:Description&gt;</code>, with a
487 * <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
488 * <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
489 * the structure:
490 * <pre class='fragment'>
491 * &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
492 * &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
493 * &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
494 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
495 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
496 * &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
497 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
498 * &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
499 * &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
500 * &lt;/rdf:Description&gt;
501 * </pre>
502 * In the template above, the placeholder <span class='code'
503 * style='border-bottom: 1px solid black'>meta id</span> stands for the
504 * element's meta identifier, which is a field available on all SBML
505 * components derived from the {@link SBase} base object class.  The <span
506 * style='border-bottom: 2px dotted #888'>dotted</span> portions are
507 * optional, and the ellipses <span class='code' style='background-color:
508 * #edd'>...</span> are placeholders for zero or more elements of the same
509 * form as the immediately preceding element.
510   <p>
511   * The placeholder <span class='code' style='background-color: #bbb'>
512   * RELATION_ELEMENT</span> refers to a BioModels.net qualifier
513   * element name.  This is an element in either the XML namespace
514   * <code>'http://biomodels.net/model-qualifiers'</code> (for model
515   * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
516   * (for biological qualifier).  The present method returns a code
517   * identifying which one of these two relationship namespaces is being
518   * used; any other qualifier in libSBML is considered unknown (as far as
519   * the {@link CVTerm} class is concerned).  Consequently, this method will return
520   * one of the following values:
521   <p>
522   * <ul>
523   * <li> {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER}
524   * <li> {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER}
525   * <li> {@link libsbmlConstants#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER}
526   *
527   * </ul> <p>
528   * The specific relationship of this {@link CVTerm} to the enclosing SBML object
529   * can be determined using the {@link CVTerm} methods such as
530   * {@link CVTerm#getModelQualifierType()} and
531   * {@link CVTerm#getBiologicalQualifierType()}.  Callers will typically want to
532   * use the present method to find out which one of the <em>other</em> two
533   * methods to call to find out the specific relationship.
534   <p>
535   * @return the qualifier type
536   * of this object or {@link libsbmlConstants#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER}
537   * (the default).
538   <p>
539   * @see #getResources()
540   * @see #getModelQualifierType()
541   * @see #getBiologicalQualifierType()
542   */ public
543 int getQualifierType() {
544    return libsbmlJNI.CVTerm_getQualifierType__SWIG_0(swigCPtr, this);
545  }
546
547  
548/**
549   * Returns the model qualifier type of this {@link CVTerm} object.
550   <p>
551   * <p>
552 * The RDF element used in the SBML format for referring to external entities
553 * is <code>&lt;rdf:Description&gt;</code>, with a
554 * <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
555 * <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
556 * the structure:
557 * <pre class='fragment'>
558 * &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
559 * &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
560 * &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
561 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
562 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
563 * &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
564 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
565 * &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
566 * &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
567 * &lt;/rdf:Description&gt;
568 * </pre>
569 * In the template above, the placeholder <span class='code'
570 * style='border-bottom: 1px solid black'>meta id</span> stands for the
571 * element's meta identifier, which is a field available on all SBML
572 * components derived from the {@link SBase} base object class.  The <span
573 * style='border-bottom: 2px dotted #888'>dotted</span> portions are
574 * optional, and the ellipses <span class='code' style='background-color:
575 * #edd'>...</span> are placeholders for zero or more elements of the same
576 * form as the immediately preceding element.
577   <p>
578   * The placeholder <span class='code' style='background-color: #bbb'>
579   * RELATION_ELEMENT</span> refers to a BioModels.net qualifier
580   * element name.  This is an element in either the XML namespace
581   * <code>'http://biomodels.net/model-qualifiers'</code> (for model
582   * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
583   * (for biological qualifier).  Callers will typically use
584   * {@link CVTerm#getQualifierType()} to find out the type of qualifier relevant to this
585   * particular {@link CVTerm} object, then if it is a <em>model</em> qualifier, use the
586   * present method to determine the specific qualifier.
587   <p>
588   * Annotations with model qualifiers express a relationship between an
589   * annotation resource and the <em>modeling concept</em> represented by a
590   * given object in the model.  The diagram below illustrates the
591   * relationship in this case:
592   <p>
593   * <center class='image'><img src='model-qualifiers.png'></center>
594   * 
595   <p>
596   * <br> The set of known model qualifiers is, at the time of this libSBML
597   * release, the following:
598   <p>
599   * <ul>
600   * <li> {@link libsbmlConstants#BQM_IS BQM_IS}
601   * <li> {@link libsbmlConstants#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY}
602   * <li> {@link libsbmlConstants#BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM}
603   * <li> {@link libsbmlConstants#BQM_IS_INSTANCE_OF BQM_IS_INSTANCE_OF}
604   * <li> {@link libsbmlConstants#BQM_HAS_INSTANCE BQM_HAS_INSTANCE}
605   *
606   * </ul> <p>
607   * Any other BioModels.net qualifier found in the model is considered
608   * unknown by libSBML and reported as
609   * {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN}.
610   <p>
611   * @return the model qualifier type
612   * of this object or {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN}
613   * (the default).
614   */ public
615 int getModelQualifierType() {
616    return libsbmlJNI.CVTerm_getModelQualifierType__SWIG_0(swigCPtr, this);
617  }
618
619  
620/**
621   * Returns the biological qualifier type of this {@link CVTerm} object.
622   <p>
623   * <p>
624 * The RDF element used in the SBML format for referring to external entities
625 * is <code>&lt;rdf:Description&gt;</code>, with a
626 * <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
627 * <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
628 * the structure:
629 * <pre class='fragment'>
630 * &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
631 * &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
632 * &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
633 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
634 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
635 * &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
636 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
637 * &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
638 * &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
639 * &lt;/rdf:Description&gt;
640 * </pre>
641 * In the template above, the placeholder <span class='code'
642 * style='border-bottom: 1px solid black'>meta id</span> stands for the
643 * element's meta identifier, which is a field available on all SBML
644 * components derived from the {@link SBase} base object class.  The <span
645 * style='border-bottom: 2px dotted #888'>dotted</span> portions are
646 * optional, and the ellipses <span class='code' style='background-color:
647 * #edd'>...</span> are placeholders for zero or more elements of the same
648 * form as the immediately preceding element.
649   <p>
650   * The placeholder <span class='code' style='background-color: #bbb'>
651   * RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
652   * name.  This is an element in either the XML namespace
653   * <code>'http://biomodels.net/model-qualifiers'</code> (for model
654   * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
655   * (for biological qualifier).  Callers will typically use
656   * {@link CVTerm#getQualifierType()} to find out the type of qualifier relevant to
657   * this particular {@link CVTerm} object, then if it is a <em>biological</em> qualifier,
658   * use the present method to determine the specific qualifier.
659   <p>
660   * Annotations with biological qualifiers express a relationship between an
661   * annotation resource and the <em>biological concept</em> represented by a
662   * given object in the model.    The diagram
663   * below illustrates the relationship in this case:
664   <p>
665   * <center class='image'><img src='biology-qualifiers.png'></center>
666   * 
667   <p>
668   * <br> The set of known biological qualifiers is, at the time of this
669   * libSBML release, the following:
670   <p>
671   * <ul>
672   * <li> {@link libsbmlConstants#BQB_IS BQB_IS}
673   * <li> {@link libsbmlConstants#BQB_HAS_PART BQB_HAS_PART}
674   * <li> {@link libsbmlConstants#BQB_IS_PART_OF BQB_IS_PART_OF}
675   * <li> {@link libsbmlConstants#BQB_IS_VERSION_OF BQB_IS_VERSION_OF}
676   * <li> {@link libsbmlConstants#BQB_HAS_VERSION BQB_HAS_VERSION}
677   * <li> {@link libsbmlConstants#BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO}
678   * <li> {@link libsbmlConstants#BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY}
679   * <li> {@link libsbmlConstants#BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY}
680   * <li> {@link libsbmlConstants#BQB_ENCODES BQB_ENCODES}
681   * <li> {@link libsbmlConstants#BQB_OCCURS_IN BQB_OCCURS_IN}
682   * <li> {@link libsbmlConstants#BQB_HAS_PROPERTY BQB_HAS_PROPERTY}
683   * <li> {@link libsbmlConstants#BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF}
684   * <li> {@link libsbmlConstants#BQB_HAS_TAXON BQB_HAS_TAXON}
685   *
686   * </ul> <p>
687   * Any other BioModels.net qualifier found in the model is considered
688   * unknown by libSBML and reported as
689   * {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN}.
690   <p>
691   * @return the biology qualifier type
692   * of this object or {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN}
693   * (the default).
694   */ public
695 int getBiologicalQualifierType() {
696    return libsbmlJNI.CVTerm_getBiologicalQualifierType__SWIG_0(swigCPtr, this);
697  }
698
699  
700/**
701   * Returns the resource references for this {@link CVTerm} object.
702   <p>
703   * <p>
704 * The RDF element used in the SBML format for referring to external entities
705 * is <code>&lt;rdf:Description&gt;</code>, with a
706 * <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
707 * <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
708 * the structure:
709 * <pre class='fragment'>
710 * &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
711 * &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
712 * &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
713 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
714 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
715 * &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
716 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
717 * &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
718 * &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
719 * &lt;/rdf:Description&gt;
720 * </pre>
721 * In the template above, the placeholder <span class='code'
722 * style='border-bottom: 1px solid black'>meta id</span> stands for the
723 * element's meta identifier, which is a field available on all SBML
724 * components derived from the {@link SBase} base object class.  The <span
725 * style='border-bottom: 2px dotted #888'>dotted</span> portions are
726 * optional, and the ellipses <span class='code' style='background-color:
727 * #edd'>...</span> are placeholders for zero or more elements of the same
728 * form as the immediately preceding element.
729   <p>
730   * The <span class='code' style='background-color: #d0d0ee'>resource
731   * URI</span> values shown in the template above are stored internally in
732   * {@link CVTerm} objects using an {@link XMLAttributes} object.  Each attribute stored
733   * inside the {@link XMLAttributes} will have the same name (specifically,
734   * &quot;<code>rdf:resource</code>&quot;) but a different value, and the
735   * value will be a <span class='code' style='background-color: #d0d0ee'>
736   * resource URI</span> shown in the XML template above.
737   <p>
738   * A valid {@link CVTerm} entity must always have at least one resource and
739   * a value for the relationship qualifier.
740   <p>
741   * @return the {@link XMLAttributes} that store the resources of this {@link CVTerm}.
742   <p>
743   * @see #getQualifierType()
744   * @see #addResource(String resource)
745   * @see #getResourceURI(long n)
746   */ public
747 XMLAttributes getResources() {
748    long cPtr = libsbmlJNI.CVTerm_getResources__SWIG_0(swigCPtr, this);
749    return (cPtr == 0) ? null : new XMLAttributes(cPtr, false);
750  }
751
752  
753/**
754   * Returns the number of resources for this {@link CVTerm} object.
755   <p>
756   * <p>
757 * The RDF element used in the SBML format for referring to external entities
758 * is <code>&lt;rdf:Description&gt;</code>, with a
759 * <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
760 * <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
761 * the structure:
762 * <pre class='fragment'>
763 * &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
764 * &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
765 * &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
766 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
767 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
768 * &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
769 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
770 * &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
771 * &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
772 * &lt;/rdf:Description&gt;
773 * </pre>
774 * In the template above, the placeholder <span class='code'
775 * style='border-bottom: 1px solid black'>meta id</span> stands for the
776 * element's meta identifier, which is a field available on all SBML
777 * components derived from the {@link SBase} base object class.  The <span
778 * style='border-bottom: 2px dotted #888'>dotted</span> portions are
779 * optional, and the ellipses <span class='code' style='background-color:
780 * #edd'>...</span> are placeholders for zero or more elements of the same
781 * form as the immediately preceding element.
782   <p>
783   * The fragment above illustrates that there can be more than one
784   * resource referenced by a given relationship annotation (i.e., the
785   * <span class='code' style='background-color: #d0d0ee'>resource
786   * URI</span> values associated with a particular <span class='code'
787   * style='background-color: #bbb'>RELATION_ELEMENT</span>).  The present
788   * method returns a count of the resources stored in this {@link CVTerm} object.
789   <p>
790   * @return the number of resources in the set of {@link XMLAttributes}
791   * of this {@link CVTerm}.
792   <p>
793   * @see #getResources()
794   * @see #getResourceURI(long n)
795   */ public
796 long getNumResources() {
797    return libsbmlJNI.CVTerm_getNumResources__SWIG_0(swigCPtr, this);
798  }
799
800  
801/**
802   * Returns the value of the <em>n</em>th resource for this {@link CVTerm} object.
803   <p>
804   * <p>
805 * The RDF element used in the SBML format for referring to external entities
806 * is <code>&lt;rdf:Description&gt;</code>, with a
807 * <code>&lt;rdf:Bag&gt;</code> element inside of it containing one or more
808 * <code>&lt;rdf:li&gt;</code> elements.  The following template illustrates
809 * the structure:
810 * <pre class='fragment'>
811 * &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
812 * &nbsp;&nbsp;<span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span>
813 * &nbsp;&nbsp;&lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
814 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:Bag&gt;
815 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
816 * &nbsp;&nbsp;&nbsp;&nbsp;<span style='background-color: #edd'>...</span>
817 * &nbsp;&nbsp;&nbsp;&nbsp;&lt;/rdf:Bag&gt;
818 * &nbsp;&nbsp;&lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
819 * &nbsp;&nbsp;<span style='background-color: #edd'>...</span>
820 * &lt;/rdf:Description&gt;
821 * </pre>
822 * In the template above, the placeholder <span class='code'
823 * style='border-bottom: 1px solid black'>meta id</span> stands for the
824 * element's meta identifier, which is a field available on all SBML
825 * components derived from the {@link SBase} base object class.  The <span
826 * style='border-bottom: 2px dotted #888'>dotted</span> portions are
827 * optional, and the ellipses <span class='code' style='background-color:
828 * #edd'>...</span> are placeholders for zero or more elements of the same
829 * form as the immediately preceding element.
830   <p>
831   * The fragment above illustrates that there can be more than one resource
832   * referenced by a given relationship annotation (i.e., the <span
833   * class='code' style='background-color: #d0d0ee'>resource URI</span>
834   * values associated with a particular <span class='code'
835   * style='background-color: #bbb'>RELATION_ELEMENT</span>).  LibSBML stores
836   * all resource URIs in a single {@link CVTerm} object for a given relationship.
837   * Callers can use {@link CVTerm#getNumResources()} to find out how many resources
838   * are stored in this {@link CVTerm} object, then call this method to retrieve the
839   * <em>n</em>th resource URI.
840   <p>
841   * @param n the index of the resource to query.
842   <p>
843   * @return string representing the value of the nth resource
844   * in the set of {@link XMLAttributes} of this {@link CVTerm}.
845   <p>
846   * @see #getNumResources()
847   * @see #getQualifierType()
848   */ public
849 String getResourceURI(long n) {
850    return libsbmlJNI.CVTerm_getResourceURI__SWIG_0(swigCPtr, this, n);
851  }
852
853  
854/**
855   * Sets the qualifier code of this
856   * {@link CVTerm} object.
857   <p>
858   * @param type the qualifier type.
859   <p>
860   * <p>
861 * @return integer value indicating success/failure of the
862 * function.   This particular
863 * function only does one thing irrespective of user input or 
864 * object state, and thus will only return a single value:
865   * <ul>
866   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
867   *
868   * </ul> <p>
869   * @see #getQualifierType()
870   */ public
871 int setQualifierType(int type) {
872    return libsbmlJNI.CVTerm_setQualifierType(swigCPtr, this, type);
873  }
874
875  
876/**
877   * Sets the model qualifier type
878   * of this {@link CVTerm} object.
879   <p>
880   * @param type the model qualifier type.
881   <p>
882   * <p>
883 * @return integer value indicating success/failure of the
884 * function.   The possible values
885 * returned by this function are:
886   * <ul>
887   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
888   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
889   *
890   * </ul> <p>
891   * @note If the Qualifier Type of this object is not
892   * {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER}, then the
893   * then the model qualifier type
894   * will default to {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN}.
895   <p>
896   * @see #getQualifierType()
897   * @see #setQualifierType(int)
898   */ public
899 int setModelQualifierType(int type) {
900    return libsbmlJNI.CVTerm_setModelQualifierType__SWIG_0(swigCPtr, this, type);
901  }
902
903  
904/**
905   * Sets the biology qualifier
906   * type of this {@link CVTerm} object.
907   <p>
908   * @param type the biology
909   * qualifier type.
910   <p>
911   * <p>
912 * @return integer value indicating success/failure of the
913 * function.   The possible values
914 * returned by this function are:
915   * <ul>
916   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
917   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
918   *
919   * </ul> <p>
920   * @note If the Qualifier Type of this object is not
921   * {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER},
922   * then the biology qualifier type
923   * will default to {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN}.
924   <p>
925   * @see #getQualifierType()
926   * @see #setQualifierType(int)
927   */ public
928 int setBiologicalQualifierType(int type) {
929    return libsbmlJNI.CVTerm_setBiologicalQualifierType__SWIG_0(swigCPtr, this, type);
930  }
931
932  
933/**
934   * Sets the model qualifier
935   * type value of this {@link CVTerm} object.
936   <p>
937   * @param qualifier the string representing a model qualifier.
938   <p>
939   * <p>
940 * @return integer value indicating success/failure of the
941 * function.   The possible values
942 * returned by this function are:
943   * <ul>
944   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
945   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
946   *
947   * </ul> <p>
948   * @note If the Qualifier Type of this object is not
949   * {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER}, 
950   * then the model qualifier type
951   * will default to {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN}.
952   <p>
953   * @see #getQualifierType()
954   * @see #setQualifierType(int)
955   */ public
956 int setModelQualifierType(String qualifier) {
957    return libsbmlJNI.CVTerm_setModelQualifierType__SWIG_1(swigCPtr, this, qualifier);
958  }
959
960  
961/**
962   * Sets the biology qualifier
963   * type code of this {@link CVTerm} object.
964   <p>
965   * @param qualifier the string representing a biology qualifier.
966   <p>
967   * <p>
968 * @return integer value indicating success/failure of the
969 * function.   The possible values
970 * returned by this function are:
971   * <ul>
972   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
973   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
974   *
975   * </ul> <p>
976   * @note If the Qualifier Type of this object is not
977   * {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER},
978   * then the biology qualifier type code
979   * will default to {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN}.
980   <p>
981   * @see #getQualifierType()
982   * @see #setQualifierType(int)
983   */ public
984 int setBiologicalQualifierType(String qualifier) {
985    return libsbmlJNI.CVTerm_setBiologicalQualifierType__SWIG_1(swigCPtr, this, qualifier);
986  }
987
988  
989/**
990   * Adds a resource reference to this {@link CVTerm} object.
991   <p>
992   * <p>
993 * The SBML Level&nbsp;2 and Level&nbsp;3 specifications define a simple
994 * format for annotating models when (a) referring to controlled
995 * vocabulary terms and database identifiers that define and describe
996 * biological and other entities, and (b) describing the creator of a
997 * model and the model's modification history.  The annotation content is
998 * stored in <code>&lt;annotation&gt;</code> elements attached to
999 * individual SBML elements.  The format for storing the content inside
1000 * SBML <code>&lt;annotation&gt;</code> elements is a subset of W3C RDF
1001 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description
1002 * Format</a>) expressed in XML.  The {@link CVTerm} class provides a programming
1003 * interface for working directly with controlled vocabulary term ('CV
1004 * term') objects without having to deal directly with the XML form.
1005 * When libSBML reads in an SBML model containing RDF annotations, it
1006 * parses those annotations into a list of {@link CVTerm} objects, and when
1007 * writing a model, it parses the {@link CVTerm} objects back into the
1008 * appropriate SBML <code>&lt;annotation&gt;</code> structure. 
1009   <p>
1010   * The specific RDF element used in this SBML format for referring to
1011   * external entities is <code>&lt;rdf:Description&gt;</code>, with a
1012   * <code>&lt;rdf:Bag&gt;</code> element containing one or more
1013   * <code>&lt;rdf:li&gt;</code> elements.  Each such element refers to a
1014   * data item in an external resource; the resource and data item are
1015   * together identified uniquely using a URI.  The following template
1016   * illustrates the structure:
1017   <p>
1018   <pre class='fragment'>
1019   &lt;rdf:Description rdf:about=&quot;#<span style='border-bottom: 1px solid black'>meta id</span>&quot;&gt;
1020     <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span>
1021     &lt;<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
1022       &lt;rdf:Bag&gt;
1023         &lt;rdf:li rdf:resource=&quot;<span style='background-color: #d0d0ee'>resource URI</span>&quot; /&gt;
1024         <span style='background-color: #edd'>...</span>
1025       &lt;/rdf:Bag&gt;
1026     &lt;/<span style='background-color: #bbb'>RELATION_ELEMENT</span>&gt;
1027     <span style='background-color: #edd'>...</span>
1028   &lt;/rdf:Description&gt;
1029   </pre>
1030   <p>
1031   * In the template above, the placeholder <span class='code'
1032   * style='border-bottom: 1px solid black'>meta id</span> stands for the
1033   * element's meta identifier, which is a field available on all SBML
1034   * components derived from the {@link SBase} base object class.  The <span
1035   * style='border-bottom: 2px dotted #888'>dotted</span> portions are
1036   * optional, and the ellipses <span class='code'
1037   * style='background-color: #edd'>...</span> are placeholders for zero or
1038   * more elements of the same form as the immediately preceding element.
1039   * The placeholder <span class='code' style='background-color: #bbb'>
1040   * RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
1041   * name.  This is an element in either the XML namespace
1042   * <code>'http://biomodels.net/model-qualifiers'</code> (for model
1043   * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code>
1044   * (for biological qualifier).
1045   <p>
1046   * The <span class='code' style='background-color: #d0d0ee'>resource
1047   * URI</span> is a required data value that uniquely identifies a
1048   * resource and data within that resource to which the annotation refers.
1049   * The present method allows callers to add a reference to a resource URI
1050   * with the same relationship to the enclosing SBML object.  (In other
1051   * words, the argument to this method is a <span class='code'
1052   * style='background-color: #d0d0ee'>resource URI</span> as shown in the
1053   * XML fragment above.)  Resources are stored in this {@link CVTerm} object
1054   * within an {@link XMLAttributes} object.
1055   <p>
1056   * The relationship of this {@link CVTerm} to the enclosing SBML object can be
1057   * determined using the {@link CVTerm} methods such as
1058   * {@link CVTerm#getModelQualifierType()} and {@link CVTerm#getBiologicalQualifierType()}.
1059   <p>
1060   * @param resource a string representing the URI of the resource and data
1061   * item being referenced; e.g.,
1062   * <code>'http://www.geneontology.org/#GO:0005892'</code>.
1063   <p>
1064   * <p>
1065 * @return integer value indicating success/failure of the
1066 * function.   The possible values
1067 * returned by this function are:
1068   * <ul>
1069   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1070   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1071   *
1072   * </ul> <p>
1073   * @see #getResources()
1074   * @see #removeResource(String resource)
1075   * @see #getQualifierType()
1076   * @see #getModelQualifierType()
1077   * @see #getBiologicalQualifierType()
1078   */ public
1079 int addResource(String resource) {
1080    return libsbmlJNI.CVTerm_addResource(swigCPtr, this, resource);
1081  }
1082
1083  
1084/**
1085   * Removes a resource URI from the set of resources stored in this {@link CVTerm}
1086   * object.
1087   <p>
1088   * @param resource a string representing the resource URI to remove;
1089   * e.g., <code>'http://www.geneontology.org/#GO:0005892'</code>.
1090   <p>
1091   * <p>
1092 * @return integer value indicating success/failure of the
1093 * function.   The possible values
1094 * returned by this function are:
1095   * <ul>
1096   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1097   * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE}
1098   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1099   *
1100   * </ul> <p>
1101   * @see #addResource(String resource)
1102   */ public
1103 int removeResource(String resource) {
1104    return libsbmlJNI.CVTerm_removeResource(swigCPtr, this, resource);
1105  }
1106
1107  
1108/**
1109   * Predicate returning <code>true</code> if all the required elements for this
1110   * {@link CVTerm} object have been set.
1111   <p>
1112   * @note The required attributes for a {@link CVTerm} are:
1113   * <ul>
1114   * <li> a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier
1115   * <li> at least one resource
1116   * </ul>
1117   */ public
1118 boolean hasRequiredAttributes() {
1119    return libsbmlJNI.CVTerm_hasRequiredAttributes__SWIG_0(swigCPtr, this);
1120  }
1121
1122  
1123/** * @internal */ public
1124 boolean hasBeenModified() {
1125    return libsbmlJNI.CVTerm_hasBeenModified(swigCPtr, this);
1126  }
1127
1128  
1129/** * @internal */ public
1130 void resetModifiedFlags() {
1131    libsbmlJNI.CVTerm_resetModifiedFlags(swigCPtr, this);
1132  }
1133
1134  
1135/**
1136   * Returns the number of {@link CVTerm} objects nested within this {@link CVTerm}
1137   * object.
1138   <p>
1139   * @return the number of CVTerms nested within this {@link CVTerm} object.
1140   <p>
1141   * @note this does not recurse through potentially nested {@link CVTerm} objects
1142   * within a given nested {@link CVTerm}. It returns the number of terms immediately
1143   * nested within this {@link CVTerm}.
1144   */ public
1145 long getNumNestedCVTerms() {
1146    return libsbmlJNI.CVTerm_getNumNestedCVTerms(swigCPtr, this);
1147  }
1148
1149  
1150/**
1151   * Returns the nth {@link CVTerm} in the list of CVTerms of this {@link CVTerm}
1152   * object.
1153   <p>
1154   * @param n long the index of the {@link CVTerm} to retrieve.
1155   <p>
1156   * @return the nth {@link CVTerm} in the list of CVTerms for this {@link CVTerm} object.
1157   */ public
1158 CVTerm getNestedCVTerm(long n) {
1159    long cPtr = libsbmlJNI.CVTerm_getNestedCVTerm__SWIG_0(swigCPtr, this, n);
1160    return (cPtr == 0) ? null : new CVTerm(cPtr, false);
1161  }
1162
1163  
1164/**
1165   * Returns a list of {@link CVTerm} objects contained within this {@link CVTerm}
1166   * object.
1167   <p>
1168   * @return the list of CVTerms for this {@link CVTerm} object.
1169   */ public
1170 SWIGTYPE_p_List getListNestedCVTerms() {
1171    long cPtr = libsbmlJNI.CVTerm_getListNestedCVTerms__SWIG_0(swigCPtr, this);
1172    return (cPtr == 0) ? null : new SWIGTYPE_p_List(cPtr, false);
1173  }
1174
1175  
1176/**
1177   * Adds a copy of the given {@link CVTerm} object to the list of nested {@link CVTerm}
1178   * objects within this {@link CVTerm} object.
1179   <p>
1180   * @param term the {@link CVTerm} to assign.
1181   <p>
1182   * <p>
1183 * @return integer value indicating success/failure of the
1184 * function.   The possible values
1185 * returned by this function are:
1186   * <ul>
1187   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1188   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1189   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1190   * </ul>
1191   */ public
1192 int addNestedCVTerm(CVTerm term) {
1193    return libsbmlJNI.CVTerm_addNestedCVTerm(swigCPtr, this, CVTerm.getCPtr(term), term);
1194  }
1195
1196  
1197/**
1198   * Removes the nth {@link CVTerm} in the list of CVTerms of this {@link CVTerm}
1199   * object and returns a pointer to it.
1200   <p>
1201   * @param n long the index of the {@link CVTerm} to retrieve.
1202   <p>
1203   * @return a pointer to the nth {@link CVTerm} in the list of CVTerms for this 
1204   * {@link CVTerm} object.
1205   */ public
1206 CVTerm removeNestedCVTerm(long n) {
1207    long cPtr = libsbmlJNI.CVTerm_removeNestedCVTerm(swigCPtr, this, n);
1208    return (cPtr == 0) ? null : new CVTerm(cPtr, false);
1209  }
1210
1211}