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