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 *  Representation of errors, warnings and other diagnostics
013 <p>
014 * <p style='color: #777; font-style: italic'>
015This class of objects is defined by libSBML only and has no direct
016equivalent in terms of SBML components.  This class is not prescribed by
017the SBML specifications, although it is used to implement features
018defined in SBML.
019</p>
020
021 <p>
022 * LibSBML can be configured to use any of a number of XML parsers; at the
023 * time of this writing, libSBML supports Xerces versions 2.4 through 3.1,
024 * Expat version 1.95.x and higher, and libxml2 version 2.6.16 and higher.
025 * These parsers each report different status codes for the various
026 * exceptions that can occur during XML processing.  The {@link XMLError} object
027 * class abstracts away from the particular diagnostics reported by the
028 * different parsers and presents a single uniform interface and set of
029 * status codes, along with operations for manipulating the error objects.
030 <p>
031 * When the libSBML XML parser layer encounters an error in the XML content
032 * being processed, or when there is something else wrong (such as an
033 * out-of-memory condition), the problems are reported as {@link XMLError} objects.
034 * Each {@link XMLError} object instance has an identification number that
035 * identifies the nature of the problem.
036 * This
037 * error identifier is one of the constants listed in the next section below.
038 * Applications can use the error identifiers as a means of recognizing the
039 * error encountered and changing their behavior if desired.  
040 <p>
041 * Integer error codes are useful for software, but not so much for telling
042 * humans what happened.  For this reason, {@link XMLError} also provides two text
043 * messages describing the nature of the error.  These messages are
044 * accessible by means of the methods {@link XMLError#getShortMessage()} and
045 * {@link XMLError#getMessage()}.  The method {@link XMLError#getShortMessage()} returns
046 * a very brief synopsis of the warning or error condition, whereas
047 * {@link XMLError#getMessage()} returns a longer explanation.  These text strings
048 * are suitable for displaying to human users.
049 <p>
050 * Each {@link XMLError} object also contains a category code; its value may be
051 * retrieved using the method {@link XMLError#getCategory()}.  Category values
052 * are drawn from a
053 * set of constants whose names begin with the characters <code>LIBSBML_CAT_</code>, described below. &nbsp;Categories
054 * are used by libSBML to provide more information to calling programs about
055 * the nature of a given error.  
056 <p>
057 * In addition to category codes, each {@link XMLError} object also has a severity
058 * code; its value may be retrieved using the method
059 * {@link XMLError#getSeverity()}.  Severity code values are drawn from
060 * a
061 * set of constants whose names begin with the characters <code>LIBSBML_SEV_</code>,
062 * described below. Severity levels range from informational
063 * ({@link  libsbmlConstants#LIBSBML_SEV_INFO LIBSBML_SEV_INFO}) to
064 * fatal errors ({@link  libsbmlConstants#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL}).
065 <p>
066 * Finally, {@link XMLError} objects record the line and column near where the
067 * problem occurred in the XML content.  The values can be retrieved using
068 * the methods {@link XMLError#getLine()} and {@link XMLError#getColumn()}.  We say 'near
069 * where the problem occurred', because many factors affect how accurate
070 * the line/column information ultimately is.  For example, sometimes, the
071 * underlying XML parsers can only report such information for the parent
072 * XML element where an error occurs, and not for the specific point where
073 * the problem occurs.  In other situations, some parsers report invalid
074 * line and/or column numbers altogether.  If this occurs, libSBML sets the
075 * line and/or column number in the {@link XMLError} object to either
076 * <code>0</code> or the value of the maximum unsigned long integer
077 * representable on the platform where libSBML is running.  The probability
078 * that a true line or column number in an SBML model would equal this
079 * value is vanishingly small; thus, if an application encounters these
080 * values in an {@link XMLError} object, it can assume no valid line/column number
081 * could be provided by libSBML in that situation.
082 <p>
083 * <h3><a class='anchor' 
084 * name='error-codes'>Error codes associated with {@link XMLError} objects</a></h3>
085 <p>
086 * The error and warning codes returned by the XML layer in libSBML are
087 * listed in the table below.  In the libSBML Java language interface,
088 * these error identifiers are currently implemented as static integer
089 * constants defined in the interface class <code><a
090 * href='libsbmlConstants.html'>libsbmlConstants</a></code>.  This is
091 * admittedly not an ideal approach from the standpoint of modern Java
092 * programming, but it was necessary to work around the lack of
093 * enumerations in Java prior to JDK 1.5.  Future versions of libSBML may
094 * use a proper Java enumeration type to define the error
095 * identifiers. 
096 <p>
097 * <center>
098 * <table cellspacing='1' cellpadding='1' border='0' class='text-table width80 normal-font alt-row-colors'>
099 * <caption>Possible {@link XMLError} error codes.  Depending on the programming
100 * language in use, the <em>Enumerator</em> values will be defined either
101 * as a value from the enumeration XMLErrorCode_t or as integer constants.
102 * To make this table more compact, we have shortened the identifiers for
103 * the category and severity codes to their essential parts.  To get the
104 * actual names of the constants, prepend <code>LIBSBML_CAT_</code> to the
105 * category names and <code>LIBSBML_SEV_</code> to the severity names
106 * shown in the two right-hand columns.
107 * </caption>
108 *  <tr style='background: lightgray' class='normal-font'>
109 *      <th>Enumerator</th>
110 *      <th>Meaning</th>
111 *      <th width='90'>Category</th>
112 *      <th width='90'>Severity</th>
113 *  </tr>
114 * <tr><td>{@link  libsbmlConstants#XMLUnknownError XMLUnknownError}</td><td>Unrecognized error encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr>
115 * <tr><td>{@link  libsbmlConstants#XMLOutOfMemory XMLOutOfMemory}</td> <td>Out of memory</td><td>SYSTEM</td><td>FATAL</td></tr>
116 * <tr><td>{@link  libsbmlConstants#XMLFileUnreadable XMLFileUnreadable}</td> <td>File unreadable</td><td>SYSTEM</td><td>ERROR</td></tr>
117 * <tr><td>{@link  libsbmlConstants#XMLFileUnwritable XMLFileUnwritable}</td> <td>File unwritable</td><td>SYSTEM</td><td>ERROR</td></tr>
118 * <tr><td>{@link  libsbmlConstants#XMLFileOperationError XMLFileOperationError}</td><td>Error encountered while attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr>
119 * <tr><td>{@link  libsbmlConstants#XMLNetworkAccessError XMLNetworkAccessError}</td><td>Network access error</td><td>SYSTEM</td><td>ERROR</td></tr>
120 * <tr><td>{@link  libsbmlConstants#InternalXMLParserError InternalXMLParserError}</td><td>Internal XML parser state error</td><td>INTERNAL</td><td>FATAL</td></tr>
121 * <tr><td>{@link  libsbmlConstants#UnrecognizedXMLParserCode UnrecognizedXMLParserCode}</td><td>XML parser returned an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr>
122 * <tr><td>{@link  libsbmlConstants#XMLTranscoderError XMLTranscoderError}</td><td>Character transcoder error</td><td>INTERNAL</td><td>FATAL</td></tr>
123 * <tr><td>{@link  libsbmlConstants#MissingXMLDecl MissingXMLDecl}</td><td>Missing XML declaration at beginning of XML input</td><td>XML</td><td>ERROR</td></tr>
124 * <tr><td>{@link  libsbmlConstants#MissingXMLEncoding MissingXMLEncoding}</td><td>Missing encoding attribute in XML declaration</td><td>XML</td><td>ERROR</td></tr>
125 * <tr><td>{@link  libsbmlConstants#BadXMLDecl BadXMLDecl}</td><td>Invalid or unrecognized XML declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr>
126 * <tr><td>{@link  libsbmlConstants#BadXMLDOCTYPE BadXMLDOCTYPE}</td><td>Invalid, malformed or unrecognized XML DOCTYPE declaration</td><td>XML</td><td>ERROR</td></tr>
127 * <tr><td>{@link  libsbmlConstants#InvalidCharInXML InvalidCharInXML}</td><td>Invalid character in XML content</td><td>XML</td><td>ERROR</td></tr>
128 * <tr><td>{@link  libsbmlConstants#BadlyFormedXML BadlyFormedXML}</td><td>XML content is not well-formed</td><td>XML</td><td>ERROR</td></tr>
129 * <tr><td>{@link  libsbmlConstants#UnclosedXMLToken UnclosedXMLToken}</td><td>Unclosed XML token</td><td>XML</td><td>ERROR</td></tr>
130 * <tr><td>{@link  libsbmlConstants#InvalidXMLConstruct InvalidXMLConstruct}</td><td>XML construct is invalid or not permitted</td><td>XML</td><td>ERROR</td></tr>
131 * <tr><td>{@link  libsbmlConstants#XMLTagMismatch XMLTagMismatch}</td><td>Element tag mismatch or missing tag</td><td>XML</td><td>ERROR</td></tr>
132 * <tr><td>{@link  libsbmlConstants#DuplicateXMLAttribute DuplicateXMLAttribute}</td><td>Duplicate XML attribute</td><td>XML</td><td>ERROR</td></tr>
133 * <tr><td>{@link  libsbmlConstants#UndefinedXMLEntity UndefinedXMLEntity}</td><td>Undefined XML entity</td><td>XML</td><td>ERROR</td></tr>
134 * <tr><td>{@link  libsbmlConstants#BadProcessingInstruction BadProcessingInstruction}</td><td>Invalid, malformed or unrecognized XML processing instruction</td><td>XML</td><td>ERROR</td></tr>
135 * <tr><td>{@link  libsbmlConstants#BadXMLPrefix BadXMLPrefix}</td><td>Invalid or undefined XML namespace prefix</td><td>XML</td><td>ERROR</td></tr>
136 * <tr><td>{@link  libsbmlConstants#BadXMLPrefixValue BadXMLPrefixValue}</td><td>Invalid XML namespace prefix value</td><td>XML</td><td>ERROR</td></tr>
137 * <tr><td>{@link  libsbmlConstants#MissingXMLRequiredAttribute MissingXMLRequiredAttribute}</td><td>Missing a required XML attribute</td><td>XML</td><td>ERROR</td></tr>
138 * <tr><td>{@link  libsbmlConstants#XMLAttributeTypeMismatch XMLAttributeTypeMismatch}</td><td>Data type mismatch for the value of an attribute</td><td>XML</td><td>ERROR</td></tr>
139 * <tr><td>{@link  libsbmlConstants#XMLBadUTF8Content XMLBadUTF8Content}</td><td>Invalid UTF8 content</td><td>XML</td><td>ERROR</td></tr>
140 * <tr><td>{@link  libsbmlConstants#MissingXMLAttributeValue MissingXMLAttributeValue}</td><td>Missing or improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr>
141 * <tr><td>{@link  libsbmlConstants#BadXMLAttributeValue BadXMLAttributeValue}</td><td>Invalid or unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr>
142 * <tr><td>{@link  libsbmlConstants#BadXMLAttribute BadXMLAttribute}</td><td>Invalid, unrecognized or malformed attribute</td><td>XML</td><td>ERROR</td></tr>
143 * <tr><td>{@link  libsbmlConstants#UnrecognizedXMLElement UnrecognizedXMLElement}</td><td>Element either not recognized or not permitted</td><td>XML</td><td>ERROR</td></tr>
144 * <tr><td>{@link  libsbmlConstants#BadXMLComment BadXMLComment}</td><td>Badly formed XML comment</td><td>XML</td><td>ERROR</td></tr>
145 * <tr><td>{@link  libsbmlConstants#BadXMLDeclLocation BadXMLDeclLocation}</td><td>XML declaration not permitted in this location</td><td>XML</td><td>ERROR</td></tr>
146 * <tr><td>{@link  libsbmlConstants#XMLUnexpectedEOF XMLUnexpectedEOF}</td><td>Reached end of input unexpectedly</td><td>XML</td><td>ERROR</td></tr>
147 * <tr><td>{@link  libsbmlConstants#BadXMLIDValue BadXMLIDValue}</td><td>Value is invalid for XML ID, or has already been used</td><td>XML</td><td>ERROR</td></tr>
148 * <tr><td>{@link  libsbmlConstants#BadXMLIDRef BadXMLIDRef}</td><td>XML ID value was never declared</td><td>XML</td><td>ERROR</td></tr>
149 * <tr><td>{@link  libsbmlConstants#UninterpretableXMLContent UninterpretableXMLContent}</td><td>Unable to interpret content</td><td>XML</td><td>ERROR</td></tr>
150 * <tr><td>{@link  libsbmlConstants#BadXMLDocumentStructure BadXMLDocumentStructure}</td><td>Bad XML document structure</td><td>XML</td><td>ERROR</td></tr>
151 * <tr><td>{@link  libsbmlConstants#InvalidAfterXMLContent InvalidAfterXMLContent}</td><td>Encountered invalid content after expected content</td><td>XML</td><td>ERROR</td></tr>
152 * <tr><td>{@link  libsbmlConstants#XMLExpectedQuotedString XMLExpectedQuotedString}</td><td>Expected to find a quoted string</td><td>XML</td><td>ERROR</td></tr>
153 * <tr><td>{@link  libsbmlConstants#XMLEmptyValueNotPermitted XMLEmptyValueNotPermitted}</td><td>An empty value is not permitted in this context</td><td>XML</td><td>ERROR</td></tr>
154 * <tr><td>{@link  libsbmlConstants#XMLBadNumber XMLBadNumber}</td><td>Invalid or unrecognized number</td><td>XML</td><td>ERROR</td></tr>
155 * <tr><td>{@link  libsbmlConstants#XMLBadColon XMLBadColon}</td><td>Colon characters are invalid in this context</td><td>XML</td><td>ERROR</td></tr>
156 * <tr><td>{@link  libsbmlConstants#MissingXMLElements MissingXMLElements}</td><td>One or more expected elements are missing</td><td>XML</td><td>ERROR</td></tr>
157 * <tr><td>{@link  libsbmlConstants#XMLContentEmpty XMLContentEmpty}</td><td>Main XML content is empty</td><td>XML</td><td>ERROR</td></tr>
158 * </table>
159 * </center>
160 <p>
161 <p>
162 * <h3><a class='anchor'
163 * name='error-categories'>Category codes associated with {@link XMLError} objects</a></h3>
164 <p>
165 * As discussed above, each {@link XMLError} object contains a value for a category
166 * identifier, describing the type of issue that the {@link XMLError} object represents.
167 * The category can be retrieved from an {@link XMLError} object using the method
168 * {@link XMLError#getCategory()}. The following table lists each possible value
169 * and a brief description of its meaning.
170 <p>
171 * As is the case with the error codes, in the libSBML Java language
172 * interface, the category identifiers are currently implemented as static
173 * integer constants defined in the interface class
174 * <code>libsbmlConstants</code> in the file '<a
175 * href='libsbmlConstants.html'>libsbmlConstants.java</a>'.
176 <p>
177 <p>
178 * <center>
179 * <table width='90%' cellspacing='1' cellpadding='1' border='0' class='text-table width80 normal-font alt-row-colors'>
180 *  <tr style='background: lightgray' class='normal-font'>
181 *      <th>Enumerator</th>
182 *      <th>Meaning</th>
183 *  </tr>
184 * <tr><td>{@link  libsbmlConstants#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL}</td>
185 * <td>A problem involving the libSBML
186 * software itself or the underlying XML parser.  This almost certainly
187 * indicates a software defect (i.e., bug) in libSBML.  Please report
188 * instances of this to the libSBML developers.</td></tr>
189 * <tr><td>{@link  libsbmlConstants#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM}</td>
190 * <td>A problem reported by the operating
191 * system, such as an inability to read or write a file.  This indicates
192 * something that is not a program error but is outside of the control of
193 * libSBML.</td></tr>
194 * <tr><td>{@link  libsbmlConstants#LIBSBML_CAT_XML LIBSBML_CAT_XML}</td>
195 * <td>A problem in the XML content itself.  This
196 * usually arises from malformed XML or the use of
197 * constructs not permitted in SBML.</td></tr>
198 * </table>
199 * </center>
200 <p>
201 <p>
202 * <h3><a class='anchor'
203 * name='error-severities'>Severity codes associated with {@link XMLError} objects</a></h3>
204 <p>
205 * As described above, each {@link XMLError} object contains a value for a severity
206 * code, describing how severe is the issue that the {@link XMLError} object
207 * represents.  The severity be retrieved from an {@link XMLError} object using the
208 * method {@link XMLError#getSeverity()}. The following table lists each possible
209 * value and a brief description of its meaning.
210 <p>
211 * As is the case with the category codes, in the libSBML Java language
212 * interface, these severity codes are currently
213 * implemented as static integer constants defined in the interface class
214 * <code>libsbmlConstants</code> in the file '<a
215 * href='libsbmlConstants.html'>libsbmlConstants.java</a>'.  This
216 * is admittedly not an ideal approach from the standpoint of modern Java
217 * programming, but it was necessary to work around the lack of
218 * enumerations in Java prior to JDK 1.5.  Future versions of libSBML may
219 * use a proper Java enumeration type to define the severity
220 * codes. 
221 <p>
222 * <center>
223 * <table width='90%' cellspacing='1' cellpadding='1' border='0' class='text-table width80 normal-font alt-row-colors'>
224 *  <tr style='background: lightgray' class='normal-font'>
225 *      <th>Enumerator</th>
226 *      <th>Meaning</th>
227 *  </tr>
228 * <tr><td>{@link  libsbmlConstants#LIBSBML_SEV_INFO LIBSBML_SEV_INFO}</td>
229 * <td>The error is actually informational and
230 * not necessarily a serious problem.</td></tr>
231 * <tr><td>{@link  libsbmlConstants#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING}</td>
232 * <td>The error object represents a problem
233 * that is not serious enough to necessarily stop the problem, but
234 * applications should take note of the problem and evaluate what its
235 * implications may be.</td></tr>
236 * <tr><td>{@link  libsbmlConstants#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR}</td>
237 * <td>The error object represents a serious
238 * error.  The application may continue running but it is unlikely to be
239 * able to continue processing the same XML file or data stream.</td></tr>
240 * <tr><td>{@link  libsbmlConstants#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL}</td>
241 * <td>A serious error occurred, such as an
242 * out-of-memory condition, and the software should terminate
243 * immediately.</td></tr>
244 * </table>
245 * </center>
246 */
247
248public class XMLError {
249   private long swigCPtr;
250   protected boolean swigCMemOwn;
251
252   protected XMLError(long cPtr, boolean cMemoryOwn)
253   {
254     swigCMemOwn = cMemoryOwn;
255     swigCPtr    = cPtr;
256   }
257
258   protected static long getCPtr(XMLError obj)
259   {
260     return (obj == null) ? 0 : obj.swigCPtr;
261   }
262
263   protected static long getCPtrAndDisown (XMLError obj)
264   {
265     long ptr = 0;
266
267     if (obj != null)
268     {
269       ptr             = obj.swigCPtr;
270       obj.swigCMemOwn = false;
271     }
272
273     return ptr;
274   }
275
276  protected void finalize() {
277    delete();
278  }
279
280  public synchronized void delete() {
281    if (swigCPtr != 0) {
282      if (swigCMemOwn) {
283        swigCMemOwn = false;
284        libsbmlJNI.delete_XMLError(swigCPtr);
285      }
286      swigCPtr = 0;
287    }
288  }
289
290  /**
291   * Equality comparison method for XMLError.
292   * <p>
293   * Because the Java methods for libSBML are actually wrappers around code
294   * implemented in C++ and C, certain operations will not behave as
295   * expected.  Equality comparison is one such case.  An instance of a
296   * libSBML object class is actually a <em>proxy object</em>
297   * wrapping the real underlying C/C++ object.  The normal <code>==</code>
298   * equality operator in Java will <em>only compare the Java proxy objects</em>,
299   * not the underlying native object.  The result is almost never what you
300   * want in practical situations.  Unfortunately, Java does not provide a
301   * way to override <code>==</code>.
302   *  <p>
303   * The alternative that must be followed is to use the
304   * <code>equals()</code> method.  The <code>equals</code> method on this
305   * class overrides the default java.lang.Object one, and performs an
306   * intelligent comparison of instances of objects of this class.  The
307   * result is an assessment of whether two libSBML Java objects are truly 
308   * the same underlying native-code objects.
309   *  <p>
310   * The use of this method in practice is the same as the use of any other
311   * Java <code>equals</code> method.  For example,
312   * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns
313   * <code>true</code> if <em>a</em> and <em>b</em> are references to the
314   * same underlying object.
315   *
316   * @param sb a reference to an object to which the current object
317   * instance will be compared
318   *
319   * @return <code>true</code> if <code>sb</code> refers to the same underlying 
320   * native object as this one, <code>false</code> otherwise
321   */
322  public boolean equals(Object sb)
323  {
324    if ( this == sb ) 
325    {
326      return true;
327    }
328    return swigCPtr == getCPtr((XMLError)(sb));
329  }
330
331  /**
332   * Returns a hashcode for this XMLError object.
333   *
334   * @return a hash code usable by Java methods that need them.
335   */
336  public int hashCode()
337  {
338    return (int)(swigCPtr^(swigCPtr>>>32));
339  }
340
341  
342/**
343   * Creates a new {@link XMLError} to report that something occurred during XML
344   * processing.
345   <p>
346   * {@link XMLError} objects have identification numbers to indicate the nature of
347   * the exception.  These numbers are defined as unsigned 
348   * integer constants in the file
349   * 'libsbmlConstants.java'.  See the <a class='el'
350   * href='#error-codes'>top of this documentation</a> for a table
351   * listing the possible values and their meanings.  The argument 
352   * <code>errorId</code> to this constructor <em>can</em> be (but does not have to be) a
353   * value from this set of constants.  If it is
354   * one of the predefined error identifiers, the {@link XMLError} class assumes
355   * the error is a low-level system or XML layer error and
356   * <em>prepends</em> a built-in, predefined error message to any string
357   * passed in the argument <code>details</code> to this constructor.  In addition,
358   * all the predefined error identifiers have associated values for the 
359   * <code>severity</code> and <code>category</code> codes, and these fields are filled-in as
360   * well. 
361   <p>
362   * If the error identifier <code>errorId</code> is a number greater than 9999, this
363   * constructor assumes that the error was generated from another part of
364   * the software, and does not do additional filling in of values beyond
365   * the defaults in the constructor itself.  This allows {@link XMLError} to serve
366   * as a base class for other errors (and is used in this way elsewhere in
367   * libSBML).  Callers should fill in all the parameters with suitable
368   * values if generating errors with codes greater than 9999 to make
369   * maximum use of the {@link XMLError} facilities.
370   <p>
371   * As mentioned above, 
372   * there are additional constants defined for <a class='el'
373   * href='#error-severities'>standard severity</a> and <a class='el'
374   * href='#error-categories'>standard category</a> codes, and every predefined 
375   * error in libSBML has an associated value for severity and category taken
376   * from these predefined sets.  These constants have symbol names
377   * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
378   * respectively.  If the value of <code>errorId</code> is one of the standard error
379   * codes, callers do not need to fill in <code>severity</code> and <code>category</code> in a
380   * call to this constructor.  Conversely, if <code>errorId</code> is not an existing
381   * XML-level error code, callers can use other values for <code>severity</code> and
382   * <code>category</code>. 
383   <p>
384   * @param errorId a long integer, the identification number of the error.
385   <p>
386   * @param details a string containing additional details about the error.
387   * If the error code in <code>errorId</code> is one that is recognized by {@link XMLError},
388   * the given message is <em>appended</em> to a predefined message associated
389   * with the given code.  If the error code is not recognized, the message
390   * is stored as-is as the text of the error.
391   <p>
392   * @param line a long integer, the line number at which the error occured.
393   <p>
394   * @param column a long integer, the column number at which the error occured.
395   <p>
396   * @param severity an integer indicating severity of the error.
397   <p>
398   * @param category an integer indicating the category to which the error
399   * belongs.
400   <p>
401   * 
402</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
403The native C++ implementation of this method defines a default argument
404value. In the documentation generated for different libSBML language
405bindings, you may or may not see corresponding arguments in the method
406declarations. For example, in Java and C#, a default argument is handled by
407declaring two separate methods, with one of them having the argument and
408the other one lacking the argument. However, the libSBML documentation will
409be <em>identical</em> for both methods. Consequently, if you are reading
410this and do not see an argument even though one is described, please look
411for descriptions of other variants of this method near where this one
412appears in the documentation.
413</dd></dl>
414 
415   */ public
416 XMLError(int errorId, String details, long line, long column, long severity, long category) throws org.sbml.libsbml.XMLConstructorException {
417    this(libsbmlJNI.new_XMLError__SWIG_0(errorId, details, line, column, severity, category), true);
418  }
419
420  
421/**
422   * Creates a new {@link XMLError} to report that something occurred during XML
423   * processing.
424   <p>
425   * {@link XMLError} objects have identification numbers to indicate the nature of
426   * the exception.  These numbers are defined as unsigned 
427   * integer constants in the file
428   * 'libsbmlConstants.java'.  See the <a class='el'
429   * href='#error-codes'>top of this documentation</a> for a table
430   * listing the possible values and their meanings.  The argument 
431   * <code>errorId</code> to this constructor <em>can</em> be (but does not have to be) a
432   * value from this set of constants.  If it is
433   * one of the predefined error identifiers, the {@link XMLError} class assumes
434   * the error is a low-level system or XML layer error and
435   * <em>prepends</em> a built-in, predefined error message to any string
436   * passed in the argument <code>details</code> to this constructor.  In addition,
437   * all the predefined error identifiers have associated values for the 
438   * <code>severity</code> and <code>category</code> codes, and these fields are filled-in as
439   * well. 
440   <p>
441   * If the error identifier <code>errorId</code> is a number greater than 9999, this
442   * constructor assumes that the error was generated from another part of
443   * the software, and does not do additional filling in of values beyond
444   * the defaults in the constructor itself.  This allows {@link XMLError} to serve
445   * as a base class for other errors (and is used in this way elsewhere in
446   * libSBML).  Callers should fill in all the parameters with suitable
447   * values if generating errors with codes greater than 9999 to make
448   * maximum use of the {@link XMLError} facilities.
449   <p>
450   * As mentioned above, 
451   * there are additional constants defined for <a class='el'
452   * href='#error-severities'>standard severity</a> and <a class='el'
453   * href='#error-categories'>standard category</a> codes, and every predefined 
454   * error in libSBML has an associated value for severity and category taken
455   * from these predefined sets.  These constants have symbol names
456   * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
457   * respectively.  If the value of <code>errorId</code> is one of the standard error
458   * codes, callers do not need to fill in <code>severity</code> and <code>category</code> in a
459   * call to this constructor.  Conversely, if <code>errorId</code> is not an existing
460   * XML-level error code, callers can use other values for <code>severity</code> and
461   * <code>category</code>. 
462   <p>
463   * @param errorId a long integer, the identification number of the error.
464   <p>
465   * @param details a string containing additional details about the error.
466   * If the error code in <code>errorId</code> is one that is recognized by {@link XMLError},
467   * the given message is <em>appended</em> to a predefined message associated
468   * with the given code.  If the error code is not recognized, the message
469   * is stored as-is as the text of the error.
470   <p>
471   * @param line a long integer, the line number at which the error occured.
472   <p>
473   * @param column a long integer, the column number at which the error occured.
474   <p>
475   * @param severity an integer indicating severity of the error.
476   <p>
477   * @param category an integer indicating the category to which the error
478   * belongs.
479   <p>
480   * 
481</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
482The native C++ implementation of this method defines a default argument
483value. In the documentation generated for different libSBML language
484bindings, you may or may not see corresponding arguments in the method
485declarations. For example, in Java and C#, a default argument is handled by
486declaring two separate methods, with one of them having the argument and
487the other one lacking the argument. However, the libSBML documentation will
488be <em>identical</em> for both methods. Consequently, if you are reading
489this and do not see an argument even though one is described, please look
490for descriptions of other variants of this method near where this one
491appears in the documentation.
492</dd></dl>
493 
494   */ public
495 XMLError(int errorId, String details, long line, long column, long severity) throws org.sbml.libsbml.XMLConstructorException {
496    this(libsbmlJNI.new_XMLError__SWIG_1(errorId, details, line, column, severity), true);
497  }
498
499  
500/**
501   * Creates a new {@link XMLError} to report that something occurred during XML
502   * processing.
503   <p>
504   * {@link XMLError} objects have identification numbers to indicate the nature of
505   * the exception.  These numbers are defined as unsigned 
506   * integer constants in the file
507   * 'libsbmlConstants.java'.  See the <a class='el'
508   * href='#error-codes'>top of this documentation</a> for a table
509   * listing the possible values and their meanings.  The argument 
510   * <code>errorId</code> to this constructor <em>can</em> be (but does not have to be) a
511   * value from this set of constants.  If it is
512   * one of the predefined error identifiers, the {@link XMLError} class assumes
513   * the error is a low-level system or XML layer error and
514   * <em>prepends</em> a built-in, predefined error message to any string
515   * passed in the argument <code>details</code> to this constructor.  In addition,
516   * all the predefined error identifiers have associated values for the 
517   * <code>severity</code> and <code>category</code> codes, and these fields are filled-in as
518   * well. 
519   <p>
520   * If the error identifier <code>errorId</code> is a number greater than 9999, this
521   * constructor assumes that the error was generated from another part of
522   * the software, and does not do additional filling in of values beyond
523   * the defaults in the constructor itself.  This allows {@link XMLError} to serve
524   * as a base class for other errors (and is used in this way elsewhere in
525   * libSBML).  Callers should fill in all the parameters with suitable
526   * values if generating errors with codes greater than 9999 to make
527   * maximum use of the {@link XMLError} facilities.
528   <p>
529   * As mentioned above, 
530   * there are additional constants defined for <a class='el'
531   * href='#error-severities'>standard severity</a> and <a class='el'
532   * href='#error-categories'>standard category</a> codes, and every predefined 
533   * error in libSBML has an associated value for severity and category taken
534   * from these predefined sets.  These constants have symbol names
535   * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
536   * respectively.  If the value of <code>errorId</code> is one of the standard error
537   * codes, callers do not need to fill in <code>severity</code> and <code>category</code> in a
538   * call to this constructor.  Conversely, if <code>errorId</code> is not an existing
539   * XML-level error code, callers can use other values for <code>severity</code> and
540   * <code>category</code>. 
541   <p>
542   * @param errorId a long integer, the identification number of the error.
543   <p>
544   * @param details a string containing additional details about the error.
545   * If the error code in <code>errorId</code> is one that is recognized by {@link XMLError},
546   * the given message is <em>appended</em> to a predefined message associated
547   * with the given code.  If the error code is not recognized, the message
548   * is stored as-is as the text of the error.
549   <p>
550   * @param line a long integer, the line number at which the error occured.
551   <p>
552   * @param column a long integer, the column number at which the error occured.
553   <p>
554   * @param severity an integer indicating severity of the error.
555   <p>
556   * @param category an integer indicating the category to which the error
557   * belongs.
558   <p>
559   * 
560</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
561The native C++ implementation of this method defines a default argument
562value. In the documentation generated for different libSBML language
563bindings, you may or may not see corresponding arguments in the method
564declarations. For example, in Java and C#, a default argument is handled by
565declaring two separate methods, with one of them having the argument and
566the other one lacking the argument. However, the libSBML documentation will
567be <em>identical</em> for both methods. Consequently, if you are reading
568this and do not see an argument even though one is described, please look
569for descriptions of other variants of this method near where this one
570appears in the documentation.
571</dd></dl>
572 
573   */ public
574 XMLError(int errorId, String details, long line, long column) throws org.sbml.libsbml.XMLConstructorException {
575    this(libsbmlJNI.new_XMLError__SWIG_2(errorId, details, line, column), true);
576  }
577
578  
579/**
580   * Creates a new {@link XMLError} to report that something occurred during XML
581   * processing.
582   <p>
583   * {@link XMLError} objects have identification numbers to indicate the nature of
584   * the exception.  These numbers are defined as unsigned 
585   * integer constants in the file
586   * 'libsbmlConstants.java'.  See the <a class='el'
587   * href='#error-codes'>top of this documentation</a> for a table
588   * listing the possible values and their meanings.  The argument 
589   * <code>errorId</code> to this constructor <em>can</em> be (but does not have to be) a
590   * value from this set of constants.  If it is
591   * one of the predefined error identifiers, the {@link XMLError} class assumes
592   * the error is a low-level system or XML layer error and
593   * <em>prepends</em> a built-in, predefined error message to any string
594   * passed in the argument <code>details</code> to this constructor.  In addition,
595   * all the predefined error identifiers have associated values for the 
596   * <code>severity</code> and <code>category</code> codes, and these fields are filled-in as
597   * well. 
598   <p>
599   * If the error identifier <code>errorId</code> is a number greater than 9999, this
600   * constructor assumes that the error was generated from another part of
601   * the software, and does not do additional filling in of values beyond
602   * the defaults in the constructor itself.  This allows {@link XMLError} to serve
603   * as a base class for other errors (and is used in this way elsewhere in
604   * libSBML).  Callers should fill in all the parameters with suitable
605   * values if generating errors with codes greater than 9999 to make
606   * maximum use of the {@link XMLError} facilities.
607   <p>
608   * As mentioned above, 
609   * there are additional constants defined for <a class='el'
610   * href='#error-severities'>standard severity</a> and <a class='el'
611   * href='#error-categories'>standard category</a> codes, and every predefined 
612   * error in libSBML has an associated value for severity and category taken
613   * from these predefined sets.  These constants have symbol names
614   * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
615   * respectively.  If the value of <code>errorId</code> is one of the standard error
616   * codes, callers do not need to fill in <code>severity</code> and <code>category</code> in a
617   * call to this constructor.  Conversely, if <code>errorId</code> is not an existing
618   * XML-level error code, callers can use other values for <code>severity</code> and
619   * <code>category</code>. 
620   <p>
621   * @param errorId a long integer, the identification number of the error.
622   <p>
623   * @param details a string containing additional details about the error.
624   * If the error code in <code>errorId</code> is one that is recognized by {@link XMLError},
625   * the given message is <em>appended</em> to a predefined message associated
626   * with the given code.  If the error code is not recognized, the message
627   * is stored as-is as the text of the error.
628   <p>
629   * @param line a long integer, the line number at which the error occured.
630   <p>
631   * @param column a long integer, the column number at which the error occured.
632   <p>
633   * @param severity an integer indicating severity of the error.
634   <p>
635   * @param category an integer indicating the category to which the error
636   * belongs.
637   <p>
638   * 
639</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
640The native C++ implementation of this method defines a default argument
641value. In the documentation generated for different libSBML language
642bindings, you may or may not see corresponding arguments in the method
643declarations. For example, in Java and C#, a default argument is handled by
644declaring two separate methods, with one of them having the argument and
645the other one lacking the argument. However, the libSBML documentation will
646be <em>identical</em> for both methods. Consequently, if you are reading
647this and do not see an argument even though one is described, please look
648for descriptions of other variants of this method near where this one
649appears in the documentation.
650</dd></dl>
651 
652   */ public
653 XMLError(int errorId, String details, long line) throws org.sbml.libsbml.XMLConstructorException {
654    this(libsbmlJNI.new_XMLError__SWIG_3(errorId, details, line), true);
655  }
656
657  
658/**
659   * Creates a new {@link XMLError} to report that something occurred during XML
660   * processing.
661   <p>
662   * {@link XMLError} objects have identification numbers to indicate the nature of
663   * the exception.  These numbers are defined as unsigned 
664   * integer constants in the file
665   * 'libsbmlConstants.java'.  See the <a class='el'
666   * href='#error-codes'>top of this documentation</a> for a table
667   * listing the possible values and their meanings.  The argument 
668   * <code>errorId</code> to this constructor <em>can</em> be (but does not have to be) a
669   * value from this set of constants.  If it is
670   * one of the predefined error identifiers, the {@link XMLError} class assumes
671   * the error is a low-level system or XML layer error and
672   * <em>prepends</em> a built-in, predefined error message to any string
673   * passed in the argument <code>details</code> to this constructor.  In addition,
674   * all the predefined error identifiers have associated values for the 
675   * <code>severity</code> and <code>category</code> codes, and these fields are filled-in as
676   * well. 
677   <p>
678   * If the error identifier <code>errorId</code> is a number greater than 9999, this
679   * constructor assumes that the error was generated from another part of
680   * the software, and does not do additional filling in of values beyond
681   * the defaults in the constructor itself.  This allows {@link XMLError} to serve
682   * as a base class for other errors (and is used in this way elsewhere in
683   * libSBML).  Callers should fill in all the parameters with suitable
684   * values if generating errors with codes greater than 9999 to make
685   * maximum use of the {@link XMLError} facilities.
686   <p>
687   * As mentioned above, 
688   * there are additional constants defined for <a class='el'
689   * href='#error-severities'>standard severity</a> and <a class='el'
690   * href='#error-categories'>standard category</a> codes, and every predefined 
691   * error in libSBML has an associated value for severity and category taken
692   * from these predefined sets.  These constants have symbol names
693   * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
694   * respectively.  If the value of <code>errorId</code> is one of the standard error
695   * codes, callers do not need to fill in <code>severity</code> and <code>category</code> in a
696   * call to this constructor.  Conversely, if <code>errorId</code> is not an existing
697   * XML-level error code, callers can use other values for <code>severity</code> and
698   * <code>category</code>. 
699   <p>
700   * @param errorId a long integer, the identification number of the error.
701   <p>
702   * @param details a string containing additional details about the error.
703   * If the error code in <code>errorId</code> is one that is recognized by {@link XMLError},
704   * the given message is <em>appended</em> to a predefined message associated
705   * with the given code.  If the error code is not recognized, the message
706   * is stored as-is as the text of the error.
707   <p>
708   * @param line a long integer, the line number at which the error occured.
709   <p>
710   * @param column a long integer, the column number at which the error occured.
711   <p>
712   * @param severity an integer indicating severity of the error.
713   <p>
714   * @param category an integer indicating the category to which the error
715   * belongs.
716   <p>
717   * 
718</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
719The native C++ implementation of this method defines a default argument
720value. In the documentation generated for different libSBML language
721bindings, you may or may not see corresponding arguments in the method
722declarations. For example, in Java and C#, a default argument is handled by
723declaring two separate methods, with one of them having the argument and
724the other one lacking the argument. However, the libSBML documentation will
725be <em>identical</em> for both methods. Consequently, if you are reading
726this and do not see an argument even though one is described, please look
727for descriptions of other variants of this method near where this one
728appears in the documentation.
729</dd></dl>
730 
731   */ public
732 XMLError(int errorId, String details) throws org.sbml.libsbml.XMLConstructorException {
733    this(libsbmlJNI.new_XMLError__SWIG_4(errorId, details), true);
734  }
735
736  
737/**
738   * Creates a new {@link XMLError} to report that something occurred during XML
739   * processing.
740   <p>
741   * {@link XMLError} objects have identification numbers to indicate the nature of
742   * the exception.  These numbers are defined as unsigned 
743   * integer constants in the file
744   * 'libsbmlConstants.java'.  See the <a class='el'
745   * href='#error-codes'>top of this documentation</a> for a table
746   * listing the possible values and their meanings.  The argument 
747   * <code>errorId</code> to this constructor <em>can</em> be (but does not have to be) a
748   * value from this set of constants.  If it is
749   * one of the predefined error identifiers, the {@link XMLError} class assumes
750   * the error is a low-level system or XML layer error and
751   * <em>prepends</em> a built-in, predefined error message to any string
752   * passed in the argument <code>details</code> to this constructor.  In addition,
753   * all the predefined error identifiers have associated values for the 
754   * <code>severity</code> and <code>category</code> codes, and these fields are filled-in as
755   * well. 
756   <p>
757   * If the error identifier <code>errorId</code> is a number greater than 9999, this
758   * constructor assumes that the error was generated from another part of
759   * the software, and does not do additional filling in of values beyond
760   * the defaults in the constructor itself.  This allows {@link XMLError} to serve
761   * as a base class for other errors (and is used in this way elsewhere in
762   * libSBML).  Callers should fill in all the parameters with suitable
763   * values if generating errors with codes greater than 9999 to make
764   * maximum use of the {@link XMLError} facilities.
765   <p>
766   * As mentioned above, 
767   * there are additional constants defined for <a class='el'
768   * href='#error-severities'>standard severity</a> and <a class='el'
769   * href='#error-categories'>standard category</a> codes, and every predefined 
770   * error in libSBML has an associated value for severity and category taken
771   * from these predefined sets.  These constants have symbol names
772   * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
773   * respectively.  If the value of <code>errorId</code> is one of the standard error
774   * codes, callers do not need to fill in <code>severity</code> and <code>category</code> in a
775   * call to this constructor.  Conversely, if <code>errorId</code> is not an existing
776   * XML-level error code, callers can use other values for <code>severity</code> and
777   * <code>category</code>. 
778   <p>
779   * @param errorId a long integer, the identification number of the error.
780   <p>
781   * @param details a string containing additional details about the error.
782   * If the error code in <code>errorId</code> is one that is recognized by {@link XMLError},
783   * the given message is <em>appended</em> to a predefined message associated
784   * with the given code.  If the error code is not recognized, the message
785   * is stored as-is as the text of the error.
786   <p>
787   * @param line a long integer, the line number at which the error occured.
788   <p>
789   * @param column a long integer, the column number at which the error occured.
790   <p>
791   * @param severity an integer indicating severity of the error.
792   <p>
793   * @param category an integer indicating the category to which the error
794   * belongs.
795   <p>
796   * 
797</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
798The native C++ implementation of this method defines a default argument
799value. In the documentation generated for different libSBML language
800bindings, you may or may not see corresponding arguments in the method
801declarations. For example, in Java and C#, a default argument is handled by
802declaring two separate methods, with one of them having the argument and
803the other one lacking the argument. However, the libSBML documentation will
804be <em>identical</em> for both methods. Consequently, if you are reading
805this and do not see an argument even though one is described, please look
806for descriptions of other variants of this method near where this one
807appears in the documentation.
808</dd></dl>
809 
810   */ public
811 XMLError(int errorId) throws org.sbml.libsbml.XMLConstructorException {
812    this(libsbmlJNI.new_XMLError__SWIG_5(errorId), true);
813  }
814
815  
816/**
817   * Creates a new {@link XMLError} to report that something occurred during XML
818   * processing.
819   <p>
820   * {@link XMLError} objects have identification numbers to indicate the nature of
821   * the exception.  These numbers are defined as unsigned 
822   * integer constants in the file
823   * 'libsbmlConstants.java'.  See the <a class='el'
824   * href='#error-codes'>top of this documentation</a> for a table
825   * listing the possible values and their meanings.  The argument 
826   * <code>errorId</code> to this constructor <em>can</em> be (but does not have to be) a
827   * value from this set of constants.  If it is
828   * one of the predefined error identifiers, the {@link XMLError} class assumes
829   * the error is a low-level system or XML layer error and
830   * <em>prepends</em> a built-in, predefined error message to any string
831   * passed in the argument <code>details</code> to this constructor.  In addition,
832   * all the predefined error identifiers have associated values for the 
833   * <code>severity</code> and <code>category</code> codes, and these fields are filled-in as
834   * well. 
835   <p>
836   * If the error identifier <code>errorId</code> is a number greater than 9999, this
837   * constructor assumes that the error was generated from another part of
838   * the software, and does not do additional filling in of values beyond
839   * the defaults in the constructor itself.  This allows {@link XMLError} to serve
840   * as a base class for other errors (and is used in this way elsewhere in
841   * libSBML).  Callers should fill in all the parameters with suitable
842   * values if generating errors with codes greater than 9999 to make
843   * maximum use of the {@link XMLError} facilities.
844   <p>
845   * As mentioned above, 
846   * there are additional constants defined for <a class='el'
847   * href='#error-severities'>standard severity</a> and <a class='el'
848   * href='#error-categories'>standard category</a> codes, and every predefined 
849   * error in libSBML has an associated value for severity and category taken
850   * from these predefined sets.  These constants have symbol names
851   * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
852   * respectively.  If the value of <code>errorId</code> is one of the standard error
853   * codes, callers do not need to fill in <code>severity</code> and <code>category</code> in a
854   * call to this constructor.  Conversely, if <code>errorId</code> is not an existing
855   * XML-level error code, callers can use other values for <code>severity</code> and
856   * <code>category</code>. 
857   <p>
858   * @param errorId a long integer, the identification number of the error.
859   <p>
860   * @param details a string containing additional details about the error.
861   * If the error code in <code>errorId</code> is one that is recognized by {@link XMLError},
862   * the given message is <em>appended</em> to a predefined message associated
863   * with the given code.  If the error code is not recognized, the message
864   * is stored as-is as the text of the error.
865   <p>
866   * @param line a long integer, the line number at which the error occured.
867   <p>
868   * @param column a long integer, the column number at which the error occured.
869   <p>
870   * @param severity an integer indicating severity of the error.
871   <p>
872   * @param category an integer indicating the category to which the error
873   * belongs.
874   <p>
875   * 
876</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
877The native C++ implementation of this method defines a default argument
878value. In the documentation generated for different libSBML language
879bindings, you may or may not see corresponding arguments in the method
880declarations. For example, in Java and C#, a default argument is handled by
881declaring two separate methods, with one of them having the argument and
882the other one lacking the argument. However, the libSBML documentation will
883be <em>identical</em> for both methods. Consequently, if you are reading
884this and do not see an argument even though one is described, please look
885for descriptions of other variants of this method near where this one
886appears in the documentation.
887</dd></dl>
888 
889   */ public
890 XMLError() throws org.sbml.libsbml.XMLConstructorException {
891    this(libsbmlJNI.new_XMLError__SWIG_6(), true);
892  }
893
894  
895/**
896   * Copy constructor; creates a copy of this {@link XMLError}.
897   <p>
898   * <code>orig</code> the {@link XMLError} object to copy.
899   <p>
900   * @throws XMLConstructorException 
901   * Thrown if the argument <code>orig</code> is <code>null.</code>
902   */ public
903 XMLError(XMLError orig) throws org.sbml.libsbml.XMLConstructorException {
904    this(libsbmlJNI.new_XMLError__SWIG_7(XMLError.getCPtr(orig), orig), true);
905  }
906
907  
908/**
909   * Returns the identifier of this error.
910   <p>
911   * @return the error code for this error.
912   <p>
913   * @see #getMessage()
914   * @see #getShortMessage()
915   * @see #getCategory()
916   * @see #getSeverity()
917   */ public
918 long getErrorId() {
919    return libsbmlJNI.XMLError_getErrorId(swigCPtr, this);
920  }
921
922  
923/**
924   * Returns the message text of this error.
925   <p>
926   * The message associated with an error object describes the nature of
927   * the problem.  The message returned by this method is generally longer
928   * and clearer than the message returned by {@link XMLError#getShortMessage()},
929   * but not in all cases.
930   <p>
931   * Callers may use {@link XMLError#getCategory()} and {@link XMLError#getSeverity()} to
932   * obtain additional information about the nature and severity of the
933   * problem.
934   <p>
935   * @return the message text
936   <p>
937   * @see #getErrorId()
938   * @see #getShortMessage()
939   * @see #getCategory()
940   * @see #getSeverity()
941   */ public
942 String getMessage() {
943    return libsbmlJNI.XMLError_getMessage(swigCPtr, this);
944  }
945
946  
947/**
948   * Returns a brief message for this error.
949   <p>
950   * This is an alternative error message that, in general, is as short as
951   * the authors could make it.  However, brevity is often inversely
952   * proportional to clarity, so this short message may not be sufficiently
953   * informative to understand the nature of the error.  Calling
954   * applications may wish to check {@link XMLError#getMessage()} in addition or
955   * instead.
956   <p>
957   * @return the short error message text
958   <p>
959   * @see #getErrorId()
960   * @see #getMessage()
961   * @see #getCategory()
962   * @see #getSeverity()
963   */ public
964 String getShortMessage() {
965    return libsbmlJNI.XMLError_getShortMessage(swigCPtr, this);
966  }
967
968  
969/**
970   * Returns the line number in the XML input near where the error, warning
971   * or other diagnostic occurred.
972   <p>
973   * We say 'near where the problem occurred', because many factors affect
974   * how accurate the line/column information ultimately is.  For example,
975   * sometimes, the underlying XML parsers can only report such information
976   * for the parent XML element where an error occurs, and not for the
977   * specific point where the problem occurs.  In other situations, some
978   * parsers report invalid line and/or column numbers altogether.  If this
979   * occurs, libSBML sets the line and/or column number in the {@link XMLError}
980   * object to either <code>0</code> or the value of the maximum unsigned
981   * long integer representable on the platform where libSBML is running.
982   * The probability that a true line or column number in an SBML model
983   * would equal this value is vanishingly small; thus, if an application
984   * encounters these values in an {@link XMLError} object, it can assume no valid
985   * line/column number could be provided by libSBML in that situation.
986   <p>
987   * @return the line number
988   <p>
989   * @see #getColumn()
990   */ public
991 long getLine() {
992    return libsbmlJNI.XMLError_getLine(swigCPtr, this);
993  }
994
995  
996/**
997   * Returns the column number in the XML input near where the error,
998   * warning or other diagnostic occurred.
999   <p>
1000   * We say 'near where the problem occurred', because many factors affect
1001   * how accurate the line/column information ultimately is.  For example,
1002   * sometimes, the underlying XML parsers can only report such information
1003   * for the parent XML element where an error occurs, and not for the
1004   * specific point where the problem occurs.  In other situations, some
1005   * parsers report invalid line and/or column numbers altogether.  If this
1006   * occurs, libSBML sets the line and/or column number in the {@link XMLError}
1007   * object to either <code>0</code> or the value of the maximum unsigned
1008   * long integer representable on the platform where libSBML is running.
1009   * The probability that a true line or column number in an SBML model
1010   * would equal this value is vanishingly small; thus, if an application
1011   * encounters these values in an {@link XMLError} object, it can assume no valid
1012   * line/column number could be provided by libSBML in that situation.
1013   <p>
1014   * @return the column number
1015   <p>
1016   * @see #getLine()
1017   */ public
1018 long getColumn() {
1019    return libsbmlJNI.XMLError_getColumn(swigCPtr, this);
1020  }
1021
1022  
1023/**
1024   * Returns the severity of this error.
1025   <p>
1026   * {@link XMLError} defines an enumeration of severity codes for the XML layer.
1027   * Applications that build on {@link XMLError} by subclassing it may add their
1028   * own severity codes with numbers higher than those in the predefined
1029   * set of severity codes.
1030   <p>
1031   * @return the severity of this {@link XMLError}.
1032   <p>
1033   * @see #getSeverityAsString()
1034   * @see #getCategory()
1035   */ public
1036 long getSeverity() {
1037    return libsbmlJNI.XMLError_getSeverity(swigCPtr, this);
1038  }
1039
1040  
1041/**
1042   * Returns a string describing the severity level of this error.
1043   <p>
1044   * {@link XMLError} defines an enumeration of severity codes for the XML layer.
1045   * Applications that build on {@link XMLError} by subclassing it may add their
1046   * own severity codes with numbers higher than those in the predefined
1047   * set of severity codes.
1048   <p>
1049   * @return string representing the severity of this {@link XMLError}.
1050   <p>
1051   * @see #getSeverity()
1052   * @see #getCategoryAsString()
1053   */ public
1054 String getSeverityAsString() {
1055    return libsbmlJNI.XMLError_getSeverityAsString(swigCPtr, this);
1056  }
1057
1058  
1059/**
1060   * Returns the category of this error.
1061   <p>
1062   * {@link XMLError} defines an enumeration of category codes for the XML layer.
1063   * Applications that build on {@link XMLError} by subclassing it may add their
1064   * own categories with numbers higher than those in the predefined
1065   * set of category codes.
1066   <p>
1067   * Categories can be used to partition errors into distinct groups.
1068   * Among other things, this can be used to prevent id conflicts by
1069   * uniquely identifying an {@link XMLError} by both id and category.
1070   <p>
1071   * @return the category of this {@link XMLError}.
1072   <p>
1073   * @see #getSeverity()
1074   * @see #getCategoryAsString()
1075   */ public
1076 long getCategory() {
1077    return libsbmlJNI.XMLError_getCategory(swigCPtr, this);
1078  }
1079
1080  
1081/**
1082   * Returns a string describing the category of this error.
1083   <p>
1084   * {@link XMLError} defines an enumeration of category codes for the XML layer.
1085   * Applications that build on {@link XMLError} by subclassing it may add their
1086   * own categories with numbers higher than those in the predefined
1087   * set of category codes.
1088   <p>
1089   * Categories can be used to partition errors into distinct groups.
1090   * Among other things, this can be used to prevent id conflicts by
1091   * uniquely identifying an {@link XMLError} by both id and category.
1092   <p>
1093   * @return string representing the category of this {@link XMLError}.
1094   <p>
1095   * @see #getCategory()
1096   * @see #getSeverityAsString()
1097   */ public
1098 String getCategoryAsString() {
1099    return libsbmlJNI.XMLError_getCategoryAsString(swigCPtr, this);
1100  }
1101
1102  
1103/**
1104   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
1105   * error object is for information purposes only.
1106   <p>
1107   * This is equivalent to obtaining the severity code from an {@link XMLError}
1108   * object (via {@link XMLError#getSeverity()}) and then comparing it to the
1109   * value {@link  libsbmlConstants#LIBSBML_SEV_INFO LIBSBML_SEV_INFO} from the
1110   * set of predefined
1111   * severity codes.
1112   <p>
1113   * @return <code>true</code> if this {@link XMLError} is for informational purposes only,
1114   * <code>false</code> otherwise.
1115   <p>
1116   * @see #isWarning()
1117   * @see #isError()
1118   * @see #isFatal()
1119   */ public
1120 boolean isInfo() {
1121    return libsbmlJNI.XMLError_isInfo(swigCPtr, this);
1122  }
1123
1124  
1125/**
1126   * Predicate returning <code>true</code> or <code>false</code> depending on whether 
1127   * this error object is a warning.
1128   <p>
1129   * This is equivalent to obtaining the severity code from an {@link XMLError}
1130   * object (via {@link XMLError#getSeverity()}) and then comparing it to the
1131   * value {@link  libsbmlConstants#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING} from the
1132   * set of predefined
1133   * severity codes.
1134   <p>
1135   * @return <code>true</code> if this error is a warning, <code>false</code> otherwise.
1136   <p>
1137   * @see #isInfo()
1138   * @see #isError()
1139   * @see #isFatal()
1140   */ public
1141 boolean isWarning() {
1142    return libsbmlJNI.XMLError_isWarning(swigCPtr, this);
1143  }
1144
1145  
1146/**
1147   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
1148   * error is a significant error.
1149   <p>
1150   * This is equivalent to obtaining the severity code from an {@link XMLError}
1151   * object (via {@link XMLError#getSeverity()}) and then comparing it to the
1152   * value {@link  libsbmlConstants#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR} from the
1153   * set of predefined
1154   * severity codes.
1155   <p>
1156   * @return <code>true</code> if this error is an error, <code>false</code> otherwise.
1157   <p>
1158   * @see #isInfo()
1159   * @see #isWarning()
1160   * @see #isFatal()
1161   */ public
1162 boolean isError() {
1163    return libsbmlJNI.XMLError_isError(swigCPtr, this);
1164  }
1165
1166  
1167/**
1168   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
1169   * error is a fatal run-time error.
1170   <p>
1171   * This is equivalent to obtaining the severity code from an {@link XMLError}
1172   * object (via {@link XMLError#getSeverity()}) and then comparing it to the
1173   * value {@link  libsbmlConstants#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL} from the
1174   * set of predefined severity codes.
1175   <p>
1176   * @return <code>true</code> if this error is a fatal error, <code>false</code> otherwise.
1177   <p>
1178   * @see #isInfo()
1179   * @see #isWarning()
1180   * @see #isError()
1181   */ public
1182 boolean isFatal() {
1183    return libsbmlJNI.XMLError_isFatal(swigCPtr, this);
1184  }
1185
1186  
1187/**
1188   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
1189   * error resulted from an internal program error.
1190   <p>
1191   * This is equivalent to obtaining the category identifier from an
1192   * {@link XMLError} object (via {@link XMLError#getCategory()}) and then comparing it to
1193   * the value {@link  libsbmlConstants#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL} from the
1194   * set of predefined category codes.
1195   <p>
1196   * @return <code>true</code> or <code>false</code>
1197   <p>
1198   * @see #isSystem()
1199   * @see #isXML()
1200   */ public
1201 boolean isInternal() {
1202    return libsbmlJNI.XMLError_isInternal(swigCPtr, this);
1203  }
1204
1205  
1206/**
1207   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
1208   * error was generated by the operating system.
1209   <p>
1210   * This is equivalent to obtaining the category identifier from an
1211   * {@link XMLError} object (via {@link XMLError#getCategory()}) and then comparing it to
1212   * the value {@link  libsbmlConstants#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM} from the
1213   * set of predefined category codes.
1214   <p>
1215   * @return <code>true</code> or <code>false</code>
1216   <p>
1217   * @see #isInternal()
1218   * @see #isXML()
1219   */ public
1220 boolean isSystem() {
1221    return libsbmlJNI.XMLError_isSystem(swigCPtr, this);
1222  }
1223
1224  
1225/**
1226   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
1227   * error resulted from a problem in the XML input (e.g., an XML syntax
1228   * error).
1229   <p>
1230   * This is equivalent to obtaining the category identifier from an
1231   * {@link XMLError} object (via {@link XMLError#getCategory()}) and then comparing it to
1232   * the value {@link  libsbmlConstants#LIBSBML_CAT_XML LIBSBML_CAT_XML} from the
1233   * set of predefined category codes.
1234   <p>
1235   * @return <code>true</code> or <code>false</code>
1236   <p>
1237   * @see #isInternal()
1238   * @see #isSystem()
1239   */ public
1240 boolean isXML() {
1241    return libsbmlJNI.XMLError_isXML(swigCPtr, this);
1242  }
1243
1244  
1245/**
1246   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
1247   * error resulted from a problem or whether it was logged as an unknown
1248   * error.
1249   <p>
1250   * This is equivalent to obtaining the error identifier from an
1251   * {@link XMLError} object (via {@link XMLError#getErrorId()}) and then comparing it to
1252   * the value XMLUnknownError or UnknownError from the
1253   * set of predefined error codes.
1254   <p>
1255   * @return <code>true</code> or <code>false</code>
1256   */ public
1257 boolean isValid() {
1258    return libsbmlJNI.XMLError_isValid(swigCPtr, this);
1259  }
1260
1261  
1262/**
1263   * Sets the line number where this error occurred.
1264   <p>
1265   * @param line a long integer, the line number to set.
1266   <p>
1267   * @return integer value indicating success/failure of the
1268   * function.   The possible values
1269   * returned by this function are:
1270   * <ul>
1271   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1272   *
1273   * </ul> <p>
1274   * @see #setColumn(long column)
1275   */ public
1276 int setLine(long line) {
1277    return libsbmlJNI.XMLError_setLine(swigCPtr, this, line);
1278  }
1279
1280  
1281/**
1282   * Sets the column number where this error occurred.
1283   <p>
1284   * @param column a long integer, the column number to set.
1285   <p>
1286   * @return integer value indicating success/failure of the
1287   * function.   The possible values
1288   * returned by this function are:
1289   * <ul>
1290   * <li> {@link  libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
1291   *
1292   * </ul> <p>
1293   * @see #setLine(long line)
1294   */ public
1295 int setColumn(long column) {
1296    return libsbmlJNI.XMLError_setColumn(swigCPtr, this, column);
1297  }
1298
1299  
1300/**
1301   * Returns a copy of the message string associated with the given
1302   * predefined {@link XMLError} code.
1303   <p>
1304   * @param code the error code whose message is sought; it must be a
1305   * predefined value from <a class='el' href='#error-codes'>the set
1306   * of predefined error identifiers</a>.
1307   */ public
1308 static String getStandardMessage(int code) {
1309    return libsbmlJNI.XMLError_getStandardMessage(code);
1310  }
1311
1312  
1313/**
1314   * Returns the SBML Level&nbsp;3 package extension (if any) that logged
1315   * this error.
1316   <p>
1317   * Each error logged by an libSBML extension for SBML Level&nbsp;3 packages
1318   * includes a record of the package that logged it.  The field is a simple
1319   * text string.  If the string is empty or has the value <code>'core'</code>, then
1320   * the error came from libSBML core; otherwise, the string will be the
1321   * short-form name of the package (e.g., <code>'comp'</code> for the Hierarchical
1322   * {@link Model} Composition package).
1323   <p>
1324   * @return a string representing the name of the package that logged this
1325   * error.  If the error did not come from a package extension, the value
1326   * will be the empty string or <code>'core'.</code>
1327   */ public
1328 String getPackage() {
1329    return libsbmlJNI.XMLError_getPackage(swigCPtr, this);
1330  }
1331
1332  
1333/**
1334   * Returns libSBML's internal numerical offset for the error code
1335   * associated with this error.
1336   <p>
1337   * In the SBML Level&nbsp;3 package specifications, package validation
1338   * rules are identified by 5-digit numbers prefixed with the nickname of
1339   * the package itself&mdash;e.g., &ldquo;comp-10101&rdquo;,
1340   * &ldquo;fbc-20301&rdquo;, etc.  Historically, libSBML reported error
1341   * codes as pure integers, and some application software systems make
1342   * decisions based on the numerical values of the error codes.  To permit
1343   * these applications to continue to function in this fashion, libSBML
1344   * internally continues to maintain error identifiers as pure integers.  To
1345   * handle the possibility that errors may come from package extensions,
1346   * libSBML uses numerical offsets added to the internal error codes.  These
1347   * offsets add two leading digits to the regular 5-digit error codes; for
1348   * example, &ldquo;comp&rdquo; error codes are stored as 1010101, 1020102,
1349   * etc.  The offset in this case is 1000000.  Another package will have the
1350   * offset 2000000, yet another will have 3000000, etc.
1351   <p>
1352   * This method returns the integer offset in this error's error code.
1353   * Calling applications can get the 5-digit package-specific number for a
1354   * given error code by subtracting the offset from the value reported by
1355   * getErrorId():
1356   * <div class='fragment'><pre class='fragment'>
1357 getErrorId() - getErrorIdOffset()
1358 </pre></div>
1359   * When libSBML produces error messages, it combines the text string
1360   * returned by getPackage() with the subtracted value of the error code,
1361   * to produce a text string of the form &ldquo;comp-10101&rdquo;.
1362   <p>
1363   * @see #getErrorId()
1364   * @see #getPackage()
1365   */ public
1366 long getErrorIdOffset() {
1367    return libsbmlJNI.XMLError_getErrorIdOffset(swigCPtr, this);
1368  }
1369
1370}