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