1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.2
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package org.sbml.libsbml;
10 
11 /**
12  *  SBML's <em>SBase</em> class, base class of most SBML objects.
13  <p>
14  * Most components in SBML are derived from a single abstract base type,
15  * {@link SBase}.  In addition to serving as the parent class for most other
16  * classes of objects in SBML, this base type is designed to allow a
17  * modeler or a software package to attach arbitrary information to each
18  * major element or list in an SBML model.
19  <p>
20  * {@link SBase} has an optional subelement called 'notes'.  It is intended to
21  * serve as a place for storing optional information intended to be seen by
22  * humans.  An example use of the 'notes' element would be to contain
23  * formatted user comments about the model element in which the 'notes'
24  * element is enclosed.  There are certain conditions on the XHTML content
25  * permitted inside the 'notes' element; please consult the <a
26  * target='_blank' href='http://sbml.org/Documents/Specifications'>SBML
27  * specification document</a> corresponding to the SBML Level and Version
28  * of your model for more information about the requirements for 'notes'
29  * content.
30  <p>
31  * {@link SBase} has another optional subelement called 'annotation'.  Whereas the
32  * 'notes' element described above is a container for content to be shown
33  * directly to humans, the 'annotation' element is a container for optional
34  * software-generated content <em>not</em> meant to be shown to humans.  The
35  * element's content type is <a target='_blank'
36  * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
37  * 'any'</a>, allowing essentially arbitrary data content.  SBML places
38  * only a few restrictions on the organization of the content; these are
39  * intended to help software tools read and write the data as well as help
40  * reduce conflicts between annotations added by different tools.  As is
41  * the case with 'notes', it is important to refer to the <a
42  * target='_blank' href='http://sbml.org/Documents/Specifications'>SBML
43  * specification document</a> corresponding to the SBML Level and Version
44  * of your model for more information about the requirements for
45  * 'annotation' content.
46  <p>
47  * It is worth pointing out that the 'annotation' element in the definition
48  * of {@link SBase} exists in order that software developers may attach optional
49  * application-specific data to the elements in an SBML model.  However, it
50  * is important that this facility not be misused.  In particular, it is
51  * <em>critical</em> that data essential to a model definition or that can
52  * be encoded in existing SBML elements is <em>not</em> stored in
53  * 'annotation'. {@link Parameter} values, functional dependencies between model
54  * elements, etc., should not be recorded as annotations.  It is crucial to
55  * keep in mind the fact that data placed in annotations can be freely
56  * ignored by software applications.  If such data affects the
57  * interpretation of a model, then software interoperability is greatly
58  * impeded.
59  <p>
60  * SBML Level 2 introduced an optional {@link SBase} attribute named 'metaid' for
61  * supporting metadata annotations using RDF (<a target='_blank'
62  * href='http://www.w3.org/RDF/'>Resource Description Format</a>). The
63  * attribute value has the data type <a
64  * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML identifier
65  * type, which means each 'metaid' value must be globally unique within an
66  * SBML file.  (Importantly, this uniqueness criterion applies across any
67  * attribute with type <a href='http://www.w3.org/TR/REC-xml/#id'>XML
68  * ID</a>, not just the 'metaid' attribute used by SBML&mdash;something to
69  * be aware of if your application-specific XML content inside the
70  * 'annotation' subelement happens to use <a
71  * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)  The 'metaid' value
72  * serves to identify a model component for purposes such as referencing
73  * that component from metadata placed within 'annotation' subelements.
74  <p>
75  * Beginning with SBML Level 2 Version 2, {@link SBase} has an optional
76  * attribute named 'sboTerm' for supporting the use of the Systems Biology
77  * Ontology.  In SBML proper, the data type of the attribute is a string of
78  * the form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit integer number;
79  * libSBML simplifies the representation by only storing the 'NNNNNNN'
80  * integer portion.  Thus, in libSBML, the 'sboTerm' attribute on {@link SBase} has
81  * data type <code>int</code>, and {@link SBO} identifiers are stored simply as integers.
82  * (For convenience, {@link SBase} offers methods for returning both the integer
83  * form and a text-string form of the {@link SBO} identifier.)  {@link SBO} terms are a
84  * type of optional annotation, and each different class of SBML object
85  * derived from {@link SBase} imposes its own requirements about the values
86  * permitted for 'sboTerm'.  More details can be found in SBML specifications
87  * for Level&nbsp;2 Version&nbsp;2 and above.
88  <p>
89  * Finally, note that, in the list of methods on {@link SBase}, there is no public
90  * constructor because {@link SBase} is an abstract class.  The constructors reside
91  * in the subclasses derived from {@link SBase}.
92  <p>
93  * <h2>Standard format for annotations linking data resources</h2>
94  <p>
95  * SBML Level 2 Versions 2, 3 and 4, and Level&nbsp;3, define a proposed
96  * regular format for encoding two particular categories of annotations:
97  * (a) references to controlled vocabulary terms and database identifiers
98  * which define and describe biological and biochemical entities in a
99  * model; and (b) descriptions of the provenance of a model, including its
100  * author(s) and modification history.
101  */
102 
103 public class SBase {
104    private long swigCPtr;
105    protected boolean swigCMemOwn;
106 
SBase(long cPtr, boolean cMemoryOwn)107    protected SBase(long cPtr, boolean cMemoryOwn)
108    {
109      swigCMemOwn = cMemoryOwn;
110      swigCPtr    = cPtr;
111    }
112 
getCPtr(SBase obj)113    protected static long getCPtr(SBase obj)
114    {
115      return (obj == null) ? 0 : obj.swigCPtr;
116    }
117 
getCPtrAndDisown(SBase obj)118    protected static long getCPtrAndDisown (SBase obj)
119    {
120      long ptr = 0;
121 
122      if (obj != null)
123      {
124        ptr             = obj.swigCPtr;
125        obj.swigCMemOwn = false;
126      }
127 
128      return ptr;
129    }
130 
131   @SuppressWarnings("deprecation")
finalize()132   protected void finalize() {
133     delete();
134   }
135 
delete()136   public synchronized void delete() {
137     if (swigCPtr != 0) {
138       if (swigCMemOwn) {
139         swigCMemOwn = false;
140         libsbmlJNI.delete_SBase(swigCPtr);
141       }
142       swigCPtr = 0;
143     }
144   }
145 
146   /**
147    * Equality comparison method for SBase.
148    * <p>
149    * Because the Java methods for libSBML are actually wrappers around code
150    * implemented in C++ and C, certain operations will not behave as
151    * expected.  Equality comparison is one such case.  An instance of a
152    * libSBML object class is actually a <em>proxy object</em>
153    * wrapping the real underlying C/C++ object.  The normal <code>==</code>
154    * equality operator in Java will <em>only compare the Java proxy objects</em>,
155    * not the underlying native object.  The result is almost never what you
156    * want in practical situations.  Unfortunately, Java does not provide a
157    * way to override <code>==</code>.
158    *  <p>
159    * The alternative that must be followed is to use the
160    * <code>equals()</code> method.  The <code>equals</code> method on this
161    * class overrides the default java.lang.Object one, and performs an
162    * intelligent comparison of instances of objects of this class.  The
163    * result is an assessment of whether two libSBML Java objects are truly
164    * the same underlying native-code objects.
165    *  <p>
166    * The use of this method in practice is the same as the use of any other
167    * Java <code>equals</code> method.  For example,
168    * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns
169    * <code>true</code> if <em>a</em> and <em>b</em> are references to the
170    * same underlying object.
171    *
172    * @param sb a reference to an object to which the current object
173    * instance will be compared
174    *
175    * @return <code>true</code> if <code>sb</code> refers to the same underlying
176    * native object as this one, <code>false</code> otherwise
177    */
equals(Object sb)178   public boolean equals(Object sb)
179   {
180     if ( this == sb )
181     {
182       return true;
183     }
184     return swigCPtr == getCPtr((SBase)(sb));
185   }
186 
187   /**
188    * Returns a hashcode for this SBase object.
189    *
190    * @return a hash code usable by Java methods that need them.
191    */
hashCode()192   public int hashCode()
193   {
194     return (int)(swigCPtr^(swigCPtr>>>32));
195   }
196 
197 
198 /**
199    * Creates and returns a deep copy of this {@link SBase} object.
200    <p>
201    * @return the (deep) copy of this {@link SBase} object.
202    */ public
cloneObject()203  SBase cloneObject() {
204   return libsbml.DowncastSBase(libsbmlJNI.SBase_cloneObject(swigCPtr, this), true);
205 }
206 
207 
208 /**
209    * Returns the first child element found that has the given <code>id</code> in the
210    * model-wide <code>SId</code> namespace, or <code>null</code> if no such object is found.
211    <p>
212    * @param id string representing the 'id' attribute value of the object
213    * to find.
214    <p>
215    * @return pointer to the first element found with the given identifier.
216    */ public
getElementBySId(String id)217  SBase getElementBySId(String id) {
218   return libsbml.DowncastSBase(libsbmlJNI.SBase_getElementBySId__SWIG_0(swigCPtr, this, id), false);
219 }
220 
221 
222 /**
223    * Returns the first child element it can find with a specific 'metaid'
224    * attribute value, or <code>null</code> if no such object is found.
225    <p>
226    * <p>
227  * The optional attribute named 'metaid', present on every major SBML
228  * component type, is for supporting metadata annotations using RDF (<a
229  * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
230  * attribute value has the data type <a
231  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
232  * identifier type, which means each 'metaid' value must be globally unique
233  * within an SBML file.  The latter point is important, because the
234  * uniqueness criterion applies across <em>any</em> attribute with type
235  * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
236  * by SBML&mdash;something to be aware of if your application-specific XML
237  * content inside the 'annotation' subelement happens to use the XML
238  * <code>ID</code> type.  Although SBML itself specifies the use of <a
239  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
240  * the 'metaid' attribute, SBML-compatible applications should be careful if
241  * they use XML <code>ID</code>'s in XML portions of a model that are not
242  * defined by SBML, such as in the application-specific content of the
243  * 'annotation' subelement.  Finally, note that LibSBML does not provide an
244  * explicit XML <code>ID</code> data type; it uses ordinary character
245  * strings, which is easier for applications to support.
246    <p>
247    * @param metaid string representing the 'metaid' attribute value of the
248    * object to find.
249    <p>
250    * @return pointer to the first element found with the given meta-identifier.
251    */ public
getElementByMetaId(String metaid)252  SBase getElementByMetaId(String metaid) {
253   return libsbml.DowncastSBase(libsbmlJNI.SBase_getElementByMetaId__SWIG_0(swigCPtr, this, metaid), false);
254 }
255 
256 
257 /**
258    * <p>
259  * Replaces all uses of a given <code>SIdRef</code> type attribute value with another
260  * value.
261  <p>
262  * <p>
263  * In SBML, object identifiers are of a data type called <code>SId</code>.
264  * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
265  * introduced for attribute values that refer to <code>SId</code> values; in
266  * previous Levels of SBML, this data type did not exist and attributes were
267  * simply described to as 'referring to an identifier', but the effective
268  * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
269  * other methods of libSBML refer to the type <code>SIdRef</code> for all
270  * Levels of SBML, even if the corresponding SBML specification did not
271  * explicitly name the data type.
272  <p>
273  * This method works by looking at all attributes and (if appropriate)
274  * mathematical formulas in MathML content, comparing the referenced
275  * identifiers to the value of <code>oldid</code>.  If any matches are found, the
276  * matching values are replaced with <code>newid</code>.  The method does <em>not</em>
277  * descend into child elements.
278  <p>
279  * @param oldid the old identifier.
280  * @param newid the new identifier.
281    */ public
renameSIdRefs(String oldid, String newid)282  void renameSIdRefs(String oldid, String newid) {
283     libsbmlJNI.SBase_renameSIdRefs(swigCPtr, this, oldid, newid);
284   }
285 
286 
287 /**
288    * <p>
289  * Replaces all uses of a given meta identifier attribute value with
290  * another value.
291  <p>
292  * <p>
293  * In SBML, object 'meta' identifiers are of the XML data type <code>ID</code>;
294  * the SBML object attribute itself is typically named <code>metaid</code>.  All
295  * attributes that hold values <em>referring</em> to values of type
296  * <code>ID</code> are of the XML data type <code>IDREF</code>.  They are also
297  * sometimes informally referred to as 'metaid refs', in analogy to the
298  * SBML-defined type <code>SIdRef</code>.
299  <p>
300  * This method works by looking at all meta-identifier attribute values,
301  * comparing the identifiers to the value of <code>oldid</code>.  If any matches are
302  * found, the matching identifiers are replaced with <code>newid</code>.  The method
303  * does <em>not</em> descend into child elements.
304  <p>
305  * @param oldid the old identifier.
306  * @param newid the new identifier.
307    */ public
renameMetaIdRefs(String oldid, String newid)308  void renameMetaIdRefs(String oldid, String newid) {
309     libsbmlJNI.SBase_renameMetaIdRefs(swigCPtr, this, oldid, newid);
310   }
311 
312 
313 /**
314    * <p>
315  * Replaces all uses of a given <code>UnitSIdRef</code> type attribute value with
316  * another value.
317  <p>
318  * <p>
319  * In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
320  * SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
321  * introduced for attribute values that refer to <code>UnitSId</code> values; in
322  * previous Levels of SBML, this data type did not exist and attributes were
323  * simply described to as 'referring to a unit identifier', but the effective
324  * data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
325  * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
326  * Levels of SBML, even if the corresponding SBML specification did not
327  * explicitly name the data type.
328  <p>
329  * This method works by looking at all unit identifier attribute values
330  * (including, if appropriate, inside mathematical formulas), comparing the
331  * referenced unit identifiers to the value of <code>oldid</code>.  If any matches
332  * are found, the matching values are replaced with <code>newid</code>.  The method
333  * does <em>not</em> descend into child elements.
334  <p>
335  * @param oldid the old identifier.
336  * @param newid the new identifier.
337    */ public
renameUnitSIdRefs(String oldid, String newid)338  void renameUnitSIdRefs(String oldid, String newid) {
339     libsbmlJNI.SBase_renameUnitSIdRefs(swigCPtr, this, oldid, newid);
340   }
341 
342 
343 /** * @internal */ public
replaceSIDWithFunction(String id, ASTNode function)344  void replaceSIDWithFunction(String id, ASTNode function) {
345     libsbmlJNI.SBase_replaceSIDWithFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function);
346   }
347 
348 
349 /** * @internal */ public
divideAssignmentsToSIdByFunction(String id, ASTNode function)350  void divideAssignmentsToSIdByFunction(String id, ASTNode function) {
351     libsbmlJNI.SBase_divideAssignmentsToSIdByFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function);
352   }
353 
354 
355 /** * @internal */ public
multiplyAssignmentsToSIdByFunction(String id, ASTNode function)356  void multiplyAssignmentsToSIdByFunction(String id, ASTNode function) {
357     libsbmlJNI.SBase_multiplyAssignmentsToSIdByFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function);
358   }
359 
360 
361 /** * @internal */ public
getElementFromPluginsBySId(String id)362  SBase getElementFromPluginsBySId(String id) {
363   return libsbml.DowncastSBase(libsbmlJNI.SBase_getElementFromPluginsBySId(swigCPtr, this, id), false);
364 }
365 
366 
367 /** * @internal */ public
getElementFromPluginsByMetaId(String metaid)368  SBase getElementFromPluginsByMetaId(String metaid) {
369   return libsbml.DowncastSBase(libsbmlJNI.SBase_getElementFromPluginsByMetaId(swigCPtr, this, metaid), false);
370 }
371 
372 
373 /** * @internal */ public
hasNonstandardIdentifierBeginningWith(String prefix)374  boolean hasNonstandardIdentifierBeginningWith(String prefix) {
375     return libsbmlJNI.SBase_hasNonstandardIdentifierBeginningWith(swigCPtr, this, prefix);
376   }
377 
378 
379 /** * @internal */ public
prependStringToAllIdentifiers(String prefix)380  int prependStringToAllIdentifiers(String prefix) {
381     return libsbmlJNI.SBase_prependStringToAllIdentifiers(swigCPtr, this, prefix);
382   }
383 
384 
385 /** * @internal */ public
transformIdentifiers(IdentifierTransformer idTransformer)386  int transformIdentifiers(IdentifierTransformer idTransformer) {
387     return libsbmlJNI.SBase_transformIdentifiers(swigCPtr, this, IdentifierTransformer.getCPtr(idTransformer), idTransformer);
388   }
389 
390 
391 /**
392    * Returns the value of the 'metaid' attribute of this SBML object.
393    <p>
394    * <p>
395  * The optional attribute named 'metaid', present on every major SBML
396  * component type, is for supporting metadata annotations using RDF (<a
397  * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
398  * attribute value has the data type <a
399  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
400  * identifier type, which means each 'metaid' value must be globally unique
401  * within an SBML file.  The latter point is important, because the
402  * uniqueness criterion applies across <em>any</em> attribute with type
403  * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
404  * by SBML&mdash;something to be aware of if your application-specific XML
405  * content inside the 'annotation' subelement happens to use the XML
406  * <code>ID</code> type.  Although SBML itself specifies the use of <a
407  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
408  * the 'metaid' attribute, SBML-compatible applications should be careful if
409  * they use XML <code>ID</code>'s in XML portions of a model that are not
410  * defined by SBML, such as in the application-specific content of the
411  * 'annotation' subelement.  Finally, note that LibSBML does not provide an
412  * explicit XML <code>ID</code> data type; it uses ordinary character
413  * strings, which is easier for applications to support.
414    <p>
415    * @return the meta-identifier of this SBML object.
416    <p>
417    * @see #isSetMetaId()
418    * @see #setMetaId(String metaid)
419    */ public
getMetaId()420  String getMetaId() {
421     return libsbmlJNI.SBase_getMetaId(swigCPtr, this);
422   }
423 
424 
425 /**
426    * Returns the value of the 'id' attribute of this SBML object, if it has one,
427    * or the 'variable' attribute of a {@link Rule}, or the 'symbol' attribute of
428    * an {@link InitialAssignment}.
429    <p>
430    * <p>
431  * The identifier given by an object's 'id' attribute value
432  * is used to identify the object within the SBML model definition.
433  * Other objects can refer to the component using this identifier.  The
434  * data type of 'id' is always <code>SId</code> or a type derived
435  * from that, such as <code>UnitSId</code>, depending on the object in
436  * question.  All data types are defined as follows:
437  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
438  *   letter .= 'a'..'z','A'..'Z'
439  *   digit  .= '0'..'9'
440  *   idChar .= letter | digit | '_'
441  *   SId    .= ( letter | '_' ) idChar*
442  * </pre>
443  * The characters <code>(</code> and <code>)</code> are used for grouping,
444  * the character <code>*</code> 'zero or more times', and the character
445  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
446  * is determined by an exact character sequence match; i.e., comparisons must
447  * be performed in a case-sensitive manner.  This applies to all uses of
448  * <code>SId</code>, <code>SIdRef</code>, and derived types.
449  <p>
450  * Users need to be aware of some important API issues that are the result of
451  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
452  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
453  * of SBML objects.  To simplify the work of programmers, libSBML's API
454  * provided get, set, check, and unset on the {@link SBase} object class itself
455  * instead of on individual subobject classes. This made the
456  * get/set/etc. methods uniformly available on all objects in the libSBML
457  * API.  LibSBML simply returned empty strings or otherwise did not act when
458  * the methods were applied to SBML objects that were not defined by the SBML
459  * specification to have 'id' or 'name' attributes.  Additional complications
460  * arose with the rule and assignment objects: {@link InitialAssignment},
461  * {@link EventAssignment}, {@link AssignmentRule}, and {@link RateRule}.  In early versions of SBML,
462  * the rule object hierarchy was different, and in addition, then as now,
463  * they possess different attributes: 'variable' (for the rules and event
464  * assignments), 'symbol' (for initial assignments), or neither (for
465  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
466  * would always return an empty string, and isSetId() would always return
467  * <code>false</code> for objects of these classes.
468  <p>
469  * With the addition of 'id' and 'name' attributes on {@link SBase} in Level&nbsp;3
470  * Version&nbsp;2, it became necessary to introduce a new way to interact
471  * with the attributes more consistently in libSBML to avoid breaking
472  * backward compatibility in the behavior of the original 'id' methods.  For
473  * this reason, libSBML provides four functions (getIdAttribute(),
474  * setIdAttribute(String), isSetIdAttribute(), and
475  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
476  * from {@link SBase}, regardless of the object's type.  <strong>These new methods
477  * should be used instead of the older getId()/setId()/etc. methods</strong>
478  * unless the old behavior is somehow necessary.  Regardless of the Level and
479  * Version of the SBML, these functions allow client applications to use more
480  * generalized code in some situations (for instance, when manipulating
481  * objects that are all known to have identifiers).  If the object in
482  * question does not posess an 'id' attribute according to the SBML
483  * specification for the Level and Version in use, libSBML will not allow the
484  * identifier to be set, nor will it read or write 'id' attributes for those
485  * objects.
486    <p>
487    * @return the id of this SBML object, or the 'variable' if the object is a
488    * {@link Rule}, or the 'symbol' if the object is an {@link InitialAssignment}.
489    <p>
490    * @note Because of the inconsistent behavior of this function with respect
491    * to assignments and rules, callers should use getIdAttribute() instead.
492    <p>
493    * @see #getIdAttribute()
494    * @see #setIdAttribute(String sid)
495    * @see #isSetIdAttribute()
496    * @see #unsetIdAttribute()
497    */ public
getId()498  String getId() {
499     return libsbmlJNI.SBase_getId(swigCPtr, this);
500   }
501 
502 
503 /**
504    * Returns the value of the 'id' attribute of this SBML object.
505    <p>
506    * <p>
507  * The identifier given by an object's 'id' attribute value
508  * is used to identify the object within the SBML model definition.
509  * Other objects can refer to the component using this identifier.  The
510  * data type of 'id' is always <code>SId</code> or a type derived
511  * from that, such as <code>UnitSId</code>, depending on the object in
512  * question.  All data types are defined as follows:
513  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
514  *   letter .= 'a'..'z','A'..'Z'
515  *   digit  .= '0'..'9'
516  *   idChar .= letter | digit | '_'
517  *   SId    .= ( letter | '_' ) idChar*
518  * </pre>
519  * The characters <code>(</code> and <code>)</code> are used for grouping,
520  * the character <code>*</code> 'zero or more times', and the character
521  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
522  * is determined by an exact character sequence match; i.e., comparisons must
523  * be performed in a case-sensitive manner.  This applies to all uses of
524  * <code>SId</code>, <code>SIdRef</code>, and derived types.
525  <p>
526  * Users need to be aware of some important API issues that are the result of
527  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
528  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
529  * of SBML objects.  To simplify the work of programmers, libSBML's API
530  * provided get, set, check, and unset on the {@link SBase} object class itself
531  * instead of on individual subobject classes. This made the
532  * get/set/etc. methods uniformly available on all objects in the libSBML
533  * API.  LibSBML simply returned empty strings or otherwise did not act when
534  * the methods were applied to SBML objects that were not defined by the SBML
535  * specification to have 'id' or 'name' attributes.  Additional complications
536  * arose with the rule and assignment objects: {@link InitialAssignment},
537  * {@link EventAssignment}, {@link AssignmentRule}, and {@link RateRule}.  In early versions of SBML,
538  * the rule object hierarchy was different, and in addition, then as now,
539  * they possess different attributes: 'variable' (for the rules and event
540  * assignments), 'symbol' (for initial assignments), or neither (for
541  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
542  * would always return an empty string, and isSetId() would always return
543  * <code>false</code> for objects of these classes.
544  <p>
545  * With the addition of 'id' and 'name' attributes on {@link SBase} in Level&nbsp;3
546  * Version&nbsp;2, it became necessary to introduce a new way to interact
547  * with the attributes more consistently in libSBML to avoid breaking
548  * backward compatibility in the behavior of the original 'id' methods.  For
549  * this reason, libSBML provides four functions (getIdAttribute(),
550  * setIdAttribute(String), isSetIdAttribute(), and
551  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
552  * from {@link SBase}, regardless of the object's type.  <strong>These new methods
553  * should be used instead of the older getId()/setId()/etc. methods</strong>
554  * unless the old behavior is somehow necessary.  Regardless of the Level and
555  * Version of the SBML, these functions allow client applications to use more
556  * generalized code in some situations (for instance, when manipulating
557  * objects that are all known to have identifiers).  If the object in
558  * question does not posess an 'id' attribute according to the SBML
559  * specification for the Level and Version in use, libSBML will not allow the
560  * identifier to be set, nor will it read or write 'id' attributes for those
561  * objects.
562    <p>
563    * @return the id of this SBML object, if set and valid for this
564    * level and version of SBML; an empty string otherwise.
565    <p>
566    * @note Because of the inconsistent behavior of this function with respect
567    * to assignments and rules, callers should use getIdAttribute() instead.
568    <p>
569    * @see #setIdAttribute(String sid)
570    * @see #isSetIdAttribute()
571    * @see #unsetIdAttribute()
572    */ public
getIdAttribute()573  String getIdAttribute() {
574     return libsbmlJNI.SBase_getIdAttribute(swigCPtr, this);
575   }
576 
577 
578 /**
579    * Returns the value of the 'name' attribute of this SBML object.
580    <p>
581    * <p>
582  * <p>
583  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
584  * moved to {@link SBase} directly, instead of being defined individually for many
585  * (but not all) objects.  LibSBML has for a long time provided functions
586  * defined on {@link SBase} itself to get, set, and unset those attributes, which
587  * would fail or otherwise return empty strings if executed on any object
588  * for which those attributes were not defined.  Now that all {@link SBase} objects
589  * define those attributes, those functions now succeed for any object with
590  * the appropriate level and version.
591  <p>
592  * The 'name' attribute is
593  * optional and is not intended to be used for cross-referencing purposes
594  * within a model.  Its purpose instead is to provide a human-readable
595  * label for the component.  The data type of 'name' is the type
596  * <code>string</code> defined in XML Schema.  SBML imposes no
597  * restrictions as to the content of 'name' attributes beyond those
598  * restrictions defined by the <code>string</code> type in XML Schema.
599  <p>
600  * The recommended practice for handling 'name' is as follows.  If a
601  * software tool has the capability for displaying the content of 'name'
602  * attributes, it should display this content to the user as a
603  * component's label instead of the component's 'id'.  If the user
604  * interface does not have this capability (e.g., because it cannot
605  * display or use special characters in symbol names), or if the 'name'
606  * attribute is missing on a given component, then the user interface
607  * should display the value of the 'id' attribute instead.  (Script
608  * language interpreters are especially likely to display 'id' instead of
609  * 'name'.)
610  <p>
611  * As a consequence of the above, authors of systems that automatically
612  * generate the values of 'id' attributes should be aware some systems
613  * may display the 'id''s to the user.  Authors therefore may wish to
614  * take some care to have their software create 'id' values that are: (a)
615  * reasonably easy for humans to type and read; and (b) likely to be
616  * meaningful, for example by making the 'id' attribute be an abbreviated
617  * form of the name attribute value.
618  <p>
619  * An additional point worth mentioning is although there are
620  * restrictions on the uniqueness of 'id' values, there are no
621  * restrictions on the uniqueness of 'name' values in a model.  This
622  * allows software applications leeway in assigning component identifiers.
623  <p>
624  * Regardless of the level and version of the SBML, these functions allow
625  * client applications to use more generalized code in some situations
626  * (for instance, when manipulating objects that are all known to have
627  * names).  If the object in question does not posess a 'name' attribute
628  * according to the SBML specification for the Level and Version in use,
629  * libSBML will not allow the name to be set, nor will it read or
630  * write 'name' attributes for those objects.
631  <p>
632  * @return the name of this SBML object, or the empty string if not set or unsettable.
633  <p>
634  * @see #getIdAttribute()
635  * @see #isSetName()
636  * @see #setName(String sid)
637  * @see #unsetName()
638    */ public
getName()639  String getName() {
640     return libsbmlJNI.SBase_getName(swigCPtr, this);
641   }
642 
643 
644 /**
645    * Returns the content of the 'notes' subelement of this object as
646    * a tree of {@link XMLNode} objects.
647    <p>
648    * <p>
649  * The optional SBML element named 'notes', present on every major SBML
650  * component type (and in SBML Level&nbsp;3, the 'message' subelement of
651  * {@link Constraint}), is intended as a place for storing optional information
652  * intended to be seen by humans.  An example use of the 'notes' element
653  * would be to contain formatted user comments about the model element in
654  * which the 'notes' element is enclosed.  Every object derived directly or
655  * indirectly from type {@link SBase} can have a separate value for 'notes', allowing
656  * users considerable freedom when adding comments to their models.
657  <p>
658  * The format of 'notes' elements conform to the definition of <a
659  * target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
660  * However, the content cannot be <em>entirely</em> free-form; it must satisfy
661  * certain requirements defined in the <a target='_blank'
662  * href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
663  * for specific SBML Levels.  To help verify the formatting of 'notes'
664  * content, libSBML provides the static utility method
665  * {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; this
666  * method implements a verification process that lets callers check whether
667  * the content of a given {@link XMLNode} object conforms to the SBML requirements
668  * for 'notes' and 'message' structure.  Developers are urged to consult the
669  * appropriate <a target='_blank'
670  * href='http://sbml.org/Documents/Specifications'>SBML specification
671  * document</a> for the Level and Version of their model for more in-depth
672  * explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and&nbsp;3
673  * specifications have considerable detail about how 'notes' element content
674  * must be structured.
675    <p>
676    * The 'notes' element content returned by this method will be in XML
677    * form, but libSBML does not provide an object model specifically for
678    * the content of notes.  Callers will need to traverse the XML tree
679    * structure using the facilities available on {@link XMLNode} and related
680    * objects.  For an alternative method of accessing the notes, see
681    * getNotesString().
682    <p>
683    * @return the content of the 'notes' subelement of this SBML object as a
684    * tree structure composed of {@link XMLNode} objects.
685    <p>
686    * @see #getNotesString()
687    * @see #isSetNotes()
688    * @see #setNotes(XMLNode notes)
689    * @see #setNotes(String notes, boolean addXHTMLMarkup)
690    * @see #appendNotes(XMLNode notes)
691    * @see #appendNotes(String notes)
692    * @see #unsetNotes()
693    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
694    */ public
getNotes()695  XMLNode getNotes() {
696     long cPtr = libsbmlJNI.SBase_getNotes__SWIG_0(swigCPtr, this);
697     return (cPtr == 0) ? null : new XMLNode(cPtr, false);
698   }
699 
700 
701 /**
702    * Returns the content of the 'notes' subelement of this object as a
703    * string.
704    <p>
705    * <p>
706  * The optional SBML element named 'notes', present on every major SBML
707  * component type (and in SBML Level&nbsp;3, the 'message' subelement of
708  * {@link Constraint}), is intended as a place for storing optional information
709  * intended to be seen by humans.  An example use of the 'notes' element
710  * would be to contain formatted user comments about the model element in
711  * which the 'notes' element is enclosed.  Every object derived directly or
712  * indirectly from type {@link SBase} can have a separate value for 'notes', allowing
713  * users considerable freedom when adding comments to their models.
714  <p>
715  * The format of 'notes' elements conform to the definition of <a
716  * target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
717  * However, the content cannot be <em>entirely</em> free-form; it must satisfy
718  * certain requirements defined in the <a target='_blank'
719  * href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
720  * for specific SBML Levels.  To help verify the formatting of 'notes'
721  * content, libSBML provides the static utility method
722  * {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; this
723  * method implements a verification process that lets callers check whether
724  * the content of a given {@link XMLNode} object conforms to the SBML requirements
725  * for 'notes' and 'message' structure.  Developers are urged to consult the
726  * appropriate <a target='_blank'
727  * href='http://sbml.org/Documents/Specifications'>SBML specification
728  * document</a> for the Level and Version of their model for more in-depth
729  * explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and&nbsp;3
730  * specifications have considerable detail about how 'notes' element content
731  * must be structured.
732    <p>
733    * For an alternative method of accessing the notes, see getNotes(),
734    * which returns the content as an {@link XMLNode} tree structure.  Depending on
735    * an application's needs, one or the other method may be more
736    * convenient.
737    <p>
738    * @return the content of the 'notes' subelement of this SBML object as a
739    * string.
740    <p>
741    * @see #getNotes()
742    * @see #isSetNotes()
743    * @see #setNotes(XMLNode notes)
744    * @see #setNotes(String notes, boolean addXHTMLMarkup)
745    * @see #appendNotes(XMLNode notes)
746    * @see #appendNotes(String notes)
747    * @see #unsetNotes()
748    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
749    */ public
getNotesString()750  String getNotesString() {
751     return libsbmlJNI.SBase_getNotesString__SWIG_0(swigCPtr, this);
752   }
753 
754 
755 /**
756    * Returns the content of the 'annotation' subelement of this object as
757    * a tree of {@link XMLNode} objects.
758    <p>
759    * <p>
760  * Whereas the SBML 'notes' subelement is a container for content to be
761  * shown directly to humans, the 'annotation' element is a container for
762  * optional software-generated content <em>not</em> meant to be shown to
763  * humans.  Every object derived from {@link SBase} can have its own value for
764  * 'annotation'.  The element's content type is <a target='_blank'
765  * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
766  * 'any'</a>, allowing essentially arbitrary well-formed XML data
767  * content.
768  <p>
769  * SBML places a few restrictions on the organization of the content of
770  * annotations; these are intended to help software tools read and write
771  * the data as well as help reduce conflicts between annotations added by
772  * different tools.  Please see the SBML specifications for more details.
773    <p>
774    * The annotations returned by this method will be in XML form.  LibSBML
775    * provides an object model and related interfaces for certain specific
776    * kinds of annotations, namely model history information and RDF
777    * content.  See the {@link ModelHistory}, {@link CVTerm} and {@link RDFAnnotationParser} classes
778    * for more information about the facilities available.
779    <p>
780    * @return the annotation of this SBML object as a tree of {@link XMLNode} objects.
781    <p>
782    * @see #getAnnotationString()
783    * @see #isSetAnnotation()
784    * @see #setAnnotation(XMLNode annotation)
785    * @see #setAnnotation(String annotation)
786    * @see #appendAnnotation(XMLNode annotation)
787    * @see #appendAnnotation(String annotation)
788    * @see #unsetAnnotation()
789    */ public
getAnnotation()790  XMLNode getAnnotation() {
791     long cPtr = libsbmlJNI.SBase_getAnnotation__SWIG_0(swigCPtr, this);
792     return (cPtr == 0) ? null : new XMLNode(cPtr, false);
793   }
794 
795 
796 /**
797    * Returns the content of the 'annotation' subelement of this object as a
798    * character string.
799    <p>
800    * <p>
801  * Whereas the SBML 'notes' subelement is a container for content to be
802  * shown directly to humans, the 'annotation' element is a container for
803  * optional software-generated content <em>not</em> meant to be shown to
804  * humans.  Every object derived from {@link SBase} can have its own value for
805  * 'annotation'.  The element's content type is <a target='_blank'
806  * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
807  * 'any'</a>, allowing essentially arbitrary well-formed XML data
808  * content.
809  <p>
810  * SBML places a few restrictions on the organization of the content of
811  * annotations; these are intended to help software tools read and write
812  * the data as well as help reduce conflicts between annotations added by
813  * different tools.  Please see the SBML specifications for more details.
814    <p>
815    * The annotations returned by this method will be in string form.  See the
816    * method getAnnotation() for a version that returns annotations in XML form.
817    <p>
818    * @return the annotation of this SBML object as a character string.
819    <p>
820    * @see #getAnnotation()
821    * @see #isSetAnnotation()
822    * @see #setAnnotation(XMLNode annotation)
823    * @see #setAnnotation(String annotation)
824    * @see #appendAnnotation(XMLNode annotation)
825    * @see #appendAnnotation(String annotation)
826    * @see #unsetAnnotation()
827    */ public
getAnnotationString()828  String getAnnotationString() {
829     return libsbmlJNI.SBase_getAnnotationString__SWIG_0(swigCPtr, this);
830   }
831 
832 
833 /**
834    * Returns a list of the XML Namespaces declared on the SBML document
835    * owning this object.
836    <p>
837    * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
838    * information.  It is used to communicate the SBML Level, Version, and (in
839    * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.
840    <p>
841    * @return the XML Namespaces associated with this SBML object, or <code>null</code>
842    * in certain very usual circumstances where a namespace is not set.
843    <p>
844    * @see #getLevel()
845    * @see #getVersion()
846    */ public
getNamespaces()847  XMLNamespaces getNamespaces() {
848     long cPtr = libsbmlJNI.SBase_getNamespaces(swigCPtr, this);
849     return (cPtr == 0) ? null : new XMLNamespaces(cPtr, false);
850   }
851 
852 
853 /**
854    * Returns the {@link SBMLDocument} object containing this object instance.
855    <p>
856    * <p>
857  * LibSBML uses the class {@link SBMLDocument} as a top-level container for
858  * storing SBML content and data associated with it (such as warnings and
859  * error messages).  An SBML model in libSBML is contained inside an
860  * {@link SBMLDocument} object.  {@link SBMLDocument} corresponds roughly to the class
861  * <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
862  * specifications, but it does not have a direct correspondence in SBML
863  * Level&nbsp;1.  (But, it is created by libSBML no matter whether the
864  * model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
865    <p>
866    * This method allows the caller to obtain the {@link SBMLDocument} for the
867    * current object.
868    <p>
869    * @return the parent {@link SBMLDocument} object of this SBML object.
870    <p>
871    * @see #getParentSBMLObject()
872    * @see #getModel()
873    */ public
getSBMLDocument()874  SBMLDocument getSBMLDocument() {
875     long cPtr = libsbmlJNI.SBase_getSBMLDocument__SWIG_0(swigCPtr, this);
876     return (cPtr == 0) ? null : new SBMLDocument(cPtr, false);
877   }
878 
879 
880 /**
881    * Returns the parent SBML object containing this object.
882    <p>
883    * This returns the immediately-containing object.  This method is
884    * convenient when holding an object nested inside other objects in an
885    * SBML model.
886    <p>
887    * @return the parent SBML object of this SBML object.
888    <p>
889    * @see #getSBMLDocument()
890    * @see #getModel()
891    */ public
getParentSBMLObject()892  SBase getParentSBMLObject() {
893   return libsbml.DowncastSBase(libsbmlJNI.SBase_getParentSBMLObject__SWIG_0(swigCPtr, this), false);
894 }
895 
896 
897 /**
898    * Returns the first ancestor object that has the given SBML type code from the given package.
899    <p>
900    * LibSBML attaches an identifying code to every
901    * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
902    * other languages, the set of type codes is stored in an enumeration; in
903    * the Java language interface for libSBML, the type codes are defined as
904    * static integer constants in the interface class {@link
905    * libsbmlConstants}.  The names of the type codes all begin with the
906    * characters <code>SBML_.</code>
907    <p>
908    * This method searches the tree of objects that are parents of this
909    * object, and returns the first one that has the given SBML type code from
910    * the given <code>pkgName</code>.
911    <p>
912    * @param type the SBML type code of the object sought.
913    <p>
914    * @param pkgName (optional) the short name of an SBML Level&nbsp;3
915    * package to which the sought-after object must belong.
916    <p>
917    * @return the ancestor SBML object of this SBML object that corresponds
918    * to the given SBML object type
919    * code, or <code>null</code> if no ancestor exists.
920    <p>
921    * @warning The optional argument <code>pkgName</code> must be used for all type codes
922    * from SBML Level&nbsp;3 packages.  Otherwise, the function will search the
923    * 'core' namespace alone, not find any corresponding elements, and return
924    * null.
925    <p>
926    *
927 </dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
928 The native C++ implementation of this method defines a default argument
929 value. In the documentation generated for different libSBML language
930 bindings, you may or may not see corresponding arguments in the method
931 declarations. For example, in Java and C#, a default argument is handled by
932 declaring two separate methods, with one of them having the argument and
933 the other one lacking the argument. However, the libSBML documentation will
934 be <em>identical</em> for both methods. Consequently, if you are reading
935 this and do not see an argument even though one is described, please look
936 for descriptions of other variants of this method near where this one
937 appears in the documentation.
938 </dd></dl>
939 
940    */ public
getAncestorOfType(int type, String pkgName)941  SBase getAncestorOfType(int type, String pkgName) {
942   return libsbml.DowncastSBase(libsbmlJNI.SBase_getAncestorOfType__SWIG_0(swigCPtr, this, type, pkgName), false);
943 }
944 
945 
946 /**
947    * Returns the first ancestor object that has the given SBML type code from the given package.
948    <p>
949    * LibSBML attaches an identifying code to every
950    * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
951    * other languages, the set of type codes is stored in an enumeration; in
952    * the Java language interface for libSBML, the type codes are defined as
953    * static integer constants in the interface class {@link
954    * libsbmlConstants}.  The names of the type codes all begin with the
955    * characters <code>SBML_.</code>
956    <p>
957    * This method searches the tree of objects that are parents of this
958    * object, and returns the first one that has the given SBML type code from
959    * the given <code>pkgName</code>.
960    <p>
961    * @param type the SBML type code of the object sought.
962    <p>
963    * @param pkgName (optional) the short name of an SBML Level&nbsp;3
964    * package to which the sought-after object must belong.
965    <p>
966    * @return the ancestor SBML object of this SBML object that corresponds
967    * to the given SBML object type
968    * code, or <code>null</code> if no ancestor exists.
969    <p>
970    * @warning The optional argument <code>pkgName</code> must be used for all type codes
971    * from SBML Level&nbsp;3 packages.  Otherwise, the function will search the
972    * 'core' namespace alone, not find any corresponding elements, and return
973    * null.
974    <p>
975    *
976 </dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
977 The native C++ implementation of this method defines a default argument
978 value. In the documentation generated for different libSBML language
979 bindings, you may or may not see corresponding arguments in the method
980 declarations. For example, in Java and C#, a default argument is handled by
981 declaring two separate methods, with one of them having the argument and
982 the other one lacking the argument. However, the libSBML documentation will
983 be <em>identical</em> for both methods. Consequently, if you are reading
984 this and do not see an argument even though one is described, please look
985 for descriptions of other variants of this method near where this one
986 appears in the documentation.
987 </dd></dl>
988 
989    */ public
getAncestorOfType(int type)990  SBase getAncestorOfType(int type) {
991   return libsbml.DowncastSBase(libsbmlJNI.SBase_getAncestorOfType__SWIG_1(swigCPtr, this, type), false);
992 }
993 
994 
995 /**
996    * Returns the integer portion of the value of the 'sboTerm' attribute of
997    * this object.
998    <p>
999    * <p>
1000  * Beginning with SBML Level 2 Version 2, objects derived from {@link SBase} have
1001  * an optional attribute named 'sboTerm' for supporting the use of the
1002  * Systems Biology Ontology.  In SBML proper, the data type of the
1003  * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
1004  * seven digit integer number; libSBML simplifies the representation by
1005  * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
1006  * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
1007  * are stored simply as integers.
1008    * <p>
1009  * {@link SBO} terms are a type of optional annotation, and each different class
1010  * of SBML object derived from {@link SBase} imposes its own requirements about
1011  * the values permitted for 'sboTerm'. More details can be found in SBML
1012  * specifications for Level&nbsp;2 Version&nbsp;2 and above.
1013    <p>
1014    * @return the value of the 'sboTerm' attribute as an integer, or <code>-1</code>
1015    * if the value is not set.
1016    */ public
getSBOTerm()1017  int getSBOTerm() {
1018     return libsbmlJNI.SBase_getSBOTerm(swigCPtr, this);
1019   }
1020 
1021 
1022 /**
1023    * Returns the string representation of the 'sboTerm' attribute of
1024    * this object.
1025    <p>
1026    * <p>
1027  * Beginning with SBML Level 2 Version 2, objects derived from {@link SBase} have
1028  * an optional attribute named 'sboTerm' for supporting the use of the
1029  * Systems Biology Ontology.  In SBML proper, the data type of the
1030  * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
1031  * seven digit integer number; libSBML simplifies the representation by
1032  * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
1033  * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
1034  * are stored simply as integers.
1035    * <p>
1036  * {@link SBO} terms are a type of optional annotation, and each different class
1037  * of SBML object derived from {@link SBase} imposes its own requirements about
1038  * the values permitted for 'sboTerm'. More details can be found in SBML
1039  * specifications for Level&nbsp;2 Version&nbsp;2 and above.
1040    <p>
1041    * @return the value of the 'sboTerm' attribute as a string (its value
1042    * will be of the form 'SBO:NNNNNNN'), or an empty string if
1043    * the value is not set.
1044    */ public
getSBOTermID()1045  String getSBOTermID() {
1046     return libsbmlJNI.SBase_getSBOTermID(swigCPtr, this);
1047   }
1048 
1049 
1050 /**
1051    * Returns the URL representation of the 'sboTerm' attribute of this
1052    * object.
1053    <p>
1054    * This method returns the entire {@link SBO} identifier as a text string in the
1055    * form <code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://identifiers.org/biomodels.sbo/SBO:NNNNNNN'</code>.
1056    <p>
1057    * <p>
1058  * {@link SBO} terms are a type of optional annotation, and each different class
1059  * of SBML object derived from {@link SBase} imposes its own requirements about
1060  * the values permitted for 'sboTerm'. More details can be found in SBML
1061  * specifications for Level&nbsp;2 Version&nbsp;2 and above.
1062    <p>
1063    * @return the value of the 'sboTerm' attribute as an identifiers.org URL,
1064    * or an empty string if the value is not set.
1065    */ public
getSBOTermAsURL()1066  String getSBOTermAsURL() {
1067     return libsbmlJNI.SBase_getSBOTermAsURL(swigCPtr, this);
1068   }
1069 
1070 
1071 /**
1072    * Returns the line number where this object first appears in the XML
1073    * representation of the SBML document.
1074    <p>
1075    * @return the line number of this SBML object.  If this object was
1076    * created programmatically and not read from a file, this method will
1077    * return the value <code>0.</code>
1078    <p>
1079    * @note The line number for each construct in an SBML model is set upon
1080    * reading the model.  The accuracy of the line number depends on the
1081    * correctness of the XML representation of the model, and on the
1082    * particular XML parser library being used.  The former limitation
1083    * relates to the following problem: if the model is actually invalid
1084    * XML, then the parser may not be able to interpret the data correctly
1085    * and consequently may not be able to establish the real line number.
1086    * The latter limitation is simply that different parsers seem to have
1087    * their own accuracy limitations, and out of all the parsers supported
1088    * by libSBML, none have been 100% accurate in all situations. (At this
1089    * time, libSBML supports the use of <a target='_blank'
1090    * href='http://xmlsoft.org'>libxml2</a>, <a target='_blank'
1091    * href='http://expat.sourceforge.net/'>Expat</a> and <a target='_blank'
1092    * href='http://xerces.apache.org/xerces-c/'>Xerces</a>.)
1093    <p>
1094    * @see #getColumn()
1095    */ public
getLine()1096  long getLine() {
1097     return libsbmlJNI.SBase_getLine(swigCPtr, this);
1098   }
1099 
1100 
1101 /**
1102    * Returns the column number where this object first appears in the XML
1103    * representation of the SBML document.
1104    <p>
1105    * @return the column number of this SBML object.  If this object was
1106    * created programmatically and not read from a file, this method will
1107    * return the value <code>0.</code>
1108    <p>
1109    * @note The column number for each construct in an SBML model is set
1110    * upon reading the model.  The accuracy of the column number depends on
1111    * the correctness of the XML representation of the model, and on the
1112    * particular XML parser library being used.  The former limitation
1113    * relates to the following problem: if the model is actually invalid
1114    * XML, then the parser may not be able to interpret the data correctly
1115    * and consequently may not be able to establish the real column number.
1116    * The latter limitation is simply that different parsers seem to have
1117    * their own accuracy limitations, and out of all the parsers supported
1118    * by libSBML, none have been 100% accurate in all situations. (At this
1119    * time, libSBML supports the use of <a target='_blank'
1120    * href='http://xmlsoft.org'>libxml2</a>, <a target='_blank'
1121    * href='http://expat.sourceforge.net/'>Expat</a> and <a target='_blank'
1122    * href='http://xerces.apache.org/xerces-c/'>Xerces</a>.)
1123    <p>
1124    * @see #getLine()
1125    */ public
getColumn()1126  long getColumn() {
1127     return libsbmlJNI.SBase_getColumn(swigCPtr, this);
1128   }
1129 
1130 
1131 /**
1132    * Returns the {@link ModelHistory} object, if any, attached to this object.
1133    <p>
1134    * @return the {@link ModelHistory} object attached to this object, or <code>null</code> if
1135    * none exist.
1136    <p>
1137    * @note In SBML Level&nbsp;2, model history annotations were only
1138    * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
1139    * permitted on all SBML components derived from {@link SBase}.
1140    */ public
getModelHistory()1141  ModelHistory getModelHistory() {
1142     long cPtr = libsbmlJNI.SBase_getModelHistory__SWIG_0(swigCPtr, this);
1143     return (cPtr == 0) ? null : new ModelHistory(cPtr, false);
1144   }
1145 
1146 
1147 /**
1148    * Predicate returning <code>true</code> if this object's 'metaid' attribute is set.
1149    <p>
1150    * <p>
1151  * The optional attribute named 'metaid', present on every major SBML
1152  * component type, is for supporting metadata annotations using RDF (<a
1153  * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
1154  * attribute value has the data type <a
1155  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
1156  * identifier type, which means each 'metaid' value must be globally unique
1157  * within an SBML file.  The latter point is important, because the
1158  * uniqueness criterion applies across <em>any</em> attribute with type
1159  * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
1160  * by SBML&mdash;something to be aware of if your application-specific XML
1161  * content inside the 'annotation' subelement happens to use the XML
1162  * <code>ID</code> type.  Although SBML itself specifies the use of <a
1163  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
1164  * the 'metaid' attribute, SBML-compatible applications should be careful if
1165  * they use XML <code>ID</code>'s in XML portions of a model that are not
1166  * defined by SBML, such as in the application-specific content of the
1167  * 'annotation' subelement.  Finally, note that LibSBML does not provide an
1168  * explicit XML <code>ID</code> data type; it uses ordinary character
1169  * strings, which is easier for applications to support.
1170    <p>
1171    * @return <code>true</code> if the 'metaid' attribute of this SBML object is
1172    * set, <code>false</code> otherwise.
1173    <p>
1174    * @see #getMetaId()
1175    * @see #setMetaId(String metaid)
1176    */ public
isSetMetaId()1177  boolean isSetMetaId() {
1178     return libsbmlJNI.SBase_isSetMetaId(swigCPtr, this);
1179   }
1180 
1181 
1182 /**
1183    * Predicate returning <code>true</code> if a call to getId() returns a
1184    * non-empty string.
1185    <p>
1186    * For most objects, this function will return <code>true</code> if its 'id'
1187    * attribute is set, and <code>false</code> if it is not, or if the object has no
1188    * 'id' attribute at all.  However, for an {@link EventAssignment} or a {@link Rule},
1189    * isSetId() checks whether the 'variable' attribute is set, and for an
1190    * {@link InitialAssignment}, it checks whether the 'symbol' attribute is set.
1191    * Because those elements will also have an 'id' attribute in SBML
1192    * Level&nbsp;3 Version&nbsp;2 which isSetId() will not check, the function
1193    * itself is deprecated, and it is recommended to use isSetIdAttribute() in
1194    * all cases where one needs to know whether the 'id' attribute is set, and
1195    * to use {@link EventAssignment#isSetVariable()}, {@link Rule#isSetVariable()} and
1196    * {@link InitialAssignment#isSetSymbol()} when the status of the 'variable' or
1197    * 'symbol' attributes need to be checked.
1198    <p>
1199    * <p>
1200  * <p>
1201  * The identifier given by an object's 'id' attribute value
1202  * is used to identify the object within the SBML model definition.
1203  * Other objects can refer to the component using this identifier.  The
1204  * data type of 'id' is always <code>SId</code> or a type derived
1205  * from that, such as <code>UnitSId</code>, depending on the object in
1206  * question.  All data types are defined as follows:
1207  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1208  *   letter .= 'a'..'z','A'..'Z'
1209  *   digit  .= '0'..'9'
1210  *   idChar .= letter | digit | '_'
1211  *   SId    .= ( letter | '_' ) idChar*
1212  * </pre>
1213  * The characters <code>(</code> and <code>)</code> are used for grouping,
1214  * the character <code>*</code> 'zero or more times', and the character
1215  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1216  * is determined by an exact character sequence match; i.e., comparisons must
1217  * be performed in a case-sensitive manner.  This applies to all uses of
1218  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1219  <p>
1220  * Users need to be aware of some important API issues that are the result of
1221  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1222  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1223  * of SBML objects.  To simplify the work of programmers, libSBML's API
1224  * provided get, set, check, and unset on the {@link SBase} object class itself
1225  * instead of on individual subobject classes. This made the
1226  * get/set/etc. methods uniformly available on all objects in the libSBML
1227  * API.  LibSBML simply returned empty strings or otherwise did not act when
1228  * the methods were applied to SBML objects that were not defined by the SBML
1229  * specification to have 'id' or 'name' attributes.  Additional complications
1230  * arose with the rule and assignment objects: {@link InitialAssignment},
1231  * {@link EventAssignment}, {@link AssignmentRule}, and {@link RateRule}.  In early versions of SBML,
1232  * the rule object hierarchy was different, and in addition, then as now,
1233  * they possess different attributes: 'variable' (for the rules and event
1234  * assignments), 'symbol' (for initial assignments), or neither (for
1235  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1236  * would always return an empty string, and isSetId() would always return
1237  * <code>false</code> for objects of these classes.
1238  <p>
1239  * With the addition of 'id' and 'name' attributes on {@link SBase} in Level&nbsp;3
1240  * Version&nbsp;2, it became necessary to introduce a new way to interact
1241  * with the attributes more consistently in libSBML to avoid breaking
1242  * backward compatibility in the behavior of the original 'id' methods.  For
1243  * this reason, libSBML provides four functions (getIdAttribute(),
1244  * setIdAttribute(String), isSetIdAttribute(), and
1245  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1246  * from {@link SBase}, regardless of the object's type.  <strong>These new methods
1247  * should be used instead of the older getId()/setId()/etc. methods</strong>
1248  * unless the old behavior is somehow necessary.  Regardless of the Level and
1249  * Version of the SBML, these functions allow client applications to use more
1250  * generalized code in some situations (for instance, when manipulating
1251  * objects that are all known to have identifiers).  If the object in
1252  * question does not posess an 'id' attribute according to the SBML
1253  * specification for the Level and Version in use, libSBML will not allow the
1254  * identifier to be set, nor will it read or write 'id' attributes for those
1255  * objects.
1256  <p>
1257  * @return <code>true</code> if the 'id' attribute of this SBML object is
1258  * set, <code>false</code> otherwise.
1259  <p>
1260  * @note Because of the inconsistent behavior of this function with
1261  * respect to assignments and rules, it is recommended that callers
1262  * use isSetIdAttribute() instead.
1263  <p>
1264  * @see #getIdAttribute()
1265  * @see #setIdAttribute(String sid)
1266  * @see #unsetIdAttribute()
1267  * @see #isSetIdAttribute()
1268    */ public
isSetId()1269  boolean isSetId() {
1270     return libsbmlJNI.SBase_isSetId(swigCPtr, this);
1271   }
1272 
1273 
1274 /**
1275    * Predicate returning <code>true</code> if this object's 'id' attribute is set.
1276    <p>
1277    * <p>
1278  * The identifier given by an object's 'id' attribute value
1279  * is used to identify the object within the SBML model definition.
1280  * Other objects can refer to the component using this identifier.  The
1281  * data type of 'id' is always <code>SId</code> or a type derived
1282  * from that, such as <code>UnitSId</code>, depending on the object in
1283  * question.  All data types are defined as follows:
1284  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1285  *   letter .= 'a'..'z','A'..'Z'
1286  *   digit  .= '0'..'9'
1287  *   idChar .= letter | digit | '_'
1288  *   SId    .= ( letter | '_' ) idChar*
1289  * </pre>
1290  * The characters <code>(</code> and <code>)</code> are used for grouping,
1291  * the character <code>*</code> 'zero or more times', and the character
1292  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1293  * is determined by an exact character sequence match; i.e., comparisons must
1294  * be performed in a case-sensitive manner.  This applies to all uses of
1295  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1296  <p>
1297  * Users need to be aware of some important API issues that are the result of
1298  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1299  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1300  * of SBML objects.  To simplify the work of programmers, libSBML's API
1301  * provided get, set, check, and unset on the {@link SBase} object class itself
1302  * instead of on individual subobject classes. This made the
1303  * get/set/etc. methods uniformly available on all objects in the libSBML
1304  * API.  LibSBML simply returned empty strings or otherwise did not act when
1305  * the methods were applied to SBML objects that were not defined by the SBML
1306  * specification to have 'id' or 'name' attributes.  Additional complications
1307  * arose with the rule and assignment objects: {@link InitialAssignment},
1308  * {@link EventAssignment}, {@link AssignmentRule}, and {@link RateRule}.  In early versions of SBML,
1309  * the rule object hierarchy was different, and in addition, then as now,
1310  * they possess different attributes: 'variable' (for the rules and event
1311  * assignments), 'symbol' (for initial assignments), or neither (for
1312  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1313  * would always return an empty string, and isSetId() would always return
1314  * <code>false</code> for objects of these classes.
1315  <p>
1316  * With the addition of 'id' and 'name' attributes on {@link SBase} in Level&nbsp;3
1317  * Version&nbsp;2, it became necessary to introduce a new way to interact
1318  * with the attributes more consistently in libSBML to avoid breaking
1319  * backward compatibility in the behavior of the original 'id' methods.  For
1320  * this reason, libSBML provides four functions (getIdAttribute(),
1321  * setIdAttribute(String), isSetIdAttribute(), and
1322  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1323  * from {@link SBase}, regardless of the object's type.  <strong>These new methods
1324  * should be used instead of the older getId()/setId()/etc. methods</strong>
1325  * unless the old behavior is somehow necessary.  Regardless of the Level and
1326  * Version of the SBML, these functions allow client applications to use more
1327  * generalized code in some situations (for instance, when manipulating
1328  * objects that are all known to have identifiers).  If the object in
1329  * question does not posess an 'id' attribute according to the SBML
1330  * specification for the Level and Version in use, libSBML will not allow the
1331  * identifier to be set, nor will it read or write 'id' attributes for those
1332  * objects.
1333    <p>
1334    * @return <code>true</code> if the 'id' attribute of this SBML object is
1335    * set, <code>false</code> otherwise.
1336    <p>
1337    * @see #getIdAttribute()
1338    * @see #setIdAttribute(String sid)
1339    * @see #unsetIdAttribute()
1340    */ public
isSetIdAttribute()1341  boolean isSetIdAttribute() {
1342     return libsbmlJNI.SBase_isSetIdAttribute(swigCPtr, this);
1343   }
1344 
1345 
1346 /**
1347    * Predicate returning <code>true</code> if this
1348    * object's 'name' attribute is set.
1349    <p>
1350    * <p>
1351  * <p>
1352  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
1353  * moved to {@link SBase} directly, instead of being defined individually for many
1354  * (but not all) objects.  LibSBML has for a long time provided functions
1355  * defined on {@link SBase} itself to get, set, and unset those attributes, which
1356  * would fail or otherwise return empty strings if executed on any object
1357  * for which those attributes were not defined.  Now that all {@link SBase} objects
1358  * define those attributes, those functions now succeed for any object with
1359  * the appropriate level and version.
1360  <p>
1361  * The 'name' attribute is
1362  * optional and is not intended to be used for cross-referencing purposes
1363  * within a model.  Its purpose instead is to provide a human-readable
1364  * label for the component.  The data type of 'name' is the type
1365  * <code>string</code> defined in XML Schema.  SBML imposes no
1366  * restrictions as to the content of 'name' attributes beyond those
1367  * restrictions defined by the <code>string</code> type in XML Schema.
1368  <p>
1369  * The recommended practice for handling 'name' is as follows.  If a
1370  * software tool has the capability for displaying the content of 'name'
1371  * attributes, it should display this content to the user as a
1372  * component's label instead of the component's 'id'.  If the user
1373  * interface does not have this capability (e.g., because it cannot
1374  * display or use special characters in symbol names), or if the 'name'
1375  * attribute is missing on a given component, then the user interface
1376  * should display the value of the 'id' attribute instead.  (Script
1377  * language interpreters are especially likely to display 'id' instead of
1378  * 'name'.)
1379  <p>
1380  * As a consequence of the above, authors of systems that automatically
1381  * generate the values of 'id' attributes should be aware some systems
1382  * may display the 'id''s to the user.  Authors therefore may wish to
1383  * take some care to have their software create 'id' values that are: (a)
1384  * reasonably easy for humans to type and read; and (b) likely to be
1385  * meaningful, for example by making the 'id' attribute be an abbreviated
1386  * form of the name attribute value.
1387  <p>
1388  * An additional point worth mentioning is although there are
1389  * restrictions on the uniqueness of 'id' values, there are no
1390  * restrictions on the uniqueness of 'name' values in a model.  This
1391  * allows software applications leeway in assigning component identifiers.
1392  <p>
1393  * Regardless of the level and version of the SBML, these functions allow
1394  * client applications to use more generalized code in some situations
1395  * (for instance, when manipulating objects that are all known to have
1396  * names).  If the object in question does not posess a 'name' attribute
1397  * according to the SBML specification for the Level and Version in use,
1398  * libSBML will not allow the name to be set, nor will it read or
1399  * write 'name' attributes for those objects.
1400  <p>
1401  * @return <code>true</code> if the 'name' attribute of this SBML object is
1402  * set, <code>false</code> otherwise.
1403  <p>
1404  * @see #getName()
1405  * @see #setName(String sid)
1406  * @see #unsetName()
1407    */ public
isSetName()1408  boolean isSetName() {
1409     return libsbmlJNI.SBase_isSetName(swigCPtr, this);
1410   }
1411 
1412 
1413 /**
1414    * Predicate returning <code>true</code> if this
1415    * object's 'notes' subelement exists and has content.
1416    <p>
1417    * The optional SBML element named 'notes', present on every major SBML
1418    * component type, is intended as a place for storing optional
1419    * information intended to be seen by humans.  An example use of the
1420    * 'notes' element would be to contain formatted user comments about the
1421    * model element in which the 'notes' element is enclosed.  Every object
1422    * derived directly or indirectly from type {@link SBase} can have a separate
1423    * value for 'notes', allowing users considerable freedom when adding
1424    * comments to their models.
1425    <p>
1426    * The format of 'notes' elements must be <a target='_blank'
1427    * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
1428    * verify the formatting of 'notes' content, libSBML provides the static
1429    * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode xhtml)}; however,
1430    * readers are urged to consult the appropriate <a target='_blank'
1431    * href='http://sbml.org/Documents/Specifications'>SBML specification
1432    * document</a> for the Level and Version of their model for more
1433    * in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
1434    * specifications have considerable detail about how 'notes' element
1435    * content must be structured.
1436    <p>
1437    * @return <code>true</code> if a 'notes' subelement exists, <code>false</code> otherwise.
1438    <p>
1439    * @see #getNotes()
1440    * @see #getNotesString()
1441    * @see #setNotes(XMLNode notes)
1442    * @see #setNotes(String notes, boolean addXHTMLMarkup)
1443    * @see #appendNotes(XMLNode notes)
1444    * @see #appendNotes(String notes)
1445    * @see #unsetNotes()
1446    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
1447    */ public
isSetNotes()1448  boolean isSetNotes() {
1449     return libsbmlJNI.SBase_isSetNotes(swigCPtr, this);
1450   }
1451 
1452 
1453 /**
1454    * Predicate returning <code>true</code> if this
1455    * object's 'annotation' subelement exists and has content.
1456    <p>
1457    * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1458    * shown directly to humans, the 'annotation' element is a container for
1459    * optional software-generated content <em>not</em> meant to be shown to
1460    * humans.  Every object derived from {@link SBase} can have its own value for
1461    * 'annotation'.  The element's content type is <a target='_blank'
1462    * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
1463    * 'any'</a>, allowing essentially arbitrary well-formed XML data
1464    * content.
1465    <p>
1466    * SBML places a few restrictions on the organization of the content of
1467    * annotations; these are intended to help software tools read and write
1468    * the data as well as help reduce conflicts between annotations added by
1469    * different tools.  Please see the SBML specifications for more details.
1470    <p>
1471    * @return <code>true</code> if a 'annotation' subelement exists, <code>false</code>
1472    * otherwise.
1473    <p>
1474    * @see #getAnnotation()
1475    * @see #getAnnotationString()
1476    * @see #setAnnotation(XMLNode annotation)
1477    * @see #setAnnotation(String annotation)
1478    * @see #appendAnnotation(XMLNode annotation)
1479    * @see #appendAnnotation(String annotation)
1480    * @see #unsetAnnotation()
1481    */ public
isSetAnnotation()1482  boolean isSetAnnotation() {
1483     return libsbmlJNI.SBase_isSetAnnotation(swigCPtr, this);
1484   }
1485 
1486 
1487 /**
1488    * Predicate returning <code>true</code> if this
1489    * object's 'sboTerm' attribute is set.
1490    <p>
1491    * @return <code>true</code> if the 'sboTerm' attribute of this SBML object is
1492    * set, <code>false</code> otherwise.
1493    */ public
isSetSBOTerm()1494  boolean isSetSBOTerm() {
1495     return libsbmlJNI.SBase_isSetSBOTerm(swigCPtr, this);
1496   }
1497 
1498 
1499 /**
1500    * Sets the value of the meta-identifier attribute of this SBML object.
1501    <p>
1502    * <p>
1503  * The optional attribute named 'metaid', present on every major SBML
1504  * component type, is for supporting metadata annotations using RDF (<a
1505  * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
1506  * attribute value has the data type <a
1507  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
1508  * identifier type, which means each 'metaid' value must be globally unique
1509  * within an SBML file.  The latter point is important, because the
1510  * uniqueness criterion applies across <em>any</em> attribute with type
1511  * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
1512  * by SBML&mdash;something to be aware of if your application-specific XML
1513  * content inside the 'annotation' subelement happens to use the XML
1514  * <code>ID</code> type.  Although SBML itself specifies the use of <a
1515  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
1516  * the 'metaid' attribute, SBML-compatible applications should be careful if
1517  * they use XML <code>ID</code>'s in XML portions of a model that are not
1518  * defined by SBML, such as in the application-specific content of the
1519  * 'annotation' subelement.  Finally, note that LibSBML does not provide an
1520  * explicit XML <code>ID</code> data type; it uses ordinary character
1521  * strings, which is easier for applications to support.
1522    <p>
1523    * The string <code>metaid</code> is copied.
1524    <p>
1525    * @param metaid the identifier string to use as the value of the
1526    * 'metaid' attribute.
1527    <p>
1528    * <p>
1529  * @return integer value indicating success/failure of the
1530  * function.   The possible values
1531  * returned by this function are:
1532    * <ul>
1533    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1534    * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1535    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1536    *
1537    * </ul> <p>
1538    * @see #getMetaId()
1539    * @see #isSetMetaId()
1540    */ public
setMetaId(String metaid)1541  int setMetaId(String metaid) {
1542     return libsbmlJNI.SBase_setMetaId(swigCPtr, this, metaid);
1543   }
1544 
1545 
1546 /**
1547    * Predicate returning <code>true</code> if this
1548    * object has a {@link ModelHistory} object attached to it.
1549    <p>
1550    * @return <code>true</code> if the {@link ModelHistory} of this object is set,
1551    * <code>false</code> otherwise.
1552    <p>
1553    * @note In SBML Level&nbsp;2, model history annotations were only
1554    * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
1555    * permitted on all SBML components derived from {@link SBase}.
1556    */ public
isSetModelHistory()1557  boolean isSetModelHistory() {
1558     return libsbmlJNI.SBase_isSetModelHistory(swigCPtr, this);
1559   }
1560 
1561 
1562 /**
1563    * Sets the value of the 'id' attribute of this SBML object.
1564    <p>
1565    * <p>
1566  * The string <code>sid</code> is copied.
1567  <p>
1568  * <p>
1569  * The identifier given by an object's 'id' attribute value
1570  * is used to identify the object within the SBML model definition.
1571  * Other objects can refer to the component using this identifier.  The
1572  * data type of 'id' is always <code>SId</code> or a type derived
1573  * from that, such as <code>UnitSId</code>, depending on the object in
1574  * question.  All data types are defined as follows:
1575  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1576  *   letter .= 'a'..'z','A'..'Z'
1577  *   digit  .= '0'..'9'
1578  *   idChar .= letter | digit | '_'
1579  *   SId    .= ( letter | '_' ) idChar*
1580  * </pre>
1581  * The characters <code>(</code> and <code>)</code> are used for grouping,
1582  * the character <code>*</code> 'zero or more times', and the character
1583  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1584  * is determined by an exact character sequence match; i.e., comparisons must
1585  * be performed in a case-sensitive manner.  This applies to all uses of
1586  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1587  <p>
1588  * Users need to be aware of some important API issues that are the result of
1589  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1590  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1591  * of SBML objects.  To simplify the work of programmers, libSBML's API
1592  * provided get, set, check, and unset on the {@link SBase} object class itself
1593  * instead of on individual subobject classes. This made the
1594  * get/set/etc. methods uniformly available on all objects in the libSBML
1595  * API.  LibSBML simply returned empty strings or otherwise did not act when
1596  * the methods were applied to SBML objects that were not defined by the SBML
1597  * specification to have 'id' or 'name' attributes.  Additional complications
1598  * arose with the rule and assignment objects: {@link InitialAssignment},
1599  * {@link EventAssignment}, {@link AssignmentRule}, and {@link RateRule}.  In early versions of SBML,
1600  * the rule object hierarchy was different, and in addition, then as now,
1601  * they possess different attributes: 'variable' (for the rules and event
1602  * assignments), 'symbol' (for initial assignments), or neither (for
1603  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1604  * would always return an empty string, and isSetId() would always return
1605  * <code>false</code> for objects of these classes.
1606  <p>
1607  * With the addition of 'id' and 'name' attributes on {@link SBase} in Level&nbsp;3
1608  * Version&nbsp;2, it became necessary to introduce a new way to interact
1609  * with the attributes more consistently in libSBML to avoid breaking
1610  * backward compatibility in the behavior of the original 'id' methods.  For
1611  * this reason, libSBML provides four functions (getIdAttribute(),
1612  * setIdAttribute(String), isSetIdAttribute(), and
1613  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1614  * from {@link SBase}, regardless of the object's type.  <strong>These new methods
1615  * should be used instead of the older getId()/setId()/etc. methods</strong>
1616  * unless the old behavior is somehow necessary.  Regardless of the Level and
1617  * Version of the SBML, these functions allow client applications to use more
1618  * generalized code in some situations (for instance, when manipulating
1619  * objects that are all known to have identifiers).  If the object in
1620  * question does not posess an 'id' attribute according to the SBML
1621  * specification for the Level and Version in use, libSBML will not allow the
1622  * identifier to be set, nor will it read or write 'id' attributes for those
1623  * objects.
1624  <p>
1625  * @param sid the string to use as the identifier of this object.
1626  <p>
1627  * <p>
1628  * @return integer value indicating success/failure of the
1629  * function.   The possible values
1630  * returned by this function are:
1631  * <ul>
1632  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1633  * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1634  * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1635  *
1636  * </ul> <p>
1637  * @see #getIdAttribute()
1638  * @see #setIdAttribute(String sid)
1639  * @see #isSetIdAttribute()
1640  * @see #unsetIdAttribute()
1641    */ public
setId(String sid)1642  int setId(String sid) {
1643     return libsbmlJNI.SBase_setId(swigCPtr, this, sid);
1644   }
1645 
1646 
1647 /**
1648    * Sets the value of the 'id' attribute of this SBML object.
1649    <p>
1650    * <p>
1651  * The string <code>sid</code> is copied.
1652  <p>
1653  * <p>
1654  * The identifier given by an object's 'id' attribute value
1655  * is used to identify the object within the SBML model definition.
1656  * Other objects can refer to the component using this identifier.  The
1657  * data type of 'id' is always <code>SId</code> or a type derived
1658  * from that, such as <code>UnitSId</code>, depending on the object in
1659  * question.  All data types are defined as follows:
1660  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1661  *   letter .= 'a'..'z','A'..'Z'
1662  *   digit  .= '0'..'9'
1663  *   idChar .= letter | digit | '_'
1664  *   SId    .= ( letter | '_' ) idChar*
1665  * </pre>
1666  * The characters <code>(</code> and <code>)</code> are used for grouping,
1667  * the character <code>*</code> 'zero or more times', and the character
1668  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1669  * is determined by an exact character sequence match; i.e., comparisons must
1670  * be performed in a case-sensitive manner.  This applies to all uses of
1671  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1672  <p>
1673  * Users need to be aware of some important API issues that are the result of
1674  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1675  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1676  * of SBML objects.  To simplify the work of programmers, libSBML's API
1677  * provided get, set, check, and unset on the {@link SBase} object class itself
1678  * instead of on individual subobject classes. This made the
1679  * get/set/etc. methods uniformly available on all objects in the libSBML
1680  * API.  LibSBML simply returned empty strings or otherwise did not act when
1681  * the methods were applied to SBML objects that were not defined by the SBML
1682  * specification to have 'id' or 'name' attributes.  Additional complications
1683  * arose with the rule and assignment objects: {@link InitialAssignment},
1684  * {@link EventAssignment}, {@link AssignmentRule}, and {@link RateRule}.  In early versions of SBML,
1685  * the rule object hierarchy was different, and in addition, then as now,
1686  * they possess different attributes: 'variable' (for the rules and event
1687  * assignments), 'symbol' (for initial assignments), or neither (for
1688  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1689  * would always return an empty string, and isSetId() would always return
1690  * <code>false</code> for objects of these classes.
1691  <p>
1692  * With the addition of 'id' and 'name' attributes on {@link SBase} in Level&nbsp;3
1693  * Version&nbsp;2, it became necessary to introduce a new way to interact
1694  * with the attributes more consistently in libSBML to avoid breaking
1695  * backward compatibility in the behavior of the original 'id' methods.  For
1696  * this reason, libSBML provides four functions (getIdAttribute(),
1697  * setIdAttribute(String), isSetIdAttribute(), and
1698  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1699  * from {@link SBase}, regardless of the object's type.  <strong>These new methods
1700  * should be used instead of the older getId()/setId()/etc. methods</strong>
1701  * unless the old behavior is somehow necessary.  Regardless of the Level and
1702  * Version of the SBML, these functions allow client applications to use more
1703  * generalized code in some situations (for instance, when manipulating
1704  * objects that are all known to have identifiers).  If the object in
1705  * question does not posess an 'id' attribute according to the SBML
1706  * specification for the Level and Version in use, libSBML will not allow the
1707  * identifier to be set, nor will it read or write 'id' attributes for those
1708  * objects.
1709  <p>
1710  * @param sid the string to use as the identifier of this object.
1711  <p>
1712  * <p>
1713  * @return integer value indicating success/failure of the
1714  * function.   The possible values
1715  * returned by this function are:
1716  * <ul>
1717  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1718  * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1719  * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1720  *
1721  * </ul> <p>
1722  * @see #getIdAttribute()
1723  * @see #setIdAttribute(String sid)
1724  * @see #isSetIdAttribute()
1725  * @see #unsetIdAttribute()
1726    */ public
setIdAttribute(String sid)1727  int setIdAttribute(String sid) {
1728     return libsbmlJNI.SBase_setIdAttribute(swigCPtr, this, sid);
1729   }
1730 
1731 
1732 /**
1733    * Sets the value of the 'name' attribute of this SBML object.
1734    <p>
1735    * <p>
1736  * The string in <code>name</code> is copied.
1737  <p>
1738  * @param name the new name for the SBML object.
1739  <p>
1740  * <p>
1741  * @return integer value indicating success/failure of the
1742  * function.   The possible values
1743  * returned by this function are:
1744  * <ul>
1745  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1746  * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1747  *
1748  * </ul>
1749    */ public
setName(String name)1750  int setName(String name) {
1751     return libsbmlJNI.SBase_setName(swigCPtr, this, name);
1752   }
1753 
1754 
1755 /**
1756    * Sets the value of the 'annotation' subelement of this SBML object.
1757    <p>
1758    * The content of <code>annotation</code> is copied, and any previous content of
1759    * this object's 'annotation' subelement is deleted.
1760    <p>
1761    * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1762    * shown directly to humans, the 'annotation' element is a container for
1763    * optional software-generated content <em>not</em> meant to be shown to
1764    * humans.  Every object derived from {@link SBase} can have its own value for
1765    * 'annotation'.  The element's content type is <a target='_blank'
1766    * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
1767    * 'any'</a>, allowing essentially arbitrary well-formed XML data
1768    * content.
1769    <p>
1770    * SBML places a few restrictions on the organization of the content of
1771    * annotations; these are intended to help software tools read and write
1772    * the data as well as help reduce conflicts between annotations added by
1773    * different tools.  Please see the SBML specifications for more details.
1774    <p>
1775    * Call this method will result in any existing content of the
1776    * 'annotation' subelement to be discarded.  Unless you have taken steps
1777    * to first copy and reconstitute any existing annotations into the
1778    * <code>annotation</code> that is about to be assigned, it is likely that performing
1779    * such wholesale replacement is unfriendly towards other software
1780    * applications whose annotations are discarded.  An alternative may be
1781    * to use {@link SBase#appendAnnotation(XMLNode annotation)} or
1782    * {@link SBase#appendAnnotation(String annotation)}.
1783    <p>
1784    * @param annotation an XML structure that is to be used as the new content
1785    * of the 'annotation' subelement of this object.
1786    <p>
1787    * <p>
1788  * @return integer value indicating success/failure of the
1789  * function.   This particular
1790  * function only does one thing irrespective of user input or
1791  * object state, and thus will only return a single value:
1792    * <ul>
1793    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1794    *
1795    * </ul> <p>
1796    * @see #getAnnotationString()
1797    * @see #isSetAnnotation()
1798    * @see #setAnnotation(String annotation)
1799    * @see #appendAnnotation(XMLNode annotation)
1800    * @see #appendAnnotation(String annotation)
1801    * @see #unsetAnnotation()
1802    */ public
setAnnotation(XMLNode annotation)1803  int setAnnotation(XMLNode annotation) {
1804     return libsbmlJNI.SBase_setAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
1805   }
1806 
1807 
1808 /**
1809    * Sets the value of the 'annotation' subelement of this SBML object.
1810    <p>
1811    * The content of <code>annotation</code> is copied, and any previous content of
1812    * this object's 'annotation' subelement is deleted.
1813    <p>
1814    * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1815    * shown directly to humans, the 'annotation' element is a container for
1816    * optional software-generated content <em>not</em> meant to be shown to
1817    * humans.  Every object derived from {@link SBase} can have its own value for
1818    * 'annotation'.  The element's content type is <a target='_blank'
1819    * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
1820    * 'any'</a>, allowing essentially arbitrary well-formed XML data
1821    * content.
1822    <p>
1823    * SBML places a few restrictions on the organization of the content of
1824    * annotations; these are intended to help software tools read and write
1825    * the data as well as help reduce conflicts between annotations added by
1826    * different tools.  Please see the SBML specifications for more details.
1827    <p>
1828    * Call this method will result in any existing content of the
1829    * 'annotation' subelement to be discarded.  Unless you have taken steps
1830    * to first copy and reconstitute any existing annotations into the
1831    * <code>annotation</code> that is about to be assigned, it is likely that performing
1832    * such wholesale replacement is unfriendly towards other software
1833    * applications whose annotations are discarded.  An alternative may be
1834    * to use {@link SBase#appendAnnotation(XMLNode annotation)} or
1835    * {@link SBase#appendAnnotation(String annotation)}.
1836    <p>
1837    * @param annotation an XML string that is to be used as the content
1838    * of the 'annotation' subelement of this object.
1839    <p>
1840    * <p>
1841  * @return integer value indicating success/failure of the
1842  * function.   The possible values
1843  * returned by this function are:
1844    * <ul>
1845    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1846    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1847    *
1848    * </ul> <p>
1849    * @see #getAnnotationString()
1850    * @see #isSetAnnotation()
1851    * @see #setAnnotation(XMLNode annotation)
1852    * @see #appendAnnotation(XMLNode annotation)
1853    * @see #appendAnnotation(String annotation)
1854    * @see #unsetAnnotation()
1855    */ public
setAnnotation(String annotation)1856  int setAnnotation(String annotation) {
1857     return libsbmlJNI.SBase_setAnnotation__SWIG_1(swigCPtr, this, annotation);
1858   }
1859 
1860 
1861 /**
1862    * Appends the given <code>annotation</code> to the 'annotation' subelement of this
1863    * object.
1864    <p>
1865    * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1866    * shown directly to humans, the 'annotation' element is a container for
1867    * optional software-generated content <em>not</em> meant to be shown to
1868    * humans.  Every object derived from {@link SBase} can have its own value for
1869    * 'annotation'.  The element's content type is <a
1870    * target='_blank'
1871    * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type 'any'</a>,
1872    * allowing essentially arbitrary well-formed XML data content.
1873    <p>
1874    * SBML places a few restrictions on the organization of the content of
1875    * annotations; these are intended to help software tools read and write
1876    * the data as well as help reduce conflicts between annotations added by
1877    * different tools.  Please see the SBML specifications for more details.
1878    <p>
1879    * Unlike {@link SBase#setAnnotation(XMLNode annotation)} or
1880    * {@link SBase#setAnnotation(String annotation)}, this method
1881    * allows other annotations to be preserved when an application adds its
1882    * own data.
1883    <p>
1884    * @param annotation an XML structure that is to be copied and appended
1885    * to the content of the 'annotation' subelement of this object.
1886    <p>
1887    * <p>
1888  * @return integer value indicating success/failure of the
1889  * function.   The possible values
1890  * returned by this function are:
1891    * <ul>
1892    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1893    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1894    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1895    * (if the parent element does not have the 'metaid' attribute set)
1896    * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS}
1897    * (if the parent was already annotated with the annotation in question)
1898    *
1899    * </ul> <p>
1900    * @see #getAnnotationString()
1901    * @see #isSetAnnotation()
1902    * @see #setAnnotation(XMLNode annotation)
1903    * @see #setAnnotation(String annotation)
1904    * @see #appendAnnotation(String annotation)
1905    * @see #unsetAnnotation()
1906    */ public
appendAnnotation(XMLNode annotation)1907  int appendAnnotation(XMLNode annotation) {
1908     return libsbmlJNI.SBase_appendAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
1909   }
1910 
1911 
1912 /**
1913    * Appends the given <code>annotation</code> to the 'annotation' subelement of this
1914    * object.
1915    <p>
1916    * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1917    * shown directly to humans, the 'annotation' element is a container for
1918    * optional software-generated content <em>not</em> meant to be shown to
1919    * humans.  Every object derived from {@link SBase} can have its own value for
1920    * 'annotation'.  The element's content type is <a
1921    * target='_blank'
1922    * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type 'any'</a>,
1923    * allowing essentially arbitrary well-formed XML data content.
1924    <p>
1925    * SBML places a few restrictions on the organization of the content of
1926    * annotations; these are intended to help software tools read and write
1927    * the data as well as help reduce conflicts between annotations added by
1928    * different tools.  Please see the SBML specifications for more details.
1929    <p>
1930    * Unlike {@link SBase#setAnnotation(XMLNode annotation)} or
1931    * {@link SBase#setAnnotation(String annotation)}, this method
1932    * allows other annotations to be preserved when an application adds its
1933    * own data.
1934    <p>
1935    * @param annotation an XML string that is to be copied and appended
1936    * to the content of the 'annotation' subelement of this object.
1937    <p>
1938    * <p>
1939  * @return integer value indicating success/failure of the
1940  * function.   The possible values
1941  * returned by this function are:
1942    * <ul>
1943    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1944    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1945    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1946    * (if the parent element does not have the 'metaid' attribute set)
1947    * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS}
1948    * (if the parent was already annotated with the annotation in question)
1949    *
1950    * </ul> <p>
1951    * @see #getAnnotationString()
1952    * @see #isSetAnnotation()
1953    * @see #setAnnotation(XMLNode annotation)
1954    * @see #setAnnotation(String annotation)
1955    * @see #appendAnnotation(XMLNode annotation)
1956    * @see #unsetAnnotation()
1957    */ public
appendAnnotation(String annotation)1958  int appendAnnotation(String annotation) {
1959     return libsbmlJNI.SBase_appendAnnotation__SWIG_1(swigCPtr, this, annotation);
1960   }
1961 
1962 
1963 /**
1964    * Removes the top-level element within the 'annotation' subelement of this
1965    * SBML object with the given name and optional URI.
1966    <p>
1967    * SBML places a few restrictions on the organization of the content of
1968    * annotations; these are intended to help software tools read and write
1969    * the data as well as help reduce conflicts between annotations added by
1970    * different tools.  Please see the SBML specifications for more details.
1971    <p>
1972    * Calling this method allows a particular annotation element to be removed
1973    * whilst the remaining annotations remain intact.
1974    <p>
1975    * @param elementName a string representing the name of the top level
1976    * annotation element that is to be removed.
1977    * @param elementURI an optional string that is used to check both the name
1978    * and URI of the top level element to be removed.
1979    * @param removeEmpty if after removing of the element, the annotation is
1980    * empty, and the removeEmpty argument is true, the annotation node will be
1981    * deleted (default).
1982    <p>
1983    * <p>
1984  * @return integer value indicating success/failure of the
1985  * function.   The possible values
1986  * returned by this function are:
1987    * <ul>
1988    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1989    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1990    * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND}
1991    * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND}
1992    *
1993    * </ul> <p>
1994    * @see #replaceTopLevelAnnotationElement(XMLNode )
1995    * @see #replaceTopLevelAnnotationElement(String)
1996    */ public
removeTopLevelAnnotationElement(String elementName, String elementURI, boolean removeEmpty)1997  int removeTopLevelAnnotationElement(String elementName, String elementURI, boolean removeEmpty) {
1998     return libsbmlJNI.SBase_removeTopLevelAnnotationElement__SWIG_0(swigCPtr, this, elementName, elementURI, removeEmpty);
1999   }
2000 
2001 
2002 /**
2003    * Removes the top-level element within the 'annotation' subelement of this
2004    * SBML object with the given name and optional URI.
2005    <p>
2006    * SBML places a few restrictions on the organization of the content of
2007    * annotations; these are intended to help software tools read and write
2008    * the data as well as help reduce conflicts between annotations added by
2009    * different tools.  Please see the SBML specifications for more details.
2010    <p>
2011    * Calling this method allows a particular annotation element to be removed
2012    * whilst the remaining annotations remain intact.
2013    <p>
2014    * @param elementName a string representing the name of the top level
2015    * annotation element that is to be removed.
2016    * @param elementURI an optional string that is used to check both the name
2017    * and URI of the top level element to be removed.
2018    * @param removeEmpty if after removing of the element, the annotation is
2019    * empty, and the removeEmpty argument is true, the annotation node will be
2020    * deleted (default).
2021    <p>
2022    * <p>
2023  * @return integer value indicating success/failure of the
2024  * function.   The possible values
2025  * returned by this function are:
2026    * <ul>
2027    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2028    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2029    * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND}
2030    * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND}
2031    *
2032    * </ul> <p>
2033    * @see #replaceTopLevelAnnotationElement(XMLNode )
2034    * @see #replaceTopLevelAnnotationElement(String)
2035    */ public
removeTopLevelAnnotationElement(String elementName, String elementURI)2036  int removeTopLevelAnnotationElement(String elementName, String elementURI) {
2037     return libsbmlJNI.SBase_removeTopLevelAnnotationElement__SWIG_1(swigCPtr, this, elementName, elementURI);
2038   }
2039 
2040 
2041 /**
2042    * Removes the top-level element within the 'annotation' subelement of this
2043    * SBML object with the given name and optional URI.
2044    <p>
2045    * SBML places a few restrictions on the organization of the content of
2046    * annotations; these are intended to help software tools read and write
2047    * the data as well as help reduce conflicts between annotations added by
2048    * different tools.  Please see the SBML specifications for more details.
2049    <p>
2050    * Calling this method allows a particular annotation element to be removed
2051    * whilst the remaining annotations remain intact.
2052    <p>
2053    * @param elementName a string representing the name of the top level
2054    * annotation element that is to be removed.
2055    * @param elementURI an optional string that is used to check both the name
2056    * and URI of the top level element to be removed.
2057    * @param removeEmpty if after removing of the element, the annotation is
2058    * empty, and the removeEmpty argument is true, the annotation node will be
2059    * deleted (default).
2060    <p>
2061    * <p>
2062  * @return integer value indicating success/failure of the
2063  * function.   The possible values
2064  * returned by this function are:
2065    * <ul>
2066    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2067    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2068    * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND}
2069    * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND}
2070    *
2071    * </ul> <p>
2072    * @see #replaceTopLevelAnnotationElement(XMLNode )
2073    * @see #replaceTopLevelAnnotationElement(String)
2074    */ public
removeTopLevelAnnotationElement(String elementName)2075  int removeTopLevelAnnotationElement(String elementName) {
2076     return libsbmlJNI.SBase_removeTopLevelAnnotationElement__SWIG_2(swigCPtr, this, elementName);
2077   }
2078 
2079 
2080 /**
2081    * Replaces the given top-level element within the 'annotation'
2082    * subelement of this SBML object and with the annotation element supplied.
2083    <p>
2084    * SBML places a few restrictions on the organization of the content of
2085    * annotations; these are intended to help software tools read and write
2086    * the data as well as help reduce conflicts between annotations added by
2087    * different tools.  Please see the SBML specifications for more details.
2088    <p>
2089    * This method determines the name of the element to be replaced from the
2090    * annotation argument. Functionally it is equivalent to calling <code>
2091    * removeTopLevelAnnotationElement(name)</code> followed by calling
2092    * <code>appendAnnotation(annotation_with_name)</code>, with the exception
2093    * that the placement of the annotation element remains the same.
2094    <p>
2095    * @param annotation {@link XMLNode} representing the replacement top level annotation.
2096    <p>
2097    * <p>
2098  * @return integer value indicating success/failure of the
2099  * function.   The possible values
2100  * returned by this function are:
2101    * <ul>
2102    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2103    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2104    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2105    *
2106    * </ul> <p>
2107    * @see #removeTopLevelAnnotationElement(String elementName, String elementURI, boolean removeEmpty)
2108    * @see #replaceTopLevelAnnotationElement(String)
2109    */ public
replaceTopLevelAnnotationElement(XMLNode annotation)2110  int replaceTopLevelAnnotationElement(XMLNode annotation) {
2111     return libsbmlJNI.SBase_replaceTopLevelAnnotationElement__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
2112   }
2113 
2114 
2115 /**
2116    * Replaces the given top-level element within the 'annotation'
2117    * subelement of this SBML object and with the annotation element supplied.
2118    <p>
2119    * SBML places a few restrictions on the organization of the content of
2120    * annotations; these are intended to help software tools read and write
2121    * the data as well as help reduce conflicts between annotations added by
2122    * different tools.  Please see the SBML specifications for more details.
2123    <p>
2124    * This method determines the name of the element to be replaced from the
2125    * annotation argument. Functionally it is equivalent to calling <code>
2126    * removeTopLevelAnnotationElement(name)</code> followed by calling
2127    * <code>appendAnnotation(annotation_with_name)</code>, with the exception
2128    * that the placement of the annotation element remains the same.
2129    <p>
2130    * @param annotation string representing the replacement top level annotation.
2131    <p>
2132    * <p>
2133  * @return integer value indicating success/failure of the
2134  * function.   The possible values
2135  * returned by this function are:
2136    * <ul>
2137    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2138    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2139    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2140    *
2141    * </ul> <p>
2142    * @see #removeTopLevelAnnotationElement(String elementName, String elementURI)
2143    * @see #replaceTopLevelAnnotationElement(XMLNode)
2144    */ public
replaceTopLevelAnnotationElement(String annotation)2145  int replaceTopLevelAnnotationElement(String annotation) {
2146     return libsbmlJNI.SBase_replaceTopLevelAnnotationElement__SWIG_1(swigCPtr, this, annotation);
2147   }
2148 
2149 
2150 /**
2151    * Sets the value of the 'notes' subelement of this SBML object.
2152    <p>
2153    * The content of <code>notes</code> is copied, and any existing content of this
2154    * object's 'notes' subelement is deleted.
2155    <p>
2156    * The optional SBML element named 'notes', present on every major SBML
2157    * component type, is intended as a place for storing optional
2158    * information intended to be seen by humans.  An example use of the
2159    * 'notes' element would be to contain formatted user comments about the
2160    * model element in which the 'notes' element is enclosed.  Every object
2161    * derived directly or indirectly from type {@link SBase} can have a separate
2162    * value for 'notes', allowing users considerable freedom when adding
2163    * comments to their models.
2164    <p>
2165    * The format of 'notes' elements must be <a target='_blank'
2166    * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
2167    * verify the formatting of 'notes' content, libSBML provides the static
2168    * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode xhtml)}; however,
2169    * readers are urged to consult the appropriate <a target='_blank'
2170    * href='http://sbml.org/Documents/Specifications'>SBML specification
2171    * document</a> for the Level and Version of their model for more
2172    * in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
2173    * specifications have considerable detail about how 'notes' element
2174    * content must be structured.
2175    <p>
2176    * @param notes an XML structure that is to be used as the content of the
2177    * 'notes' subelement of this object.
2178    <p>
2179    * <p>
2180  * @return integer value indicating success/failure of the
2181  * function.   The possible values
2182  * returned by this function are:
2183    * <ul>
2184    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2185    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2186    *
2187    * </ul> <p>
2188    * @see #getNotesString()
2189    * @see #isSetNotes()
2190    * @see #setNotes(String notes, boolean addXHTMLMarkup)
2191    * @see #appendNotes(XMLNode notes)
2192    * @see #appendNotes(String notes)
2193    * @see #unsetNotes()
2194    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
2195    */ public
setNotes(XMLNode notes)2196  int setNotes(XMLNode notes) {
2197     return libsbmlJNI.SBase_setNotes__SWIG_0(swigCPtr, this, XMLNode.getCPtr(notes), notes);
2198   }
2199 
2200 
2201 /**
2202    * Sets the value of the 'notes' subelement of this SBML object to a copy
2203    * of the string <code>notes</code>.
2204    <p>
2205    * The content of <code>notes</code> is copied, and any existing content of this
2206    * object's 'notes' subelement is deleted.
2207    <p>
2208    * The optional SBML element named 'notes', present on every major SBML
2209    * component type, is intended as a place for storing optional
2210    * information intended to be seen by humans.  An example use of the
2211    * 'notes' element would be to contain formatted user comments about the
2212    * model element in which the 'notes' element is enclosed.  Every object
2213    * derived directly or indirectly from type {@link SBase} can have a separate
2214    * value for 'notes', allowing users considerable freedom when adding
2215    * comments to their models.
2216    <p>
2217    * The format of 'notes' elements must be <a target='_blank'
2218    * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
2219    * verify the formatting of 'notes' content, libSBML provides the static
2220    * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
2221    * readers are urged to consult the appropriate <a target='_blank'
2222    * href='http://sbml.org/Documents/Specifications'>SBML specification
2223    * document</a> for the Level and Version of their model for more
2224    * in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
2225    * specifications have considerable detail about how 'notes' element
2226    * content must be structured.
2227    <p>
2228    * The following code illustrates a very simple way of setting the notes
2229    * using this method.  Here, the object being annotated is the whole SBML
2230    * document, but that is for illustration purposes only; you could of
2231    * course use this same approach to annotate any other SBML component.
2232    <p>
2233 <pre class='fragment'>
2234 {@link SBMLDocument} s = new {@link SBMLDocument}(3, 1);
2235 s.setNotes('&lt;body xmlns='http://www.w3.org/1999/xhtml'&gt;here is my note&lt;/p&gt;&lt;/body&gt;');
2236 </pre>
2237 <p>
2238    * @param notes an XML string that is to be used as the content of the
2239    * 'notes' subelement of this object.
2240    <p>
2241    * @param addXHTMLMarkup a boolean indicating whether to wrap the contents
2242    * of the <code>notes</code> argument with XHTML paragraph (<code>&lt;p&gt;</code>)
2243    * tags.  This is appropriate when the string in <code>notes</code> does not already
2244    * containg the appropriate XHTML markup.
2245    <p>
2246    * <p>
2247  * @return integer value indicating success/failure of the
2248  * function.   The possible values
2249  * returned by this function are:
2250    * <ul>
2251    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2252    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2253    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2254    *
2255    * </ul> <p>
2256    * @see #getNotesString()
2257    * @see #isSetNotes()
2258    * @see #setNotes(XMLNode notes)
2259    * @see #appendNotes(XMLNode notes)
2260    * @see #appendNotes(String notes)
2261    * @see #unsetNotes()
2262    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
2263    */ public
setNotes(String notes, boolean addXHTMLMarkup)2264  int setNotes(String notes, boolean addXHTMLMarkup) {
2265     return libsbmlJNI.SBase_setNotes__SWIG_1(swigCPtr, this, notes, addXHTMLMarkup);
2266   }
2267 
2268 
2269 /**
2270    * Sets the value of the 'notes' subelement of this SBML object to a copy
2271    * of the string <code>notes</code>.
2272    <p>
2273    * The content of <code>notes</code> is copied, and any existing content of this
2274    * object's 'notes' subelement is deleted.
2275    <p>
2276    * The optional SBML element named 'notes', present on every major SBML
2277    * component type, is intended as a place for storing optional
2278    * information intended to be seen by humans.  An example use of the
2279    * 'notes' element would be to contain formatted user comments about the
2280    * model element in which the 'notes' element is enclosed.  Every object
2281    * derived directly or indirectly from type {@link SBase} can have a separate
2282    * value for 'notes', allowing users considerable freedom when adding
2283    * comments to their models.
2284    <p>
2285    * The format of 'notes' elements must be <a target='_blank'
2286    * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
2287    * verify the formatting of 'notes' content, libSBML provides the static
2288    * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
2289    * readers are urged to consult the appropriate <a target='_blank'
2290    * href='http://sbml.org/Documents/Specifications'>SBML specification
2291    * document</a> for the Level and Version of their model for more
2292    * in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
2293    * specifications have considerable detail about how 'notes' element
2294    * content must be structured.
2295    <p>
2296    * The following code illustrates a very simple way of setting the notes
2297    * using this method.  Here, the object being annotated is the whole SBML
2298    * document, but that is for illustration purposes only; you could of
2299    * course use this same approach to annotate any other SBML component.
2300    <p>
2301 <pre class='fragment'>
2302 {@link SBMLDocument} s = new {@link SBMLDocument}(3, 1);
2303 s.setNotes('&lt;body xmlns='http://www.w3.org/1999/xhtml'&gt;here is my note&lt;/p&gt;&lt;/body&gt;');
2304 </pre>
2305 <p>
2306    * @param notes an XML string that is to be used as the content of the
2307    * 'notes' subelement of this object.
2308    <p>
2309    * @param addXHTMLMarkup a boolean indicating whether to wrap the contents
2310    * of the <code>notes</code> argument with XHTML paragraph (<code>&lt;p&gt;</code>)
2311    * tags.  This is appropriate when the string in <code>notes</code> does not already
2312    * containg the appropriate XHTML markup.
2313    <p>
2314    * <p>
2315  * @return integer value indicating success/failure of the
2316  * function.   The possible values
2317  * returned by this function are:
2318    * <ul>
2319    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2320    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2321    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2322    *
2323    * </ul> <p>
2324    * @see #getNotesString()
2325    * @see #isSetNotes()
2326    * @see #setNotes(XMLNode notes)
2327    * @see #appendNotes(XMLNode notes)
2328    * @see #appendNotes(String notes)
2329    * @see #unsetNotes()
2330    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
2331    */ public
setNotes(String notes)2332  int setNotes(String notes) {
2333     return libsbmlJNI.SBase_setNotes__SWIG_2(swigCPtr, this, notes);
2334   }
2335 
2336 
2337 /**
2338    * Appends the given <code>notes</code> to the 'notes' subelement of this object.
2339    <p>
2340    * The content of <code>notes</code> is copied.
2341    <p>
2342    * The optional SBML element named 'notes', present on every major SBML
2343    * component type, is intended as a place for storing optional
2344    * information intended to be seen by humans.  An example use of the
2345    * 'notes' element would be to contain formatted user comments about the
2346    * model element in which the 'notes' element is enclosed.  Every object
2347    * derived directly or indirectly from type {@link SBase} can have a separate
2348    * value for 'notes', allowing users considerable freedom when adding
2349    * comments to their models.
2350    <p>
2351    * The format of 'notes' elements must be <a target='_blank'
2352    * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
2353    * verify the formatting of 'notes' content, libSBML provides the static
2354    * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
2355    * readers are urged to consult the appropriate <a target='_blank'
2356    * href='http://sbml.org/Documents/Specifications'>SBML specification
2357    * document</a> for the Level and Version of their model for more
2358    * in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
2359    * specifications have considerable detail about how 'notes' element
2360    * content must be structured.
2361    <p>
2362    * @param notes an XML node structure that is to appended to the content
2363    * of the 'notes' subelement of this object.
2364    <p>
2365    * <p>
2366  * @return integer value indicating success/failure of the
2367  * function.   The possible values
2368  * returned by this function are:
2369    * <ul>
2370    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2371    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2372    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2373    *
2374    * </ul> <p>
2375    * @see #getNotesString()
2376    * @see #isSetNotes()
2377    * @see #setNotes(XMLNode notes)
2378    * @see #setNotes(String notes, boolean addXHTMLMarkup)
2379    * @see #appendNotes(String notes)
2380    * @see #unsetNotes()
2381    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
2382    */ public
appendNotes(XMLNode notes)2383  int appendNotes(XMLNode notes) {
2384     return libsbmlJNI.SBase_appendNotes__SWIG_0(swigCPtr, this, XMLNode.getCPtr(notes), notes);
2385   }
2386 
2387 
2388 /**
2389    * Appends the given <code>notes</code> to the 'notes' subelement of this object.
2390    <p>
2391    * The content of the parameter <code>notes</code> is copied.
2392    <p>
2393    * The optional SBML element named 'notes', present on every major SBML
2394    * component type, is intended as a place for storing optional
2395    * information intended to be seen by humans.  An example use of the
2396    * 'notes' element would be to contain formatted user comments about the
2397    * model element in which the 'notes' element is enclosed.  Every object
2398    * derived directly or indirectly from type {@link SBase} can have a separate
2399    * value for 'notes', allowing users considerable freedom when adding
2400    * comments to their models.
2401    <p>
2402    * The format of 'notes' elements must be <a target='_blank'
2403    * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
2404    * verify the formatting of 'notes' content, libSBML provides the static
2405    * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
2406    * readers are urged to consult the appropriate <a target='_blank'
2407    * href='http://sbml.org/Documents/Specifications'>SBML specification
2408    * document</a> for the Level and Version of their model for more
2409    * in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
2410    * specifications have considerable detail about how 'notes' element
2411    * content must be structured.
2412    <p>
2413    * @param notes an XML string that is to appended to the content of
2414    * the 'notes' subelement of this object.
2415    <p>
2416    * <p>
2417  * @return integer value indicating success/failure of the
2418  * function.   The possible values
2419  * returned by this function are:
2420    * <ul>
2421    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2422    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2423    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2424    *
2425    * </ul> <p>
2426    * @see #getNotesString()
2427    * @see #isSetNotes()
2428    * @see #setNotes(XMLNode notes)
2429    * @see #setNotes(String notes, boolean addXHTMLMarkup)
2430    * @see #appendNotes(XMLNode notes)
2431    * @see #unsetNotes()
2432    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
2433    */ public
appendNotes(String notes)2434  int appendNotes(String notes) {
2435     return libsbmlJNI.SBase_appendNotes__SWIG_1(swigCPtr, this, notes);
2436   }
2437 
2438 
2439 /**
2440    * Sets the {@link ModelHistory} of this object.
2441    <p>
2442    * The content of <code>history</code> is copied, and this object's existing model
2443    * history content is deleted.
2444    <p>
2445    * @param history {@link ModelHistory} of this object.
2446    <p>
2447    * <p>
2448  * @return integer value indicating success/failure of the
2449  * function.   The possible values
2450  * returned by this function are:
2451    * <ul>
2452    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2453    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2454    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2455    *
2456    * </ul> <p>
2457    * @note In SBML Level&nbsp;2, model history annotations were only
2458    * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
2459    * permitted on all SBML components derived from {@link SBase}.
2460    */ public
setModelHistory(ModelHistory history)2461  int setModelHistory(ModelHistory history) {
2462     return libsbmlJNI.SBase_setModelHistory(swigCPtr, this, ModelHistory.getCPtr(history), history);
2463   }
2464 
2465 
2466 /** * @internal */ public
connectToParent(SBase parent)2467  void connectToParent(SBase parent) {
2468     libsbmlJNI.SBase_connectToParent(swigCPtr, this, SBase.getCPtr(parent), parent);
2469   }
2470 
connectToChild()2471   public void connectToChild() {
2472     libsbmlJNI.SBase_connectToChild(swigCPtr, this);
2473   }
2474 
2475 
2476 /**
2477    * Sets the value of the 'sboTerm' attribute.
2478    <p>
2479    * <p>
2480  * Beginning with SBML Level 2 Version 2, objects derived from {@link SBase} have
2481  * an optional attribute named 'sboTerm' for supporting the use of the
2482  * Systems Biology Ontology.  In SBML proper, the data type of the
2483  * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
2484  * seven digit integer number; libSBML simplifies the representation by
2485  * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
2486  * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
2487  * are stored simply as integers.
2488    * <p>
2489  * {@link SBO} terms are a type of optional annotation, and each different class
2490  * of SBML object derived from {@link SBase} imposes its own requirements about
2491  * the values permitted for 'sboTerm'. More details can be found in SBML
2492  * specifications for Level&nbsp;2 Version&nbsp;2 and above.
2493    <p>
2494    * @param value the NNNNNNN integer portion of the {@link SBO} identifier.
2495    <p>
2496    * <p>
2497  * @return integer value indicating success/failure of the
2498  * function.   The possible values
2499  * returned by this function are:
2500    * <ul>
2501    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2502    * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
2503    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2504    *
2505    * </ul> <p>
2506    * @see #setSBOTerm(String sboid)
2507    */ public
setSBOTerm(int value)2508  int setSBOTerm(int value) {
2509     return libsbmlJNI.SBase_setSBOTerm__SWIG_0(swigCPtr, this, value);
2510   }
2511 
2512 
2513 /**
2514    * Sets the value of the 'sboTerm' attribute by string.
2515    <p>
2516    * <p>
2517  * Beginning with SBML Level 2 Version 2, objects derived from {@link SBase} have
2518  * an optional attribute named 'sboTerm' for supporting the use of the
2519  * Systems Biology Ontology.  In SBML proper, the data type of the
2520  * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
2521  * seven digit integer number; libSBML simplifies the representation by
2522  * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
2523  * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
2524  * are stored simply as integers.
2525    * <p>
2526  * {@link SBO} terms are a type of optional annotation, and each different class
2527  * of SBML object derived from {@link SBase} imposes its own requirements about
2528  * the values permitted for 'sboTerm'. More details can be found in SBML
2529  * specifications for Level&nbsp;2 Version&nbsp;2 and above.
2530    <p>
2531    * @param sboid the {@link SBO} identifier string of the form 'SBO:NNNNNNN'.
2532    <p>
2533    * <p>
2534  * @return integer value indicating success/failure of the
2535  * function.   The possible values
2536  * returned by this function are:
2537    * <ul>
2538    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2539    * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
2540    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2541    *
2542    * </ul> <p>
2543    * @see #setSBOTerm(int value)
2544    */ public
setSBOTerm(String sboid)2545  int setSBOTerm(String sboid) {
2546     return libsbmlJNI.SBase_setSBOTerm__SWIG_1(swigCPtr, this, sboid);
2547   }
2548 
2549 
2550 /**
2551    * Sets the namespaces relevant of this SBML object.
2552    <p>
2553    * The content of <code>xmlns</code> is copied, and this object's existing
2554    * namespace content is deleted.
2555    <p>
2556    * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
2557    * information.  It is used to communicate the SBML Level, Version, and
2558    * (in Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.
2559    <p>
2560    * @param xmlns the namespaces to set.
2561    <p>
2562    * <p>
2563  * @return integer value indicating success/failure of the
2564  * function.   The possible values
2565  * returned by this function are:
2566    * <ul>
2567    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2568    * </ul>
2569    */ public
setNamespaces(XMLNamespaces xmlns)2570  int setNamespaces(XMLNamespaces xmlns) {
2571     return libsbmlJNI.SBase_setNamespaces(swigCPtr, this, XMLNamespaces.getCPtr(xmlns), xmlns);
2572   }
2573 
2574 
2575 /**
2576    * Unsets the value of the 'metaid' attribute of this SBML object.
2577    <p>
2578    * <p>
2579  * The optional attribute named 'metaid', present on every major SBML
2580  * component type, is for supporting metadata annotations using RDF (<a
2581  * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
2582  * attribute value has the data type <a
2583  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
2584  * identifier type, which means each 'metaid' value must be globally unique
2585  * within an SBML file.  The latter point is important, because the
2586  * uniqueness criterion applies across <em>any</em> attribute with type
2587  * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
2588  * by SBML&mdash;something to be aware of if your application-specific XML
2589  * content inside the 'annotation' subelement happens to use the XML
2590  * <code>ID</code> type.  Although SBML itself specifies the use of <a
2591  * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
2592  * the 'metaid' attribute, SBML-compatible applications should be careful if
2593  * they use XML <code>ID</code>'s in XML portions of a model that are not
2594  * defined by SBML, such as in the application-specific content of the
2595  * 'annotation' subelement.  Finally, note that LibSBML does not provide an
2596  * explicit XML <code>ID</code> data type; it uses ordinary character
2597  * strings, which is easier for applications to support.
2598    <p>
2599    * <p>
2600  * @return integer value indicating success/failure of the
2601  * function.   The possible values
2602  * returned by this function are:
2603    * <ul>
2604    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2605    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2606    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2607    * </ul>
2608    */ public
unsetMetaId()2609  int unsetMetaId() {
2610     return libsbmlJNI.SBase_unsetMetaId(swigCPtr, this);
2611   }
2612 
2613 
2614 /**
2615    * Unsets the value of the 'id' attribute of this SBML object.
2616    <p>
2617    * <p>
2618  * <p>
2619  * The identifier given by an object's 'id' attribute value
2620  * is used to identify the object within the SBML model definition.
2621  * Other objects can refer to the component using this identifier.  The
2622  * data type of 'id' is always <code>SId</code> or a type derived
2623  * from that, such as <code>UnitSId</code>, depending on the object in
2624  * question.  All data types are defined as follows:
2625  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
2626  *   letter .= 'a'..'z','A'..'Z'
2627  *   digit  .= '0'..'9'
2628  *   idChar .= letter | digit | '_'
2629  *   SId    .= ( letter | '_' ) idChar*
2630  * </pre>
2631  * The characters <code>(</code> and <code>)</code> are used for grouping,
2632  * the character <code>*</code> 'zero or more times', and the character
2633  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
2634  * is determined by an exact character sequence match; i.e., comparisons must
2635  * be performed in a case-sensitive manner.  This applies to all uses of
2636  * <code>SId</code>, <code>SIdRef</code>, and derived types.
2637  <p>
2638  * Users need to be aware of some important API issues that are the result of
2639  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
2640  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
2641  * of SBML objects.  To simplify the work of programmers, libSBML's API
2642  * provided get, set, check, and unset on the {@link SBase} object class itself
2643  * instead of on individual subobject classes. This made the
2644  * get/set/etc. methods uniformly available on all objects in the libSBML
2645  * API.  LibSBML simply returned empty strings or otherwise did not act when
2646  * the methods were applied to SBML objects that were not defined by the SBML
2647  * specification to have 'id' or 'name' attributes.  Additional complications
2648  * arose with the rule and assignment objects: {@link InitialAssignment},
2649  * {@link EventAssignment}, {@link AssignmentRule}, and {@link RateRule}.  In early versions of SBML,
2650  * the rule object hierarchy was different, and in addition, then as now,
2651  * they possess different attributes: 'variable' (for the rules and event
2652  * assignments), 'symbol' (for initial assignments), or neither (for
2653  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
2654  * would always return an empty string, and isSetId() would always return
2655  * <code>false</code> for objects of these classes.
2656  <p>
2657  * With the addition of 'id' and 'name' attributes on {@link SBase} in Level&nbsp;3
2658  * Version&nbsp;2, it became necessary to introduce a new way to interact
2659  * with the attributes more consistently in libSBML to avoid breaking
2660  * backward compatibility in the behavior of the original 'id' methods.  For
2661  * this reason, libSBML provides four functions (getIdAttribute(),
2662  * setIdAttribute(String), isSetIdAttribute(), and
2663  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
2664  * from {@link SBase}, regardless of the object's type.  <strong>These new methods
2665  * should be used instead of the older getId()/setId()/etc. methods</strong>
2666  * unless the old behavior is somehow necessary.  Regardless of the Level and
2667  * Version of the SBML, these functions allow client applications to use more
2668  * generalized code in some situations (for instance, when manipulating
2669  * objects that are all known to have identifiers).  If the object in
2670  * question does not posess an 'id' attribute according to the SBML
2671  * specification for the Level and Version in use, libSBML will not allow the
2672  * identifier to be set, nor will it read or write 'id' attributes for those
2673  * objects.
2674  <p>
2675  * <p>
2676  * @return integer value indicating success/failure of the
2677  * function.   The possible values
2678  * returned by this function are:
2679  * <ul>
2680  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2681  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2682  *
2683  * </ul> <p>
2684  * @see #getIdAttribute()
2685  * @see #setIdAttribute(String sid)
2686  * @see #isSetIdAttribute()
2687  * @see #unsetIdAttribute()
2688    */ public
unsetId()2689  int unsetId() {
2690     return libsbmlJNI.SBase_unsetId(swigCPtr, this);
2691   }
2692 
2693 
2694 /**
2695    * Unsets the value of the 'id' attribute of this SBML object.
2696    <p>
2697    * Most (but not all) objects in SBML include two common attributes: 'id'
2698    * and 'name'.  The identifier given by an object's 'id' attribute value
2699    * is used to identify the object within the SBML model definition.
2700    * Other objects can refer to the component using this identifier.
2701    <p>
2702    * <p>
2703  * @return integer value indicating success/failure of the
2704  * function.   The possible values
2705  * returned by this function are:
2706    * <ul>
2707    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2708    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2709    *
2710    * </ul> <p>
2711    * @see #getIdAttribute()
2712    * @see #setIdAttribute(String sid)
2713    * @see #isSetIdAttribute()
2714    */ public
unsetIdAttribute()2715  int unsetIdAttribute() {
2716     return libsbmlJNI.SBase_unsetIdAttribute(swigCPtr, this);
2717   }
2718 
2719 
2720 /**
2721    * Unsets the value of the 'name' attribute of this SBML object.
2722    <p>
2723    * <p>
2724  * <p>
2725  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
2726  * moved to {@link SBase} directly, instead of being defined individually for many
2727  * (but not all) objects.  LibSBML has for a long time provided functions
2728  * defined on {@link SBase} itself to get, set, and unset those attributes, which
2729  * would fail or otherwise return empty strings if executed on any object
2730  * for which those attributes were not defined.  Now that all {@link SBase} objects
2731  * define those attributes, those functions now succeed for any object with
2732  * the appropriate level and version.
2733  <p>
2734  * The 'name' attribute is
2735  * optional and is not intended to be used for cross-referencing purposes
2736  * within a model.  Its purpose instead is to provide a human-readable
2737  * label for the component.  The data type of 'name' is the type
2738  * <code>string</code> defined in XML Schema.  SBML imposes no
2739  * restrictions as to the content of 'name' attributes beyond those
2740  * restrictions defined by the <code>string</code> type in XML Schema.
2741  <p>
2742  * The recommended practice for handling 'name' is as follows.  If a
2743  * software tool has the capability for displaying the content of 'name'
2744  * attributes, it should display this content to the user as a
2745  * component's label instead of the component's 'id'.  If the user
2746  * interface does not have this capability (e.g., because it cannot
2747  * display or use special characters in symbol names), or if the 'name'
2748  * attribute is missing on a given component, then the user interface
2749  * should display the value of the 'id' attribute instead.  (Script
2750  * language interpreters are especially likely to display 'id' instead of
2751  * 'name'.)
2752  <p>
2753  * As a consequence of the above, authors of systems that automatically
2754  * generate the values of 'id' attributes should be aware some systems
2755  * may display the 'id''s to the user.  Authors therefore may wish to
2756  * take some care to have their software create 'id' values that are: (a)
2757  * reasonably easy for humans to type and read; and (b) likely to be
2758  * meaningful, for example by making the 'id' attribute be an abbreviated
2759  * form of the name attribute value.
2760  <p>
2761  * An additional point worth mentioning is although there are
2762  * restrictions on the uniqueness of 'id' values, there are no
2763  * restrictions on the uniqueness of 'name' values in a model.  This
2764  * allows software applications leeway in assigning component identifiers.
2765  <p>
2766  * Regardless of the level and version of the SBML, these functions allow
2767  * client applications to use more generalized code in some situations
2768  * (for instance, when manipulating objects that are all known to have
2769  * names).  If the object in question does not posess a 'name' attribute
2770  * according to the SBML specification for the Level and Version in use,
2771  * libSBML will not allow the name to be set, nor will it read or
2772  * write 'name' attributes for those objects.
2773  <p>
2774  * <p>
2775  * @return integer value indicating success/failure of the
2776  * function.   The possible values
2777  * returned by this function are:
2778  * <ul>
2779  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2780  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2781  *
2782  * </ul> <p>
2783  * @see #getName()
2784  * @see #setName(String sid)
2785  * @see #isSetName()
2786    */ public
unsetName()2787  int unsetName() {
2788     return libsbmlJNI.SBase_unsetName(swigCPtr, this);
2789   }
2790 
2791 
2792 /**
2793    * Unsets the value of the 'notes' subelement of this SBML object.
2794    <p>
2795    * The optional SBML element named 'notes', present on every major SBML
2796    * component type, is intended as a place for storing optional
2797    * information intended to be seen by humans.  An example use of the
2798    * 'notes' element would be to contain formatted user comments about the
2799    * model element in which the 'notes' element is enclosed.  Every object
2800    * derived directly or indirectly from type {@link SBase} can have a separate
2801    * value for 'notes', allowing users considerable freedom when adding
2802    * comments to their models.
2803    <p>
2804    * The format of 'notes' elements must be <a target='_blank'
2805    * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
2806    * verify the formatting of 'notes' content, libSBML provides the static
2807    * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
2808    * readers are urged to consult the appropriate <a target='_blank'
2809    * href='http://sbml.org/Documents/Specifications'>SBML specification
2810    * document</a> for the Level and Version of their model for more
2811    * in-depth explanations.  The SBML Level&nbsp;2 and&nbsp;3
2812    * specifications have considerable detail about how 'notes' element
2813    * content must be structured.
2814    <p>
2815    * <p>
2816  * @return integer value indicating success/failure of the
2817  * function.   This particular
2818  * function only does one thing irrespective of user input or
2819  * object state, and thus will only return a single value:
2820    * <ul>
2821    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2822    *
2823    * </ul> <p>
2824    * @see #getNotesString()
2825    * @see #isSetNotes()
2826    * @see #setNotes(XMLNode notes)
2827    * @see #setNotes(String notes, boolean addXHTMLMarkup)
2828    * @see #appendNotes(XMLNode notes)
2829    * @see #appendNotes(String notes)
2830    * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
2831    */ public
unsetNotes()2832  int unsetNotes() {
2833     return libsbmlJNI.SBase_unsetNotes(swigCPtr, this);
2834   }
2835 
2836 
2837 /**
2838    * Unsets the value of the 'annotation' subelement of this SBML object.
2839    <p>
2840    * Whereas the {@link SBase} 'notes' subelement is a container for content to be
2841    * shown directly to humans, the 'annotation' element is a container for
2842    * optional software-generated content <em>not</em> meant to be shown to
2843    * humans.  Every object derived from {@link SBase} can have its own value for
2844    * 'annotation'.  The element's content type is <a target='_blank'
2845    * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
2846    * 'any'</a>, allowing essentially arbitrary well-formed XML data
2847    * content.
2848    <p>
2849    * SBML places a few restrictions on the organization of the content of
2850    * annotations; these are intended to help software tools read and write
2851    * the data as well as help reduce conflicts between annotations added by
2852    * different tools.  Please see the SBML specifications for more details.
2853    <p>
2854    * <p>
2855  * @return integer value indicating success/failure of the
2856  * function.   This particular
2857  * function only does one thing irrespective of user input or
2858  * object state, and thus will only return a single value:
2859    * <ul>
2860    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2861    *
2862    * </ul> <p>
2863    * @see #getAnnotation()
2864    * @see #getAnnotationString()
2865    * @see #isSetAnnotation()
2866    * @see #setAnnotation(XMLNode annotation)
2867    * @see #setAnnotation(String annotation)
2868    * @see #appendAnnotation(XMLNode annotation)
2869    * @see #appendAnnotation(String annotation)
2870    */ public
unsetAnnotation()2871  int unsetAnnotation() {
2872     return libsbmlJNI.SBase_unsetAnnotation(swigCPtr, this);
2873   }
2874 
2875 
2876 /**
2877    * Unsets the value of the 'sboTerm' attribute of this SBML object.
2878    <p>
2879    * <p>
2880  * @return integer value indicating success/failure of the
2881  * function.   The possible values
2882  * returned by this function are:
2883    * <ul>
2884    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2885    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2886    * </ul>
2887    */ public
unsetSBOTerm()2888  int unsetSBOTerm() {
2889     return libsbmlJNI.SBase_unsetSBOTerm(swigCPtr, this);
2890   }
2891 
2892 
2893 /**
2894    * Adds a copy of the given {@link CVTerm} object to this SBML object.
2895    <p>
2896    * @param term the {@link CVTerm} to assign.
2897    <p>
2898    * @param newBag if <code>true</code>, creates a new RDF bag with the same identifier
2899    * as a previous bag, and if <code>false</code>, adds the term to an existing
2900    * RDF bag with the same type of qualifier as the term being added.
2901    <p>
2902    * <p>
2903  * @return integer value indicating success/failure of the
2904  * function.   The possible values
2905  * returned by this function are:
2906    * <ul>
2907    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2908    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2909    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}, if
2910    * this object lacks a 'metaid' attribute
2911    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2912    *
2913    * </ul> <p>
2914    * @note Since the CV Term uses the 'metaid' attribute of the object as a
2915    * reference, if the object has no 'metaid' attribute value set, then the
2916    * {@link CVTerm} will not be added.
2917    <p>
2918    * <p>
2919  * @note This method should be used with some caution.  The fact that this
2920  * method <em>copies</em> the object passed to it means that the caller will be
2921  * left holding a physically different object instance than the one contained
2922  * inside this object.  Changes made to the original object instance (such as
2923  * resetting attribute values) will <em>not affect the instance in this
2924  * object</em>.  In addition, the caller should make sure to free the
2925  * original object if it is no longer being used, or else a memory leak will
2926  * result.  Please see other methods on this class (particularly a
2927  * corresponding method whose name begins with the word <code>create</code>)
2928  * for alternatives that do not lead to these issues.
2929    <p>
2930    *
2931 </dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
2932 The native C++ implementation of this method defines a default argument
2933 value. In the documentation generated for different libSBML language
2934 bindings, you may or may not see corresponding arguments in the method
2935 declarations. For example, in Java and C#, a default argument is handled by
2936 declaring two separate methods, with one of them having the argument and
2937 the other one lacking the argument. However, the libSBML documentation will
2938 be <em>identical</em> for both methods. Consequently, if you are reading
2939 this and do not see an argument even though one is described, please look
2940 for descriptions of other variants of this method near where this one
2941 appears in the documentation.
2942 </dd></dl>
2943 
2944    */ public
addCVTerm(CVTerm term, boolean newBag)2945  int addCVTerm(CVTerm term, boolean newBag) {
2946     return libsbmlJNI.SBase_addCVTerm__SWIG_0(swigCPtr, this, CVTerm.getCPtr(term), term, newBag);
2947   }
2948 
2949 
2950 /**
2951    * Adds a copy of the given {@link CVTerm} object to this SBML object.
2952    <p>
2953    * @param term the {@link CVTerm} to assign.
2954    <p>
2955    * @param newBag if <code>true</code>, creates a new RDF bag with the same identifier
2956    * as a previous bag, and if <code>false</code>, adds the term to an existing
2957    * RDF bag with the same type of qualifier as the term being added.
2958    <p>
2959    * <p>
2960  * @return integer value indicating success/failure of the
2961  * function.   The possible values
2962  * returned by this function are:
2963    * <ul>
2964    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2965    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2966    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}, if
2967    * this object lacks a 'metaid' attribute
2968    * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2969    *
2970    * </ul> <p>
2971    * @note Since the CV Term uses the 'metaid' attribute of the object as a
2972    * reference, if the object has no 'metaid' attribute value set, then the
2973    * {@link CVTerm} will not be added.
2974    <p>
2975    * <p>
2976  * @note This method should be used with some caution.  The fact that this
2977  * method <em>copies</em> the object passed to it means that the caller will be
2978  * left holding a physically different object instance than the one contained
2979  * inside this object.  Changes made to the original object instance (such as
2980  * resetting attribute values) will <em>not affect the instance in this
2981  * object</em>.  In addition, the caller should make sure to free the
2982  * original object if it is no longer being used, or else a memory leak will
2983  * result.  Please see other methods on this class (particularly a
2984  * corresponding method whose name begins with the word <code>create</code>)
2985  * for alternatives that do not lead to these issues.
2986    <p>
2987    *
2988 </dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
2989 The native C++ implementation of this method defines a default argument
2990 value. In the documentation generated for different libSBML language
2991 bindings, you may or may not see corresponding arguments in the method
2992 declarations. For example, in Java and C#, a default argument is handled by
2993 declaring two separate methods, with one of them having the argument and
2994 the other one lacking the argument. However, the libSBML documentation will
2995 be <em>identical</em> for both methods. Consequently, if you are reading
2996 this and do not see an argument even though one is described, please look
2997 for descriptions of other variants of this method near where this one
2998 appears in the documentation.
2999 </dd></dl>
3000 
3001    */ public
addCVTerm(CVTerm term)3002  int addCVTerm(CVTerm term) {
3003     return libsbmlJNI.SBase_addCVTerm__SWIG_1(swigCPtr, this, CVTerm.getCPtr(term), term);
3004   }
3005 
3006 
3007 /**
3008    * Returns a list of {@link CVTerm} objects in the annotations of this SBML
3009    * object.
3010    <p>
3011    * @return the list of CVTerms for this SBML object.
3012    */ public
getCVTerms()3013   CVTermList  getCVTerms() {
3014   long cPtr = libsbmlJNI.SBase_getCVTerms__SWIG_0(swigCPtr, this);
3015   return (cPtr == 0) ? null : new  CVTermList(cPtr, true);
3016 }
3017 
3018 
3019 /**
3020    * Returns the number of {@link CVTerm} objects in the annotations of this SBML
3021    * object.
3022    <p>
3023    * @return the number of CVTerms for this SBML object.
3024    */ public
getNumCVTerms()3025  long getNumCVTerms() {
3026     return libsbmlJNI.SBase_getNumCVTerms(swigCPtr, this);
3027   }
3028 
3029 
3030 /**
3031    * Returns the nth {@link CVTerm} in the list of CVTerms of this SBML
3032    * object.
3033    <p>
3034    * @param n long the index of the {@link CVTerm} to retrieve.
3035    <p>
3036    * @return the nth {@link CVTerm} in the list of CVTerms for this SBML object.
3037    * If the index <code>n</code> is invalid, <code>null</code> is returned.
3038    */ public
getCVTerm(long n)3039  CVTerm getCVTerm(long n) {
3040     long cPtr = libsbmlJNI.SBase_getCVTerm(swigCPtr, this, n);
3041     return (cPtr == 0) ? null : new CVTerm(cPtr, false);
3042   }
3043 
3044 
3045 /**
3046    * Clears the list of {@link CVTerm} objects attached to this SBML object.
3047    <p>
3048    * <p>
3049  * @return integer value indicating success/failure of the
3050  * function.   The possible values
3051  * returned by this function are:
3052    * <ul>
3053    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
3054    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
3055    * </ul>
3056    */ public
unsetCVTerms()3057  int unsetCVTerms() {
3058     return libsbmlJNI.SBase_unsetCVTerms(swigCPtr, this);
3059   }
3060 
3061 
3062 /**
3063    * Unsets the {@link ModelHistory} object attached to this object.
3064    <p>
3065    * <p>
3066  * @return integer value indicating success/failure of the
3067  * function.   The possible values
3068  * returned by this function are:
3069    * <ul>
3070    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
3071    * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
3072    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
3073    *
3074    * </ul> <p>
3075    * @note In SBML Level&nbsp;2, model history annotations were only
3076    * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
3077    * permitted on all SBML components derived from {@link SBase}.
3078    */ public
unsetModelHistory()3079  int unsetModelHistory() {
3080     return libsbmlJNI.SBase_unsetModelHistory(swigCPtr, this);
3081   }
3082 
3083 
3084 /**
3085    * Returns the MIRIAM <em>biological qualifier</em> associated with the
3086    * given resource.
3087    <p>
3088    * In <a target='_blank' href='http://biomodels.net/miriam'>MIRIAM</a>,
3089    * qualifiers are an optional means of indicating the relationship
3090    * between a model component and its annotations.  There are two broad
3091    * kinds of annotations: <em>model</em> and <em>biological</em>.  The
3092    * latter kind is used to qualify the relationship between a model
3093    * component and a biological entity which it represents.  Examples of
3094    * relationships include 'is' and 'has part', but many others are
3095    * possible.  MIRIAM defines <a target='_blank'
3096    * href='http://www.ebi.ac.uk/miriam/main/qualifiers/'>numerous
3097    * relationship qualifiers</a> to enable different software tools to
3098    * qualify biological annotations in the same standardized way.  In
3099    * libSBML, the MIRIAM controlled-vocabulary annotations on an SBML model
3100    * element are represented using lists of {@link CVTerm} objects, and the
3101    * the MIRIAM biological qualifiers are represented using
3102    * values whose
3103    * names begin with <code>BQB_</code> in the interface class
3104    * {@link libsbmlConstants}.
3105    <p>
3106    * This method searches the controlled-vocabulary annotations
3107    * (i.e., the list of {@link CVTerm} objects) on the present object, then out of
3108    * those that have biological qualifiers, looks for an annotation to the
3109    * given <code>resource</code>.  If such an annotation is found, it returns the
3110    * type of biological qualifier associated with that resource as a
3111    * value whose name
3112    * begins with <code>BQB_</code> from the interface
3113    * class {@link libsbmlConstants}.
3114    <p>
3115    * @param resource string representing the resource; e.g.,
3116    * <code>'http://www.geneontology.org/#GO:0005892'</code>.
3117    <p>
3118    * @return the qualifier associated with the resource,
3119    * or {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN} if the
3120    * resource does not exist.
3121    <p>
3122    * @note The set of MIRIAM biological qualifiers grows over
3123    * time, although relatively slowly.  The values are up to date with
3124    * MIRIAM at the time of a given libSBML release.  The set of values in
3125    * list of <code>BQB_</code> constants defined in {@link libsbmlConstants}
3126    * may be expanded in later libSBML releases, to match
3127    * the values defined by MIRIAM at that later time.
3128    */ public
getResourceBiologicalQualifier(String resource)3129  int getResourceBiologicalQualifier(String resource) {
3130     return libsbmlJNI.SBase_getResourceBiologicalQualifier(swigCPtr, this, resource);
3131   }
3132 
3133 
3134 /**
3135    * Returns the MIRIAM <em>model qualifier</em> associated with the
3136    * given resource.
3137    <p>
3138    * In <a target='_blank' href='http://biomodels.net/miriam'>MIRIAM</a>,
3139    * qualifiers are an optional means of indicating the relationship
3140    * between a model component and its annotations.  There are two broad
3141    * kinds of annotations: <em>model</em> and <em>biological</em>.  The
3142    * former kind is used to qualify the relationship between a model
3143    * component and another modeling object.  An example qualifier is
3144    * 'isDerivedFrom', to indicate that a given component of the model is
3145    * derived from the modeling object represented by the referenced
3146    * resource.  MIRIAM defines <a target='_blank'
3147    * href='http://www.ebi.ac.uk/miriam/main/qualifiers/'>numerous
3148    * relationship qualifiers</a> to enable different software tools to
3149    * qualify model annotations in the same standardized way.  In libSBML,
3150    * the MIRIAM controlled-vocabulary annotations on an SBML model element
3151    * are represented using lists of {@link CVTerm} objects, and the
3152    * the MIRIAM model qualifiers are represented using
3153    * values whose
3154    * names begin with <code>BQM_</code> in the interface class
3155    * {@link libsbmlConstants}.
3156    <p>
3157    * This method method searches the controlled-vocabulary annotations
3158    * (i.e., the list of {@link CVTerm} objects) on the present object, then out of
3159    * those that have model qualifiers, looks for an annotation to the given
3160    * <code>resource</code>.  If such an annotation is found, it returns the type of
3161    * type of model qualifier associated with that resource as a
3162    * value whose name
3163    * begins with <code>BQM_</code> from the interface
3164    * class {@link libsbmlConstants}.
3165    <p>
3166    * @param resource string representing the resource; e.g.,
3167    * <code>'http://www.geneontology.org/#GO:0005892'</code>.
3168    <p>
3169    * @return the model qualifier
3170    * type associated with the resource, or {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN} if the resource does not exist.
3171    <p>
3172    * @note The set of MIRIAM model qualifiers grows over
3173    * time, although relatively slowly.  The values are up to date with
3174    * MIRIAM at the time of a given libSBML release.  The set of values in
3175    * list of <code>BQM_</code> constants defined in {@link libsbmlConstants}
3176    * may be expanded in later libSBML releases, to match
3177    * the values defined by MIRIAM at that later time.
3178    */ public
getResourceModelQualifier(String resource)3179  int getResourceModelQualifier(String resource) {
3180     return libsbmlJNI.SBase_getResourceModelQualifier(swigCPtr, this, resource);
3181   }
3182 
3183 
3184 /**
3185    * Returns the {@link Model} object for the SBML Document in which the current object is located.
3186    <p>
3187    * @return the {@link Model} object for the SBML Document of this SBML object.
3188    <p>
3189    * @see #getParentSBMLObject()
3190    * @see #getSBMLDocument()
3191    */ public
getModel()3192  Model getModel() {
3193     long cPtr = libsbmlJNI.SBase_getModel(swigCPtr, this);
3194     return (cPtr == 0) ? null : new Model(cPtr, false);
3195   }
3196 
3197 
3198 /**
3199    * Returns the SBML Level of the {@link SBMLDocument} object containing <em>this</em>
3200    * object.
3201    <p>
3202    * <p>
3203  * LibSBML uses the class {@link SBMLDocument} as a top-level container for
3204  * storing SBML content and data associated with it (such as warnings and
3205  * error messages).  An SBML model in libSBML is contained inside an
3206  * {@link SBMLDocument} object.  {@link SBMLDocument} corresponds roughly to the class
3207  * <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
3208  * specifications, but it does not have a direct correspondence in SBML
3209  * Level&nbsp;1.  (But, it is created by libSBML no matter whether the
3210  * model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
3211    <p>
3212    * @return the SBML level of this SBML object.
3213    <p>
3214    * @see #getVersion()
3215    * @see #getNamespaces()
3216    * @see #getPackageVersion()
3217    */ public
getLevel()3218  long getLevel() {
3219     return libsbmlJNI.SBase_getLevel(swigCPtr, this);
3220   }
3221 
3222 
3223 /**
3224    * Returns the Version within the SBML Level of the {@link SBMLDocument} object
3225    * containing <em>this</em> object.
3226    <p>
3227    * <p>
3228  * LibSBML uses the class {@link SBMLDocument} as a top-level container for
3229  * storing SBML content and data associated with it (such as warnings and
3230  * error messages).  An SBML model in libSBML is contained inside an
3231  * {@link SBMLDocument} object.  {@link SBMLDocument} corresponds roughly to the class
3232  * <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
3233  * specifications, but it does not have a direct correspondence in SBML
3234  * Level&nbsp;1.  (But, it is created by libSBML no matter whether the
3235  * model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
3236    <p>
3237    * @return the SBML version of this SBML object.
3238    <p>
3239    * @see #getLevel()
3240    * @see #getNamespaces()
3241    */ public
getVersion()3242  long getVersion() {
3243     return libsbmlJNI.SBase_getVersion(swigCPtr, this);
3244   }
3245 
3246 
3247 /**
3248   * Returns the SBML Core Version within the SBML Level of the actual object.
3249   <p>
3250   * <p>
3251  * LibSBML uses the class {@link SBMLDocument} as a top-level container for
3252  * storing SBML content and data associated with it (such as warnings and
3253  * error messages).  An SBML model in libSBML is contained inside an
3254  * {@link SBMLDocument} object.  {@link SBMLDocument} corresponds roughly to the class
3255  * <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
3256  * specifications, but it does not have a direct correspondence in SBML
3257  * Level&nbsp;1.  (But, it is created by libSBML no matter whether the
3258  * model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
3259   <p>
3260   * @return the SBML core version of this SBML object.
3261   */ public
getPackageCoreVersion()3262  long getPackageCoreVersion() {
3263     return libsbmlJNI.SBase_getPackageCoreVersion(swigCPtr, this);
3264   }
3265 
3266 
3267 /**
3268    * Returns the Version of the SBML Level&nbsp;3 package to which this
3269    * element belongs to.
3270    <p>
3271    * @return the version of the SBML Level&nbsp;3 package to which this
3272    * element belongs. The value <code>0</code> will be returned if this element
3273    * belongs to the SBML Level&nbsp;3 Core package.
3274    <p>
3275    * @see #getLevel()
3276    * @see #getVersion()
3277    */ public
getPackageVersion()3278  long getPackageVersion() {
3279     return libsbmlJNI.SBase_getPackageVersion(swigCPtr, this);
3280   }
3281 
3282 
3283 /**
3284    * Returns the name of the SBML Level&nbsp;3 package in which this element
3285    * is defined.
3286    <p>
3287    * @return the name of the SBML package in which this element is defined.
3288    * The string <code>&quot;core&quot;</code> will be returned if this
3289    * element is defined in SBML Level&nbsp;3 Core. The string
3290    * <code>&quot;unknown&quot;</code> will be returned if this element is
3291    * not defined in any SBML package.
3292    */ public
getPackageName()3293  String getPackageName() {
3294     return libsbmlJNI.SBase_getPackageName(swigCPtr, this);
3295   }
3296 
3297 
3298 /**
3299    * Returns the libSBML type code for this object.
3300    <p>
3301    * <p>
3302  * LibSBML attaches an identifying code to every kind of SBML object.  These
3303  * are integer constants known as <em>SBML type codes</em>.  The names of all
3304  * the codes begin with the characters <code>SBML_</code>.
3305  * In the Java language interface for libSBML, the
3306  * type codes are defined as static integer constants in the interface class
3307  * {@link libsbmlConstants}.    Note that different Level&nbsp;3
3308  * package plug-ins may use overlapping type codes; to identify the package
3309  * to which a given object belongs, call the
3310  * <code>{@link SBase#getPackageName()}
3311  * </code>
3312  * method on the object.
3313  <p>
3314  * The exception to this is lists:  all SBML-style list elements have the type
3315  * {@link libsbmlConstants#SBML_LIST_OF SBML_LIST_OF}, regardless of what package they
3316  * are from.
3317    <p>
3318    * <p>
3319  * Here follow some additional general information about libSBML type codes:
3320  <p>
3321  * <ul>
3322  * <li> The codes are the possible return values (integers) for the following
3323  * functions:
3324  * <ul>
3325  *     <li> {@link SBase#getTypeCode()}
3326  *     <li> {@link ListOf#getItemTypeCode()}
3327  * </ul>
3328  * (Compatibility note: in libSBML 5, the type of return values of these
3329  * functions changed from an enumeration to an integer for extensibility
3330  * in the face of different programming languages.)
3331  <p>
3332  * <li> Each package extension must define similar sets of values for each
3333  * {@link SBase} subclass (e.g. <code>SBMLLayoutTypeCode_t</code> for the SBML Level&nbsp;3
3334  * Layout extension, <code>SBMLFbcTypeCode_t</code> for the SBML Level&nbsp;3 Flux
3335  * Balance Constraints extension, etc.).
3336  <p>
3337  * <li> The value of each package-specific type code can be duplicated between
3338  * those of different packages.  (This is necessary because the development
3339  * of libSBML extensions for different SBML packages may be undertaken by
3340  * different developers at different times; requiring the developers to
3341  * coordinate their use of type codes would be nettlesome and probably
3342  * doomed to failure.)
3343  <p>
3344  * <li> To distinguish between the type codes of different packages, both the
3345  * return value of {@link SBase#getTypeCode()} and {@link SBase#getPackageName()} must be
3346  * checked.  This is particularly important for functions that take an SBML
3347  * type code as an argument, such as
3348  * {@link SBase#getAncestorOfType(int, String)}, which by
3349  * default assumes you are handing it a core type, and will return <code>null</code> if
3350  * the value you give it is actually from a package.
3351  *
3352  * </ul> <p>
3353  * The following example code illustrates the combined use of
3354  * {@link SBase#getPackageName()} and {@link SBase#getTypeCode()}:
3355  <p>
3356 <pre class='fragment'>
3357 void example (SBase sb)
3358 {
3359   String pkgName = sb.getPackageName();
3360   if (pkgName.equals('core'))
3361   {
3362     switch (sb.getTypeCode())
3363     {
3364       case libsbml.SBML_MODEL:
3365          ....
3366          break;
3367       case libsbml.SBML_REACTION:
3368          ....
3369     }
3370   }
3371   else if (pkgName.equals('layout'))
3372   {
3373     switch (sb.getTypeCode())
3374     {
3375       case libsbml.SBML_LAYOUT_LAYOUT:
3376          ....
3377          break;
3378       case libsbml.SBML_LAYOUT_REACTIONGLYPH:
3379          ....
3380     }
3381   }
3382   ...
3383 }
3384 </pre>
3385    <p>
3386    * @return the SBML object type
3387    * code of this SBML object, or {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).  The latter is possible because
3388    * subclasses of {@link SBase} are not required to implement this method to return
3389    * a type code.
3390    <p>
3391    * <p>
3392  * @warning <span class='warning'>The specific integer values of the possible
3393  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
3394  * packages,  To fully identify the correct code, <strong>it is necessary to
3395  * invoke both getPackageName() and getTypeCode()</strong> (or
3396  * {@link ListOf#getItemTypeCode()}).</span>
3397    <p>
3398    * @see #getPackageName()
3399    * @see #getElementName()
3400    */ public
getTypeCode()3401  int getTypeCode() {
3402     return libsbmlJNI.SBase_getTypeCode(swigCPtr, this);
3403   }
3404 
3405 
3406 /**
3407    * Predicate returning <code>true</code> if this object's level/version and namespace
3408    * values correspond to a valid SBML specification.
3409    <p>
3410    * The valid combinations of SBML Level, Version and Namespace as of this
3411    * release of libSBML are the following:
3412    * <ul>
3413    * <li> Level&nbsp;1 Version&nbsp;2: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level1</code>&quot;
3414    * <li> Level&nbsp;2 Version&nbsp;1: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2</code>&quot;
3415    * <li> Level&nbsp;2 Version&nbsp;2: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2/version2</code>&quot;
3416    * <li> Level&nbsp;2 Version&nbsp;3: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2/version3</code>&quot;
3417    * <li> Level&nbsp;2 Version&nbsp;4: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2/version4</code>&quot;
3418    * <li> Level&nbsp;2 Version&nbsp;5: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level2/version5</code>&quot;
3419    * <li> Level&nbsp;3 Version&nbsp;1 Core: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level3/version1/core</code>&quot;
3420    * <li> Level&nbsp;3 Version&nbsp;2 Core: &quot;<code style='margin-right:0; padding-right:0'>http</code><code style='margin-left:0; padding-left:0'>://www.sbml.org/sbml/level3/version2/core</code>&quot;
3421    * </ul>
3422    <p>
3423    * @return <code>true</code> if the level, version and namespace values of this
3424    * SBML object correspond to a valid set of values, <code>false</code> otherwise.
3425    */ public
hasValidLevelVersionNamespaceCombination()3426  boolean hasValidLevelVersionNamespaceCombination() {
3427     return libsbmlJNI.SBase_hasValidLevelVersionNamespaceCombination(swigCPtr, this);
3428   }
3429 
3430 
3431 /**
3432    * Returns the XML element name of this object.
3433    <p>
3434    * This is overridden by subclasses to return a string appropriate to the
3435    * SBML component.  For example, {@link Model} defines it as returning
3436    * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
3437    * and so on.
3438    */ public
getElementName()3439  String getElementName() {
3440     return libsbmlJNI.SBase_getElementName(swigCPtr, this);
3441   }
3442 
3443 
3444 /**
3445    * Returns a string consisting of a partial SBML corresponding to just
3446    * this object.
3447    <p>
3448    * @return the partial SBML that describes this SBML object.
3449    <p>
3450    * @warning <span class='warning'>This is primarily provided for testing
3451    * and debugging purposes.  It may be removed in a future version of
3452    * libSBML.</span>
3453    */ public
toSBML()3454  String toSBML() {
3455     return libsbmlJNI.SBase_toSBML(swigCPtr, this);
3456   }
3457 
3458 
3459 /**
3460    * Returns this element as an {@link XMLNode}.
3461    <p>
3462    * @return this element as an {@link XMLNode}.
3463    <p>
3464    * @warning <span class='warning'>This operation is computationally
3465    * expensive, because the element has to be fully serialized to a string
3466    * and then parsed into the {@link XMLNode} structure.  Attempting to convert a
3467    * large tree structure (e.g., a large {@link Model}) may consume significant
3468    * computer memory and time.</span>
3469    */ public
toXMLNode()3470  XMLNode toXMLNode() {
3471     long cPtr = libsbmlJNI.SBase_toXMLNode(swigCPtr, this);
3472     return (cPtr == 0) ? null : new XMLNode(cPtr, false);
3473   }
3474 
3475 
3476 /**
3477    * Reads (initializes) this SBML object by reading from the given {@link XMLNode}.
3478    <p>
3479    * @param node the {@link XMLNode} to read from.
3480    <p>
3481    * @param flag an optional flag that determines how how errors are logged
3482    * during the reading process.
3483    <p>
3484    * @warning <span class='warning'>This method is computationally expensive,
3485    * because the given node has to be serialized to a string first.
3486    * Attempting to serialize a large tree structure (e.g., a large {@link Model}) may
3487    * consume significant computer memory and time.</span>
3488    */ public
read(XMLNode node, int flag)3489  void read(XMLNode node, int flag) {
3490     libsbmlJNI.SBase_read__SWIG_0(swigCPtr, this, XMLNode.getCPtr(node), node, flag);
3491   }
3492 
3493 
3494 /**
3495    * Reads (initializes) this SBML object by reading from the given {@link XMLNode}.
3496    <p>
3497    * @param node the {@link XMLNode} to read from.
3498    <p>
3499    * @param flag an optional flag that determines how how errors are logged
3500    * during the reading process.
3501    <p>
3502    * @warning <span class='warning'>This method is computationally expensive,
3503    * because the given node has to be serialized to a string first.
3504    * Attempting to serialize a large tree structure (e.g., a large {@link Model}) may
3505    * consume significant computer memory and time.</span>
3506    */ public
read(XMLNode node)3507  void read(XMLNode node) {
3508     libsbmlJNI.SBase_read__SWIG_1(swigCPtr, this, XMLNode.getCPtr(node), node);
3509   }
3510 
3511 
3512 /**
3513    * Returns a plug-in object (extension interface) for an SBML Level&nbsp;3
3514    * package extension with the given package name or URI.
3515    * The returned plug-in will be the appropriate type of plugin requested:
3516    * calling {@link Model#getPlugin('fbc')} will return an FbcModelPlugin; calling
3517    * {@link Parameter#getPlugin('comp')} will return CompSBasePlugin, etc.
3518    <p>
3519    * If no such plugin exists, null is returned.
3520    <p>
3521    * <p>
3522  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
3523  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
3524  * that it uses one or more SBML packages, and likewise, a software tool may be
3525  * able to support one or more packages.  LibSBML does not come preconfigured
3526  * with all possible packages included and enabled, in part because not all
3527  * package specifications have been finalized.  To support the ability for
3528  * software systems to enable support for the Level&nbsp;3 packages they choose,
3529  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
3530  * package is implemented in a separate code plug-in that can be enabled by the
3531  * application to support working with that SBML package.  A given SBML model
3532  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
3533  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
3534  * packages.
3535    <p>
3536    * @param package the name or URI of the package.
3537    <p>
3538    * @return the plug-in object (the libSBML extension interface) of
3539    * a package extension with the given package name or URI.
3540    <p>
3541    * @see #getPlugin(long n)
3542    */ public
getPlugin(String _package)3543  SBasePlugin getPlugin(String _package) {
3544 	return libsbml.DowncastSBasePlugin(libsbmlJNI.SBase_getPlugin__SWIG_0(swigCPtr, this, _package), false);
3545 }
3546 
3547 
3548 /**
3549    * Returns the nth plug-in object (extension interface) for an SBML Level&nbsp;3
3550    * package extension.
3551    * The returned plug-in will be the appropriate type of plugin requested:
3552    * calling {@link Model#getPlugin('fbc')} will return an FbcModelPlugin; calling
3553    * {@link Parameter#getPlugin('comp')} will return CompSBasePlugin, etc.
3554    <p>
3555    * If no such plugin exists, null is returned.
3556    <p>
3557    * <p>
3558  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
3559  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
3560  * that it uses one or more SBML packages, and likewise, a software tool may be
3561  * able to support one or more packages.  LibSBML does not come preconfigured
3562  * with all possible packages included and enabled, in part because not all
3563  * package specifications have been finalized.  To support the ability for
3564  * software systems to enable support for the Level&nbsp;3 packages they choose,
3565  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
3566  * package is implemented in a separate code plug-in that can be enabled by the
3567  * application to support working with that SBML package.  A given SBML model
3568  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
3569  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
3570  * packages.
3571    <p>
3572    * @param n the index of the plug-in to return.
3573    <p>
3574    * @return the nth plug-in object (the libSBML extension interface) of a
3575    * package extension.
3576    * If the index <code>n</code> is invalid, <code>null</code> is returned.
3577    <p>
3578    * @see #getNumPlugins()
3579    * @see #getPlugin(String package)
3580    */ public
getPlugin(long n)3581  SBasePlugin getPlugin(long n) {
3582 	return libsbml.DowncastSBasePlugin(libsbmlJNI.SBase_getPlugin__SWIG_2(swigCPtr, this, n), false);
3583 }
3584 
3585 
3586 /**
3587    * Returns the nth disabled plug-in object (extension interface) for an SBML Level&nbsp;3
3588    * package extension.  If no such plugin exists, null is returned.
3589    <p>
3590    * <p>
3591  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
3592  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
3593  * that it uses one or more SBML packages, and likewise, a software tool may be
3594  * able to support one or more packages.  LibSBML does not come preconfigured
3595  * with all possible packages included and enabled, in part because not all
3596  * package specifications have been finalized.  To support the ability for
3597  * software systems to enable support for the Level&nbsp;3 packages they choose,
3598  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
3599  * package is implemented in a separate code plug-in that can be enabled by the
3600  * application to support working with that SBML package.  A given SBML model
3601  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
3602  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
3603  * packages.
3604    <p>
3605    * <p>
3606  * If a plugin is <em>disabled</em>, the package information it contains is
3607  * no longer considered to be part of the SBML document for the purposes of
3608  * searching the document or writing out the document.  However, the information
3609  * is still retained, so if the plugin is enabled again, the same information
3610  * will once again be available, and will be written out to the final model.
3611    <p>
3612    * @param n the index of the disabled plug-in to return.
3613    <p>
3614    * @return the nth disabled plug-in object (the libSBML extension interface) of a
3615    * package extension.
3616    * If the index <code>n</code> is invalid, <code>null</code> is returned.
3617    <p>
3618    * @see #getNumDisabledPlugins()
3619    * @see #getPlugin(String package)
3620    */ public
getDisabledPlugin(long n)3621  SBasePlugin getDisabledPlugin(long n) {
3622 	return libsbml.DowncastSBasePlugin(libsbmlJNI.SBase_getDisabledPlugin__SWIG_0(swigCPtr, this, n), false);
3623 }
3624 
3625 
3626 /**
3627    * Returns the number of plug-in objects (extenstion interfaces) for SBML
3628    * Level&nbsp;3 package extensions known.
3629    <p>
3630    * <p>
3631  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
3632  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
3633  * that it uses one or more SBML packages, and likewise, a software tool may be
3634  * able to support one or more packages.  LibSBML does not come preconfigured
3635  * with all possible packages included and enabled, in part because not all
3636  * package specifications have been finalized.  To support the ability for
3637  * software systems to enable support for the Level&nbsp;3 packages they choose,
3638  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
3639  * package is implemented in a separate code plug-in that can be enabled by the
3640  * application to support working with that SBML package.  A given SBML model
3641  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
3642  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
3643  * packages.
3644    <p>
3645    * @return the number of plug-in objects (extension interfaces) of
3646    * package extensions known by this instance of libSBML.
3647    <p>
3648    * @see #getPlugin(long n)
3649    */ public
getNumPlugins()3650  long getNumPlugins() {
3651     return libsbmlJNI.SBase_getNumPlugins(swigCPtr, this);
3652   }
3653 
3654 
3655 /**
3656    * Returns the number of disabled plug-in objects (extension interfaces)
3657    * for SBML Level&nbsp;3 package extensions known.
3658    <p>
3659    * <p>
3660  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
3661  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
3662  * that it uses one or more SBML packages, and likewise, a software tool may be
3663  * able to support one or more packages.  LibSBML does not come preconfigured
3664  * with all possible packages included and enabled, in part because not all
3665  * package specifications have been finalized.  To support the ability for
3666  * software systems to enable support for the Level&nbsp;3 packages they choose,
3667  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
3668  * package is implemented in a separate code plug-in that can be enabled by the
3669  * application to support working with that SBML package.  A given SBML model
3670  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
3671  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
3672  * packages.
3673    <p>
3674    * <p>
3675  * If a plugin is <em>disabled</em>, the package information it contains is
3676  * no longer considered to be part of the SBML document for the purposes of
3677  * searching the document or writing out the document.  However, the information
3678  * is still retained, so if the plugin is enabled again, the same information
3679  * will once again be available, and will be written out to the final model.
3680    <p>
3681    * @return the number of disabled plug-in objects (extension interfaces)
3682    * of package extensions known by this instance of libSBML.
3683    */ public
getNumDisabledPlugins()3684  long getNumDisabledPlugins() {
3685     return libsbmlJNI.SBase_getNumDisabledPlugins(swigCPtr, this);
3686   }
3687 
3688 
3689 /**
3690    * Deletes all information stored in disabled plugins.  If the plugin is
3691    * re-enabled later, it will then not have any previously-stored information.
3692    <p>
3693    * <p>
3694  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
3695  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
3696  * that it uses one or more SBML packages, and likewise, a software tool may be
3697  * able to support one or more packages.  LibSBML does not come preconfigured
3698  * with all possible packages included and enabled, in part because not all
3699  * package specifications have been finalized.  To support the ability for
3700  * software systems to enable support for the Level&nbsp;3 packages they choose,
3701  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
3702  * package is implemented in a separate code plug-in that can be enabled by the
3703  * application to support working with that SBML package.  A given SBML model
3704  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
3705  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
3706  * packages.
3707    <p>
3708    * <p>
3709  * If a plugin is <em>disabled</em>, the package information it contains is
3710  * no longer considered to be part of the SBML document for the purposes of
3711  * searching the document or writing out the document.  However, the information
3712  * is still retained, so if the plugin is enabled again, the same information
3713  * will once again be available, and will be written out to the final model.
3714    <p>
3715    * @param recursive if <code>true</code>, the disabled information will be deleted
3716    * also from all child elements, otherwise only from this {@link SBase} element.
3717    <p>
3718    * @see #getNumDisabledPlugins()
3719    */ public
deleteDisabledPlugins(boolean recursive)3720  void deleteDisabledPlugins(boolean recursive) {
3721     libsbmlJNI.SBase_deleteDisabledPlugins__SWIG_0(swigCPtr, this, recursive);
3722   }
3723 
3724 
3725 /**
3726    * Deletes all information stored in disabled plugins.  If the plugin is
3727    * re-enabled later, it will then not have any previously-stored information.
3728    <p>
3729    * <p>
3730  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
3731  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
3732  * that it uses one or more SBML packages, and likewise, a software tool may be
3733  * able to support one or more packages.  LibSBML does not come preconfigured
3734  * with all possible packages included and enabled, in part because not all
3735  * package specifications have been finalized.  To support the ability for
3736  * software systems to enable support for the Level&nbsp;3 packages they choose,
3737  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
3738  * package is implemented in a separate code plug-in that can be enabled by the
3739  * application to support working with that SBML package.  A given SBML model
3740  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
3741  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
3742  * packages.
3743    <p>
3744    * <p>
3745  * If a plugin is <em>disabled</em>, the package information it contains is
3746  * no longer considered to be part of the SBML document for the purposes of
3747  * searching the document or writing out the document.  However, the information
3748  * is still retained, so if the plugin is enabled again, the same information
3749  * will once again be available, and will be written out to the final model.
3750    <p>
3751    * @param recursive if <code>true</code>, the disabled information will be deleted
3752    * also from all child elements, otherwise only from this {@link SBase} element.
3753    <p>
3754    * @see #getNumDisabledPlugins()
3755    */ public
deleteDisabledPlugins()3756  void deleteDisabledPlugins() {
3757     libsbmlJNI.SBase_deleteDisabledPlugins__SWIG_1(swigCPtr, this);
3758   }
3759 
3760 
3761 /**
3762    * Enables or disables the given SBML Level&nbsp;3 package on this object.
3763    <p>
3764    * This method enables the specified package on this object and other
3765    * objects connected by child-parent links in the same {@link SBMLDocument} object.
3766    * This method is the converse of
3767    * {@link SBase#disablePackage(String pkgURI, String pkgPrefix)}.
3768    <p>
3769    * @param pkgURI the URI of the package.
3770    <p>
3771    * @param pkgPrefix the XML prefix of the package.
3772    <p>
3773    * @param flag whether to enable (<code>true</code>) or disable (<code>false</code>) the package.
3774    <p>
3775    * <p>
3776  * @return integer value indicating success/failure of the
3777  * function.   The possible values
3778  * returned by this function are:
3779    * <ul>
3780    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
3781    * <li> {@link libsbmlConstants#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN}
3782    * <li> {@link libsbmlConstants#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH}
3783    * <li> {@link libsbmlConstants#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION}
3784    *
3785    * </ul> <p>
3786    * @see #disablePackage(String pkgURI, String pkgPrefix)
3787    */ public
enablePackage(String pkgURI, String pkgPrefix, boolean flag)3788  int enablePackage(String pkgURI, String pkgPrefix, boolean flag) {
3789     return libsbmlJNI.SBase_enablePackage(swigCPtr, this, pkgURI, pkgPrefix, flag);
3790   }
3791 
3792 
3793 /**
3794    * Disables the given SBML Level&nbsp;3 package on this object.
3795    <p>
3796    * This method disables the specified package on this object
3797    * and other objects connected by child-parent links in the same
3798    * {@link SBMLDocument} object.
3799    <p>
3800    * An example of when this may be useful is during construction of model
3801    * components when mixing existing and new models.  Suppose your
3802    * application read an SBML document containing a model that used the SBML
3803    * Hierarchical Model Composition (&ldquo;comp&rdquo;) package, and
3804    * extracted parts of that model in order to construct a new model in
3805    * memory.  The new, in-memory model will not accept a component drawn from
3806    * an other {@link SBMLDocument} with different package namespace declarations.
3807    * You could reconstruct the same namespaces in the in-memory model first,
3808    * but as a shortcut, you could also disable the package namespace on the
3809    * object being added.  Here is a code example to help clarify this:
3810    <p>
3811 <pre class='fragment'>
3812 // We read in an SBML L3V1 model that uses the 'comp' package namespace
3813 {@link SBMLReader} reader = new {@link SBMLReader}();
3814 {@link SBMLDocument} doc = reader.readSBML('sbml-file-with-comp-elements.xml');
3815 
3816 // We extract one of the species from the model we just read in.
3817 {@link Species} s1 = doc.getModel().getSpecies(0);
3818 
3819 // We construct a new model.  This model does not use the 'comp' package.
3820 {@link Model} newModel = new {@link Model}(3,1);
3821 
3822 // The following will fail with an error, because addSpecies() will
3823 // first check that the parent of the given object has namespaces
3824 // declared, and will discover that s1 does but newModel does not.
3825 
3826 // newModel-&gt;addSpecies(s1);
3827 
3828 // However, if we disable the 'comp' package on s1, then the call
3829 // to addSpecies will work.
3830 
3831 s1-&gt;disablePackage('http://www.sbml.org/sbml/level3/version1/comp/version1',
3832                    'comp');
3833 newModel.addSpecies(s1);
3834 </pre>
3835 <p>
3836    * @param pkgURI the URI of the package.
3837    <p>
3838    * @param pkgPrefix the XML prefix of the package.
3839    <p>
3840    * <p>
3841  * @return integer value indicating success/failure of the
3842  * function.   The possible values
3843  * returned by this function are:
3844    * <ul>
3845    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
3846    * <li> {@link libsbmlConstants#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN}
3847    * <li> {@link libsbmlConstants#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH}
3848    * <li> {@link libsbmlConstants#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION}
3849    *
3850    * </ul> <p>
3851    * @see #enablePackage(String pkgURI, String pkgPrefix, boolean flag)
3852    */ public
disablePackage(String pkgURI, String pkgPrefix)3853  int disablePackage(String pkgURI, String pkgPrefix) {
3854     return libsbmlJNI.SBase_disablePackage(swigCPtr, this, pkgURI, pkgPrefix);
3855   }
3856 
3857 
3858 /** * @internal */ public
enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag)3859  void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
3860     libsbmlJNI.SBase_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
3861   }
3862 
3863 
3864 /**
3865    * Predicate returning <code>true</code> if an SBML Level&nbsp;3 package with the
3866    * given URI is enabled with this object.
3867    <p>
3868    * @param pkgURI the URI of the package.
3869    <p>
3870    * @return <code>true</code> if the given package is enabled within this object, @c
3871    * false otherwise.
3872    <p>
3873    * @see #isPackageEnabled(String)
3874    */ public
isPackageURIEnabled(String pkgURI)3875  boolean isPackageURIEnabled(String pkgURI) {
3876     return libsbmlJNI.SBase_isPackageURIEnabled(swigCPtr, this, pkgURI);
3877   }
3878 
3879 
3880 /**
3881    * Predicate returning <code>true</code> if the given SBML Level&nbsp;3 package is
3882    * enabled with this object.
3883    <p>
3884    * The search ignores the package version.
3885    <p>
3886    * @param pkgName the name of the package.
3887    <p>
3888    * @return <code>true</code> if the given package is enabled within this object,
3889    * <code>false</code> otherwise.
3890    <p>
3891    * @see #isPackageURIEnabled(String)
3892    */ public
isPackageEnabled(String pkgName)3893  boolean isPackageEnabled(String pkgName) {
3894     return libsbmlJNI.SBase_isPackageEnabled(swigCPtr, this, pkgName);
3895   }
3896 
3897 
3898 /**
3899    * Predicate returning <code>true</code> if an SBML Level&nbsp;3 package with the
3900    * given URI is enabled with this object.
3901    <p>
3902    * @param pkgURI the URI of the package.
3903    <p>
3904    * @return <code>true</code> if the given package is enabled within this object, @c
3905    * false otherwise.
3906    <p>
3907    * @deprecated <div class='deprecated'>Replaced in libSBML 5.2.0 by
3908    * {@link SBase#isPackageURIEnabled(String)}.
3909    * </div>
3910    <p>
3911    * @see #isPkgEnabled(String)
3912    */ public
isPkgURIEnabled(String pkgURI)3913  boolean isPkgURIEnabled(String pkgURI) {
3914     return libsbmlJNI.SBase_isPkgURIEnabled(swigCPtr, this, pkgURI);
3915   }
3916 
3917 
3918 /**
3919    * Predicate returning <code>true</code> if the given SBML Level&nbsp;3 package is
3920    * enabled with this object.
3921    <p>
3922    * The search ignores the package version.
3923    <p>
3924    * @param pkgName the name of the package.
3925    <p>
3926    * @return <code>true</code> if the given package is enabled within this object,
3927    * <code>false</code> otherwise.
3928    <p>
3929    * @deprecated <div class='deprecated'>Replaced in libSBML 5.2.0 by
3930    * {@link SBase#isPackageEnabled(String)}.
3931    * </div>
3932    <p>
3933    * @see #isPkgURIEnabled(String)
3934    */ public
isPkgEnabled(String pkgName)3935  boolean isPkgEnabled(String pkgName) {
3936     return libsbmlJNI.SBase_isPkgEnabled(swigCPtr, this, pkgName);
3937   }
3938 
3939 
3940 /** * @internal */ public
writeExtensionElements(XMLOutputStream stream)3941  void writeExtensionElements(XMLOutputStream stream) {
3942     libsbmlJNI.SBase_writeExtensionElements(swigCPtr, this, XMLOutputStream.getCPtr(stream), stream);
3943   }
3944 
3945 
3946 /** * @internal */ public
read(XMLInputStream stream)3947  void read(XMLInputStream stream) {
3948     libsbmlJNI.SBase_read__SWIG_2(swigCPtr, this, XMLInputStream.getCPtr(stream), stream);
3949   }
3950 
3951 
3952 /** * @internal */ public
write(XMLOutputStream stream)3953  void write(XMLOutputStream stream) {
3954     libsbmlJNI.SBase_write(swigCPtr, this, XMLOutputStream.getCPtr(stream), stream);
3955   }
3956 
3957 
3958 /** * @internal */ public
hasRequiredAttributes()3959  boolean hasRequiredAttributes() {
3960     return libsbmlJNI.SBase_hasRequiredAttributes(swigCPtr, this);
3961   }
3962 
3963 
3964 /** * @internal */ public
hasRequiredElements()3965  boolean hasRequiredElements() {
3966     return libsbmlJNI.SBase_hasRequiredElements(swigCPtr, this);
3967   }
3968 
3969 
3970 /** * @internal */ public
checkCompatibility(SBase object)3971  int checkCompatibility(SBase object) {
3972     return libsbmlJNI.SBase_checkCompatibility(swigCPtr, this, SBase.getCPtr(object), object);
3973   }
3974 
3975 
3976 /** * @internal */ public
setSBMLNamespacesAndOwn(SBMLNamespaces disownedNs)3977  void setSBMLNamespacesAndOwn(SBMLNamespaces disownedNs) {
3978     libsbmlJNI.SBase_setSBMLNamespacesAndOwn(swigCPtr, this, SBMLNamespaces.getCPtrAndDisown(disownedNs), disownedNs);
3979   }
3980 
3981 
3982 /** * @internal */ public
getSBMLNamespaces()3983  SBMLNamespaces getSBMLNamespaces() {
3984   return libsbml.DowncastSBMLNamespaces(libsbmlJNI.SBase_getSBMLNamespaces(swigCPtr, this), false);
3985 }
3986 
3987 
3988 /** * @internal */ public
removeDuplicateAnnotations()3989  void removeDuplicateAnnotations() {
3990     libsbmlJNI.SBase_removeDuplicateAnnotations(swigCPtr, this);
3991   }
3992 
3993 
3994 /** * @internal */ public
checkMathMLNamespace(XMLToken elem)3995  String checkMathMLNamespace(XMLToken elem) {
3996     return libsbmlJNI.SBase_checkMathMLNamespace(swigCPtr, this, XMLToken.getCPtr(elem), elem);
3997   }
3998 
3999 
4000 /** * @internal */ public
getDerivedUnitDefinition()4001  UnitDefinition getDerivedUnitDefinition() {
4002     long cPtr = libsbmlJNI.SBase_getDerivedUnitDefinition(swigCPtr, this);
4003     return (cPtr == 0) ? null : new UnitDefinition(cPtr, false);
4004   }
4005 
4006 
4007 /** * @internal */ public
containsUndeclaredUnits()4008  boolean containsUndeclaredUnits() {
4009     return libsbmlJNI.SBase_containsUndeclaredUnits(swigCPtr, this);
4010   }
4011 
4012 
4013 /**
4014    * Removes this object from its parent.
4015    <p>
4016    * If the parent was storing this object as a pointer, it is deleted.  If
4017    * not, it is simply cleared (as in {@link ListOf} objects).  This is a pure
4018    * virtual method, as every {@link SBase} element has different parents, and
4019    * therefore different methods of removing itself.  Will fail (and not
4020    * delete itself) if it has no parent object.  This function is designed to
4021    * be overridden, but for all objects whose parent is of the class {@link ListOf},
4022    * the default implementation will work.
4023    <p>
4024    * <p>
4025  * @return integer value indicating success/failure of the
4026  * function.   The possible values
4027  * returned by this function are:
4028    * <ul>
4029    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
4030    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
4031    * </ul>
4032    */ public
removeFromParentAndDelete()4033  int removeFromParentAndDelete() {
4034     return libsbmlJNI.SBase_removeFromParentAndDelete(swigCPtr, this);
4035   }
4036 
4037 
4038 /**
4039    * Returns <code>true</code> if this object's set of XML namespaces are the same
4040    * as the given object's XML namespaces.
4041    <p>
4042    * <p>
4043  * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
4044  * information.  It is used to communicate the SBML Level, Version, and (in
4045  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
4046  * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
4047  * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
4048  * as needed to object constructors that accept {@link SBMLNamespaces} as arguments.
4049    <p>
4050    * @param sb an object to compare with respect to namespaces.
4051    <p>
4052    * @return boolean, <code>true</code> if this object's collection of namespaces is
4053    * the same as <code>sb's</code>, <code>false</code> otherwise.
4054    */ public
matchesSBMLNamespaces(SBase sb)4055  boolean matchesSBMLNamespaces(SBase sb) {
4056     return libsbmlJNI.SBase_matchesSBMLNamespaces__SWIG_0(swigCPtr, this, SBase.getCPtr(sb), sb);
4057   }
4058 
4059 
4060 /**
4061    * Returns <code>true</code> if this object's set of XML namespaces are a subset
4062    * of the given object's XML namespaces.
4063    <p>
4064    * <p>
4065  * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
4066  * information.  It is used to communicate the SBML Level, Version, and (in
4067  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
4068  * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
4069  * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
4070  * as needed to object constructors that accept {@link SBMLNamespaces} as arguments.
4071    <p>
4072    * @param sb an object to compare with respect to namespaces.
4073    <p>
4074    * @return boolean, <code>true</code> if this object's collection of namespaces is
4075    * a subset of <code>sb's</code>, <code>false</code> otherwise.
4076    */ public
matchesRequiredSBMLNamespacesForAddition(SBase sb)4077  boolean matchesRequiredSBMLNamespacesForAddition(SBase sb) {
4078     return libsbmlJNI.SBase_matchesRequiredSBMLNamespacesForAddition__SWIG_0(swigCPtr, this, SBase.getCPtr(sb), sb);
4079   }
4080 
4081 
4082 /**
4083    * Predicate returning true or false depending on whether
4084    * the user data of this element has been set.
4085    <p>
4086    * <p>
4087  * The user data associated with an SBML object can be used by an application
4088  * developer to attach custom information to that object in the model.  In case
4089  * of a deep copy, this data will passed as-is.  The data attribute will never
4090  * be interpreted by libSBML.
4091    <p>
4092    * @return boolean, <code>true</code> if this object's user data has been set,
4093    * <code>false</code> otherwise.
4094    */ public
isSetUserData()4095  boolean isSetUserData() {
4096     return libsbmlJNI.SBase_isSetUserData(swigCPtr, this);
4097   }
4098 
4099 
4100 /**
4101    * Unsets the user data of this element.
4102    <p>
4103    * <p>
4104  * The user data associated with an SBML object can be used by an application
4105  * developer to attach custom information to that object in the model.  In case
4106  * of a deep copy, this data will passed as-is.  The data attribute will never
4107  * be interpreted by libSBML.
4108    <p>
4109    * <p>
4110  * @return integer value indicating success/failure of the
4111  * function.   The possible values
4112  * returned by this function are:
4113    * <ul>
4114    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
4115    * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
4116    * </ul>
4117    */ public
unsetUserData()4118  int unsetUserData() {
4119     return libsbmlJNI.SBase_unsetUserData(swigCPtr, this);
4120   }
4121 
4122 
4123 /**
4124    * Returns the namespace URI to which this element belongs to.
4125    <p>
4126    * For example, all elements that belong to SBML Level&nbsp;3 Version&nbsp;1 Core
4127    * must would have the URI <code>'http://www.sbml.org/sbml/level3/version1/core'</code>;
4128    * all elements that belong to Layout Extension Version 1 for SBML Level&nbsp;3
4129    * Version&nbsp;1 Core must would have the URI
4130    * <code>'http://www.sbml.org/sbml/level3/version1/layout/version1'</code>.
4131    <p>
4132    * This function first returns the URI for this element by looking into the
4133    * {@link SBMLNamespaces} object of the document with the its package name.  If not
4134    * found, it will then look for the namespace associated with the element
4135    * itself.
4136    <p>
4137    * @return the URI of this element, as a text string.
4138    <p>
4139    * @see #getSBMLDocument()
4140    * @see #getPackageName()
4141    */ public
getURI()4142  String getURI() {
4143     return libsbmlJNI.SBase_getURI(swigCPtr, this);
4144   }
4145 
4146 
4147 /**
4148    * Returns the XML namespace prefix of this element.
4149    <p>
4150    * This reports the XML namespace prefix chosen for this class of object in
4151    * the current SBML document.  This may be an empty string if the component
4152    * has no explicit prefix (for instance, if it is a core SBML object placed
4153    * in the default SBML namespace of the document).  If it is not empty, then
4154    * it corresponds to the XML namespace prefix used set the object, whatever
4155    * that may be in a given SBML document.
4156    <p>
4157    * @return a text string representing the XML namespace prefix.
4158    */ public
getPrefix()4159  String getPrefix() {
4160     return libsbmlJNI.SBase_getPrefix(swigCPtr, this);
4161   }
4162 
4163 
4164 /** * @internal */ public
hasOptionalAttributes()4165  boolean hasOptionalAttributes() {
4166     return libsbmlJNI.SBase_hasOptionalAttributes(swigCPtr, this);
4167   }
4168 
4169 
4170 /** * @internal */ public
hasOptionalElements()4171  boolean hasOptionalElements() {
4172     return libsbmlJNI.SBase_hasOptionalElements(swigCPtr, this);
4173   }
4174 
4175 
4176 /** * @internal */ public
updateSBMLNamespace(String _package, long level, long version)4177  void updateSBMLNamespace(String _package, long level, long version) {
4178     libsbmlJNI.SBase_updateSBMLNamespace(swigCPtr, this, _package, level, version);
4179   }
4180 
4181 
4182   /**
4183    * Returns an {@link SBaseList} of all child {@link SBase} objects,
4184    * including those nested to an arbitrary depth.
4185    *
4186    * @return a pointer to an {@link SBaseList} of pointers to all children objects.
4187    */
getListOfAllElements(ElementFilter filter)4188  public SBaseList getListOfAllElements(ElementFilter filter) {
4189     return new SBaseList(libsbmlJNI.SBase_getListOfAllElements__SWIG_0(swigCPtr, this, ElementFilter.getCPtr(filter), filter), true);
4190   }
4191 
4192 
4193   /**
4194    * Returns an {@link SBaseList} of all child {@link SBase} objects,
4195    * including those nested to an arbitrary depth.
4196    *
4197    * @return a pointer to an {@link SBaseList} of pointers to all children objects.
4198    */
getListOfAllElements()4199  public SBaseList getListOfAllElements() {
4200     return new SBaseList(libsbmlJNI.SBase_getListOfAllElements__SWIG_1(swigCPtr, this), true);
4201   }
4202 
4203 
4204   /**
4205    * Returns an {@link SBaseList} of all child {@link SBase} objects
4206    * contained in SBML package plugins.
4207    *
4208    * This method walks down the list of all packages used by the model and
4209    * returns all objects contained in them.
4210    *
4211    * @return a pointer to a {@link SBaseList} of pointers to all children
4212    * objects from plugins.
4213    */
getListOfAllElementsFromPlugins(ElementFilter filter)4214  public SBaseList getListOfAllElementsFromPlugins(ElementFilter filter) {
4215     return new SBaseList(libsbmlJNI.SBase_getListOfAllElementsFromPlugins__SWIG_0(swigCPtr, this, ElementFilter.getCPtr(filter), filter), true);
4216   }
4217 
4218 
4219   /**
4220    * Returns an {@link SBaseList} of all child {@link SBase} objects
4221    * contained in SBML package plugins.
4222    *
4223    * This method walks down the list of all packages used by the model and
4224    * returns all objects contained in them.
4225    *
4226    * @return a pointer to a {@link SBaseList} of pointers to all children
4227    * objects from plugins.
4228    */
getListOfAllElementsFromPlugins()4229  public SBaseList getListOfAllElementsFromPlugins() {
4230     return new SBaseList(libsbmlJNI.SBase_getListOfAllElementsFromPlugins__SWIG_1(swigCPtr, this), true);
4231   }
4232 
4233 }
4234