001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.8
004 *
005 * Do not make changes to this file unless you know what you are doing--modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.sbml.libsbml;
010
011/** 
012 *  SBML's <em>SBase</em> class, base class of most SBML objects.
013 <p>
014 * Most components in SBML are derived from a single abstract base type,
015 * {@link SBase}.  In addition to serving as the parent class for most other
016 * classes of objects in SBML, this base type is designed to allow a
017 * modeler or a software package to attach arbitrary information to each
018 * major element or list in an SBML model.
019 <p>
020 * {@link SBase} has an optional subelement called 'notes'.  It is intended to
021 * serve as a place for storing optional information intended to be seen by
022 * humans.  An example use of the 'notes' element would be to contain
023 * formatted user comments about the model element in which the 'notes'
024 * element is enclosed.  There are certain conditions on the XHTML content
025 * permitted inside the 'notes' element; please consult the <a
026 * target='_blank' href='http://sbml.org/Documents/Specifications'>SBML
027 * specification document</a> corresponding to the SBML Level and Version
028 * of your model for more information about the requirements for 'notes'
029 * content.
030 <p>
031 * {@link SBase} has another optional subelement called 'annotation'.  Whereas the
032 * 'notes' element described above is a container for content to be shown
033 * directly to humans, the 'annotation' element is a container for optional
034 * software-generated content <em>not</em> meant to be shown to humans.  The
035 * element's content type is <a target='_blank'
036 * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
037 * 'any'</a>, allowing essentially arbitrary data content.  SBML places
038 * only a few restrictions on the organization of the content; these are
039 * intended to help software tools read and write the data as well as help
040 * reduce conflicts between annotations added by different tools.  As is
041 * the case with 'notes', it is important to refer to the <a
042 * target='_blank' href='http://sbml.org/Documents/Specifications'>SBML
043 * specification document</a> corresponding to the SBML Level and Version
044 * of your model for more information about the requirements for
045 * 'annotation' content.
046 <p>
047 * It is worth pointing out that the 'annotation' element in the definition
048 * of {@link SBase} exists in order that software developers may attach optional
049 * application-specific data to the elements in an SBML model.  However, it
050 * is important that this facility not be misused.  In particular, it is
051 * <em>critical</em> that data essential to a model definition or that can
052 * be encoded in existing SBML elements is <em>not</em> stored in
053 * 'annotation'. {@link Parameter} values, functional dependencies between model
054 * elements, etc., should not be recorded as annotations.  It is crucial to
055 * keep in mind the fact that data placed in annotations can be freely
056 * ignored by software applications.  If such data affects the
057 * interpretation of a model, then software interoperability is greatly
058 * impeded.
059 <p>
060 * SBML Level 2 introduced an optional {@link SBase} attribute named 'metaid' for
061 * supporting metadata annotations using RDF (<a target='_blank'
062 * href='http://www.w3.org/RDF/'>Resource Description Format</a>). The
063 * attribute value has the data type <a
064 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML identifier
065 * type, which means each 'metaid' value must be globally unique within an
066 * SBML file.  (Importantly, this uniqueness criterion applies across any
067 * attribute with type <a href='http://www.w3.org/TR/REC-xml/#id'>XML
068 * ID</a>, not just the 'metaid' attribute used by SBML&mdash;something to
069 * be aware of if your application-specific XML content inside the
070 * 'annotation' subelement happens to use <a
071 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.)  The 'metaid' value
072 * serves to identify a model component for purposes such as referencing
073 * that component from metadata placed within 'annotation' subelements.
074 <p>
075 * Beginning with SBML Level 2 Version 3, {@link SBase} also has an optional
076 * attribute named 'sboTerm' for supporting the use of the Systems Biology
077 * Ontology.  In SBML proper, the data type of the attribute is a string of
078 * the form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit integer number;
079 * libSBML simplifies the representation by only storing the 'NNNNNNN'
080 * integer portion.  Thus, in libSBML, the 'sboTerm' attribute on {@link SBase} has
081 * data type <code>int</code>, and {@link SBO} identifiers are stored simply as integers.
082 * (For convenience, {@link SBase} offers methods for returning both the integer
083 * form and a text-string form of the {@link SBO} identifier.)  {@link SBO} terms are a
084 * type of optional annotation, and each different class of SBML object
085 * derived from {@link SBase} imposes its own requirements about the values
086 * permitted for 'sboTerm'.  Please consult the SBML Level&nbsp;2
087 * Version&nbsp;4 specification for more information about the use of {@link SBO}
088 * and the 'sboTerm' attribute.
089 <p>
090 * Finally, note that, in the list of methods on {@link SBase}, there is no public
091 * constructor because {@link SBase} is an abstract class.  The constructors reside
092 * in the subclasses derived from {@link SBase}.
093 <p>
094 * <h2>Standard format for annotations linking data resources</h2>
095 <p>
096 * SBML Level 2 Versions 2, 3 and 4, and Level&nbsp;3, define a proposed
097 * regular format for encoding two particular categories of annotations:
098 * (a) references to controlled vocabulary terms and database identifiers
099 * which define and describe biological and biochemical entities in a
100 * model; and (b) descriptions of the provenance of a model, including its
101 * author(s) and modification history.
102 */
103
104public class SBase {
105   private long swigCPtr;
106   protected boolean swigCMemOwn;
107
108   protected SBase(long cPtr, boolean cMemoryOwn)
109   {
110     swigCMemOwn = cMemoryOwn;
111     swigCPtr    = cPtr;
112   }
113
114   protected static long getCPtr(SBase obj)
115   {
116     return (obj == null) ? 0 : obj.swigCPtr;
117   }
118
119   protected static long getCPtrAndDisown (SBase obj)
120   {
121     long ptr = 0;
122
123     if (obj != null)
124     {
125       ptr             = obj.swigCPtr;
126       obj.swigCMemOwn = false;
127     }
128
129     return ptr;
130   }
131
132  protected void finalize() {
133    delete();
134  }
135
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   */
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   */
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
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
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
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
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
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
338 void renameUnitSIdRefs(String oldid, String newid) {
339    libsbmlJNI.SBase_renameUnitSIdRefs(swigCPtr, this, oldid, newid);
340  }
341
342  
343/** * @internal */ public
344 void replaceSIDWithFunction(String id, ASTNode function) {
345    libsbmlJNI.SBase_replaceSIDWithFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function);
346  }
347
348  
349/** * @internal */ public
350 void divideAssignmentsToSIdByFunction(String id, ASTNode function) {
351    libsbmlJNI.SBase_divideAssignmentsToSIdByFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function);
352  }
353
354  
355/** * @internal */ public
356 void multiplyAssignmentsToSIdByFunction(String id, ASTNode function) {
357    libsbmlJNI.SBase_multiplyAssignmentsToSIdByFunction(swigCPtr, this, id, ASTNode.getCPtr(function), function);
358  }
359
360  
361/** * @internal */ public
362 SBase getElementFromPluginsBySId(String id) {
363  return libsbml.DowncastSBase(libsbmlJNI.SBase_getElementFromPluginsBySId(swigCPtr, this, id), false);
364}
365
366  
367/** * @internal */ public
368 SBase getElementFromPluginsByMetaId(String metaid) {
369  return libsbml.DowncastSBase(libsbmlJNI.SBase_getElementFromPluginsByMetaId(swigCPtr, this, metaid), false);
370}
371
372  
373/** * @internal */ public
374 boolean hasNonstandardIdentifierBeginningWith(String prefix) {
375    return libsbmlJNI.SBase_hasNonstandardIdentifierBeginningWith(swigCPtr, this, prefix);
376  }
377
378  
379/** * @internal */ public
380 int prependStringToAllIdentifiers(String prefix) {
381    return libsbmlJNI.SBase_prependStringToAllIdentifiers(swigCPtr, this, prefix);
382  }
383
384  
385/** * @internal */ public
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 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
420 String getMetaId() {
421    return libsbmlJNI.SBase_getMetaId(swigCPtr, this);
422  }
423
424  
425/** * @internal */ public
426 String getId() {
427    return libsbmlJNI.SBase_getId(swigCPtr, this);
428  }
429
430  
431/** * @internal */ public
432 String getName() {
433    return libsbmlJNI.SBase_getName(swigCPtr, this);
434  }
435
436  
437/**
438   * Returns the content of the 'notes' subelement of this object as
439   * a tree of {@link XMLNode} objects.
440   <p>
441   * <p>
442 * The optional SBML element named 'notes', present on every major SBML
443 * component type (and in SBML Level&nbsp;3, the 'message' subelement of
444 * {@link Constraint}), is intended as a place for storing optional information
445 * intended to be seen by humans.  An example use of the 'notes' element
446 * would be to contain formatted user comments about the model element in
447 * which the 'notes' element is enclosed.  Every object derived directly or
448 * indirectly from type {@link SBase} can have a separate value for 'notes', allowing
449 * users considerable freedom when adding comments to their models.
450 <p>
451 * The format of 'notes' elements conform to the definition of <a
452 * target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
453 * However, the content cannot be <em>entirely</em> free-form; it must satisfy
454 * certain requirements defined in the <a target='_blank'
455 * href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
456 * for specific SBML Levels.  To help verify the formatting of 'notes'
457 * content, libSBML provides the static utility method
458 * {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; this
459 * method implements a verification process that lets callers check whether
460 * the content of a given {@link XMLNode} object conforms to the SBML requirements
461 * for 'notes' and 'message' structure.  Developers are urged to consult the
462 * appropriate <a target='_blank'
463 * href='http://sbml.org/Documents/Specifications'>SBML specification
464 * document</a> for the Level and Version of their model for more in-depth
465 * explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and &nbsp;3
466 * specifications have considerable detail about how 'notes' element content
467 * must be structured. 
468   <p>
469   * The 'notes' element content returned by this method will be in XML
470   * form, but libSBML does not provide an object model specifically for
471   * the content of notes.  Callers will need to traverse the XML tree
472   * structure using the facilities available on {@link XMLNode} and related
473   * objects.  For an alternative method of accessing the notes, see
474   * getNotesString().
475   <p>
476   * @return the content of the 'notes' subelement of this SBML object as a
477   * tree structure composed of {@link XMLNode} objects.
478   <p>
479   * @see #getNotesString()
480   * @see #isSetNotes()
481   * @see #setNotes(XMLNode notes)
482   * @see #setNotes(String notes, boolean addXHTMLMarkup)
483   * @see #appendNotes(XMLNode notes)
484   * @see #appendNotes(String notes)
485   * @see #unsetNotes()
486   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
487   */ public
488 XMLNode getNotes() {
489    long cPtr = libsbmlJNI.SBase_getNotes__SWIG_0(swigCPtr, this);
490    return (cPtr == 0) ? null : new XMLNode(cPtr, false);
491  }
492
493  
494/**
495   * Returns the content of the 'notes' subelement of this object as a
496   * string.
497   <p>
498   * <p>
499 * The optional SBML element named 'notes', present on every major SBML
500 * component type (and in SBML Level&nbsp;3, the 'message' subelement of
501 * {@link Constraint}), is intended as a place for storing optional information
502 * intended to be seen by humans.  An example use of the 'notes' element
503 * would be to contain formatted user comments about the model element in
504 * which the 'notes' element is enclosed.  Every object derived directly or
505 * indirectly from type {@link SBase} can have a separate value for 'notes', allowing
506 * users considerable freedom when adding comments to their models.
507 <p>
508 * The format of 'notes' elements conform to the definition of <a
509 * target='_blank' href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.
510 * However, the content cannot be <em>entirely</em> free-form; it must satisfy
511 * certain requirements defined in the <a target='_blank'
512 * href='http://sbml.org/Documents/Specifications'>SBML specifications</a>
513 * for specific SBML Levels.  To help verify the formatting of 'notes'
514 * content, libSBML provides the static utility method
515 * {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; this
516 * method implements a verification process that lets callers check whether
517 * the content of a given {@link XMLNode} object conforms to the SBML requirements
518 * for 'notes' and 'message' structure.  Developers are urged to consult the
519 * appropriate <a target='_blank'
520 * href='http://sbml.org/Documents/Specifications'>SBML specification
521 * document</a> for the Level and Version of their model for more in-depth
522 * explanations of using 'notes' in SBML.  The SBML Level&nbsp;2 and &nbsp;3
523 * specifications have considerable detail about how 'notes' element content
524 * must be structured. 
525   <p>
526   * For an alternative method of accessing the notes, see getNotes(),
527   * which returns the content as an {@link XMLNode} tree structure.  Depending on
528   * an application's needs, one or the other method may be more
529   * convenient.
530   <p>
531   * @return the content of the 'notes' subelement of this SBML object as a
532   * string.
533   <p>
534   * @see #getNotes()
535   * @see #isSetNotes()
536   * @see #setNotes(XMLNode notes)
537   * @see #setNotes(String notes, boolean addXHTMLMarkup)
538   * @see #appendNotes(XMLNode notes)
539   * @see #appendNotes(String notes)
540   * @see #unsetNotes()
541   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
542   */ public
543 String getNotesString() {
544    return libsbmlJNI.SBase_getNotesString__SWIG_0(swigCPtr, this);
545  }
546
547  
548/**
549   * Returns the content of the 'annotation' subelement of this object as
550   * a tree of {@link XMLNode} objects.
551   <p>
552   * <p>
553 * Whereas the SBML 'notes' subelement is a container for content to be
554 * shown directly to humans, the 'annotation' element is a container for
555 * optional software-generated content <em>not</em> meant to be shown to
556 * humans.  Every object derived from {@link SBase} can have its own value for
557 * 'annotation'.  The element's content type is <a target='_blank'
558 * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
559 * 'any'</a>, allowing essentially arbitrary well-formed XML data
560 * content.
561 <p>
562 * SBML places a few restrictions on the organization of the content of
563 * annotations; these are intended to help software tools read and write
564 * the data as well as help reduce conflicts between annotations added by
565 * different tools.  Please see the SBML specifications for more details. 
566   <p>
567   * The annotations returned by this method will be in XML form.  LibSBML
568   * provides an object model and related interfaces for certain specific
569   * kinds of annotations, namely model history information and RDF
570   * content.  See the {@link ModelHistory}, {@link CVTerm} and {@link RDFAnnotationParser} classes
571   * for more information about the facilities available.
572   <p>
573   * @return the annotation of this SBML object as a tree of {@link XMLNode} objects.
574   <p>
575   * @see #getAnnotationString()
576   * @see #isSetAnnotation()
577   * @see #setAnnotation(XMLNode annotation)
578   * @see #setAnnotation(String annotation)
579   * @see #appendAnnotation(XMLNode annotation)
580   * @see #appendAnnotation(String annotation)
581   * @see #unsetAnnotation()
582   */ public
583 XMLNode getAnnotation() {
584    long cPtr = libsbmlJNI.SBase_getAnnotation__SWIG_0(swigCPtr, this);
585    return (cPtr == 0) ? null : new XMLNode(cPtr, false);
586  }
587
588  
589/**
590   * Returns the content of the 'annotation' subelement of this object as a
591   * character string.
592   <p>
593   * <p>
594 * Whereas the SBML 'notes' subelement is a container for content to be
595 * shown directly to humans, the 'annotation' element is a container for
596 * optional software-generated content <em>not</em> meant to be shown to
597 * humans.  Every object derived from {@link SBase} can have its own value for
598 * 'annotation'.  The element's content type is <a target='_blank'
599 * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
600 * 'any'</a>, allowing essentially arbitrary well-formed XML data
601 * content.
602 <p>
603 * SBML places a few restrictions on the organization of the content of
604 * annotations; these are intended to help software tools read and write
605 * the data as well as help reduce conflicts between annotations added by
606 * different tools.  Please see the SBML specifications for more details. 
607   <p>
608   * The annotations returned by this method will be in string form.  See the
609   * method getAnnotation() for a version that returns annotations in XML form.
610   <p>
611   * @return the annotation of this SBML object as a character string.
612   <p>
613   * @see #getAnnotation()
614   * @see #isSetAnnotation()
615   * @see #setAnnotation(XMLNode annotation)
616   * @see #setAnnotation(String annotation)
617   * @see #appendAnnotation(XMLNode annotation)
618   * @see #appendAnnotation(String annotation)
619   * @see #unsetAnnotation()
620   */ public
621 String getAnnotationString() {
622    return libsbmlJNI.SBase_getAnnotationString__SWIG_0(swigCPtr, this);
623  }
624
625  
626/**
627   * Returns a list of the XML Namespaces declared on the SBML document
628   * owning this object.
629   <p>
630   * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
631   * information.  It is used to communicate the SBML Level, Version, and (in
632   * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.
633   <p>
634   * @return the XML Namespaces associated with this SBML object, or <code>null</code>
635   * in certain very usual circumstances where a namespace is not set.
636   <p>
637   * @see #getLevel()
638   * @see #getVersion()
639   */ public
640 XMLNamespaces getNamespaces() {
641    long cPtr = libsbmlJNI.SBase_getNamespaces(swigCPtr, this);
642    return (cPtr == 0) ? null : new XMLNamespaces(cPtr, false);
643  }
644
645  
646/**
647   * Returns the {@link SBMLDocument} object containing this object instance.
648   <p>
649   * <p>
650 * LibSBML uses the class {@link SBMLDocument} as a top-level container for
651 * storing SBML content and data associated with it (such as warnings and
652 * error messages).  An SBML model in libSBML is contained inside an
653 * {@link SBMLDocument} object.  {@link SBMLDocument} corresponds roughly to the class
654 * <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
655 * specifications, but it does not have a direct correspondence in SBML
656 * Level&nbsp;1.  (But, it is created by libSBML no matter whether the
657 * model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
658   <p>
659   * This method allows the caller to obtain the {@link SBMLDocument} for the
660   * current object.
661   <p>
662   * @return the parent {@link SBMLDocument} object of this SBML object.
663   <p>
664   * @see #getParentSBMLObject()
665   * @see #getModel()
666   */ public
667 SBMLDocument getSBMLDocument() {
668    long cPtr = libsbmlJNI.SBase_getSBMLDocument__SWIG_0(swigCPtr, this);
669    return (cPtr == 0) ? null : new SBMLDocument(cPtr, false);
670  }
671
672  
673/**
674   * Returns the parent SBML object containing this object.
675   <p>
676   * This returns the immediately-containing object.  This method is
677   * convenient when holding an object nested inside other objects in an
678   * SBML model.  
679   <p>
680   * @return the parent SBML object of this SBML object.
681   <p>
682   * @see #getSBMLDocument()
683   * @see #getModel()
684   */ public
685 SBase getParentSBMLObject() {
686  return libsbml.DowncastSBase(libsbmlJNI.SBase_getParentSBMLObject__SWIG_0(swigCPtr, this), false);
687}
688
689  
690/**
691   * Returns the first ancestor object that has the given SBML type code from the given package.
692   <p>
693   * LibSBML attaches an identifying code to every
694   * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
695   * other languages, the set of type codes is stored in an enumeration; in
696   * the Java language interface for libSBML, the type codes are defined as
697   * static integer constants in the interface class {@link
698   * libsbmlConstants}.  The names of the type codes all begin with the
699   * characters <code>SBML_.</code> 
700   <p>
701   * This method searches the tree of objects that are parents of this
702   * object, and returns the first one that has the given SBML type code from 
703   * the given <code>pkgName</code>.
704   <p>
705   * @param type the SBML type code of the object sought
706   <p>
707   * @param pkgName (optional) the short name of an SBML Level&nbsp;3
708   * package to which the sought-after object must belong
709   <p>
710   * @return the ancestor SBML object of this SBML object that corresponds
711   * to the given SBML object type
712   * code, or <code>null</code> if no ancestor exists.
713   <p>
714   * @warning The optional argument <code>pkgName</code> must be used for all type codes
715   * from SBML Level&nbsp;3 packages.  Otherwise, the function will search the 
716   * 'core' namespace alone, not find any corresponding elements, and return 
717   * null.
718   <p>
719   * 
720</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
721The native C++ implementation of this method defines a default argument
722value. In the documentation generated for different libSBML language
723bindings, you may or may not see corresponding arguments in the method
724declarations. For example, in Java and C#, a default argument is handled by
725declaring two separate methods, with one of them having the argument and
726the other one lacking the argument. However, the libSBML documentation will
727be <em>identical</em> for both methods. Consequently, if you are reading
728this and do not see an argument even though one is described, please look
729for descriptions of other variants of this method near where this one
730appears in the documentation.
731</dd></dl>
732 
733   */ public
734 SBase getAncestorOfType(int type, String pkgName) {
735  return libsbml.DowncastSBase(libsbmlJNI.SBase_getAncestorOfType__SWIG_0(swigCPtr, this, type, pkgName), false);
736}
737
738  
739/**
740   * Returns the first ancestor object that has the given SBML type code from the given package.
741   <p>
742   * LibSBML attaches an identifying code to every
743   * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
744   * other languages, the set of type codes is stored in an enumeration; in
745   * the Java language interface for libSBML, the type codes are defined as
746   * static integer constants in the interface class {@link
747   * libsbmlConstants}.  The names of the type codes all begin with the
748   * characters <code>SBML_.</code> 
749   <p>
750   * This method searches the tree of objects that are parents of this
751   * object, and returns the first one that has the given SBML type code from 
752   * the given <code>pkgName</code>.
753   <p>
754   * @param type the SBML type code of the object sought
755   <p>
756   * @param pkgName (optional) the short name of an SBML Level&nbsp;3
757   * package to which the sought-after object must belong
758   <p>
759   * @return the ancestor SBML object of this SBML object that corresponds
760   * to the given SBML object type
761   * code, or <code>null</code> if no ancestor exists.
762   <p>
763   * @warning The optional argument <code>pkgName</code> must be used for all type codes
764   * from SBML Level&nbsp;3 packages.  Otherwise, the function will search the 
765   * 'core' namespace alone, not find any corresponding elements, and return 
766   * null.
767   <p>
768   * 
769</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
770The native C++ implementation of this method defines a default argument
771value. In the documentation generated for different libSBML language
772bindings, you may or may not see corresponding arguments in the method
773declarations. For example, in Java and C#, a default argument is handled by
774declaring two separate methods, with one of them having the argument and
775the other one lacking the argument. However, the libSBML documentation will
776be <em>identical</em> for both methods. Consequently, if you are reading
777this and do not see an argument even though one is described, please look
778for descriptions of other variants of this method near where this one
779appears in the documentation.
780</dd></dl>
781 
782   */ public
783 SBase getAncestorOfType(int type) {
784  return libsbml.DowncastSBase(libsbmlJNI.SBase_getAncestorOfType__SWIG_1(swigCPtr, this, type), false);
785}
786
787  
788/**
789   * Returns the integer portion of the value of the 'sboTerm' attribute of
790   * this object.
791   <p>
792   * Beginning with SBML Level 2 Version 3, objects derived from {@link SBase} have
793   * an optional attribute named 'sboTerm' for supporting the use of the
794   * Systems Biology Ontology.  In SBML proper, the data type of the
795   * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
796   * seven digit integer number; libSBML simplifies the representation by
797   * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
798   * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
799   * are stored simply as integers.  (For convenience, libSBML offers
800   * methods for returning both the integer form and a text-string form of
801   * the {@link SBO} identifier.)
802   <p>
803   * {@link SBO} terms are a type of optional annotation, and each different class
804   * of SBML object derived from {@link SBase} imposes its own requirements about
805   * the values permitted for 'sboTerm'.  Please consult the SBML
806   * Level&nbsp;2 Version&nbsp;4 specification for more information about
807   * the use of {@link SBO} and the 'sboTerm' attribute.
808   <p>
809   * @return the value of the 'sboTerm' attribute as an integer, or <code>-1</code>
810   * if the value is not set.
811   */ public
812 int getSBOTerm() {
813    return libsbmlJNI.SBase_getSBOTerm(swigCPtr, this);
814  }
815
816  
817/**
818   * Returns the string representation of the 'sboTerm' attribute of
819   * this object.
820   <p>
821   * Beginning with SBML Level 2 Version 3, objects derived from {@link SBase} have
822   * an optional attribute named 'sboTerm' for supporting the use of the
823   * Systems Biology Ontology.  In SBML proper, the data type of the
824   * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
825   * seven digit integer number; libSBML simplifies the representation by
826   * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
827   * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
828   * are stored simply as integers.  This method returns the entire {@link SBO}
829   * identifier as a text string in the form 'SBO:NNNNNNN'.
830   <p>
831   * {@link SBO} terms are a type of optional annotation, and each different class
832   * of SBML object derived from {@link SBase} imposes its own requirements about
833   * the values permitted for 'sboTerm'.  Please consult the SBML
834   * Level&nbsp;2 Version&nbsp;4 specification for more information about
835   * the use of {@link SBO} and the 'sboTerm' attribute.
836   <p>
837   * @return the value of the 'sboTerm' attribute as a string (its value
838   * will be of the form 'SBO:NNNNNNN'), or an empty string if
839   * the value is not set.
840   */ public
841 String getSBOTermID() {
842    return libsbmlJNI.SBase_getSBOTermID(swigCPtr, this);
843  }
844
845  
846/**
847   * Returns the URL representation of the 'sboTerm' attribute of this
848   * object.
849   <p>
850   * This method returns the entire {@link SBO} identifier as a text string in the
851   * 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>.
852   <p>
853   * {@link SBO} terms are a type of optional annotation, and each different class
854   * of SBML object derived from {@link SBase} imposes its own requirements about
855   * the values permitted for 'sboTerm'.  Please consult the SBML
856   * Level&nbsp;2 Version&nbsp;4 specification for more information about
857   * the use of {@link SBO} and the 'sboTerm' attribute.
858   <p>
859   * @return the value of the 'sboTerm' attribute as an identifiers.org URL,
860   * or an empty string if the value is not set.
861   */ public
862 String getSBOTermAsURL() {
863    return libsbmlJNI.SBase_getSBOTermAsURL(swigCPtr, this);
864  }
865
866  
867/**
868   * Returns the line number where this object first appears in the XML
869   * representation of the SBML document.
870   <p>
871   * @return the line number of this SBML object.  If this object was
872   * created programmatically and not read from a file, this method will
873   * return the value <code>0.</code>
874   <p>
875   * @note The line number for each construct in an SBML model is set upon
876   * reading the model.  The accuracy of the line number depends on the
877   * correctness of the XML representation of the model, and on the
878   * particular XML parser library being used.  The former limitation
879   * relates to the following problem: if the model is actually invalid
880   * XML, then the parser may not be able to interpret the data correctly
881   * and consequently may not be able to establish the real line number.
882   * The latter limitation is simply that different parsers seem to have
883   * their own accuracy limitations, and out of all the parsers supported
884   * by libSBML, none have been 100% accurate in all situations. (At this
885   * time, libSBML supports the use of <a target='_blank'
886   * href='http://xmlsoft.org'>libxml2</a>, <a target='_blank'
887   * href='http://expat.sourceforge.net/'>Expat</a> and <a target='_blank'
888   * href='http://xerces.apache.org/xerces-c/'>Xerces</a>.)
889   <p>
890   * @see #getColumn()
891   */ public
892 long getLine() {
893    return libsbmlJNI.SBase_getLine(swigCPtr, this);
894  }
895
896  
897/**
898   * Returns the column number where this object first appears in the XML
899   * representation of the SBML document.
900   <p>
901   * @return the column number of this SBML object.  If this object was
902   * created programmatically and not read from a file, this method will
903   * return the value <code>0.</code>
904   <p>
905   * @note The column number for each construct in an SBML model is set
906   * upon reading the model.  The accuracy of the column number depends on
907   * the correctness of the XML representation of the model, and on the
908   * particular XML parser library being used.  The former limitation
909   * relates to the following problem: if the model is actually invalid
910   * XML, then the parser may not be able to interpret the data correctly
911   * and consequently may not be able to establish the real column number.
912   * The latter limitation is simply that different parsers seem to have
913   * their own accuracy limitations, and out of all the parsers supported
914   * by libSBML, none have been 100% accurate in all situations. (At this
915   * time, libSBML supports the use of <a target='_blank'
916   * href='http://xmlsoft.org'>libxml2</a>, <a target='_blank'
917   * href='http://expat.sourceforge.net/'>Expat</a> and <a target='_blank'
918   * href='http://xerces.apache.org/xerces-c/'>Xerces</a>.)
919   <p>
920   * @see #getLine()
921   */ public
922 long getColumn() {
923    return libsbmlJNI.SBase_getColumn(swigCPtr, this);
924  }
925
926  
927/**
928   * Returns the {@link ModelHistory} object, if any, attached to this object.
929   <p>
930   * @return the {@link ModelHistory} object attached to this object, or <code>null</code> if
931   * none exist.
932   <p>
933   * @note In SBML Level&nbsp;2, model history annotations were only
934   * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
935   * permitted on all SBML components derived from {@link SBase}.
936   */ public
937 ModelHistory getModelHistory() {
938    long cPtr = libsbmlJNI.SBase_getModelHistory__SWIG_0(swigCPtr, this);
939    return (cPtr == 0) ? null : new ModelHistory(cPtr, false);
940  }
941
942  
943/**
944   * Predicate returning <code>true</code> if this object's 'metaid' attribute is set.
945   <p>
946   * <p>
947 * The optional attribute named 'metaid', present on every major SBML
948 * component type, is for supporting metadata annotations using RDF (<a
949 * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
950 * attribute value has the data type <a
951 * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
952 * identifier type, which means each 'metaid' value must be globally unique
953 * within an SBML file.  The latter point is important, because the
954 * uniqueness criterion applies across <em>any</em> attribute with type
955 * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
956 * by SBML&mdash;something to be aware of if your application-specific XML
957 * content inside the 'annotation' subelement happens to use the XML
958 * <code>ID</code> type.  Although SBML itself specifies the use of <a
959 * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
960 * the 'metaid' attribute, SBML-compatible applications should be careful if
961 * they use XML <code>ID</code>'s in XML portions of a model that are not
962 * defined by SBML, such as in the application-specific content of the
963 * 'annotation' subelement.  Finally, note that LibSBML does not provide an
964 * explicit XML <code>ID</code> data type; it uses ordinary character
965 * strings, which is easier for applications to support. 
966   <p>
967   * @return <code>true</code> if the 'metaid' attribute of this SBML object is
968   * set, <code>false</code> otherwise.
969   <p>
970   * @see #getMetaId()
971   * @see #setMetaId(String metaid)
972   */ public
973 boolean isSetMetaId() {
974    return libsbmlJNI.SBase_isSetMetaId(swigCPtr, this);
975  }
976
977  
978/** * @internal */ public
979 boolean isSetId() {
980    return libsbmlJNI.SBase_isSetId(swigCPtr, this);
981  }
982
983  
984/** * @internal */ public
985 boolean isSetName() {
986    return libsbmlJNI.SBase_isSetName(swigCPtr, this);
987  }
988
989  
990/**
991   * Predicate returning <code>true</code> if this
992   * object's 'notes' subelement exists and has content.
993   <p>
994   * The optional SBML element named 'notes', present on every major SBML
995   * component type, is intended as a place for storing optional
996   * information intended to be seen by humans.  An example use of the
997   * 'notes' element would be to contain formatted user comments about the
998   * model element in which the 'notes' element is enclosed.  Every object
999   * derived directly or indirectly from type {@link SBase} can have a separate
1000   * value for 'notes', allowing users considerable freedom when adding
1001   * comments to their models.
1002   <p>
1003   * The format of 'notes' elements must be <a target='_blank'
1004   * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
1005   * verify the formatting of 'notes' content, libSBML provides the static
1006   * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode xhtml)}; however,
1007   * readers are urged to consult the appropriate <a target='_blank'
1008   * href='http://sbml.org/Documents/Specifications'>SBML specification
1009   * document</a> for the Level and Version of their model for more
1010   * in-depth explanations.  The SBML Level&nbsp;2 and &nbsp;3
1011   * specifications have considerable detail about how 'notes' element
1012   * content must be structured.
1013   <p>
1014   * @return <code>true</code> if a 'notes' subelement exists, <code>false</code> otherwise.
1015   <p>
1016   * @see #getNotes()
1017   * @see #getNotesString()
1018   * @see #setNotes(XMLNode notes)
1019   * @see #setNotes(String notes, boolean addXHTMLMarkup)
1020   * @see #appendNotes(XMLNode notes)
1021   * @see #appendNotes(String notes)
1022   * @see #unsetNotes()
1023   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
1024   */ public
1025 boolean isSetNotes() {
1026    return libsbmlJNI.SBase_isSetNotes(swigCPtr, this);
1027  }
1028
1029  
1030/**
1031   * Predicate returning <code>true</code> if this
1032   * object's 'annotation' subelement exists and has content.
1033   <p>
1034   * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1035   * shown directly to humans, the 'annotation' element is a container for
1036   * optional software-generated content <em>not</em> meant to be shown to
1037   * humans.  Every object derived from {@link SBase} can have its own value for
1038   * 'annotation'.  The element's content type is <a target='_blank'
1039   * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
1040   * 'any'</a>, allowing essentially arbitrary well-formed XML data
1041   * content.
1042   <p>
1043   * SBML places a few restrictions on the organization of the content of
1044   * annotations; these are intended to help software tools read and write
1045   * the data as well as help reduce conflicts between annotations added by
1046   * different tools.  Please see the SBML specifications for more details.
1047   <p>
1048   * @return <code>true</code> if a 'annotation' subelement exists, <code>false</code>
1049   * otherwise.
1050   <p>
1051   * @see #getAnnotation()
1052   * @see #getAnnotationString()
1053   * @see #setAnnotation(XMLNode annotation)
1054   * @see #setAnnotation(String annotation)
1055   * @see #appendAnnotation(XMLNode annotation)
1056   * @see #appendAnnotation(String annotation)
1057   * @see #unsetAnnotation()
1058   */ public
1059 boolean isSetAnnotation() {
1060    return libsbmlJNI.SBase_isSetAnnotation(swigCPtr, this);
1061  }
1062
1063  
1064/**
1065   * Predicate returning <code>true</code> if this
1066   * object's 'sboTerm' attribute is set.
1067   <p>
1068   * @return <code>true</code> if the 'sboTerm' attribute of this SBML object is
1069   * set, <code>false</code> otherwise.
1070   */ public
1071 boolean isSetSBOTerm() {
1072    return libsbmlJNI.SBase_isSetSBOTerm(swigCPtr, this);
1073  }
1074
1075  
1076/**
1077   * Sets the value of the meta-identifier attribute of this object.
1078   <p>
1079   * <p>
1080 * The optional attribute named 'metaid', present on every major SBML
1081 * component type, is for supporting metadata annotations using RDF (<a
1082 * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
1083 * attribute value has the data type <a
1084 * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
1085 * identifier type, which means each 'metaid' value must be globally unique
1086 * within an SBML file.  The latter point is important, because the
1087 * uniqueness criterion applies across <em>any</em> attribute with type
1088 * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
1089 * by SBML&mdash;something to be aware of if your application-specific XML
1090 * content inside the 'annotation' subelement happens to use the XML
1091 * <code>ID</code> type.  Although SBML itself specifies the use of <a
1092 * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
1093 * the 'metaid' attribute, SBML-compatible applications should be careful if
1094 * they use XML <code>ID</code>'s in XML portions of a model that are not
1095 * defined by SBML, such as in the application-specific content of the
1096 * 'annotation' subelement.  Finally, note that LibSBML does not provide an
1097 * explicit XML <code>ID</code> data type; it uses ordinary character
1098 * strings, which is easier for applications to support. 
1099   <p>
1100   * The string <code>metaid</code> is copied.  
1101   <p>
1102   * @param metaid the identifier string to use as the value of the
1103   * 'metaid' attribute
1104   <p>
1105   * <p>
1106 * @return integer value indicating success/failure of the
1107 * function.   The possible values
1108 * returned by this function are:
1109   * <ul>
1110   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1111   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1112   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1113   *
1114   * </ul> <p>
1115   * @see #getMetaId()
1116   * @see #isSetMetaId()
1117   */ public
1118 int setMetaId(String metaid) {
1119    return libsbmlJNI.SBase_setMetaId(swigCPtr, this, metaid);
1120  }
1121
1122  
1123/**
1124   * Predicate returning <code>true</code> if this
1125   * object has a {@link ModelHistory} object attached to it.
1126   <p>
1127   * @return <code>true</code> if the {@link ModelHistory} of this object is set, 
1128   * <code>false</code> otherwise.
1129   <p>
1130   * @note In SBML Level&nbsp;2, model history annotations were only
1131   * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
1132   * permitted on all SBML components derived from {@link SBase}.
1133   */ public
1134 boolean isSetModelHistory() {
1135    return libsbmlJNI.SBase_isSetModelHistory(swigCPtr, this);
1136  }
1137
1138  
1139/** * @internal */ public
1140 int setId(String sid) {
1141    return libsbmlJNI.SBase_setId(swigCPtr, this, sid);
1142  }
1143
1144  
1145/** * @internal */ public
1146 int setName(String name) {
1147    return libsbmlJNI.SBase_setName(swigCPtr, this, name);
1148  }
1149
1150  
1151/**
1152   * Sets the value of the 'annotation' subelement of this SBML object.
1153   <p>
1154   * The content of <code>annotation</code> is copied, and any previous content of
1155   * this object's 'annotation' subelement is deleted.
1156   <p>
1157   * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1158   * shown directly to humans, the 'annotation' element is a container for
1159   * optional software-generated content <em>not</em> meant to be shown to
1160   * humans.  Every object derived from {@link SBase} can have its own value for
1161   * 'annotation'.  The element's content type is <a target='_blank'
1162   * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
1163   * 'any'</a>, allowing essentially arbitrary well-formed XML data
1164   * content.
1165   <p>
1166   * SBML places a few restrictions on the organization of the content of
1167   * annotations; these are intended to help software tools read and write
1168   * the data as well as help reduce conflicts between annotations added by
1169   * different tools.  Please see the SBML specifications for more details.
1170   <p>
1171   * Call this method will result in any existing content of the
1172   * 'annotation' subelement to be discarded.  Unless you have taken steps
1173   * to first copy and reconstitute any existing annotations into the 
1174   * <code>annotation</code> that is about to be assigned, it is likely that performing
1175   * such wholesale replacement is unfriendly towards other software
1176   * applications whose annotations are discarded.  An alternative may be
1177   * to use {@link SBase#appendAnnotation(XMLNode annotation)} or
1178   * {@link SBase#appendAnnotation(String annotation)}.
1179   <p>
1180   * @param annotation an XML structure that is to be used as the new content
1181   * of the 'annotation' subelement of this object
1182   <p>
1183   * <p>
1184 * @return integer value indicating success/failure of the
1185 * function.   The possible values
1186 * returned by this function are:
1187   * <ul>
1188   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1189   *
1190   * </ul> <p>
1191   * @see #getAnnotationString()
1192   * @see #isSetAnnotation()
1193   * @see #setAnnotation(String annotation)
1194   * @see #appendAnnotation(XMLNode annotation)
1195   * @see #appendAnnotation(String annotation)
1196   * @see #unsetAnnotation()
1197   */ public
1198 int setAnnotation(XMLNode annotation) {
1199    return libsbmlJNI.SBase_setAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
1200  }
1201
1202  
1203/**
1204   * Sets the value of the 'annotation' subelement of this SBML object.
1205   <p>
1206   * The content of <code>annotation</code> is copied, and any previous content of
1207   * this object's 'annotation' subelement is deleted.
1208   <p>
1209   * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1210   * shown directly to humans, the 'annotation' element is a container for
1211   * optional software-generated content <em>not</em> meant to be shown to
1212   * humans.  Every object derived from {@link SBase} can have its own value for
1213   * 'annotation'.  The element's content type is <a target='_blank'
1214   * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
1215   * 'any'</a>, allowing essentially arbitrary well-formed XML data
1216   * content.
1217   <p>
1218   * SBML places a few restrictions on the organization of the content of
1219   * annotations; these are intended to help software tools read and write
1220   * the data as well as help reduce conflicts between annotations added by
1221   * different tools.  Please see the SBML specifications for more details.
1222   <p>
1223   * Call this method will result in any existing content of the
1224   * 'annotation' subelement to be discarded.  Unless you have taken steps
1225   * to first copy and reconstitute any existing annotations into the 
1226   * <code>annotation</code> that is about to be assigned, it is likely that performing
1227   * such wholesale replacement is unfriendly towards other software
1228   * applications whose annotations are discarded.  An alternative may be
1229   * to use {@link SBase#appendAnnotation(XMLNode annotation)} or
1230   * {@link SBase#appendAnnotation(String annotation)}.
1231   <p>
1232   * @param annotation an XML string that is to be used as the content
1233   * of the 'annotation' subelement of this object
1234   <p>
1235   * <p>
1236 * @return integer value indicating success/failure of the
1237 * function.   The possible values
1238 * returned by this function are:
1239   * <ul>
1240   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1241   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1242   *
1243   * </ul> <p>
1244   * @see #getAnnotationString()
1245   * @see #isSetAnnotation()
1246   * @see #setAnnotation(XMLNode annotation)
1247   * @see #appendAnnotation(XMLNode annotation)
1248   * @see #appendAnnotation(String annotation)
1249   * @see #unsetAnnotation()
1250   */ public
1251 int setAnnotation(String annotation) {
1252    return libsbmlJNI.SBase_setAnnotation__SWIG_1(swigCPtr, this, annotation);
1253  }
1254
1255  
1256/**
1257   * Appends the given <code>annotation</code> to the 'annotation' subelement of this
1258   * object.
1259   <p>
1260   * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1261   * shown directly to humans, the 'annotation' element is a container for
1262   * optional software-generated content <em>not</em> meant to be shown to
1263   * humans.  Every object derived from {@link SBase} can have its own value for
1264   * 'annotation'.  The element's content type is <a
1265   * target='_blank'
1266   * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type 'any'</a>,
1267   * allowing essentially arbitrary well-formed XML data content.
1268   <p>
1269   * SBML places a few restrictions on the organization of the content of
1270   * annotations; these are intended to help software tools read and write
1271   * the data as well as help reduce conflicts between annotations added by
1272   * different tools.  Please see the SBML specifications for more details.
1273   <p>
1274   * Unlike {@link SBase#setAnnotation(XMLNode annotation)} or
1275   * {@link SBase#setAnnotation(String annotation)}, this method
1276   * allows other annotations to be preserved when an application adds its
1277   * own data.
1278   <p>
1279   * @param annotation an XML structure that is to be copied and appended
1280   * to the content of the 'annotation' subelement of this object
1281   <p>
1282   * <p>
1283 * @return integer value indicating success/failure of the
1284 * function.   The possible values
1285 * returned by this function are:
1286   * <ul>
1287   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1288   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1289   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1290   * (if the parent element does not have the 'metaid' attribute set)
1291   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS}
1292   * (if the parent was already annotated with the annotation in question)
1293   *
1294   * </ul> <p>
1295   * @see #getAnnotationString()
1296   * @see #isSetAnnotation()
1297   * @see #setAnnotation(XMLNode annotation)
1298   * @see #setAnnotation(String annotation)
1299   * @see #appendAnnotation(String annotation)
1300   * @see #unsetAnnotation()
1301   */ public
1302 int appendAnnotation(XMLNode annotation) {
1303    return libsbmlJNI.SBase_appendAnnotation__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
1304  }
1305
1306  
1307/**
1308   * Appends the given <code>annotation</code> to the 'annotation' subelement of this
1309   * object.
1310   <p>
1311   * Whereas the {@link SBase} 'notes' subelement is a container for content to be
1312   * shown directly to humans, the 'annotation' element is a container for
1313   * optional software-generated content <em>not</em> meant to be shown to
1314   * humans.  Every object derived from {@link SBase} can have its own value for
1315   * 'annotation'.  The element's content type is <a
1316   * target='_blank'
1317   * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type 'any'</a>,
1318   * allowing essentially arbitrary well-formed XML data content.
1319   <p>
1320   * SBML places a few restrictions on the organization of the content of
1321   * annotations; these are intended to help software tools read and write
1322   * the data as well as help reduce conflicts between annotations added by
1323   * different tools.  Please see the SBML specifications for more details.
1324   <p>
1325   * Unlike {@link SBase#setAnnotation(XMLNode annotation)} or
1326   * {@link SBase#setAnnotation(String annotation)}, this method
1327   * allows other annotations to be preserved when an application adds its
1328   * own data.
1329   <p>
1330   * @param annotation an XML string that is to be copied and appended
1331   * to the content of the 'annotation' subelement of this object
1332   <p>
1333   * <p>
1334 * @return integer value indicating success/failure of the
1335 * function.   The possible values
1336 * returned by this function are:
1337   * <ul>
1338   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1339   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1340   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1341   * (if the parent element does not have the 'metaid' attribute set)
1342   * <li> {@link libsbmlConstants#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS}
1343   * (if the parent was already annotated with the annotation in question)
1344   *
1345   * </ul> <p>
1346   * @see #getAnnotationString()
1347   * @see #isSetAnnotation()
1348   * @see #setAnnotation(XMLNode annotation)
1349   * @see #setAnnotation(String annotation)
1350   * @see #appendAnnotation(XMLNode annotation)
1351   * @see #unsetAnnotation()
1352   */ public
1353 int appendAnnotation(String annotation) {
1354    return libsbmlJNI.SBase_appendAnnotation__SWIG_1(swigCPtr, this, annotation);
1355  }
1356
1357  
1358/**
1359   * Removes the top-level element within the 'annotation' subelement of this
1360   * SBML object with the given name and optional URI.
1361   <p>
1362   * SBML places a few restrictions on the organization of the content of
1363   * annotations; these are intended to help software tools read and write
1364   * the data as well as help reduce conflicts between annotations added by
1365   * different tools.  Please see the SBML specifications for more details.
1366   <p>
1367   * Calling this method allows a particular annotation element to be removed
1368   * whilst the remaining annotations remain intact.
1369   <p>
1370   * @param elementName a string representing the name of the top level
1371   * annotation element that is to be removed
1372   * @param elementURI an optional string that is used to check both the name
1373   * and URI of the top level element to be removed
1374   * @param removeEmpty if after removing of the element, the annotation is 
1375   * empty, and the removeEmpty argument is true, the annotation node will be 
1376   * deleted (default). 
1377   <p>
1378   * <p>
1379 * @return integer value indicating success/failure of the
1380 * function.   The possible values
1381 * returned by this function are:
1382   * <ul>
1383   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1384   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1385   * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND}
1386   * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND}
1387   *
1388   * </ul> <p>
1389   * @see #replaceTopLevelAnnotationElement(XMLNode )
1390   * @see #replaceTopLevelAnnotationElement(String)
1391   */ public
1392 int removeTopLevelAnnotationElement(String elementName, String elementURI, boolean removeEmpty) {
1393    return libsbmlJNI.SBase_removeTopLevelAnnotationElement__SWIG_0(swigCPtr, this, elementName, elementURI, removeEmpty);
1394  }
1395
1396  
1397/**
1398   * Removes the top-level element within the 'annotation' subelement of this
1399   * SBML object with the given name and optional URI.
1400   <p>
1401   * SBML places a few restrictions on the organization of the content of
1402   * annotations; these are intended to help software tools read and write
1403   * the data as well as help reduce conflicts between annotations added by
1404   * different tools.  Please see the SBML specifications for more details.
1405   <p>
1406   * Calling this method allows a particular annotation element to be removed
1407   * whilst the remaining annotations remain intact.
1408   <p>
1409   * @param elementName a string representing the name of the top level
1410   * annotation element that is to be removed
1411   * @param elementURI an optional string that is used to check both the name
1412   * and URI of the top level element to be removed
1413   * @param removeEmpty if after removing of the element, the annotation is 
1414   * empty, and the removeEmpty argument is true, the annotation node will be 
1415   * deleted (default). 
1416   <p>
1417   * <p>
1418 * @return integer value indicating success/failure of the
1419 * function.   The possible values
1420 * returned by this function are:
1421   * <ul>
1422   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1423   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1424   * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND}
1425   * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND}
1426   *
1427   * </ul> <p>
1428   * @see #replaceTopLevelAnnotationElement(XMLNode )
1429   * @see #replaceTopLevelAnnotationElement(String)
1430   */ public
1431 int removeTopLevelAnnotationElement(String elementName, String elementURI) {
1432    return libsbmlJNI.SBase_removeTopLevelAnnotationElement__SWIG_1(swigCPtr, this, elementName, elementURI);
1433  }
1434
1435  
1436/**
1437   * Removes the top-level element within the 'annotation' subelement of this
1438   * SBML object with the given name and optional URI.
1439   <p>
1440   * SBML places a few restrictions on the organization of the content of
1441   * annotations; these are intended to help software tools read and write
1442   * the data as well as help reduce conflicts between annotations added by
1443   * different tools.  Please see the SBML specifications for more details.
1444   <p>
1445   * Calling this method allows a particular annotation element to be removed
1446   * whilst the remaining annotations remain intact.
1447   <p>
1448   * @param elementName a string representing the name of the top level
1449   * annotation element that is to be removed
1450   * @param elementURI an optional string that is used to check both the name
1451   * and URI of the top level element to be removed
1452   * @param removeEmpty if after removing of the element, the annotation is 
1453   * empty, and the removeEmpty argument is true, the annotation node will be 
1454   * deleted (default). 
1455   <p>
1456   * <p>
1457 * @return integer value indicating success/failure of the
1458 * function.   The possible values
1459 * returned by this function are:
1460   * <ul>
1461   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1462   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1463   * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND}
1464   * <li> {@link libsbmlConstants#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND}
1465   *
1466   * </ul> <p>
1467   * @see #replaceTopLevelAnnotationElement(XMLNode )
1468   * @see #replaceTopLevelAnnotationElement(String)
1469   */ public
1470 int removeTopLevelAnnotationElement(String elementName) {
1471    return libsbmlJNI.SBase_removeTopLevelAnnotationElement__SWIG_2(swigCPtr, this, elementName);
1472  }
1473
1474  
1475/**
1476   * Replaces the given top-level element within the 'annotation' 
1477   * subelement of this SBML object and with the annotation element supplied.
1478   <p>
1479   * SBML places a few restrictions on the organization of the content of
1480   * annotations; these are intended to help software tools read and write
1481   * the data as well as help reduce conflicts between annotations added by
1482   * different tools.  Please see the SBML specifications for more details.
1483   <p>
1484   * This method determines the name of the element to be replaced from the
1485   * annotation argument. Functionally it is equivalent to calling <code>
1486   * removeTopLevelAnnotationElement(name)</code> followed by calling
1487   * <code>appendAnnotation(annotation_with_name)</code>, with the exception
1488   * that the placement of the annotation element remains the same.
1489   <p>
1490   * @param annotation {@link XMLNode} representing the replacement top level annotation 
1491   <p>
1492   * <p>
1493 * @return integer value indicating success/failure of the
1494 * function.   The possible values
1495 * returned by this function are:
1496   * <ul>
1497   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1498   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1499   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1500   *
1501   * </ul> <p>
1502   * @see #removeTopLevelAnnotationElement(String elementName, String elementURI, boolean removeEmpty)
1503   * @see #replaceTopLevelAnnotationElement(String)
1504   */ public
1505 int replaceTopLevelAnnotationElement(XMLNode annotation) {
1506    return libsbmlJNI.SBase_replaceTopLevelAnnotationElement__SWIG_0(swigCPtr, this, XMLNode.getCPtr(annotation), annotation);
1507  }
1508
1509  
1510/**
1511   * Replaces the given top-level element within the 'annotation' 
1512   * subelement of this SBML object and with the annotation element supplied.
1513   <p>
1514   * SBML places a few restrictions on the organization of the content of
1515   * annotations; these are intended to help software tools read and write
1516   * the data as well as help reduce conflicts between annotations added by
1517   * different tools.  Please see the SBML specifications for more details.
1518   <p>
1519   * This method determines the name of the element to be replaced from the
1520   * annotation argument. Functionally it is equivalent to calling <code>
1521   * removeTopLevelAnnotationElement(name)</code> followed by calling
1522   * <code>appendAnnotation(annotation_with_name)</code>, with the exception
1523   * that the placement of the annotation element remains the same.
1524   <p>
1525   * @param annotation string representing the replacement top level annotation 
1526   <p>
1527   * <p>
1528 * @return integer value indicating success/failure of the
1529 * function.   The possible values
1530 * returned by this function are:
1531   * <ul>
1532   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1533   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1534   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1535   *
1536   * </ul> <p>
1537   * @see #removeTopLevelAnnotationElement(String elementName, String elementURI)
1538   * @see #replaceTopLevelAnnotationElement(XMLNode)
1539   */ public
1540 int replaceTopLevelAnnotationElement(String annotation) {
1541    return libsbmlJNI.SBase_replaceTopLevelAnnotationElement__SWIG_1(swigCPtr, this, annotation);
1542  }
1543
1544  
1545/**
1546   * Sets the value of the 'notes' subelement of this SBML object.
1547   <p>
1548   * The content of <code>notes</code> is copied, and any existing content of this
1549   * object's 'notes' subelement is deleted.
1550   <p>
1551   * The optional SBML element named 'notes', present on every major SBML
1552   * component type, is intended as a place for storing optional
1553   * information intended to be seen by humans.  An example use of the
1554   * 'notes' element would be to contain formatted user comments about the
1555   * model element in which the 'notes' element is enclosed.  Every object
1556   * derived directly or indirectly from type {@link SBase} can have a separate
1557   * value for 'notes', allowing users considerable freedom when adding
1558   * comments to their models.
1559   <p>
1560   * The format of 'notes' elements must be <a target='_blank'
1561   * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
1562   * verify the formatting of 'notes' content, libSBML provides the static
1563   * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode xhtml)}; however,
1564   * readers are urged to consult the appropriate <a target='_blank'
1565   * href='http://sbml.org/Documents/Specifications'>SBML specification
1566   * document</a> for the Level and Version of their model for more
1567   * in-depth explanations.  The SBML Level&nbsp;2 and &nbsp;3
1568   * specifications have considerable detail about how 'notes' element
1569   * content must be structured.
1570   <p>
1571   * @param notes an XML structure that is to be used as the content of the
1572   * 'notes' subelement of this object
1573   <p>
1574   * <p>
1575 * @return integer value indicating success/failure of the
1576 * function.   The possible values
1577 * returned by this function are:
1578   * <ul>
1579   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1580   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1581   *
1582   * </ul> <p>
1583   * @see #getNotesString()
1584   * @see #isSetNotes()
1585   * @see #setNotes(String notes, boolean addXHTMLMarkup)
1586   * @see #appendNotes(XMLNode notes)
1587   * @see #appendNotes(String notes)
1588   * @see #unsetNotes()
1589   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
1590   */ public
1591 int setNotes(XMLNode notes) {
1592    return libsbmlJNI.SBase_setNotes__SWIG_0(swigCPtr, this, XMLNode.getCPtr(notes), notes);
1593  }
1594
1595  
1596/**
1597   * Sets the value of the 'notes' subelement of this SBML object to a copy
1598   * of the string <code>notes</code>.
1599   <p>
1600   * The content of <code>notes</code> is copied, and any existing content of this
1601   * object's 'notes' subelement is deleted.
1602   <p>
1603   * The optional SBML element named 'notes', present on every major SBML
1604   * component type, is intended as a place for storing optional
1605   * information intended to be seen by humans.  An example use of the
1606   * 'notes' element would be to contain formatted user comments about the
1607   * model element in which the 'notes' element is enclosed.  Every object
1608   * derived directly or indirectly from type {@link SBase} can have a separate
1609   * value for 'notes', allowing users considerable freedom when adding
1610   * comments to their models.
1611   <p>
1612   * The format of 'notes' elements must be <a target='_blank'
1613   * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
1614   * verify the formatting of 'notes' content, libSBML provides the static
1615   * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
1616   * readers are urged to consult the appropriate <a target='_blank'
1617   * href='http://sbml.org/Documents/Specifications'>SBML specification
1618   * document</a> for the Level and Version of their model for more
1619   * in-depth explanations.  The SBML Level&nbsp;2 and &nbsp;3
1620   * specifications have considerable detail about how 'notes' element
1621   * content must be structured.
1622   <p>
1623   * The following code illustrates a very simple way of setting the notes
1624   * using this method.  Here, the object being annotated is the whole SBML
1625   * document, but that is for illustration purposes only; you could of
1626   * course use this same approach to annotate any other SBML component.
1627   <p>
1628<pre class='fragment'>
1629{@link SBMLDocument} s = new {@link SBMLDocument}(3, 1);
1630s.setNotes('&lt;body xmlns='http://www.w3.org/1999/xhtml'&gt;here is my note&lt;/p&gt;&lt;/body&gt;');
1631</pre>
1632<p>
1633   * @param notes an XML string that is to be used as the content of the
1634   * 'notes' subelement of this object
1635   <p>
1636   * @param addXHTMLMarkup a boolean indicating whether to wrap the contents
1637   * of the <code>notes</code> argument with XHTML paragraph (<code>&lt;p&gt;</code>)
1638   * tags.  This is appropriate when the string in <code>notes</code> does not already
1639   * containg the appropriate XHTML markup.
1640   <p>
1641   * <p>
1642 * @return integer value indicating success/failure of the
1643 * function.   The possible values
1644 * returned by this function are:
1645   * <ul>
1646   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1647   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1648   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1649   *
1650   * </ul> <p>
1651   * @see #getNotesString()
1652   * @see #isSetNotes()
1653   * @see #setNotes(XMLNode notes)
1654   * @see #appendNotes(XMLNode notes)
1655   * @see #appendNotes(String notes)
1656   * @see #unsetNotes()
1657   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
1658   */ public
1659 int setNotes(String notes, boolean addXHTMLMarkup) {
1660    return libsbmlJNI.SBase_setNotes__SWIG_1(swigCPtr, this, notes, addXHTMLMarkup);
1661  }
1662
1663  
1664/**
1665   * Sets the value of the 'notes' subelement of this SBML object to a copy
1666   * of the string <code>notes</code>.
1667   <p>
1668   * The content of <code>notes</code> is copied, and any existing content of this
1669   * object's 'notes' subelement is deleted.
1670   <p>
1671   * The optional SBML element named 'notes', present on every major SBML
1672   * component type, is intended as a place for storing optional
1673   * information intended to be seen by humans.  An example use of the
1674   * 'notes' element would be to contain formatted user comments about the
1675   * model element in which the 'notes' element is enclosed.  Every object
1676   * derived directly or indirectly from type {@link SBase} can have a separate
1677   * value for 'notes', allowing users considerable freedom when adding
1678   * comments to their models.
1679   <p>
1680   * The format of 'notes' elements must be <a target='_blank'
1681   * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
1682   * verify the formatting of 'notes' content, libSBML provides the static
1683   * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
1684   * readers are urged to consult the appropriate <a target='_blank'
1685   * href='http://sbml.org/Documents/Specifications'>SBML specification
1686   * document</a> for the Level and Version of their model for more
1687   * in-depth explanations.  The SBML Level&nbsp;2 and &nbsp;3
1688   * specifications have considerable detail about how 'notes' element
1689   * content must be structured.
1690   <p>
1691   * The following code illustrates a very simple way of setting the notes
1692   * using this method.  Here, the object being annotated is the whole SBML
1693   * document, but that is for illustration purposes only; you could of
1694   * course use this same approach to annotate any other SBML component.
1695   <p>
1696<pre class='fragment'>
1697{@link SBMLDocument} s = new {@link SBMLDocument}(3, 1);
1698s.setNotes('&lt;body xmlns='http://www.w3.org/1999/xhtml'&gt;here is my note&lt;/p&gt;&lt;/body&gt;');
1699</pre>
1700<p>
1701   * @param notes an XML string that is to be used as the content of the
1702   * 'notes' subelement of this object
1703   <p>
1704   * @param addXHTMLMarkup a boolean indicating whether to wrap the contents
1705   * of the <code>notes</code> argument with XHTML paragraph (<code>&lt;p&gt;</code>)
1706   * tags.  This is appropriate when the string in <code>notes</code> does not already
1707   * containg the appropriate XHTML markup.
1708   <p>
1709   * <p>
1710 * @return integer value indicating success/failure of the
1711 * function.   The possible values
1712 * returned by this function are:
1713   * <ul>
1714   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1715   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1716   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1717   *
1718   * </ul> <p>
1719   * @see #getNotesString()
1720   * @see #isSetNotes()
1721   * @see #setNotes(XMLNode notes)
1722   * @see #appendNotes(XMLNode notes)
1723   * @see #appendNotes(String notes)
1724   * @see #unsetNotes()
1725   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
1726   */ public
1727 int setNotes(String notes) {
1728    return libsbmlJNI.SBase_setNotes__SWIG_2(swigCPtr, this, notes);
1729  }
1730
1731  
1732/**
1733   * Appends the given <code>notes</code> to the 'notes' subelement of this object.
1734   <p>
1735   * The content of <code>notes</code> is copied.
1736   <p>
1737   * The optional SBML element named 'notes', present on every major SBML
1738   * component type, is intended as a place for storing optional
1739   * information intended to be seen by humans.  An example use of the
1740   * 'notes' element would be to contain formatted user comments about the
1741   * model element in which the 'notes' element is enclosed.  Every object
1742   * derived directly or indirectly from type {@link SBase} can have a separate
1743   * value for 'notes', allowing users considerable freedom when adding
1744   * comments to their models.
1745   <p>
1746   * The format of 'notes' elements must be <a target='_blank'
1747   * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
1748   * verify the formatting of 'notes' content, libSBML provides the static
1749   * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
1750   * readers are urged to consult the appropriate <a target='_blank'
1751   * href='http://sbml.org/Documents/Specifications'>SBML specification
1752   * document</a> for the Level and Version of their model for more
1753   * in-depth explanations.  The SBML Level&nbsp;2 and &nbsp;3
1754   * specifications have considerable detail about how 'notes' element
1755   * content must be structured.
1756   <p>
1757   * @param notes an XML node structure that is to appended to the content
1758   * of the 'notes' subelement of this object
1759   <p>
1760   * <p>
1761 * @return integer value indicating success/failure of the
1762 * function.   The possible values
1763 * returned by this function are:
1764   * <ul>
1765   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1766   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1767   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1768   *
1769   * </ul> <p>
1770   * @see #getNotesString()
1771   * @see #isSetNotes()
1772   * @see #setNotes(XMLNode notes)
1773   * @see #setNotes(String notes, boolean addXHTMLMarkup)
1774   * @see #appendNotes(String notes)
1775   * @see #unsetNotes()
1776   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
1777   */ public
1778 int appendNotes(XMLNode notes) {
1779    return libsbmlJNI.SBase_appendNotes__SWIG_0(swigCPtr, this, XMLNode.getCPtr(notes), notes);
1780  }
1781
1782  
1783/**
1784   * Appends the given <code>notes</code> to the 'notes' subelement of this object.
1785   <p>
1786   * The content of the parameter <code>notes</code> is copied.
1787   <p>
1788   * The optional SBML element named 'notes', present on every major SBML
1789   * component type, is intended as a place for storing optional
1790   * information intended to be seen by humans.  An example use of the
1791   * 'notes' element would be to contain formatted user comments about the
1792   * model element in which the 'notes' element is enclosed.  Every object
1793   * derived directly or indirectly from type {@link SBase} can have a separate
1794   * value for 'notes', allowing users considerable freedom when adding
1795   * comments to their models.
1796   <p>
1797   * The format of 'notes' elements must be <a target='_blank'
1798   * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
1799   * verify the formatting of 'notes' content, libSBML provides the static
1800   * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
1801   * readers are urged to consult the appropriate <a target='_blank'
1802   * href='http://sbml.org/Documents/Specifications'>SBML specification
1803   * document</a> for the Level and Version of their model for more
1804   * in-depth explanations.  The SBML Level&nbsp;2 and &nbsp;3
1805   * specifications have considerable detail about how 'notes' element
1806   * content must be structured.
1807   <p>
1808   * @param notes an XML string that is to appended to the content of
1809   * the 'notes' subelement of this object
1810   <p>
1811   * <p>
1812 * @return integer value indicating success/failure of the
1813 * function.   The possible values
1814 * returned by this function are:
1815   * <ul>
1816   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1817   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1818   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
1819   *
1820   * </ul> <p>
1821   * @see #getNotesString()
1822   * @see #isSetNotes()
1823   * @see #setNotes(XMLNode notes)
1824   * @see #setNotes(String notes, boolean addXHTMLMarkup)
1825   * @see #appendNotes(XMLNode notes)
1826   * @see #unsetNotes()
1827   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
1828   */ public
1829 int appendNotes(String notes) {
1830    return libsbmlJNI.SBase_appendNotes__SWIG_1(swigCPtr, this, notes);
1831  }
1832
1833  
1834/**
1835   * Sets the {@link ModelHistory} of this object.
1836   <p>
1837   * The content of <code>history</code> is copied, and this object's existing model
1838   * history content is deleted.
1839   <p>
1840   * @param history {@link ModelHistory} of this object.
1841   <p>
1842   * <p>
1843 * @return integer value indicating success/failure of the
1844 * function.   The possible values
1845 * returned by this function are:
1846   * <ul>
1847   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1848   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1849   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
1850   *
1851   * </ul> <p>
1852   * @note In SBML Level&nbsp;2, model history annotations were only
1853   * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
1854   * permitted on all SBML components derived from {@link SBase}.
1855   */ public
1856 int setModelHistory(ModelHistory history) {
1857    return libsbmlJNI.SBase_setModelHistory(swigCPtr, this, ModelHistory.getCPtr(history), history);
1858  }
1859
1860  
1861/** * @internal */ public
1862 void connectToParent(SBase parent) {
1863    libsbmlJNI.SBase_connectToParent(swigCPtr, this, SBase.getCPtr(parent), parent);
1864  }
1865
1866  public void connectToChild() {
1867    libsbmlJNI.SBase_connectToChild(swigCPtr, this);
1868  }
1869
1870  
1871/**
1872   * Sets the value of the 'sboTerm' attribute.
1873   <p>
1874   * Beginning with SBML Level 2 Version 3, objects derived from {@link SBase} have
1875   * an optional attribute named 'sboTerm' for supporting the use of the
1876   * Systems Biology Ontology.  In SBML proper, the data type of the
1877   * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
1878   * seven digit integer number; libSBML simplifies the representation by
1879   * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
1880   * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
1881   * are stored simply as integers. 
1882   <p>
1883   * {@link SBO} terms are a type of optional annotation, and each different class
1884   * of SBML object derived from {@link SBase} imposes its own requirements about
1885   * the values permitted for 'sboTerm'.  Please consult the SBML
1886   * Level&nbsp;2 Version&nbsp;4 specification for more information about
1887   * the use of {@link SBO} and the 'sboTerm' attribute.
1888   <p>
1889   * @param value the NNNNNNN integer portion of the {@link SBO} identifier
1890   <p>
1891   * <p>
1892 * @return integer value indicating success/failure of the
1893 * function.   The possible values
1894 * returned by this function are:
1895   * <ul>
1896   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1897   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1898   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1899   *
1900   * </ul> <p>
1901   * @see #setSBOTerm(String)
1902   */ public
1903 int setSBOTerm(int value) {
1904    return libsbmlJNI.SBase_setSBOTerm__SWIG_0(swigCPtr, this, value);
1905  }
1906
1907  
1908/**
1909   * Sets the value of the 'sboTerm' attribute by string.
1910   <p>
1911   * Beginning with SBML Level 2 Version 3, objects derived from {@link SBase} have
1912   * an optional attribute named 'sboTerm' for supporting the use of the
1913   * Systems Biology Ontology.  In SBML proper, the data type of the
1914   * attribute is a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a
1915   * seven digit integer number; libSBML simplifies the representation by
1916   * only storing the 'NNNNNNN' integer portion.  Thus, in libSBML, the
1917   * 'sboTerm' attribute on {@link SBase} has data type <code>int</code>, and {@link SBO} identifiers
1918   * are stored simply as integers.  This method lets you set the value of
1919   * 'sboTerm' as a complete string of the form 'SBO:NNNNNNN', whereas
1920   * setSBOTerm(int value) allows you to set it using the integer form.
1921   <p>
1922   * {@link SBO} terms are a type of optional annotation, and each different class
1923   * of SBML object derived from {@link SBase} imposes its own requirements about
1924   * the values permitted for 'sboTerm'.  Please consult the SBML
1925   * Level&nbsp;2 Version&nbsp;4 specification for more information about
1926   * the use of {@link SBO} and the 'sboTerm' attribute.
1927   <p>
1928   * @param sboid the {@link SBO} identifier string of the form 'SBO:NNNNNNN'
1929   <p>
1930   * <p>
1931 * @return integer value indicating success/failure of the
1932 * function.   The possible values
1933 * returned by this function are:
1934   * <ul>
1935   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1936   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
1937   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
1938   *
1939   * </ul> <p>
1940   * @see #setSBOTerm(int value)
1941   */ public
1942 int setSBOTerm(String sboid) {
1943    return libsbmlJNI.SBase_setSBOTerm__SWIG_1(swigCPtr, this, sboid);
1944  }
1945
1946  
1947/**
1948   * Sets the namespaces relevant of this SBML object.
1949   <p>
1950   * The content of <code>xmlns</code> is copied, and this object's existing
1951   * namespace content is deleted.
1952   <p>
1953   * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
1954   * information.  It is used to communicate the SBML Level, Version, and
1955   * (in Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.
1956   <p>
1957   * @param xmlns the namespaces to set
1958   <p>
1959   * <p>
1960 * @return integer value indicating success/failure of the
1961 * function.   The possible values
1962 * returned by this function are:
1963   * <ul>
1964   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
1965   * </ul>
1966   */ public
1967 int setNamespaces(XMLNamespaces xmlns) {
1968    return libsbmlJNI.SBase_setNamespaces(swigCPtr, this, XMLNamespaces.getCPtr(xmlns), xmlns);
1969  }
1970
1971  
1972/**
1973   * Unsets the value of the 'metaid' attribute of this SBML object.
1974   <p>
1975   * <p>
1976 * The optional attribute named 'metaid', present on every major SBML
1977 * component type, is for supporting metadata annotations using RDF (<a
1978 * href='http://www.w3.org/RDF/'>Resource Description Format</a>).  The
1979 * attribute value has the data type <a
1980 * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a>, the XML
1981 * identifier type, which means each 'metaid' value must be globally unique
1982 * within an SBML file.  The latter point is important, because the
1983 * uniqueness criterion applies across <em>any</em> attribute with type
1984 * <code>ID</code> anywhere in the file, not just the 'metaid' attribute used
1985 * by SBML&mdash;something to be aware of if your application-specific XML
1986 * content inside the 'annotation' subelement happens to use the XML
1987 * <code>ID</code> type.  Although SBML itself specifies the use of <a
1988 * href='http://www.w3.org/TR/REC-xml/#id'>XML <code>ID</code></a> only for
1989 * the 'metaid' attribute, SBML-compatible applications should be careful if
1990 * they use XML <code>ID</code>'s in XML portions of a model that are not
1991 * defined by SBML, such as in the application-specific content of the
1992 * 'annotation' subelement.  Finally, note that LibSBML does not provide an
1993 * explicit XML <code>ID</code> data type; it uses ordinary character
1994 * strings, which is easier for applications to support. 
1995   <p>
1996   * <p>
1997 * @return integer value indicating success/failure of the
1998 * function.   The possible values
1999 * returned by this function are:
2000   * <ul>
2001   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2002   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2003   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2004   * </ul>
2005   */ public
2006 int unsetMetaId() {
2007    return libsbmlJNI.SBase_unsetMetaId(swigCPtr, this);
2008  }
2009
2010  
2011/**
2012   * Unsets the value of the 'id' attribute of this SBML object.
2013   <p>
2014   * Most (but not all) objects in SBML include two common attributes: 'id'
2015   * and 'name'.  The identifier given by an object's 'id' attribute value
2016   * is used to identify the object within the SBML model definition.
2017   * Other objects can refer to the component using this identifier.
2018   <p>
2019   * <p>
2020 * @return integer value indicating success/failure of the
2021 * function.   The possible values
2022 * returned by this function are:
2023   * <ul>
2024   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2025   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2026   * </ul>
2027   */ public
2028 int unsetId() {
2029    return libsbmlJNI.SBase_unsetId(swigCPtr, this);
2030  }
2031
2032  
2033/**
2034   * Unsets the value of the 'name' attribute of this SBML object.
2035   <p>
2036   * Most (but not all) objects in SBML include two common attributes: 'id'
2037   * and 'name'.  In contrast to the 'id' attribute, the 'name' attribute is
2038   * optional and is not intended to be used for cross-referencing purposes
2039   * within a model.  Its purpose instead is to provide a human-readable
2040   * label for the component.  The data type of 'name' is the type
2041   * <code>string</code> defined in XML Schema.  SBML imposes no
2042   * restrictions as to the content of 'name' attributes beyond those
2043   * restrictions defined by the <code>string</code> type in XML Schema.
2044   <p>
2045   * The recommended practice for handling 'name' is as follows.  If a
2046   * software tool has the capability for displaying the content of 'name'
2047   * attributes, it should display this content to the user as a
2048   * component's label instead of the component's 'id'.  If the user
2049   * interface does not have this capability (e.g., because it cannot
2050   * display or use special characters in symbol names), or if the 'name'
2051   * attribute is missing on a given component, then the user interface
2052   * should display the value of the 'id' attribute instead.  (Script
2053   * language interpreters are especially likely to display 'id' instead of
2054   * 'name'.)
2055   <p>
2056   * As a consequence of the above, authors of systems that automatically
2057   * generate the values of 'id' attributes should be aware some systems
2058   * may display the 'id''s to the user.  Authors therefore may wish to
2059   * take some care to have their software create 'id' values that are: (a)
2060   * reasonably easy for humans to type and read; and (b) likely to be
2061   * meaningful, for example by making the 'id' attribute be an abbreviated
2062   * form of the name attribute value.
2063   <p>
2064   * An additional point worth mentioning is although there are
2065   * restrictions on the uniqueness of 'id' values, there are no
2066   * restrictions on the uniqueness of 'name' values in a model.  This
2067   * allows software applications leeway in assigning component identifiers.
2068   <p>
2069   * <p>
2070 * @return integer value indicating success/failure of the
2071 * function.   The possible values
2072 * returned by this function are:
2073   * <ul>
2074   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2075   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2076   * </ul>
2077   */ public
2078 int unsetName() {
2079    return libsbmlJNI.SBase_unsetName(swigCPtr, this);
2080  }
2081
2082  
2083/**
2084   * Unsets the value of the 'notes' subelement of this SBML object.
2085   <p>
2086   * The optional SBML element named 'notes', present on every major SBML
2087   * component type, is intended as a place for storing optional
2088   * information intended to be seen by humans.  An example use of the
2089   * 'notes' element would be to contain formatted user comments about the
2090   * model element in which the 'notes' element is enclosed.  Every object
2091   * derived directly or indirectly from type {@link SBase} can have a separate
2092   * value for 'notes', allowing users considerable freedom when adding
2093   * comments to their models.
2094   <p>
2095   * The format of 'notes' elements must be <a target='_blank'
2096   * href='http://www.w3.org/TR/xhtml1/'>XHTML&nbsp;1.0</a>.  To help
2097   * verify the formatting of 'notes' content, libSBML provides the static
2098   * utility method {@link SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)}; however,
2099   * readers are urged to consult the appropriate <a target='_blank'
2100   * href='http://sbml.org/Documents/Specifications'>SBML specification
2101   * document</a> for the Level and Version of their model for more
2102   * in-depth explanations.  The SBML Level&nbsp;2 and &nbsp;3
2103   * specifications have considerable detail about how 'notes' element
2104   * content must be structured.
2105   <p>
2106   * <p>
2107 * @return integer value indicating success/failure of the
2108 * function.   The possible values
2109 * returned by this function are:
2110   * <ul>
2111   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2112   *
2113   * </ul> <p>
2114   * @see #getNotesString()
2115   * @see #isSetNotes()
2116   * @see #setNotes(XMLNode notes)
2117   * @see #setNotes(String notes, boolean addXHTMLMarkup)
2118   * @see #appendNotes(XMLNode notes)
2119   * @see #appendNotes(String notes)
2120   * @see SyntaxChecker#hasExpectedXHTMLSyntax(XMLNode)
2121   */ public
2122 int unsetNotes() {
2123    return libsbmlJNI.SBase_unsetNotes(swigCPtr, this);
2124  }
2125
2126  
2127/**
2128   * Unsets the value of the 'annotation' subelement of this SBML object.
2129   <p>
2130   * Whereas the {@link SBase} 'notes' subelement is a container for content to be
2131   * shown directly to humans, the 'annotation' element is a container for
2132   * optional software-generated content <em>not</em> meant to be shown to
2133   * humans.  Every object derived from {@link SBase} can have its own value for
2134   * 'annotation'.  The element's content type is <a target='_blank'
2135   * href='http://www.w3.org/TR/2004/REC-xml-20040204/#elemdecls'>XML type
2136   * 'any'</a>, allowing essentially arbitrary well-formed XML data
2137   * content.
2138   <p>
2139   * SBML places a few restrictions on the organization of the content of
2140   * annotations; these are intended to help software tools read and write
2141   * the data as well as help reduce conflicts between annotations added by
2142   * different tools.  Please see the SBML specifications for more details.
2143   <p>
2144   * <p>
2145 * @return integer value indicating success/failure of the
2146 * function.   The possible values
2147 * returned by this function are:
2148   * <ul>
2149   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2150   *
2151   * </ul> <p>
2152   * @see #getAnnotation()
2153   * @see #getAnnotationString()
2154   * @see #isSetAnnotation()
2155   * @see #setAnnotation(XMLNode annotation)
2156   * @see #setAnnotation(String annotation)
2157   * @see #appendAnnotation(XMLNode annotation)
2158   * @see #appendAnnotation(String annotation)
2159   */ public
2160 int unsetAnnotation() {
2161    return libsbmlJNI.SBase_unsetAnnotation(swigCPtr, this);
2162  }
2163
2164  
2165/**
2166   * Unsets the value of the 'sboTerm' attribute of this SBML object.
2167   <p>
2168   * <p>
2169 * @return integer value indicating success/failure of the
2170 * function.   The possible values
2171 * returned by this function are:
2172   * <ul>
2173   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2174   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2175   * </ul>
2176   */ public
2177 int unsetSBOTerm() {
2178    return libsbmlJNI.SBase_unsetSBOTerm(swigCPtr, this);
2179  }
2180
2181  
2182/**
2183   * Adds a copy of the given {@link CVTerm} object to this SBML object.
2184   <p>
2185   * @param term the {@link CVTerm} to assign.
2186   <p>
2187   * @param newBag if <code>true</code>, creates a new RDF bag with the same identifier
2188   * as a previous bag, and if <code>false</code>, adds the term to an existing
2189   * RDF bag with the same type of qualifier as the term being added.
2190   <p>
2191   * <p>
2192 * @return integer value indicating success/failure of the
2193 * function.   The possible values
2194 * returned by this function are:
2195   * <ul>
2196   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2197   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2198   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}, if
2199   * this object lacks a 'metaid' attribute
2200   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2201   *
2202   * </ul> <p>
2203   * @note Since the CV Term uses the 'metaid' attribute of the object as a
2204   * reference, if the object has no 'metaid' attribute value set, then the
2205   * {@link CVTerm} will not be added.
2206   <p>
2207   * <p>
2208 * @note This method should be used with some caution.  The fact that this
2209 * method <em>copies</em> the object passed to it means that the caller will be
2210 * left holding a physically different object instance than the one contained
2211 * inside this object.  Changes made to the original object instance (such as
2212 * resetting attribute values) will <em>not affect the instance in this
2213 * object</em>.  In addition, the caller should make sure to free the
2214 * original object if it is no longer being used, or else a memory leak will
2215 * result.  Please see other methods on this class (particularly a
2216 * corresponding method whose name begins with the word <code>create</code>)
2217 * for alternatives that do not lead to these issues.
2218   <p>
2219   * 
2220</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
2221The native C++ implementation of this method defines a default argument
2222value. In the documentation generated for different libSBML language
2223bindings, you may or may not see corresponding arguments in the method
2224declarations. For example, in Java and C#, a default argument is handled by
2225declaring two separate methods, with one of them having the argument and
2226the other one lacking the argument. However, the libSBML documentation will
2227be <em>identical</em> for both methods. Consequently, if you are reading
2228this and do not see an argument even though one is described, please look
2229for descriptions of other variants of this method near where this one
2230appears in the documentation.
2231</dd></dl>
2232 
2233   */ public
2234 int addCVTerm(CVTerm term, boolean newBag) {
2235    return libsbmlJNI.SBase_addCVTerm__SWIG_0(swigCPtr, this, CVTerm.getCPtr(term), term, newBag);
2236  }
2237
2238  
2239/**
2240   * Adds a copy of the given {@link CVTerm} object to this SBML object.
2241   <p>
2242   * @param term the {@link CVTerm} to assign.
2243   <p>
2244   * @param newBag if <code>true</code>, creates a new RDF bag with the same identifier
2245   * as a previous bag, and if <code>false</code>, adds the term to an existing
2246   * RDF bag with the same type of qualifier as the term being added.
2247   <p>
2248   * <p>
2249 * @return integer value indicating success/failure of the
2250 * function.   The possible values
2251 * returned by this function are:
2252   * <ul>
2253   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2254   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2255   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}, if
2256   * this object lacks a 'metaid' attribute
2257   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
2258   *
2259   * </ul> <p>
2260   * @note Since the CV Term uses the 'metaid' attribute of the object as a
2261   * reference, if the object has no 'metaid' attribute value set, then the
2262   * {@link CVTerm} will not be added.
2263   <p>
2264   * <p>
2265 * @note This method should be used with some caution.  The fact that this
2266 * method <em>copies</em> the object passed to it means that the caller will be
2267 * left holding a physically different object instance than the one contained
2268 * inside this object.  Changes made to the original object instance (such as
2269 * resetting attribute values) will <em>not affect the instance in this
2270 * object</em>.  In addition, the caller should make sure to free the
2271 * original object if it is no longer being used, or else a memory leak will
2272 * result.  Please see other methods on this class (particularly a
2273 * corresponding method whose name begins with the word <code>create</code>)
2274 * for alternatives that do not lead to these issues.
2275   <p>
2276   * 
2277</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
2278The native C++ implementation of this method defines a default argument
2279value. In the documentation generated for different libSBML language
2280bindings, you may or may not see corresponding arguments in the method
2281declarations. For example, in Java and C#, a default argument is handled by
2282declaring two separate methods, with one of them having the argument and
2283the other one lacking the argument. However, the libSBML documentation will
2284be <em>identical</em> for both methods. Consequently, if you are reading
2285this and do not see an argument even though one is described, please look
2286for descriptions of other variants of this method near where this one
2287appears in the documentation.
2288</dd></dl>
2289 
2290   */ public
2291 int addCVTerm(CVTerm term) {
2292    return libsbmlJNI.SBase_addCVTerm__SWIG_1(swigCPtr, this, CVTerm.getCPtr(term), term);
2293  }
2294
2295  
2296/**
2297   * Returns a list of {@link CVTerm} objects in the annotations of this SBML
2298   * object.
2299   <p>
2300   * @return the list of CVTerms for this SBML object.
2301   */ public
2302  CVTermList  getCVTerms() { 
2303  long cPtr = libsbmlJNI.SBase_getCVTerms__SWIG_0(swigCPtr, this);
2304  return (cPtr == 0) ? null : new  CVTermList(cPtr, true);
2305}
2306
2307  
2308/**
2309   * Returns the number of {@link CVTerm} objects in the annotations of this SBML
2310   * object.
2311   <p>
2312   * @return the number of CVTerms for this SBML object.
2313   */ public
2314 long getNumCVTerms() {
2315    return libsbmlJNI.SBase_getNumCVTerms(swigCPtr, this);
2316  }
2317
2318  
2319/**
2320   * Returns the nth {@link CVTerm} in the list of CVTerms of this SBML
2321   * object.
2322   <p>
2323   * @param n long the index of the {@link CVTerm} to retrieve
2324   <p>
2325   * @return the nth {@link CVTerm} in the list of CVTerms for this SBML object.
2326   */ public
2327 CVTerm getCVTerm(long n) {
2328    long cPtr = libsbmlJNI.SBase_getCVTerm(swigCPtr, this, n);
2329    return (cPtr == 0) ? null : new CVTerm(cPtr, false);
2330  }
2331
2332  
2333/**
2334   * Clears the list of {@link CVTerm} objects attached to this SBML object.
2335   <p>
2336   * <p>
2337 * @return integer value indicating success/failure of the
2338 * function.   The possible values
2339 * returned by this function are:
2340   * <ul>
2341   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2342   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2343   * </ul>
2344   */ public
2345 int unsetCVTerms() {
2346    return libsbmlJNI.SBase_unsetCVTerms(swigCPtr, this);
2347  }
2348
2349  
2350/**
2351   * Unsets the {@link ModelHistory} object attached to this object.
2352   <p>
2353   * <p>
2354 * @return integer value indicating success/failure of the
2355 * function.   The possible values
2356 * returned by this function are:
2357   * <ul>
2358   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2359   * <li> {@link libsbmlConstants#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE}
2360   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
2361   *
2362   * </ul> <p>
2363   * @note In SBML Level&nbsp;2, model history annotations were only
2364   * permitted on the {@link Model} element.  In SBML Level&nbsp;3, they are
2365   * permitted on all SBML components derived from {@link SBase}.
2366   */ public
2367 int unsetModelHistory() {
2368    return libsbmlJNI.SBase_unsetModelHistory(swigCPtr, this);
2369  }
2370
2371  
2372/**
2373   * Returns the MIRIAM <em>biological qualifier</em> associated with the
2374   * given resource.
2375   <p>
2376   * In <a target='_blank' href='http://biomodels.net/miriam'>MIRIAM</a>,
2377   * qualifiers are an optional means of indicating the relationship
2378   * between a model component and its annotations.  There are two broad
2379   * kinds of annotations: <em>model</em> and <em>biological</em>.  The
2380   * latter kind is used to qualify the relationship between a model
2381   * component and a biological entity which it represents.  Examples of
2382   * relationships include 'is' and 'has part', but many others are
2383   * possible.  MIRIAM defines <a target='_blank'
2384   * href='http://www.ebi.ac.uk/miriam/main/qualifiers/'>numerous
2385   * relationship qualifiers</a> to enable different software tools to
2386   * qualify biological annotations in the same standardized way.  In
2387   * libSBML, the MIRIAM controlled-vocabulary annotations on an SBML model
2388   * element are represented using lists of {@link CVTerm} objects, and the
2389   * the MIRIAM biological qualifiers are represented using
2390   * values whose
2391   * names begin with <code>BQB_</code> in the interface class
2392   * {@link libsbmlConstants}.
2393   <p>
2394   * This method searches the controlled-vocabulary annotations
2395   * (i.e., the list of {@link CVTerm} objects) on the present object, then out of
2396   * those that have biological qualifiers, looks for an annotation to the
2397   * given <code>resource</code>.  If such an annotation is found, it returns the
2398   * type of biological qualifier associated with that resource as a 
2399   * value whose name
2400   * begins with <code>BQB_</code> from the interface
2401   * class {@link libsbmlConstants}.
2402   <p>
2403   * @param resource string representing the resource; e.g.,
2404   * <code>'http://www.geneontology.org/#GO:0005892'</code>.
2405   <p>
2406   * @return the qualifier associated with the resource,
2407   * or {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN} if the
2408   * resource does not exist.
2409   <p>
2410   * @note The set of MIRIAM biological qualifiers grows over
2411   * time, although relatively slowly.  The values are up to date with
2412   * MIRIAM at the time of a given libSBML release.  The set of values in
2413   * list of <code>BQB_</code> constants defined in {@link libsbmlConstants}
2414   * may be expanded in later libSBML releases, to match
2415   * the values defined by MIRIAM at that later time.
2416   */ public
2417 int getResourceBiologicalQualifier(String resource) {
2418    return libsbmlJNI.SBase_getResourceBiologicalQualifier(swigCPtr, this, resource);
2419  }
2420
2421  
2422/**
2423   * Returns the MIRIAM <em>model qualifier</em> associated with the
2424   * given resource.
2425   <p>
2426   * In <a target='_blank' href='http://biomodels.net/miriam'>MIRIAM</a>,
2427   * qualifiers are an optional means of indicating the relationship
2428   * between a model component and its annotations.  There are two broad
2429   * kinds of annotations: <em>model</em> and <em>biological</em>.  The
2430   * former kind is used to qualify the relationship between a model
2431   * component and another modeling object.  An example qualifier is
2432   * 'isDerivedFrom', to indicate that a given component of the model is
2433   * derived from the modeling object represented by the referenced
2434   * resource.  MIRIAM defines <a target='_blank'
2435   * href='http://www.ebi.ac.uk/miriam/main/qualifiers/'>numerous
2436   * relationship qualifiers</a> to enable different software tools to
2437   * qualify model annotations in the same standardized way.  In libSBML,
2438   * the MIRIAM controlled-vocabulary annotations on an SBML model element
2439   * are represented using lists of {@link CVTerm} objects, and the 
2440   * the MIRIAM model qualifiers are represented using
2441   * values whose
2442   * names begin with <code>BQM_</code> in the interface class
2443   * {@link libsbmlConstants}.
2444   <p>
2445   * This method method searches the controlled-vocabulary annotations
2446   * (i.e., the list of {@link CVTerm} objects) on the present object, then out of
2447   * those that have model qualifiers, looks for an annotation to the given
2448   * <code>resource</code>.  If such an annotation is found, it returns the type of
2449   * type of model qualifier associated with that resource as a 
2450   * value whose name
2451   * begins with <code>BQM_</code> from the interface
2452   * class {@link libsbmlConstants}.
2453   <p>
2454   * @param resource string representing the resource; e.g.,
2455   * <code>'http://www.geneontology.org/#GO:0005892'</code>.
2456   <p>
2457   * @return the model qualifier
2458   * type associated with the resource, or {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN} if the resource does not exist.
2459   <p>
2460   * @note The set of MIRIAM model qualifiers grows over
2461   * time, although relatively slowly.  The values are up to date with
2462   * MIRIAM at the time of a given libSBML release.  The set of values in
2463   * list of <code>BQM_</code> constants defined in {@link libsbmlConstants}
2464   * may be expanded in later libSBML releases, to match
2465   * the values defined by MIRIAM at that later time.
2466   */ public
2467 int getResourceModelQualifier(String resource) {
2468    return libsbmlJNI.SBase_getResourceModelQualifier(swigCPtr, this, resource);
2469  }
2470
2471  
2472/**
2473   * Returns the {@link Model} object for the SBML Document in which the current object is located.
2474   <p>
2475   * @return the {@link Model} object for the SBML Document of this SBML object.
2476   <p>
2477   * @see #getParentSBMLObject()
2478   * @see #getSBMLDocument()
2479   */ public
2480 Model getModel() {
2481    long cPtr = libsbmlJNI.SBase_getModel(swigCPtr, this);
2482    return (cPtr == 0) ? null : new Model(cPtr, false);
2483  }
2484
2485  
2486/**
2487   * Returns the SBML Level of the {@link SBMLDocument} object containing <em>this</em>
2488   * object.
2489   <p>
2490   * <p>
2491 * LibSBML uses the class {@link SBMLDocument} as a top-level container for
2492 * storing SBML content and data associated with it (such as warnings and
2493 * error messages).  An SBML model in libSBML is contained inside an
2494 * {@link SBMLDocument} object.  {@link SBMLDocument} corresponds roughly to the class
2495 * <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
2496 * specifications, but it does not have a direct correspondence in SBML
2497 * Level&nbsp;1.  (But, it is created by libSBML no matter whether the
2498 * model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
2499   <p>
2500   * @return the SBML level of this SBML object.
2501   <p>
2502   * @see #getVersion()
2503   * @see #getNamespaces()
2504   * @see #getPackageVersion()
2505   */ public
2506 long getLevel() {
2507    return libsbmlJNI.SBase_getLevel(swigCPtr, this);
2508  }
2509
2510  
2511/**
2512   * Returns the Version within the SBML Level of the {@link SBMLDocument} object
2513   * containing <em>this</em> object.
2514   <p>
2515   * <p>
2516 * LibSBML uses the class {@link SBMLDocument} as a top-level container for
2517 * storing SBML content and data associated with it (such as warnings and
2518 * error messages).  An SBML model in libSBML is contained inside an
2519 * {@link SBMLDocument} object.  {@link SBMLDocument} corresponds roughly to the class
2520 * <i>SBML</i> defined in the SBML Level&nbsp;3 and Level&nbsp;2
2521 * specifications, but it does not have a direct correspondence in SBML
2522 * Level&nbsp;1.  (But, it is created by libSBML no matter whether the
2523 * model is Level&nbsp;1, Level&nbsp;2 or Level&nbsp;3.)
2524   <p>
2525   * @return the SBML version of this SBML object.
2526   <p>
2527   * @see #getLevel()
2528   * @see #getNamespaces()
2529   */ public
2530 long getVersion() {
2531    return libsbmlJNI.SBase_getVersion(swigCPtr, this);
2532  }
2533
2534  
2535/**
2536   * Returns the Version of the SBML Level&nbsp;3 package to which this
2537   * element belongs to.
2538   <p>
2539   * @return the version of the SBML Level&nbsp;3 package to which this
2540   * element belongs. The value <code>0</code> will be returned if this element
2541   * belongs to the SBML Level&nbsp;3 Core package.
2542   <p>
2543   * @see #getLevel()
2544   * @see #getVersion()
2545   */ public
2546 long getPackageVersion() {
2547    return libsbmlJNI.SBase_getPackageVersion(swigCPtr, this);
2548  }
2549
2550  
2551/**
2552   * Returns the name of the SBML Level&nbsp;3 package in which this element
2553   * is defined.
2554   <p>
2555   * @return the name of the SBML package in which this element is defined.
2556   * The string <code>&quot;core&quot;</code> will be returned if this
2557   * element is defined in SBML Level&nbsp;3 Core. The string
2558   * <code>&quot;unknown&quot;</code> will be returned if this element is
2559   * not defined in any SBML package.
2560   */ public
2561 String getPackageName() {
2562    return libsbmlJNI.SBase_getPackageName(swigCPtr, this);
2563  }
2564
2565  
2566/**
2567   * Returns the libSBML type code for this object.
2568   <p>
2569   * <p>
2570 * LibSBML attaches an identifying code to every kind of SBML object.  These
2571 * are integer constants known as <em>SBML type codes</em>.  The names of all
2572 * the codes begin with the characters <code>SBML_</code>.
2573 * In the Java language interface for libSBML, the
2574 * type codes are defined as static integer constants in the interface class
2575 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
2576 * package plug-ins may use overlapping type codes; to identify the package
2577 * to which a given object belongs, call the <code>getPackageName()</code>
2578 * method on the object.
2579   <p>
2580   * <p>
2581 * Here follow some additional general information about libSBML type codes:
2582 <p>
2583 * <ul>
2584 * <li> The codes are the possible return values (integers) for the following
2585 * functions:
2586 * <ul>
2587 *     <li> {@link SBase#getTypeCode()}
2588 *     <li> {@link ListOf#getItemTypeCode()}
2589 * </ul>
2590 * (Compatibility note: in libSBML 5, the type of return values of these
2591 * functions changed from an enumeration to an integer for extensibility
2592 * in the face of different programming languages.)
2593 <p>
2594 * <li> Each package extension must define similar sets of values for each
2595 * {@link SBase} subclass (e.g. <code>SBMLLayoutTypeCode_t</code> for the SBML Level&nbsp;3
2596 * Layout extension, <code>SBMLFbcTypeCode_t</code> for the SBML Level&nbsp;3 Flux
2597 * Balance Constraints extension, etc.).
2598 <p>
2599 * <li> The value of each package-specific type code can be duplicated between
2600 * those of different packages.  (This is necessary because the development
2601 * of libSBML extensions for different SBML packages may be undertaken by
2602 * different developers at different times; requiring the developers to
2603 * coordinate their use of type codes would be nettlesome and probably
2604 * doomed to failure.)
2605 <p>
2606 * <li> To distinguish between the type codes of different packages, both the
2607 * return value of {@link SBase#getTypeCode()} and {@link SBase#getPackageName()} must be
2608 * checked.  This is particularly important for functions that take an SBML
2609 * type code as an argument, such as
2610 * {@link SBase#getAncestorOfType(int, String)}, which by
2611 * default assumes you are handing it a core type, and will return <code>null</code> if
2612 * the value you give it is actually from a package.
2613 *
2614 * </ul> <p>
2615 * The following example code illustrates the combined use of
2616 * {@link SBase#getPackageName()} and {@link SBase#getTypeCode()}:
2617 <p>
2618<pre class='fragment'>
2619void example (SBase sb)
2620{
2621  String pkgName = sb.getPackageName();
2622  if (pkgName.equals('core'))
2623  {
2624    switch (sb.getTypeCode())
2625    {
2626      case libsbml.SBML_MODEL:
2627         ....
2628         break;
2629      case libsbml.SBML_REACTION:
2630         ....
2631    }
2632  }
2633  else if (pkgName.equals('layout'))
2634  {
2635    switch (sb.getTypeCode())
2636    {
2637      case libsbml.SBML_LAYOUT_LAYOUT:
2638         ....
2639         break;
2640      case libsbml.SBML_LAYOUT_REACTIONGLYPH:
2641         ....
2642    }
2643  }
2644  ...
2645}
2646</pre>
2647   <p>
2648   * @return the SBML object type
2649   * code of this SBML object, or {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).  The latter is possible because
2650   * subclasses of {@link SBase} are not required to implement this method to return
2651   * a type code.
2652   <p>
2653   * <p>
2654 * @warning <span class='warning'>The specific integer values of the possible
2655 * type codes may be reused by different Level&nbsp;3 package plug-ins.
2656 * Thus, to identifiy the correct code, <strong>it is necessary to invoke
2657 * both getTypeCode() and getPackageName()</strong>.</span>
2658   <p>
2659   * @see #getPackageName()
2660   * @see #getElementName()
2661   */ public
2662 int getTypeCode() {
2663    return libsbmlJNI.SBase_getTypeCode(swigCPtr, this);
2664  }
2665
2666  
2667/**
2668   * Predicate returning <code>true</code> if this object's level/version and namespace
2669   * values correspond to a valid SBML specification.
2670   <p>
2671   * The valid combinations of SBML Level, Version and Namespace as of this
2672   * release of libSBML are the following:
2673   * <ul>
2674   * <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;
2675   * <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;
2676   * <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;
2677   * <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;
2678   * <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;
2679   * <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;
2680   * <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;
2681   * </ul>
2682   <p>
2683   * @return <code>true</code> if the level, version and namespace values of this 
2684   * SBML object correspond to a valid set of values, <code>false</code> otherwise.
2685   */ public
2686 boolean hasValidLevelVersionNamespaceCombination() {
2687    return libsbmlJNI.SBase_hasValidLevelVersionNamespaceCombination(swigCPtr, this);
2688  }
2689
2690  
2691/**
2692   * Returns the XML element name of this object.
2693   <p>
2694   * This is overridden by subclasses to return a string appropriate to the
2695   * SBML component.  For example, {@link Model} defines it as returning 
2696   * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
2697   * and so on.
2698   */ public
2699 String getElementName() {
2700    return libsbmlJNI.SBase_getElementName(swigCPtr, this);
2701  }
2702
2703  
2704/**
2705   * Returns a string consisting of a partial SBML corresponding to just
2706   * this object.
2707   <p>
2708   * @return the partial SBML that describes this SBML object.
2709   <p>
2710   * @warning <span class='warning'>This is primarily provided for testing
2711   * and debugging purposes.  It may be removed in a future version of
2712   * libSBML.</span>
2713   */ public
2714 String toSBML() {
2715    return libsbmlJNI.SBase_toSBML(swigCPtr, this);
2716  }
2717
2718  
2719/**
2720   * Returns this element as an {@link XMLNode}.
2721   <p>
2722   * @return this element as an {@link XMLNode}.
2723   <p>
2724   * @warning <span class='warning'>This operation is computationally
2725   * expensive, because the element has to be fully serialized to a string
2726   * and then parsed into the {@link XMLNode} structure.  Attempting to convert a
2727   * large tree structure (e.g., a large {@link Model}) may consume significant
2728   * computer memory and time.</span>
2729   */ public
2730 XMLNode toXMLNode() {
2731    long cPtr = libsbmlJNI.SBase_toXMLNode(swigCPtr, this);
2732    return (cPtr == 0) ? null : new XMLNode(cPtr, false);
2733  }
2734
2735  
2736/**
2737   * Returns a plug-in object (extension interface) for an SBML Level&nbsp;3
2738   * package extension with the given package name or URI.
2739   <p>
2740   * <p>
2741 * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
2742 * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
2743 * that it uses one or more SBML packages, and likewise, a software tool may be
2744 * able to support one or more packages.  LibSBML does not come preconfigured
2745 * with all possible packages included and enabled, in part because not all
2746 * package specifications have been finalized.  To support the ability for
2747 * software systems to enable support for the Level&nbsp;3 packages they choose,
2748 * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
2749 * package is implemented in a separate code plug-in that can be enabled by the
2750 * application to support working with that SBML package.  A given SBML model
2751 * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
2752 * objects created by libSBML plug-ins supporting additional Level&nbsp;3
2753 * packages.
2754   <p>
2755   * @param package the name or URI of the package
2756   <p>
2757   * @return the plug-in object (the libSBML extension interface) of
2758   * a package extension with the given package name or URI.
2759   <p>
2760   * @see #getPlugin(long n)
2761   */ public
2762 SBasePlugin getPlugin(String arg0) {
2763    return libsbml.DowncastSBasePlugin(libsbmlJNI.SBase_getPlugin__SWIG_0(swigCPtr, this, arg0), false);
2764}
2765
2766  
2767/**
2768   * Returns the nth plug-in object (extension interface) for an SBML Level&nbsp;3
2769   * package extension.
2770   <p>
2771   * <p>
2772 * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
2773 * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
2774 * that it uses one or more SBML packages, and likewise, a software tool may be
2775 * able to support one or more packages.  LibSBML does not come preconfigured
2776 * with all possible packages included and enabled, in part because not all
2777 * package specifications have been finalized.  To support the ability for
2778 * software systems to enable support for the Level&nbsp;3 packages they choose,
2779 * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
2780 * package is implemented in a separate code plug-in that can be enabled by the
2781 * application to support working with that SBML package.  A given SBML model
2782 * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
2783 * objects created by libSBML plug-ins supporting additional Level&nbsp;3
2784 * packages.
2785   <p>
2786   * @param n the index of the plug-in to return
2787   <p>
2788   * @return the nth plug-in object (the libSBML extension interface) of a
2789   * package extension.
2790   <p>
2791   * @see #getNumPlugins()
2792   * @see #getPlugin(String)
2793   */ public
2794 SBasePlugin getPlugin(long n) {
2795    return libsbml.DowncastSBasePlugin(libsbmlJNI.SBase_getPlugin__SWIG_2(swigCPtr, this, n), false);
2796}
2797
2798  
2799/**
2800   * Returns the nth disabled plug-in object (extension interface) for an SBML Level&nbsp;3
2801   * package extension.
2802   <p>
2803   * <p>
2804 * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
2805 * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
2806 * that it uses one or more SBML packages, and likewise, a software tool may be
2807 * able to support one or more packages.  LibSBML does not come preconfigured
2808 * with all possible packages included and enabled, in part because not all
2809 * package specifications have been finalized.  To support the ability for
2810 * software systems to enable support for the Level&nbsp;3 packages they choose,
2811 * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
2812 * package is implemented in a separate code plug-in that can be enabled by the
2813 * application to support working with that SBML package.  A given SBML model
2814 * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
2815 * objects created by libSBML plug-ins supporting additional Level&nbsp;3
2816 * packages.
2817   <p>
2818   * <p>
2819 * If a plugin is <em>disabled</em>, the package information it contains is
2820 * no longer considered to be part of the SBML document for the purposes of
2821 * searching the document or writing out the document.  However, the information
2822 * is still retained, so if the plugin is enabled again, the same information 
2823 * will once again be available, and will be written out to the final model.
2824   <p>
2825   * @param n the index of the disabled plug-in to return
2826   <p>
2827   * @return the nth disabled plug-in object (the libSBML extension interface) of a
2828   * package extension.
2829   <p>
2830   * @see #getNumDisabledPlugins()
2831   * @see #getPlugin(String)
2832   */ public
2833 SBasePlugin getDisabledPlugin(long n) {
2834    return libsbml.DowncastSBasePlugin(libsbmlJNI.SBase_getDisabledPlugin__SWIG_0(swigCPtr, this, n), false);
2835}
2836
2837  
2838/**
2839   * Returns the number of plug-in objects (extenstion interfaces) for SBML
2840   * Level&nbsp;3 package extensions known.
2841   <p>
2842   * <p>
2843 * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
2844 * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
2845 * that it uses one or more SBML packages, and likewise, a software tool may be
2846 * able to support one or more packages.  LibSBML does not come preconfigured
2847 * with all possible packages included and enabled, in part because not all
2848 * package specifications have been finalized.  To support the ability for
2849 * software systems to enable support for the Level&nbsp;3 packages they choose,
2850 * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
2851 * package is implemented in a separate code plug-in that can be enabled by the
2852 * application to support working with that SBML package.  A given SBML model
2853 * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
2854 * objects created by libSBML plug-ins supporting additional Level&nbsp;3
2855 * packages.
2856   <p>
2857   * @return the number of plug-in objects (extension interfaces) of
2858   * package extensions known by this instance of libSBML.
2859   <p>
2860   * @see #getPlugin(long n)
2861   */ public
2862 long getNumPlugins() {
2863    return libsbmlJNI.SBase_getNumPlugins(swigCPtr, this);
2864  }
2865
2866  
2867/**
2868   * Returns the number of disabled plug-in objects (extension interfaces) 
2869   * for SBML Level&nbsp;3 package extensions known.
2870   <p>
2871   * <p>
2872 * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
2873 * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
2874 * that it uses one or more SBML packages, and likewise, a software tool may be
2875 * able to support one or more packages.  LibSBML does not come preconfigured
2876 * with all possible packages included and enabled, in part because not all
2877 * package specifications have been finalized.  To support the ability for
2878 * software systems to enable support for the Level&nbsp;3 packages they choose,
2879 * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
2880 * package is implemented in a separate code plug-in that can be enabled by the
2881 * application to support working with that SBML package.  A given SBML model
2882 * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
2883 * objects created by libSBML plug-ins supporting additional Level&nbsp;3
2884 * packages.
2885   <p>
2886   * <p>
2887 * If a plugin is <em>disabled</em>, the package information it contains is
2888 * no longer considered to be part of the SBML document for the purposes of
2889 * searching the document or writing out the document.  However, the information
2890 * is still retained, so if the plugin is enabled again, the same information 
2891 * will once again be available, and will be written out to the final model.
2892   <p>
2893   * @return the number of disabled plug-in objects (extension interfaces) 
2894   * of package extensions known by this instance of libSBML.
2895   */ public
2896 long getNumDisabledPlugins() {
2897    return libsbmlJNI.SBase_getNumDisabledPlugins(swigCPtr, this);
2898  }
2899
2900  
2901/**
2902   * Deletes all information stored in disabled plugins.  If the plugin is 
2903   * re-enabled later, it will then not have any previously-stored information.
2904   <p>
2905   * <p>
2906 * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
2907 * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
2908 * that it uses one or more SBML packages, and likewise, a software tool may be
2909 * able to support one or more packages.  LibSBML does not come preconfigured
2910 * with all possible packages included and enabled, in part because not all
2911 * package specifications have been finalized.  To support the ability for
2912 * software systems to enable support for the Level&nbsp;3 packages they choose,
2913 * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
2914 * package is implemented in a separate code plug-in that can be enabled by the
2915 * application to support working with that SBML package.  A given SBML model
2916 * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
2917 * objects created by libSBML plug-ins supporting additional Level&nbsp;3
2918 * packages.
2919   <p>
2920   * <p>
2921 * If a plugin is <em>disabled</em>, the package information it contains is
2922 * no longer considered to be part of the SBML document for the purposes of
2923 * searching the document or writing out the document.  However, the information
2924 * is still retained, so if the plugin is enabled again, the same information 
2925 * will once again be available, and will be written out to the final model.
2926   <p>
2927   * @param recursive if <code>true</code>, the disabled information will be deleted
2928   * also from all child elements, otherwise only from this {@link SBase} element.
2929   <p>
2930   * @see #getNumDisabledPlugins()
2931   */ public
2932 void deleteDisabledPlugins(boolean recursive) {
2933    libsbmlJNI.SBase_deleteDisabledPlugins__SWIG_0(swigCPtr, this, recursive);
2934  }
2935
2936  
2937/**
2938   * Deletes all information stored in disabled plugins.  If the plugin is 
2939   * re-enabled later, it will then not have any previously-stored information.
2940   <p>
2941   * <p>
2942 * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
2943 * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
2944 * that it uses one or more SBML packages, and likewise, a software tool may be
2945 * able to support one or more packages.  LibSBML does not come preconfigured
2946 * with all possible packages included and enabled, in part because not all
2947 * package specifications have been finalized.  To support the ability for
2948 * software systems to enable support for the Level&nbsp;3 packages they choose,
2949 * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
2950 * package is implemented in a separate code plug-in that can be enabled by the
2951 * application to support working with that SBML package.  A given SBML model
2952 * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
2953 * objects created by libSBML plug-ins supporting additional Level&nbsp;3
2954 * packages.
2955   <p>
2956   * <p>
2957 * If a plugin is <em>disabled</em>, the package information it contains is
2958 * no longer considered to be part of the SBML document for the purposes of
2959 * searching the document or writing out the document.  However, the information
2960 * is still retained, so if the plugin is enabled again, the same information 
2961 * will once again be available, and will be written out to the final model.
2962   <p>
2963   * @param recursive if <code>true</code>, the disabled information will be deleted
2964   * also from all child elements, otherwise only from this {@link SBase} element.
2965   <p>
2966   * @see #getNumDisabledPlugins()
2967   */ public
2968 void deleteDisabledPlugins() {
2969    libsbmlJNI.SBase_deleteDisabledPlugins__SWIG_1(swigCPtr, this);
2970  }
2971
2972  
2973/**
2974   * Enables or disables the given SBML Level&nbsp;3 package on this object.
2975   <p>
2976   * This method enables the specified package on this object and other
2977   * objects connected by child-parent links in the same {@link SBMLDocument} object.
2978   * This method is the converse of
2979   * {@link SBase#disablePackage(String pkgURI, String pkgPrefix)}.
2980   <p>
2981   * @param pkgURI the URI of the package.
2982   <p>
2983   * @param pkgPrefix the XML prefix of the package
2984   <p>
2985   * @param flag whether to enable (<code>true</code>) or disable (<code>false</code>) the package
2986   <p>
2987   * <p>
2988 * @return integer value indicating success/failure of the
2989 * function.   The possible values
2990 * returned by this function are:
2991   * <ul>
2992   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
2993   * <li> {@link libsbmlConstants#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN}
2994   * <li> {@link libsbmlConstants#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH}
2995   * <li> {@link libsbmlConstants#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION}
2996   *
2997   * </ul> <p>
2998   * @see #disablePackage(String pkgURI, String pkgPrefix)
2999   */ public
3000 int enablePackage(String pkgURI, String pkgPrefix, boolean flag) {
3001    return libsbmlJNI.SBase_enablePackage(swigCPtr, this, pkgURI, pkgPrefix, flag);
3002  }
3003
3004  
3005/**
3006   * Disables the given SBML Level&nbsp;3 package on this object.
3007   <p>
3008   * This method disables the specified package on this object
3009   * and other objects connected by child-parent links in the same
3010   * {@link SBMLDocument} object.
3011   <p>
3012   * An example of when this may be useful is during construction of model
3013   * components when mixing existing and new models.  Suppose your
3014   * application read an SBML document containing a model that used the SBML
3015   * Hierarchical Model Composition (&ldquo;comp&rdquo;) package, and
3016   * extracted parts of that model in order to construct a new model in
3017   * memory.  The new, in-memory model will not accept a component drawn from
3018   * another {@link SBMLDocument} with different package namespace declarations.
3019   * You could reconstruct the same namespaces in the in-memory model first,
3020   * but as a shortcut, you could also disable the package namespace on the
3021   * object being added.  Here is a code example to help clarify this:
3022   <p>
3023<pre class='fragment'>
3024// We read in an SBML L3V1 model that uses the 'comp' package namespace
3025{@link SBMLReader} reader = new {@link SBMLReader}();
3026{@link SBMLDocument} doc = reader.readSBML('sbml-file-with-comp-elements.xml');
3027
3028// We extract one of the species from the model we just read in.
3029{@link Species} s1 = doc.getModel().getSpecies(0);
3030
3031// We construct a new model.  This model does not use the 'comp' package.
3032{@link Model} newModel = new {@link Model}(3,1);
3033
3034// The following will fail with an error, because addSpecies() will
3035// first check that the parent of the given object has namespaces
3036// declared, and will discover that s1 does but newModel does not.
3037
3038// newModel-&gt;addSpecies(s1);
3039
3040// However, if we disable the 'comp' package on s1, then the call
3041// to addSpecies will work.
3042
3043s1-&gt;disablePackage('http://www.sbml.org/sbml/level3/version1/comp/version1',
3044                   'comp');
3045newModel.addSpecies(s1);
3046</pre>
3047<p>
3048   * @param pkgURI the URI of the package
3049   <p>
3050   * @param pkgPrefix the XML prefix of the package
3051   <p>
3052   * <p>
3053 * @return integer value indicating success/failure of the
3054 * function.   The possible values
3055 * returned by this function are:
3056   * <ul>
3057   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
3058   * <li> {@link libsbmlConstants#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN}
3059   * <li> {@link libsbmlConstants#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH}
3060   * <li> {@link libsbmlConstants#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION}
3061   *
3062   * </ul> <p>
3063   * @see #enablePackage(String pkgURI, String pkgPrefix, boolean flag)
3064   */ public
3065 int disablePackage(String pkgURI, String pkgPrefix) {
3066    return libsbmlJNI.SBase_disablePackage(swigCPtr, this, pkgURI, pkgPrefix);
3067  }
3068
3069  
3070/** * @internal */ public
3071 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
3072    libsbmlJNI.SBase_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
3073  }
3074
3075  
3076/**
3077   * Predicate returning <code>true</code> if an SBML Level&nbsp;3 package with the
3078   * given URI is enabled with this object.
3079   <p>
3080   * @param pkgURI the URI of the package
3081   <p>
3082   * @return <code>true</code> if the given package is enabled within this object, @c 
3083   * false otherwise.
3084   <p>
3085   * @see #isPackageEnabled(String)
3086   */ public
3087 boolean isPackageURIEnabled(String pkgURI) {
3088    return libsbmlJNI.SBase_isPackageURIEnabled(swigCPtr, this, pkgURI);
3089  }
3090
3091  
3092/**
3093   * Predicate returning <code>true</code> if the given SBML Level&nbsp;3 package is
3094   * enabled with this object.
3095   <p>
3096   * The search ignores the package version.
3097   <p>
3098   * @param pkgName the name of the package
3099   <p>
3100   * @return <code>true</code> if the given package is enabled within this object, 
3101   * <code>false</code> otherwise.
3102   <p>
3103   * @see #isPackageURIEnabled(String)
3104   */ public
3105 boolean isPackageEnabled(String pkgName) {
3106    return libsbmlJNI.SBase_isPackageEnabled(swigCPtr, this, pkgName);
3107  }
3108
3109  
3110/**
3111   * Predicate returning <code>true</code> if an SBML Level&nbsp;3 package with the
3112   * given URI is enabled with this object.
3113   <p>
3114   * @param pkgURI the URI of the package
3115   <p>
3116   * @return <code>true</code> if the given package is enabled within this object, @c 
3117   * false otherwise.
3118   <p>
3119   * @deprecated <div class='deprecated'>Replaced in libSBML 5.2.0 by
3120   * {@link SBase#isPackageURIEnabled(String)}.
3121   * </div>
3122   <p>
3123   * @see #isPkgEnabled(String)
3124   */ public
3125 boolean isPkgURIEnabled(String pkgURI) {
3126    return libsbmlJNI.SBase_isPkgURIEnabled(swigCPtr, this, pkgURI);
3127  }
3128
3129  
3130/**
3131   * Predicate returning <code>true</code> if the given SBML Level&nbsp;3 package is
3132   * enabled with this object.
3133   <p>
3134   * The search ignores the package version.
3135   <p>
3136   * @param pkgName the name of the package
3137   <p>
3138   * @return <code>true</code> if the given package is enabled within this object, 
3139   * <code>false</code> otherwise.
3140   <p>
3141   * @deprecated <div class='deprecated'>Replaced in libSBML 5.2.0 by
3142   * {@link SBase#isPackageEnabled(String)}.
3143   * </div>
3144   <p>
3145   * @see #isPkgURIEnabled(String)
3146   */ public
3147 boolean isPkgEnabled(String pkgName) {
3148    return libsbmlJNI.SBase_isPkgEnabled(swigCPtr, this, pkgName);
3149  }
3150
3151  
3152/** * @internal */ public
3153 void writeExtensionElements(XMLOutputStream stream) {
3154    libsbmlJNI.SBase_writeExtensionElements(swigCPtr, this, XMLOutputStream.getCPtr(stream), stream);
3155  }
3156
3157  
3158/** * @internal */ public
3159 boolean hasRequiredAttributes() {
3160    return libsbmlJNI.SBase_hasRequiredAttributes(swigCPtr, this);
3161  }
3162
3163  
3164/** * @internal */ public
3165 boolean hasRequiredElements() {
3166    return libsbmlJNI.SBase_hasRequiredElements(swigCPtr, this);
3167  }
3168
3169  
3170/** * @internal */ public
3171 int checkCompatibility(SBase object) {
3172    return libsbmlJNI.SBase_checkCompatibility(swigCPtr, this, SBase.getCPtr(object), object);
3173  }
3174
3175  
3176/** * @internal */ public
3177 void setSBMLNamespacesAndOwn(SBMLNamespaces disownedNs) {
3178    libsbmlJNI.SBase_setSBMLNamespacesAndOwn(swigCPtr, this, SBMLNamespaces.getCPtrAndDisown(disownedNs), disownedNs);
3179  }
3180
3181  
3182/** * @internal */ public
3183 SBMLNamespaces getSBMLNamespaces() {
3184  return libsbml.DowncastSBMLNamespaces(libsbmlJNI.SBase_getSBMLNamespaces(swigCPtr, this), false);
3185}
3186
3187  
3188/** * @internal */ public
3189 String checkMathMLNamespace(XMLToken elem) {
3190    return libsbmlJNI.SBase_checkMathMLNamespace(swigCPtr, this, XMLToken.getCPtr(elem), elem);
3191  }
3192
3193  
3194/** * @internal */ public
3195 UnitDefinition getDerivedUnitDefinition() {
3196    long cPtr = libsbmlJNI.SBase_getDerivedUnitDefinition(swigCPtr, this);
3197    return (cPtr == 0) ? null : new UnitDefinition(cPtr, false);
3198  }
3199
3200  
3201/** * @internal */ public
3202 boolean containsUndeclaredUnits() {
3203    return libsbmlJNI.SBase_containsUndeclaredUnits(swigCPtr, this);
3204  }
3205
3206  
3207/**
3208   * Removes this object from its parent.
3209   <p>
3210   * If the parent was storing this object as a pointer, it is deleted.  If
3211   * not, it is simply cleared (as in {@link ListOf} objects).  This is a pure
3212   * virtual method, as every {@link SBase} element has different parents, and
3213   * therefore different methods of removing itself.  Will fail (and not
3214   * delete itself) if it has no parent object.  This function is designed to
3215   * be overridden, but for all objects whose parent is of the class {@link ListOf},
3216   * the default implementation will work.
3217   <p>
3218   * <p>
3219 * @return integer value indicating success/failure of the
3220 * function.   The possible values
3221 * returned by this function are:
3222   * <ul>
3223   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
3224   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
3225   * </ul>
3226   */ public
3227 int removeFromParentAndDelete() {
3228    return libsbmlJNI.SBase_removeFromParentAndDelete(swigCPtr, this);
3229  }
3230
3231  
3232/**
3233   * Returns <code>true</code> if this object's set of XML namespaces are the same
3234   * as the given object's XML namespaces.
3235   <p>
3236   * <p>
3237 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
3238 * information.  It is used to communicate the SBML Level, Version, and (in
3239 * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
3240 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
3241 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
3242 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments.
3243   <p>
3244   * @param sb an object to compare with respect to namespaces
3245   <p>
3246   * @return boolean, <code>true</code> if this object's collection of namespaces is
3247   * the same as <code>sb's</code>, <code>false</code> otherwise.
3248   */ public
3249 boolean matchesSBMLNamespaces(SBase sb) {
3250    return libsbmlJNI.SBase_matchesSBMLNamespaces__SWIG_0(swigCPtr, this, SBase.getCPtr(sb), sb);
3251  }
3252
3253  
3254/**
3255   * Returns <code>true</code> if this object's set of XML namespaces are a subset
3256   * of the given object's XML namespaces.
3257   <p>
3258   * <p>
3259 * The {@link SBMLNamespaces} object encapsulates SBML Level/Version/namespaces
3260 * information.  It is used to communicate the SBML Level, Version, and (in
3261 * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
3262 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
3263 * {@link SBMLNamespaces} object somewhere in a program once, then hand that object
3264 * as needed to object constructors that accept {@link SBMLNamespaces} as arguments.
3265   <p>
3266   * @param sb an object to compare with respect to namespaces
3267   <p>
3268   * @return boolean, <code>true</code> if this object's collection of namespaces is
3269   * a subset of <code>sb's</code>, <code>false</code> otherwise.
3270   */ public
3271 boolean matchesRequiredSBMLNamespacesForAddition(SBase sb) {
3272    return libsbmlJNI.SBase_matchesRequiredSBMLNamespacesForAddition__SWIG_0(swigCPtr, this, SBase.getCPtr(sb), sb);
3273  }
3274
3275  
3276/**
3277   * Predicate returning true or false depending on whether
3278   * the user data of this element has been set.
3279   <p>
3280   * <p>
3281 * The user data associated with an SBML object can be used by an application
3282 * developer to attach custom information to that object in the model.  In case
3283 * of a deep copy, this data will passed as-is.  The data attribute will never
3284 * be interpreted by libSBML.
3285   <p>
3286   * @return boolean, <code>true</code> if this object's user data has been set,
3287   * <code>false</code> otherwise.
3288   */ public
3289 boolean isSetUserData() {
3290    return libsbmlJNI.SBase_isSetUserData(swigCPtr, this);
3291  }
3292
3293  
3294/**
3295   * Unsets the user data of this element.
3296   <p>
3297   * <p>
3298 * The user data associated with an SBML object can be used by an application
3299 * developer to attach custom information to that object in the model.  In case
3300 * of a deep copy, this data will passed as-is.  The data attribute will never
3301 * be interpreted by libSBML.
3302   <p>
3303   * <p>
3304 * @return integer value indicating success/failure of the
3305 * function.   The possible values
3306 * returned by this function are:
3307   * <ul>
3308   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
3309   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
3310   * </ul>
3311   */ public
3312 int unsetUserData() {
3313    return libsbmlJNI.SBase_unsetUserData(swigCPtr, this);
3314  }
3315
3316  
3317/**
3318   * Gets the namespace URI to which this element belongs to.
3319   <p>
3320   * For example, all elements that belong to SBML Level 3 Version 1 Core
3321   * must would have the URI <code>'http://www.sbml.org/sbml/level3/version1/core'</code>;
3322   * all elements that belong to {@link Layout} Extension Version 1 for SBML Level 3
3323   * Version 1 Core must would have the URI
3324   * <code>'http://www.sbml.org/sbml/level3/version1/layout/version1'</code>.
3325   <p>
3326   * This function first returns the URI for this element by looking into the
3327   * {@link SBMLNamespaces} object of the document with the its package name.  If not
3328   * found, it will then look for the namespace associated with the element
3329   * itself.
3330   <p>
3331   * @return the URI of this element, as a text string
3332   <p>
3333   * @see #getSBMLDocument()
3334   * @see #getPackageName()
3335   */ public
3336 String getURI() {
3337    return libsbmlJNI.SBase_getURI(swigCPtr, this);
3338  }
3339
3340  
3341/**
3342   * Returns the XML namespace prefix of this element.
3343   <p>
3344   * This reports the XML namespace prefix chosen for this class of object in
3345   * the current SBML document.  This may be an empty string if the component
3346   * has no explicit prefix (for instance, if it is a core SBML object placed
3347   * in the default SBML namespace of the document).  If it is not empty, then
3348   * it corresponds to the XML namespace prefix used set the object, whatever
3349   * that may be in a given SBML document.
3350   <p>
3351   * @return a text string representing the XML namespace prefix
3352   */ public
3353 String getPrefix() {
3354    return libsbmlJNI.SBase_getPrefix(swigCPtr, this);
3355  }
3356
3357  public SBaseList getListOfAllElements(ElementFilter filter) {
3358    long cPtr = libsbmlJNI.SBase_getListOfAllElements__SWIG_0(swigCPtr, this, ElementFilter.getCPtr(filter), filter);
3359    return (cPtr == 0) ? null : new SBaseList(cPtr, false);
3360  }
3361
3362  public SBaseList getListOfAllElements() {
3363    long cPtr = libsbmlJNI.SBase_getListOfAllElements__SWIG_1(swigCPtr, this);
3364    return (cPtr == 0) ? null : new SBaseList(cPtr, false);
3365  }
3366
3367  public SBaseList getListOfAllElementsFromPlugins(ElementFilter filter) {
3368    long cPtr = libsbmlJNI.SBase_getListOfAllElementsFromPlugins__SWIG_0(swigCPtr, this, ElementFilter.getCPtr(filter), filter);
3369    return (cPtr == 0) ? null : new SBaseList(cPtr, false);
3370  }
3371
3372  public SBaseList getListOfAllElementsFromPlugins() {
3373    long cPtr = libsbmlJNI.SBase_getListOfAllElementsFromPlugins__SWIG_1(swigCPtr, this);
3374    return (cPtr == 0) ? null : new SBaseList(cPtr, false);
3375  }
3376
3377}