001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.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 *  Controls the behavior of the Level 3 formula parser.
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 * The function
023 * <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String, L3ParserSettings)</code></a>,
024 * along with its variants <a href='libsbml.html#parseL3Formula(java.lang.String)'><code>libsbml.parseL3Formula(String)</code></a> and
025 * <a href='libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)'><code>libsbml.parseL3FormulaWithModel(String, Model)</code></a>,
026 * are the interfaces to a parser for mathematical formulas written as
027 * text strings.  The inverse function is <a href='libsbml.html#formulaToL3String(org.sbml.libsbml.ASTNode)'><code>libsbml.formulaToL3String(ASTNode)</code></a> and its variants such as
028 * <a href='libsbml.html#formulaToL3StringWithSettings(org.sbml.libsbml.ASTNode, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.formulaToL3StringWithSettings(ASTNode, L3ParserSettings)</code></a>.
029 * The parsers and the formula writers convert between a text-string
030 * representation of mathematical formulas and Abstract Syntax Trees (ASTs),
031 * represented in libSBML using {@link ASTNode} objects.
032 * Compared to the parser and writer implemented by the functions
033 * <a href='libsbml.html#parseFormula(java.lang.String)'><code>libsbml.parseFormula(String)</code></a> and
034 * <a href='libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)'><code>libsbml.formulaToString(ASTNode)</code></a>,
035 * which were designed primarily for converting the mathematical formula
036 * strings in SBML Level&nbsp;1, the SBML Level&nbsp;3 or 'L3' variants of
037 * the parser and writer use an extended formula syntax.  They also have a
038 * number of configurable behaviors.  This class (L3ParserSettings) is an
039 * object used to communicate the configuration settings with callers.
040 <p>
041 * The following aspects of the parser are configurable using
042 * {@link L3ParserSettings} objects.  (For the formula writer, only a subset of these
043 * settings is relevant; please see the documentation for
044 * <a href='libsbml.html#formulaToL3StringWithSettings(org.sbml.libsbml.ASTNode, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.formulaToL3StringWithSettings(ASTNode, L3ParserSettings)</code></a> for more information about which ones).
045 <p>
046 * <p>
047 * <ul>
048 * <li> A {@link Model} object may optionally be provided to use identifiers (values
049 * of type <code>SId</code>) from the model in preference to pre-defined MathML symbols
050 * More precisely, the {@link Model} entities whose identifiers will shadow identical
051 * symbols in the mathematical formula are: {@link Species}, {@link Compartment}, {@link Parameter},
052 * {@link Reaction}, and {@link SpeciesReference}.  For instance, if the parser is given a
053 * {@link Model} containing a {@link Species} with the identifier
054 * &quot;<code>pi</code>&quot;, and the formula to be parsed is
055 * &quot;<code>3*pi</code>&quot;, the MathML produced by the parser will
056 * contain the construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of
057 * the construct <code>&lt;pi/&gt;</code>.  Another example, if the passed-in
058 * {@link Model} contains a {@link FunctionDefinition} with the identifier
059 * &quot;<code>sin</code>&quot;, that function will be used instead of the
060 * predefined MathML function <code>&lt;sin/&gt;</code>.
061 * <li> The function <code>log</code> with a single argument
062 * (&quot;<code>log(x)</code>&quot;) can be parsed as <code>log10(x)</code>,
063 * <code>ln(x)</code>, or treated as an error, as desired.
064 * <li> Unary minus signs can be either collapsed or preserved; that is, the
065 * parser can either (1) remove sequential pairs of unary minuses (e.g.,
066 * &quot;<code>- -3</code>&quot;) from the input and incorporate single unary
067 * minuses into the number node, or (2) preserve all minuses in the AST node
068 * structure, turning them into {@link ASTNode} objects of type
069 * {@link libsbmlConstants#AST_MINUS AST_MINUS}.
070 * <li> The character sequence &quot;<code>number id</code>&quot; can be
071 * interpreted as a numerical value <code>number</code> followed by units of measurement
072 * indicated by <code>id</code>, or it can be treated as a syntax error.  (In
073 * Level&nbsp;3, MathML <code>&lt;cn&gt;</code> elements can have an
074 * attribute named <code>units</code> placed in the SBML namespace, which can be used
075 * to indicate the units to be associated with the number.  The text-string
076 * infix formula parser allows units to be placed after raw numbers; they are
077 * interpreted as unit identifiers for units defined by the SBML
078 * specification or in the containing {@link Model} object.)
079 * <li> The symbol <code>avogadro</code> can be parsed either as a MathML <em>csymbol</em> or
080 * as a identifier.  More specifically, &quot;<code>avogadro</code>&quot; can
081 * be treated as an {@link ASTNode} of type
082 * {@link libsbmlConstants#AST_NAME_AVOGADRO AST_NAME_AVOGADRO} or of type
083 * {@link libsbmlConstants#AST_NAME AST_NAME}.
084 * <li> Strings that match built-in functions and constants can either be parsed
085 * as a match regardless of capitalization, or may be required to be
086 * all-lower-case to be considered a match.
087 * <li> LibSBML plug-ins implementing support for SBML Level&nbsp;3 packages
088 * may introduce extensions to the syntax understood by the parser.  The
089 * precise nature of the extensions will be documented by the individual
090 * package plug-ins.  An example of a possible extension is a notation for
091 * vectors and arrays, introduced by the SBML Level&nbsp;3 <em>Arrays</em>
092 * package.
093 *
094 * </ul>
095 <p>
096 * To obtain the default configuration values, callers can use the function
097 * <a href='libsbml.html#getDefaultL3ParserSettings()'><code>libsbml.getDefaultL3ParserSettings()</code></a>.  To change the configuration,
098 * callers can create an {@link L3ParserSettings} object, set the desired
099 * characteristics using the methods provided, and pass that object to
100 * <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String formula, L3ParserSettings settings)</code></a>.
101 <p>
102 * @see <a href='libsbml.html#parseL3Formula(java.lang.String)'><code>libsbml.parseL3Formula(String)</code></a>
103 * @see <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String, L3ParserSettings)</code></a>
104 * @see <a href='libsbml.html#parseL3FormulaWithModel(java.lang.String, org.sbml.libsbml.Model)'><code>libsbml.parseL3FormulaWithModel(String, Model)</code></a>
105 * @see <a href='libsbml.html#parseFormula(java.lang.String)'><code>libsbml.parseFormula(String)</code></a>
106 * @see <a href='libsbml.html#formulaToL3StringWithSettings(org.sbml.libsbml.ASTNode, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.formulaToL3StringWithSettings(ASTNode, L3ParserSettings)</code></a>
107 * @see <a href='libsbml.html#formulaToL3String(org.sbml.libsbml.ASTNode)'><code>libsbml.formulaToL3String(ASTNode)</code></a>
108 * @see <a href='libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)'><code>libsbml.formulaToString(ASTNode)</code></a>
109 * @see <a href='libsbml.html#getDefaultL3ParserSettings()'><code>libsbml.getDefaultL3ParserSettings()</code></a>
110 */
111
112public class L3ParserSettings {
113   private long swigCPtr;
114   protected boolean swigCMemOwn;
115
116   protected L3ParserSettings(long cPtr, boolean cMemoryOwn)
117   {
118     swigCMemOwn = cMemoryOwn;
119     swigCPtr    = cPtr;
120   }
121
122   protected static long getCPtr(L3ParserSettings obj)
123   {
124     return (obj == null) ? 0 : obj.swigCPtr;
125   }
126
127   protected static long getCPtrAndDisown (L3ParserSettings obj)
128   {
129     long ptr = 0;
130
131     if (obj != null)
132     {
133       ptr             = obj.swigCPtr;
134       obj.swigCMemOwn = false;
135     }
136
137     return ptr;
138   }
139
140  protected void finalize() {
141    delete();
142  }
143
144  public synchronized void delete() {
145    if (swigCPtr != 0) {
146      if (swigCMemOwn) {
147        swigCMemOwn = false;
148        libsbmlJNI.delete_L3ParserSettings(swigCPtr);
149      }
150      swigCPtr = 0;
151    }
152  }
153
154  
155/**
156   * Creates a new {@link L3ParserSettings} object with default values.
157   <p>
158   * This is the default constructor for the {@link L3ParserSettings} object.  It
159   * sets the stored {@link Model} object to <code>null</code> and sets the following
160   * field values in the {@link L3ParserSettings} object:
161   <p>
162   * <ul>
163   * <li> <em>parseunits</em> ('parse units') is set to
164   * {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS}.
165   <p>
166   * <li> <em>collapseminus</em> ('collapse minus') is set to
167   * {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS}.
168   <p>
169   * <li> <em>parselog</em> ('parse log') is set to
170   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10}.
171   <p>
172   * <li> <em>avocsymbol</em> ('Avogadro csymbol') is set to
173   * {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL}.
174   <p>
175   * <li> <em>caseSensitive</em> ('case sensitive') is set to
176   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}.
177   <p>
178   * <li> <em>moduloL3v2</em> ('modulo l3v2') is set to
179   * {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE}.
180   <p>
181   * <li> <em>sbmlns</em> ('SBML namespaces') is set to <code>null</code> (which
182   * indicates that no syntax extensions due to SBML Level&nbsp;3 packages
183   * will be assumed&mdash;the formula parser will only understand the
184   * core syntax described in the documentation for
185   * <a href='libsbml.html#parseL3Formula(java.lang.String)'><code>libsbml.parseL3Formula(String)</code></a>).
186   * </ul>
187   */ public
188 L3ParserSettings() {
189    this(libsbmlJNI.new_L3ParserSettings__SWIG_0(), true);
190  }
191
192  
193/**
194   * Creates a new {@link L3ParserSettings} object with specific values for all
195   * possible settings.
196   <p>
197   * @param model a {@link Model} object to be used for disambiguating identifiers
198   * encountered by <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String, L3ParserSettings)</code></a> in mathematical formulas.
199   <p>
200   * @param parselog ('parse log') a flag that controls how the parser will
201   * handle the symbol <code>log</code> in mathematical formulas. The function <code>log</code>
202   * with a single argument (&quot;<code>log(x)</code>&quot;) can be parsed
203   * as <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
204   * desired, by using the parameter values
205   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10},
206   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}, or
207   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}, respectively.
208   <p>
209   * @param collapseminus ('collapse minus') a flag that controls how the
210   * parser will handle minus signs in formulas.  Unary minus signs can be
211   * collapsed or preserved; that is, sequential pairs of unary minuses
212   * (e.g., &quot;<code>- -3</code>&quot;) can be removed from the input
213   * entirely and single unary minuses can be incorporated into the number
214   * node, or all minuses can be preserved in the AST node structure.
215   * The possible values of this field are
216   * {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} (to collapse unary minuses) and
217   * {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS} (to expand unary minuses).
218   <p>
219   * @param parseunits ('parse units') a flag that controls how the parser
220   * will handle apparent references to units of measurement associated with
221   * raw numbers in a formula.  If set to the value
222   * {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS}, units are parsed; if set to the value
223   * {@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS}, units are not parsed.
224   <p>
225   * @param avocsymbol ('Avogadro csymbol') a flag that controls how the
226   * parser will handle the appearance of the symbol <code>avogadro</code> in a
227   * formula.  If set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL},
228   * the symbol is interpreted as the SBML/MathML <em>csymbol</em> <code>avogadro</code>; if
229   * set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME}, the symbol is
230   * interpreted as a plain symbol name.
231   <p>
232   * @param caseSensitive ('case sensitive') a flag that controls how the
233   * cases of alphabetical characters are treated when symbols are compared.
234   * If the flag is set to the value
235   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}, symbols are
236   * compared in a case-insensitive manner, which means that mathematical
237   * functions such as <code>'sin'</code> will be matched no matter what their case is:
238   * <code>'Sin'</code>, <code>'SIN'</code>, etc.  If the flag is set to the value
239   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE}, symbols are
240   * interpreted in a case-sensitive manner.
241   <p>
242   * @param moduloL3v2 ('modulo L3v2') a flag that controls how the
243   * parser will handle the @% ('modulo') symbol in formulas.  By default, 
244   * the parser will convert 'a % b' to a piecewise function that properly
245   * calculates the remainder of a with respect to be, but the parser can
246   * also be set to produce the MathML <code>rem</code> function, should the target
247   * of the produced {@link ASTNode} be an SBML Level&nbsp;3 Version&nbsp;2 
248   * document, where the <code>rem</code> function is legal.
249   * The possible values of this field are
250   * {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} (to parse @% as a piecewise function) and
251   * {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM} (to parse @% as <code>rem</code>).
252   <p>
253   * @param sbmlns ('SBML namespaces') an SBML namespaces object.  The
254   * namespaces identify the SBML Level&nbsp;3 packages that can extend the
255   * syntax understood by the formula parser.  When non-<code>null</code>, the parser
256   * will interpret additional syntax defined by the packages; for example,
257   * it may understand vector/array extensions introduced by the SBML
258   * Level&nbsp;3 <em>Arrays</em> package.
259   <p>
260   * @param l3v2functions ('parse L3v2 functions directly') is a Boolean flag
261   * that controls how to translate certain mathematical functions added in SBML
262   * Level&nbsp;3 Version&nbsp;2 Core.  The parser can either turn them into
263   * specific AST node types, or turn them all into
264   * {@link libsbmlConstants#AST_FUNCTION AST_FUNCTION} with the name set to the
265   * function name in question.
266   <p>
267   * 
268</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
269The native C++ implementation of this method defines a default argument
270value. In the documentation generated for different libSBML language
271bindings, you may or may not see corresponding arguments in the method
272declarations. For example, in Java and C#, a default argument is handled by
273declaring two separate methods, with one of them having the argument and
274the other one lacking the argument. However, the libSBML documentation will
275be <em>identical</em> for both methods. Consequently, if you are reading
276this and do not see an argument even though one is described, please look
277for descriptions of other variants of this method near where this one
278appears in the documentation.
279</dd></dl>
280 
281   <p>
282   * @see #getModel()
283   * @see #setModel(Model)
284   * @see #unsetModel()
285   * @see #getParseLog()
286   * @see #setParseLog(int)
287   * @see #getParseUnits()
288   * @see #setParseUnits(boolean)
289   * @see #getParseCollapseMinus()
290   * @see #setParseCollapseMinus(boolean)
291   * @see #getParseAvogadroCsymbol()
292   * @see #setParseAvogadroCsymbol(boolean)
293   * @see #getParseModuloL3v2()
294   * @see #setParseModuloL3v2(boolean)
295   * @see #getParseL3v2Functions()
296   * @see #setParseL3v2Functions(boolean)
297   */ public
298 L3ParserSettings(Model model, int parselog, boolean collapseminus, boolean parseunits, boolean avocsymbol, boolean caseSensitive, SBMLNamespaces sbmlns, boolean moduloL3v2, boolean l3v2functions) {
299    this(libsbmlJNI.new_L3ParserSettings__SWIG_1(Model.getCPtr(model), model, parselog, collapseminus, parseunits, avocsymbol, caseSensitive, SBMLNamespaces.getCPtr(sbmlns), sbmlns, moduloL3v2, l3v2functions), true);
300  }
301
302  
303/**
304   * Creates a new {@link L3ParserSettings} object with specific values for all
305   * possible settings.
306   <p>
307   * @param model a {@link Model} object to be used for disambiguating identifiers
308   * encountered by <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String, L3ParserSettings)</code></a> in mathematical formulas.
309   <p>
310   * @param parselog ('parse log') a flag that controls how the parser will
311   * handle the symbol <code>log</code> in mathematical formulas. The function <code>log</code>
312   * with a single argument (&quot;<code>log(x)</code>&quot;) can be parsed
313   * as <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
314   * desired, by using the parameter values
315   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10},
316   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}, or
317   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}, respectively.
318   <p>
319   * @param collapseminus ('collapse minus') a flag that controls how the
320   * parser will handle minus signs in formulas.  Unary minus signs can be
321   * collapsed or preserved; that is, sequential pairs of unary minuses
322   * (e.g., &quot;<code>- -3</code>&quot;) can be removed from the input
323   * entirely and single unary minuses can be incorporated into the number
324   * node, or all minuses can be preserved in the AST node structure.
325   * The possible values of this field are
326   * {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} (to collapse unary minuses) and
327   * {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS} (to expand unary minuses).
328   <p>
329   * @param parseunits ('parse units') a flag that controls how the parser
330   * will handle apparent references to units of measurement associated with
331   * raw numbers in a formula.  If set to the value
332   * {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS}, units are parsed; if set to the value
333   * {@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS}, units are not parsed.
334   <p>
335   * @param avocsymbol ('Avogadro csymbol') a flag that controls how the
336   * parser will handle the appearance of the symbol <code>avogadro</code> in a
337   * formula.  If set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL},
338   * the symbol is interpreted as the SBML/MathML <em>csymbol</em> <code>avogadro</code>; if
339   * set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME}, the symbol is
340   * interpreted as a plain symbol name.
341   <p>
342   * @param caseSensitive ('case sensitive') a flag that controls how the
343   * cases of alphabetical characters are treated when symbols are compared.
344   * If the flag is set to the value
345   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}, symbols are
346   * compared in a case-insensitive manner, which means that mathematical
347   * functions such as <code>'sin'</code> will be matched no matter what their case is:
348   * <code>'Sin'</code>, <code>'SIN'</code>, etc.  If the flag is set to the value
349   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE}, symbols are
350   * interpreted in a case-sensitive manner.
351   <p>
352   * @param moduloL3v2 ('modulo L3v2') a flag that controls how the
353   * parser will handle the @% ('modulo') symbol in formulas.  By default, 
354   * the parser will convert 'a % b' to a piecewise function that properly
355   * calculates the remainder of a with respect to be, but the parser can
356   * also be set to produce the MathML <code>rem</code> function, should the target
357   * of the produced {@link ASTNode} be an SBML Level&nbsp;3 Version&nbsp;2 
358   * document, where the <code>rem</code> function is legal.
359   * The possible values of this field are
360   * {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} (to parse @% as a piecewise function) and
361   * {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM} (to parse @% as <code>rem</code>).
362   <p>
363   * @param sbmlns ('SBML namespaces') an SBML namespaces object.  The
364   * namespaces identify the SBML Level&nbsp;3 packages that can extend the
365   * syntax understood by the formula parser.  When non-<code>null</code>, the parser
366   * will interpret additional syntax defined by the packages; for example,
367   * it may understand vector/array extensions introduced by the SBML
368   * Level&nbsp;3 <em>Arrays</em> package.
369   <p>
370   * @param l3v2functions ('parse L3v2 functions directly') is a Boolean flag
371   * that controls how to translate certain mathematical functions added in SBML
372   * Level&nbsp;3 Version&nbsp;2 Core.  The parser can either turn them into
373   * specific AST node types, or turn them all into
374   * {@link libsbmlConstants#AST_FUNCTION AST_FUNCTION} with the name set to the
375   * function name in question.
376   <p>
377   * 
378</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
379The native C++ implementation of this method defines a default argument
380value. In the documentation generated for different libSBML language
381bindings, you may or may not see corresponding arguments in the method
382declarations. For example, in Java and C#, a default argument is handled by
383declaring two separate methods, with one of them having the argument and
384the other one lacking the argument. However, the libSBML documentation will
385be <em>identical</em> for both methods. Consequently, if you are reading
386this and do not see an argument even though one is described, please look
387for descriptions of other variants of this method near where this one
388appears in the documentation.
389</dd></dl>
390 
391   <p>
392   * @see #getModel()
393   * @see #setModel(Model)
394   * @see #unsetModel()
395   * @see #getParseLog()
396   * @see #setParseLog(int)
397   * @see #getParseUnits()
398   * @see #setParseUnits(boolean)
399   * @see #getParseCollapseMinus()
400   * @see #setParseCollapseMinus(boolean)
401   * @see #getParseAvogadroCsymbol()
402   * @see #setParseAvogadroCsymbol(boolean)
403   * @see #getParseModuloL3v2()
404   * @see #setParseModuloL3v2(boolean)
405   * @see #getParseL3v2Functions()
406   * @see #setParseL3v2Functions(boolean)
407   */ public
408 L3ParserSettings(Model model, int parselog, boolean collapseminus, boolean parseunits, boolean avocsymbol, boolean caseSensitive, SBMLNamespaces sbmlns, boolean moduloL3v2) {
409    this(libsbmlJNI.new_L3ParserSettings__SWIG_2(Model.getCPtr(model), model, parselog, collapseminus, parseunits, avocsymbol, caseSensitive, SBMLNamespaces.getCPtr(sbmlns), sbmlns, moduloL3v2), true);
410  }
411
412  
413/**
414   * Creates a new {@link L3ParserSettings} object with specific values for all
415   * possible settings.
416   <p>
417   * @param model a {@link Model} object to be used for disambiguating identifiers
418   * encountered by <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String, L3ParserSettings)</code></a> in mathematical formulas.
419   <p>
420   * @param parselog ('parse log') a flag that controls how the parser will
421   * handle the symbol <code>log</code> in mathematical formulas. The function <code>log</code>
422   * with a single argument (&quot;<code>log(x)</code>&quot;) can be parsed
423   * as <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
424   * desired, by using the parameter values
425   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10},
426   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}, or
427   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}, respectively.
428   <p>
429   * @param collapseminus ('collapse minus') a flag that controls how the
430   * parser will handle minus signs in formulas.  Unary minus signs can be
431   * collapsed or preserved; that is, sequential pairs of unary minuses
432   * (e.g., &quot;<code>- -3</code>&quot;) can be removed from the input
433   * entirely and single unary minuses can be incorporated into the number
434   * node, or all minuses can be preserved in the AST node structure.
435   * The possible values of this field are
436   * {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} (to collapse unary minuses) and
437   * {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS} (to expand unary minuses).
438   <p>
439   * @param parseunits ('parse units') a flag that controls how the parser
440   * will handle apparent references to units of measurement associated with
441   * raw numbers in a formula.  If set to the value
442   * {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS}, units are parsed; if set to the value
443   * {@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS}, units are not parsed.
444   <p>
445   * @param avocsymbol ('Avogadro csymbol') a flag that controls how the
446   * parser will handle the appearance of the symbol <code>avogadro</code> in a
447   * formula.  If set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL},
448   * the symbol is interpreted as the SBML/MathML <em>csymbol</em> <code>avogadro</code>; if
449   * set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME}, the symbol is
450   * interpreted as a plain symbol name.
451   <p>
452   * @param caseSensitive ('case sensitive') a flag that controls how the
453   * cases of alphabetical characters are treated when symbols are compared.
454   * If the flag is set to the value
455   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}, symbols are
456   * compared in a case-insensitive manner, which means that mathematical
457   * functions such as <code>'sin'</code> will be matched no matter what their case is:
458   * <code>'Sin'</code>, <code>'SIN'</code>, etc.  If the flag is set to the value
459   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE}, symbols are
460   * interpreted in a case-sensitive manner.
461   <p>
462   * @param moduloL3v2 ('modulo L3v2') a flag that controls how the
463   * parser will handle the @% ('modulo') symbol in formulas.  By default, 
464   * the parser will convert 'a % b' to a piecewise function that properly
465   * calculates the remainder of a with respect to be, but the parser can
466   * also be set to produce the MathML <code>rem</code> function, should the target
467   * of the produced {@link ASTNode} be an SBML Level&nbsp;3 Version&nbsp;2 
468   * document, where the <code>rem</code> function is legal.
469   * The possible values of this field are
470   * {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} (to parse @% as a piecewise function) and
471   * {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM} (to parse @% as <code>rem</code>).
472   <p>
473   * @param sbmlns ('SBML namespaces') an SBML namespaces object.  The
474   * namespaces identify the SBML Level&nbsp;3 packages that can extend the
475   * syntax understood by the formula parser.  When non-<code>null</code>, the parser
476   * will interpret additional syntax defined by the packages; for example,
477   * it may understand vector/array extensions introduced by the SBML
478   * Level&nbsp;3 <em>Arrays</em> package.
479   <p>
480   * @param l3v2functions ('parse L3v2 functions directly') is a Boolean flag
481   * that controls how to translate certain mathematical functions added in SBML
482   * Level&nbsp;3 Version&nbsp;2 Core.  The parser can either turn them into
483   * specific AST node types, or turn them all into
484   * {@link libsbmlConstants#AST_FUNCTION AST_FUNCTION} with the name set to the
485   * function name in question.
486   <p>
487   * 
488</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
489The native C++ implementation of this method defines a default argument
490value. In the documentation generated for different libSBML language
491bindings, you may or may not see corresponding arguments in the method
492declarations. For example, in Java and C#, a default argument is handled by
493declaring two separate methods, with one of them having the argument and
494the other one lacking the argument. However, the libSBML documentation will
495be <em>identical</em> for both methods. Consequently, if you are reading
496this and do not see an argument even though one is described, please look
497for descriptions of other variants of this method near where this one
498appears in the documentation.
499</dd></dl>
500 
501   <p>
502   * @see #getModel()
503   * @see #setModel(Model)
504   * @see #unsetModel()
505   * @see #getParseLog()
506   * @see #setParseLog(int)
507   * @see #getParseUnits()
508   * @see #setParseUnits(boolean)
509   * @see #getParseCollapseMinus()
510   * @see #setParseCollapseMinus(boolean)
511   * @see #getParseAvogadroCsymbol()
512   * @see #setParseAvogadroCsymbol(boolean)
513   * @see #getParseModuloL3v2()
514   * @see #setParseModuloL3v2(boolean)
515   * @see #getParseL3v2Functions()
516   * @see #setParseL3v2Functions(boolean)
517   */ public
518 L3ParserSettings(Model model, int parselog, boolean collapseminus, boolean parseunits, boolean avocsymbol, boolean caseSensitive, SBMLNamespaces sbmlns) {
519    this(libsbmlJNI.new_L3ParserSettings__SWIG_3(Model.getCPtr(model), model, parselog, collapseminus, parseunits, avocsymbol, caseSensitive, SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
520  }
521
522  
523/**
524   * Creates a new {@link L3ParserSettings} object with specific values for all
525   * possible settings.
526   <p>
527   * @param model a {@link Model} object to be used for disambiguating identifiers
528   * encountered by <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String, L3ParserSettings)</code></a> in mathematical formulas.
529   <p>
530   * @param parselog ('parse log') a flag that controls how the parser will
531   * handle the symbol <code>log</code> in mathematical formulas. The function <code>log</code>
532   * with a single argument (&quot;<code>log(x)</code>&quot;) can be parsed
533   * as <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
534   * desired, by using the parameter values
535   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10},
536   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}, or
537   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}, respectively.
538   <p>
539   * @param collapseminus ('collapse minus') a flag that controls how the
540   * parser will handle minus signs in formulas.  Unary minus signs can be
541   * collapsed or preserved; that is, sequential pairs of unary minuses
542   * (e.g., &quot;<code>- -3</code>&quot;) can be removed from the input
543   * entirely and single unary minuses can be incorporated into the number
544   * node, or all minuses can be preserved in the AST node structure.
545   * The possible values of this field are
546   * {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} (to collapse unary minuses) and
547   * {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS} (to expand unary minuses).
548   <p>
549   * @param parseunits ('parse units') a flag that controls how the parser
550   * will handle apparent references to units of measurement associated with
551   * raw numbers in a formula.  If set to the value
552   * {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS}, units are parsed; if set to the value
553   * {@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS}, units are not parsed.
554   <p>
555   * @param avocsymbol ('Avogadro csymbol') a flag that controls how the
556   * parser will handle the appearance of the symbol <code>avogadro</code> in a
557   * formula.  If set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL},
558   * the symbol is interpreted as the SBML/MathML <em>csymbol</em> <code>avogadro</code>; if
559   * set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME}, the symbol is
560   * interpreted as a plain symbol name.
561   <p>
562   * @param caseSensitive ('case sensitive') a flag that controls how the
563   * cases of alphabetical characters are treated when symbols are compared.
564   * If the flag is set to the value
565   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}, symbols are
566   * compared in a case-insensitive manner, which means that mathematical
567   * functions such as <code>'sin'</code> will be matched no matter what their case is:
568   * <code>'Sin'</code>, <code>'SIN'</code>, etc.  If the flag is set to the value
569   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE}, symbols are
570   * interpreted in a case-sensitive manner.
571   <p>
572   * @param moduloL3v2 ('modulo L3v2') a flag that controls how the
573   * parser will handle the @% ('modulo') symbol in formulas.  By default, 
574   * the parser will convert 'a % b' to a piecewise function that properly
575   * calculates the remainder of a with respect to be, but the parser can
576   * also be set to produce the MathML <code>rem</code> function, should the target
577   * of the produced {@link ASTNode} be an SBML Level&nbsp;3 Version&nbsp;2 
578   * document, where the <code>rem</code> function is legal.
579   * The possible values of this field are
580   * {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} (to parse @% as a piecewise function) and
581   * {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM} (to parse @% as <code>rem</code>).
582   <p>
583   * @param sbmlns ('SBML namespaces') an SBML namespaces object.  The
584   * namespaces identify the SBML Level&nbsp;3 packages that can extend the
585   * syntax understood by the formula parser.  When non-<code>null</code>, the parser
586   * will interpret additional syntax defined by the packages; for example,
587   * it may understand vector/array extensions introduced by the SBML
588   * Level&nbsp;3 <em>Arrays</em> package.
589   <p>
590   * @param l3v2functions ('parse L3v2 functions directly') is a Boolean flag
591   * that controls how to translate certain mathematical functions added in SBML
592   * Level&nbsp;3 Version&nbsp;2 Core.  The parser can either turn them into
593   * specific AST node types, or turn them all into
594   * {@link libsbmlConstants#AST_FUNCTION AST_FUNCTION} with the name set to the
595   * function name in question.
596   <p>
597   * 
598</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
599The native C++ implementation of this method defines a default argument
600value. In the documentation generated for different libSBML language
601bindings, you may or may not see corresponding arguments in the method
602declarations. For example, in Java and C#, a default argument is handled by
603declaring two separate methods, with one of them having the argument and
604the other one lacking the argument. However, the libSBML documentation will
605be <em>identical</em> for both methods. Consequently, if you are reading
606this and do not see an argument even though one is described, please look
607for descriptions of other variants of this method near where this one
608appears in the documentation.
609</dd></dl>
610 
611   <p>
612   * @see #getModel()
613   * @see #setModel(Model)
614   * @see #unsetModel()
615   * @see #getParseLog()
616   * @see #setParseLog(int)
617   * @see #getParseUnits()
618   * @see #setParseUnits(boolean)
619   * @see #getParseCollapseMinus()
620   * @see #setParseCollapseMinus(boolean)
621   * @see #getParseAvogadroCsymbol()
622   * @see #setParseAvogadroCsymbol(boolean)
623   * @see #getParseModuloL3v2()
624   * @see #setParseModuloL3v2(boolean)
625   * @see #getParseL3v2Functions()
626   * @see #setParseL3v2Functions(boolean)
627   */ public
628 L3ParserSettings(Model model, int parselog, boolean collapseminus, boolean parseunits, boolean avocsymbol, boolean caseSensitive) {
629    this(libsbmlJNI.new_L3ParserSettings__SWIG_4(Model.getCPtr(model), model, parselog, collapseminus, parseunits, avocsymbol, caseSensitive), true);
630  }
631
632  
633/**
634   * Creates a new {@link L3ParserSettings} object with specific values for all
635   * possible settings.
636   <p>
637   * @param model a {@link Model} object to be used for disambiguating identifiers
638   * encountered by <a href='libsbml.html#parseL3FormulaWithSettings(java.lang.String, org.sbml.libsbml.L3ParserSettings)'><code>libsbml.parseL3FormulaWithSettings(String, L3ParserSettings)</code></a> in mathematical formulas.
639   <p>
640   * @param parselog ('parse log') a flag that controls how the parser will
641   * handle the symbol <code>log</code> in mathematical formulas. The function <code>log</code>
642   * with a single argument (&quot;<code>log(x)</code>&quot;) can be parsed
643   * as <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
644   * desired, by using the parameter values
645   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10},
646   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}, or
647   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}, respectively.
648   <p>
649   * @param collapseminus ('collapse minus') a flag that controls how the
650   * parser will handle minus signs in formulas.  Unary minus signs can be
651   * collapsed or preserved; that is, sequential pairs of unary minuses
652   * (e.g., &quot;<code>- -3</code>&quot;) can be removed from the input
653   * entirely and single unary minuses can be incorporated into the number
654   * node, or all minuses can be preserved in the AST node structure.
655   * The possible values of this field are
656   * {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} (to collapse unary minuses) and
657   * {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS} (to expand unary minuses).
658   <p>
659   * @param parseunits ('parse units') a flag that controls how the parser
660   * will handle apparent references to units of measurement associated with
661   * raw numbers in a formula.  If set to the value
662   * {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS}, units are parsed; if set to the value
663   * {@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS}, units are not parsed.
664   <p>
665   * @param avocsymbol ('Avogadro csymbol') a flag that controls how the
666   * parser will handle the appearance of the symbol <code>avogadro</code> in a
667   * formula.  If set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL},
668   * the symbol is interpreted as the SBML/MathML <em>csymbol</em> <code>avogadro</code>; if
669   * set to the value {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME}, the symbol is
670   * interpreted as a plain symbol name.
671   <p>
672   * @param caseSensitive ('case sensitive') a flag that controls how the
673   * cases of alphabetical characters are treated when symbols are compared.
674   * If the flag is set to the value
675   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}, symbols are
676   * compared in a case-insensitive manner, which means that mathematical
677   * functions such as <code>'sin'</code> will be matched no matter what their case is:
678   * <code>'Sin'</code>, <code>'SIN'</code>, etc.  If the flag is set to the value
679   * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE}, symbols are
680   * interpreted in a case-sensitive manner.
681   <p>
682   * @param moduloL3v2 ('modulo L3v2') a flag that controls how the
683   * parser will handle the @% ('modulo') symbol in formulas.  By default, 
684   * the parser will convert 'a % b' to a piecewise function that properly
685   * calculates the remainder of a with respect to be, but the parser can
686   * also be set to produce the MathML <code>rem</code> function, should the target
687   * of the produced {@link ASTNode} be an SBML Level&nbsp;3 Version&nbsp;2 
688   * document, where the <code>rem</code> function is legal.
689   * The possible values of this field are
690   * {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} (to parse @% as a piecewise function) and
691   * {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM} (to parse @% as <code>rem</code>).
692   <p>
693   * @param sbmlns ('SBML namespaces') an SBML namespaces object.  The
694   * namespaces identify the SBML Level&nbsp;3 packages that can extend the
695   * syntax understood by the formula parser.  When non-<code>null</code>, the parser
696   * will interpret additional syntax defined by the packages; for example,
697   * it may understand vector/array extensions introduced by the SBML
698   * Level&nbsp;3 <em>Arrays</em> package.
699   <p>
700   * @param l3v2functions ('parse L3v2 functions directly') is a Boolean flag
701   * that controls how to translate certain mathematical functions added in SBML
702   * Level&nbsp;3 Version&nbsp;2 Core.  The parser can either turn them into
703   * specific AST node types, or turn them all into
704   * {@link libsbmlConstants#AST_FUNCTION AST_FUNCTION} with the name set to the
705   * function name in question.
706   <p>
707   * 
708</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
709The native C++ implementation of this method defines a default argument
710value. In the documentation generated for different libSBML language
711bindings, you may or may not see corresponding arguments in the method
712declarations. For example, in Java and C#, a default argument is handled by
713declaring two separate methods, with one of them having the argument and
714the other one lacking the argument. However, the libSBML documentation will
715be <em>identical</em> for both methods. Consequently, if you are reading
716this and do not see an argument even though one is described, please look
717for descriptions of other variants of this method near where this one
718appears in the documentation.
719</dd></dl>
720 
721   <p>
722   * @see #getModel()
723   * @see #setModel(Model)
724   * @see #unsetModel()
725   * @see #getParseLog()
726   * @see #setParseLog(int)
727   * @see #getParseUnits()
728   * @see #setParseUnits(boolean)
729   * @see #getParseCollapseMinus()
730   * @see #setParseCollapseMinus(boolean)
731   * @see #getParseAvogadroCsymbol()
732   * @see #setParseAvogadroCsymbol(boolean)
733   * @see #getParseModuloL3v2()
734   * @see #setParseModuloL3v2(boolean)
735   * @see #getParseL3v2Functions()
736   * @see #setParseL3v2Functions(boolean)
737   */ public
738 L3ParserSettings(Model model, int parselog, boolean collapseminus, boolean parseunits, boolean avocsymbol) {
739    this(libsbmlJNI.new_L3ParserSettings__SWIG_5(Model.getCPtr(model), model, parselog, collapseminus, parseunits, avocsymbol), true);
740  }
741
742  
743/**
744   * Copy constructor.
745   <p>
746   * @param source the instance to copy.
747   */ public
748 L3ParserSettings(L3ParserSettings source) {
749    this(libsbmlJNI.new_L3ParserSettings__SWIG_6(L3ParserSettings.getCPtr(source), source), true);
750  }
751
752  
753/**
754   * Sets the model reference in this {@link L3ParserSettings} object.
755   <p>
756   * <p>
757 * When a {@link Model} object is provided, identifiers (values of type <code>SId</code>)
758 * from that model are used in preference to pre-defined MathML symbol
759 * definitions.  More precisely, the {@link Model} entities whose identifiers will
760 * shadow identical symbols in the mathematical formula are: {@link Species},
761 * {@link Compartment}, {@link Parameter}, {@link Reaction}, and {@link SpeciesReference}.  For instance, if
762 * the parser is given a {@link Model} containing a {@link Species} with the identifier
763 * &quot;<code>pi</code>&quot;, and the formula to be parsed is
764 * &quot;<code>3*pi</code>&quot;, the MathML produced will contain the
765 * construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of the construct
766 * <code>&lt;pi/&gt;</code>.  Similarly, when a {@link Model} object is provided,
767 * <code>SId</code> values of user-defined functions present in the {@link Model} will be used
768 * preferentially over pre-defined MathML functions.  For example, if the
769 * passed-in {@link Model} contains a {@link FunctionDefinition} with the identifier
770 * &quot;<code>sin</code>&quot;, that function will be used instead of the
771 * predefined MathML function <code>&lt;sin/&gt;</code>.
772   <p>
773   * @param model a {@link Model} object to be used for disambiguating identifiers.
774   <p>
775   * @warning <span class='warning'>This does <em>not</em> copy the {@link Model} object.
776   * This means that modifications made to the {@link Model} after invoking this
777   * method may affect parsing behavior, because the parser will query the
778   * <em>current</em> contents of the model.</span>
779   <p>
780   * @see #getModel()
781   * @see #unsetModel()
782   */ public
783 void setModel(Model model) {
784    libsbmlJNI.L3ParserSettings_setModel(swigCPtr, this, Model.getCPtr(model), model);
785  }
786
787  
788/**
789   * Returns the {@link Model} object referenced by this {@link L3ParserSettings} object.
790   <p>
791   * <p>
792 * When a {@link Model} object is provided, identifiers (values of type <code>SId</code>)
793 * from that model are used in preference to pre-defined MathML symbol
794 * definitions.  More precisely, the {@link Model} entities whose identifiers will
795 * shadow identical symbols in the mathematical formula are: {@link Species},
796 * {@link Compartment}, {@link Parameter}, {@link Reaction}, and {@link SpeciesReference}.  For instance, if
797 * the parser is given a {@link Model} containing a {@link Species} with the identifier
798 * &quot;<code>pi</code>&quot;, and the formula to be parsed is
799 * &quot;<code>3*pi</code>&quot;, the MathML produced will contain the
800 * construct <code>&lt;ci&gt; pi &lt;/ci&gt;</code> instead of the construct
801 * <code>&lt;pi/&gt;</code>.  Similarly, when a {@link Model} object is provided,
802 * <code>SId</code> values of user-defined functions present in the {@link Model} will be used
803 * preferentially over pre-defined MathML functions.  For example, if the
804 * passed-in {@link Model} contains a {@link FunctionDefinition} with the identifier
805 * &quot;<code>sin</code>&quot;, that function will be used instead of the
806 * predefined MathML function <code>&lt;sin/&gt;</code>.
807   <p>
808   * @see #setModel(Model)
809   * @see #unsetModel()
810   */ public
811 Model getModel() {
812    long cPtr = libsbmlJNI.L3ParserSettings_getModel(swigCPtr, this);
813    return (cPtr == 0) ? null : new Model(cPtr, false);
814  }
815
816  
817/**
818   * Unsets the {@link Model} reference in this {@link L3ParserSettings} object.
819   <p>
820   * The effect of calling this method is to set the stored model value
821   * to <code>null.</code>
822   <p>
823   * @see #setModel(Model)
824   * @see #getModel()
825   */ public
826 void unsetModel() {
827    libsbmlJNI.L3ParserSettings_unsetModel(swigCPtr, this);
828  }
829
830  
831/**
832   * Sets the behavior for handling <code>log</code> in mathematical formulas.
833   <p>
834   * The function <code>log</code> with a single argument
835   * (&quot;<code>log(x)</code>&quot;) can be parsed as
836   * <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error.
837   * These three behaviors are set, respectively, by using the value
838   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10},
839   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}, or
840   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}
841   * for the <code>type</code> parameter.
842   <p>
843   * @param type a constant, one of following three possibilities:
844   * <ul>
845   * <li> {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10}
846   * <li> {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}
847   * <li> {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}
848   *
849   * </ul> <p>
850   * @see #getParseLog()
851   */ public
852 void setParseLog(int type) {
853    libsbmlJNI.L3ParserSettings_setParseLog(swigCPtr, this, type);
854  }
855
856  
857/**
858   * Indicates the current behavior set for handling the function <code>log</code> with
859   * one argument.
860   <p>
861   * The function <code>log</code> with a single argument
862   * (&quot;<code>log(x)</code>&quot;) can be parsed as
863   * <code>log10(x)</code>, <code>ln(x)</code>, or treated as an error, as
864   * desired.  These three possible behaviors are indicated, respectively, by
865   * the values
866   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10},
867   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}, and
868   * {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}.
869   <p>
870   * @return One of following three constants:
871   * <ul>
872   * <li> {@link libsbmlConstants#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10}
873   * <li> {@link libsbmlConstants#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN}
874   * <li> {@link libsbmlConstants#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR}
875   *
876   * </ul> <p>
877   * @see #setParseLog(int)
878   */ public
879 int getParseLog() {
880    return libsbmlJNI.L3ParserSettings_getParseLog(swigCPtr, this);
881  }
882
883  
884/**
885   * Sets the behavior for handling unary minuses appearing in mathematical
886   * formulas.
887   <p>
888   * <p>
889 * This setting affects two behaviors.  First, pairs of multiple unary
890 * minuses in a row (e.g., &quot;<code>- -3</code>&quot;) can be collapsed
891 * and ignored in the input, or the multiple minuses can be preserved in the
892 * AST node tree that is generated by the parser.  Second, minus signs in
893 * front of numbers can be collapsed into the number node itself; for
894 * example, a &quot;<code>- 4.1</code>&quot; can be turned into a single
895 * {@link ASTNode} of type {@link libsbmlConstants#AST_REAL AST_REAL} with a value of
896 * <code>-4.1</code>, or it can be turned into a node of type
897 * {@link libsbmlConstants#AST_MINUS AST_MINUS} having a child node of type
898 * {@link libsbmlConstants#AST_REAL AST_REAL}.
899   <p>
900   * This method lets you tell the parser which behavior to use&mdash;either
901   * collapse minuses or always preserve them.  The two possibilities are
902   * represented using the following constants:
903   <p>
904   * <p>
905 * <ul>
906 * <li> {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} (value = <code>true</code>): collapse
907 * unary minuses where possible.
908 * <li> {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS} (value = <code>false</code>): do not
909 * collapse unary minuses, and instead translate each one into an AST node of
910 * type {@link libsbmlConstants#AST_MINUS AST_MINUS}.
911 * </ul>
912   <p>
913   * @param collapseminus a boolean value (one of the constants
914   * {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} or
915   * {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS})
916   * indicating how unary minus signs in the input should be handled.
917   <p>
918   * @see #getParseCollapseMinus()
919   */ public
920 void setParseCollapseMinus(boolean collapseminus) {
921    libsbmlJNI.L3ParserSettings_setParseCollapseMinus(swigCPtr, this, collapseminus);
922  }
923
924  
925/**
926   * Indicates the current behavior set for handling multiple unary minuses
927   * in formulas.
928   <p>
929   * <p>
930 * This setting affects two behaviors.  First, pairs of multiple unary
931 * minuses in a row (e.g., &quot;<code>- -3</code>&quot;) can be collapsed
932 * and ignored in the input, or the multiple minuses can be preserved in the
933 * AST node tree that is generated by the parser.  Second, minus signs in
934 * front of numbers can be collapsed into the number node itself; for
935 * example, a &quot;<code>- 4.1</code>&quot; can be turned into a single
936 * {@link ASTNode} of type {@link libsbmlConstants#AST_REAL AST_REAL} with a value of
937 * <code>-4.1</code>, or it can be turned into a node of type
938 * {@link libsbmlConstants#AST_MINUS AST_MINUS} having a child node of type
939 * {@link libsbmlConstants#AST_REAL AST_REAL}.
940   <p>
941   * @return A boolean indicating the behavior currently set.  The possible
942   * values are as follows:
943   * <p>
944 * <ul>
945 * <li> {@link libsbmlConstants#L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS} (value = <code>true</code>): collapse
946 * unary minuses where possible.
947 * <li> {@link libsbmlConstants#L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS} (value = <code>false</code>): do not
948 * collapse unary minuses, and instead translate each one into an AST node of
949 * type {@link libsbmlConstants#AST_MINUS AST_MINUS}.
950 * </ul>
951   <p>
952   * @see #setParseCollapseMinus(boolean)
953   */ public
954 boolean getParseCollapseMinus() {
955    return libsbmlJNI.L3ParserSettings_getParseCollapseMinus(swigCPtr, this);
956  }
957
958  
959/**
960   * Sets the parser's behavior in handling units associated with numbers
961   * in a mathematical formula.
962   <p>
963   * <p>
964 * In SBML Level&nbsp;2, there is no means of associating a unit of
965 * measurement with a pure number in a formula, while SBML Level&nbsp;3 does
966 * define a syntax for this.  In Level&nbsp;3, MathML <code>&lt;cn&gt;</code>
967 * elements can have an attribute named <code>units</code> placed in the SBML
968 * namespace, which can be used to indicate the units to be associated with
969 * the number.  The text-string infix formula parser allows units to be
970 * placed after raw numbers; they are interpreted as unit identifiers for
971 * units defined by the SBML specification or in the containing {@link Model} object.
972 * Some examples include: &quot;<code>4 mL</code>&quot;, &quot;<code>2.01
973 * Hz</code>&quot;, &quot;<code>3.1e-6 M</code>&quot;, and &quot;<code>(5/8)
974 * inches</code>&quot;.  To produce a valid SBML model, there must either
975 * exist a {@link UnitDefinition} corresponding to the identifier of the unit, or the
976 * unit must be defined in Table&nbsp;2 of the SBML Level&nbsp;3 specification.
977   <p>
978   * This method sets the formula parser's behavior with respect to units.
979   <p>
980   * @param units a boolean indicating whether to parse units.  The
981   * possible values are as follows:
982   * <p>
983 * <ul>
984 * <li> {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS} (value = <code>true</code>): parse units in the
985 * text-string formula.
986 * <li> {@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS} (value = <code>false</code>): treat units in the
987 * text-string formula as errors.
988 * </ul>
989   <p>
990   * @see #getParseUnits()
991   */ public
992 void setParseUnits(boolean units) {
993    libsbmlJNI.L3ParserSettings_setParseUnits(swigCPtr, this, units);
994  }
995
996  
997/**
998   * Indicates the current behavior set for handling units in text-string
999   * mathematical formulas.
1000   <p>
1001   * <p>
1002 * In SBML Level&nbsp;2, there is no means of associating a unit of
1003 * measurement with a pure number in a formula, while SBML Level&nbsp;3 does
1004 * define a syntax for this.  In Level&nbsp;3, MathML <code>&lt;cn&gt;</code>
1005 * elements can have an attribute named <code>units</code> placed in the SBML
1006 * namespace, which can be used to indicate the units to be associated with
1007 * the number.  The text-string infix formula parser allows units to be
1008 * placed after raw numbers; they are interpreted as unit identifiers for
1009 * units defined by the SBML specification or in the containing {@link Model} object.
1010 * Some examples include: &quot;<code>4 mL</code>&quot;, &quot;<code>2.01
1011 * Hz</code>&quot;, &quot;<code>3.1e-6 M</code>&quot;, and &quot;<code>(5/8)
1012 * inches</code>&quot;.  To produce a valid SBML model, there must either
1013 * exist a {@link UnitDefinition} corresponding to the identifier of the unit, or the
1014 * unit must be defined in Table&nbsp;2 of the SBML Level&nbsp;3 specification.
1015   <p>
1016   * Since SBML Level&nbsp;2 does not have the ability to associate units
1017   * with pure numbers, the value should be expected to be <code>false</code>
1018   * ({@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS}) when parsing text-string
1019   * formulas intended for use in SBML Level&nbsp;2 documents.
1020   <p>
1021   * @return A boolean indicating whether to parse units.  The
1022   * possible values are as follows:
1023   * <p>
1024 * <ul>
1025 * <li> {@link libsbmlConstants#L3P_PARSE_UNITS L3P_PARSE_UNITS} (value = <code>true</code>): parse units in the
1026 * text-string formula.
1027 * <li> {@link libsbmlConstants#L3P_NO_UNITS L3P_NO_UNITS} (value = <code>false</code>): treat units in the
1028 * text-string formula as errors.
1029 * </ul>
1030   <p>
1031   * @see #setParseUnits(boolean)
1032   */ public
1033 boolean getParseUnits() {
1034    return libsbmlJNI.L3ParserSettings_getParseUnits(swigCPtr, this);
1035  }
1036
1037  
1038/**
1039   * Sets the parser's behavior in handling the symbol <code>avogadro</code> in
1040   * mathematical formulas.
1041   <p>
1042   * <p>
1043 * SBML Level&nbsp;3 defines a symbol for representing the value of
1044 * Avogadro's constant, but it is not defined in SBML Level&nbsp;2.  As a
1045 * result, the text-string formula parser must behave differently
1046 * depending on which SBML Level is being targeted.  For Level&nbsp;3
1047 * documents, it can interpret instances of <code>avogadro</code> in the input
1048 * as a reference to the MathML <em>csymbol</em> for Avogadro's constant
1049 * defined in the SBML Level&nbsp;3 specification.  For Level&nbsp;2,
1050 * it must treat <code>avogadro</code> as just another plain symbol.
1051   <p>
1052   * This method allows callers to set the <code>avogadro</code>-handling
1053   * behavior in this {@link L3ParserSettings} object.  The possible values of 
1054   * <code>l2only</code> are as follows:
1055   <p>
1056   * <p>
1057 * <ul>
1058 * <li> {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL} (value = <code>true</code>): tells the
1059 * parser to translate the string <code>avogadro</code> (in any capitalization) into an
1060 * AST node of type {@link libsbmlConstants#AST_NAME_AVOGADRO AST_NAME_AVOGADRO}.
1061 * <li> {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME} (value = <code>false</code>): tells the
1062 * parser to translate the string <code>avogadro</code> into an AST of type
1063 * {@link libsbmlConstants#AST_NAME AST_NAME}.
1064 * </ul>
1065   <p>
1066   * Since SBML Level&nbsp;2 does not define a symbol for Avogadro's
1067   * constant, the value should be set to
1068   * {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME} when parsing text-string formulas
1069   * intended for use in SBML Level&nbsp;2 documents.
1070   <p>
1071   * @param l2only a boolean value indicating how the string <code>avogadro</code>
1072   * should be treated when encountered in a formula.  This will be one of
1073   * the values {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL} or
1074   * {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME}.
1075   <p>
1076   * @see #getParseAvogadroCsymbol()
1077   */ public
1078 void setParseAvogadroCsymbol(boolean l2only) {
1079    libsbmlJNI.L3ParserSettings_setParseAvogadroCsymbol(swigCPtr, this, l2only);
1080  }
1081
1082  
1083/**
1084   * Indicates the current behavior set for handling <code>avogadro</code> for SBML
1085   * Level&nbsp;3.
1086   <p>
1087   * <p>
1088 * SBML Level&nbsp;3 defines a symbol for representing the value of
1089 * Avogadro's constant, but it is not defined in SBML Level&nbsp;2.  As a
1090 * result, the text-string formula parser must behave differently
1091 * depending on which SBML Level is being targeted.  For Level&nbsp;3
1092 * documents, it can interpret instances of <code>avogadro</code> in the input
1093 * as a reference to the MathML <em>csymbol</em> for Avogadro's constant
1094 * defined in the SBML Level&nbsp;3 specification.  For Level&nbsp;2,
1095 * it must treat <code>avogadro</code> as just another plain symbol.
1096   <p>
1097   * This method returns the current setting of the
1098   * <code>avogadro</code>-handling behavior in this {@link L3ParserSettings} object.
1099   * The possible values are as follows:
1100   <p>
1101   * <p>
1102 * <ul>
1103 * <li> {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL} (value = <code>true</code>): tells the
1104 * parser to translate the string <code>avogadro</code> (in any capitalization) into an
1105 * AST node of type {@link libsbmlConstants#AST_NAME_AVOGADRO AST_NAME_AVOGADRO}.
1106 * <li> {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME} (value = <code>false</code>): tells the
1107 * parser to translate the string <code>avogadro</code> into an AST of type
1108 * {@link libsbmlConstants#AST_NAME AST_NAME}.
1109 * </ul>
1110   <p>
1111   * @return A boolean indicating which mode is currently set; one of
1112   * {@link libsbmlConstants#L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL}
1113   * or
1114   * {@link libsbmlConstants#L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME}.
1115   <p>
1116   * @see #setParseAvogadroCsymbol(boolean)
1117   */ public
1118 boolean getParseAvogadroCsymbol() {
1119    return libsbmlJNI.L3ParserSettings_getParseAvogadroCsymbol(swigCPtr, this);
1120  }
1121
1122  
1123/**
1124   * Sets the parser's behavior with respect to case sensitivity for
1125   * recognizing predefined symbols.
1126   <p>
1127   * <p>
1128 * By default (which is the value
1129 * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}), the parser
1130 * compares symbols in a case <em>insensitive</em> manner for built-in functions
1131 * such as <code>'sin'</code> and <code>'piecewise'</code>, and for constants such as <code>'true'</code>
1132 * and <code>'avogadro'.</code>  Setting this option to
1133 * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE} causes the parser to
1134 * become case sensitive.  In that mode, for example, the symbols <code>'sin'</code>
1135 * and <code>'true'</code> will match the built-in values, but the symbols <code>'SIN'</code>,
1136 * <code>'Sin'</code>, <code>'True'</code>, <code>'TRUE'</code>, and so on, will not.
1137   <p>
1138   * @param strcmp a boolean indicating whether to be case sensitive (if
1139   * <code>true</code>) or be case insensitive (if <code>false</code>).
1140   <p>
1141   * @see #getComparisonCaseSensitivity()
1142   */ public
1143 void setComparisonCaseSensitivity(boolean strcmp) {
1144    libsbmlJNI.L3ParserSettings_setComparisonCaseSensitivity(swigCPtr, this, strcmp);
1145  }
1146
1147  
1148/**
1149   * Returns <code>true</code> if the parser is configured to match built-in symbols
1150   * in a case-insensitive way.
1151   <p>
1152   * <p>
1153 * By default (which is the value
1154 * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE}), the parser
1155 * compares symbols in a case <em>insensitive</em> manner for built-in functions
1156 * such as <code>'sin'</code> and <code>'piecewise'</code>, and for constants such as <code>'true'</code>
1157 * and <code>'avogadro'.</code>  Setting this option to
1158 * {@link libsbmlConstants#L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE} causes the parser to
1159 * become case sensitive.  In that mode, for example, the symbols <code>'sin'</code>
1160 * and <code>'true'</code> will match the built-in values, but the symbols <code>'SIN'</code>,
1161 * <code>'Sin'</code>, <code>'True'</code>, <code>'TRUE'</code>, and so on, will not.
1162   <p>
1163   * @return <code>true</code> if matches are done in a case-sensitive manner, and 
1164   * <code>false</code> if the parser will recognize built-in functions and
1165   * constants regardless of case,.
1166   <p>
1167   * @see #setComparisonCaseSensitivity(boolean)
1168   */ public
1169 boolean getComparisonCaseSensitivity() {
1170    return libsbmlJNI.L3ParserSettings_getComparisonCaseSensitivity(swigCPtr, this);
1171  }
1172
1173  
1174/**
1175  * Sets the behavior for handling the @% symbol in mathematical
1176  * formulas.
1177  <p>
1178  * <p>
1179 * This setting affects whether the @% symbol (modulo) is parsed as a
1180 * piecewise equation that returns the modulo value of the entries on 
1181 * either side of the symbol, or whether it is parsed as the MathML 
1182 * 'rem' function, which was allowed in SBML Level&nbsp;3 Version&nbsp;2,
1183 * but not in previous level/versions.  The latter is more succinct, but 
1184 * might not be legal SBML for the desired target SBML document.
1185  <p>
1186  * This method lets you tell the parser which behavior to use&mdash;either
1187  * parse @% as the 'rem' function or as a piecewise function with the
1188  * same interpretation.  The two possibilities are
1189  * represented using the following constants:
1190  <p>
1191  * <p>
1192 * <ul>
1193 * <li> {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM} (value = <code>true</code>): use the
1194 * 'rem' MathML function ({@link libsbmlConstants#AST_FUNCTION_REM AST_FUNCTION_REM}).
1195 * <li> {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} (value = <code>false</code>): use 
1196 * a piecewise function ({@link libsbmlConstants#AST_FUNCTION_PIECEWISE AST_FUNCTION_PIECEWISE})
1197 * to encode the modulo rule explicitly.
1198 * </ul>
1199  <p>
1200  * @param modulol3v2 a boolean value (one of the constants
1201  * {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} or
1202  * {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM})
1203  * indicating how the @% symbol in the input should be handled.
1204  <p>
1205  * @see #getParseModuloL3v2()
1206  */ public
1207 void setParseModuloL3v2(boolean modulol3v2) {
1208    libsbmlJNI.L3ParserSettings_setParseModuloL3v2(swigCPtr, this, modulol3v2);
1209  }
1210
1211  
1212/**
1213  * Indicates the current behavior set for handling the @% symbol in 
1214  * mathematical formulas.
1215  <p>
1216  * <p>
1217 * This setting affects whether the @% symbol (modulo) is parsed as a
1218 * piecewise equation that returns the modulo value of the entries on 
1219 * either side of the symbol, or whether it is parsed as the MathML 
1220 * 'rem' function, which was allowed in SBML Level&nbsp;3 Version&nbsp;2,
1221 * but not in previous level/versions.  The latter is more succinct, but 
1222 * might not be legal SBML for the desired target SBML document.
1223  <p>
1224  * @return A boolean indicating the behavior currently set.  The possible
1225  * values are as follows:
1226  * <p>
1227 * <ul>
1228 * <li> {@link libsbmlConstants#L3P_MODULO_IS_REM L3P_MODULO_IS_REM} (value = <code>true</code>): use the
1229 * 'rem' MathML function ({@link libsbmlConstants#AST_FUNCTION_REM AST_FUNCTION_REM}).
1230 * <li> {@link libsbmlConstants#L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE} (value = <code>false</code>): use 
1231 * a piecewise function ({@link libsbmlConstants#AST_FUNCTION_PIECEWISE AST_FUNCTION_PIECEWISE})
1232 * to encode the modulo rule explicitly.
1233 * </ul>
1234  <p>
1235  * @see #setParseModuloL3v2(boolean)
1236  */ public
1237 boolean getParseModuloL3v2() {
1238    return libsbmlJNI.L3ParserSettings_getParseModuloL3v2(swigCPtr, this);
1239  }
1240
1241  
1242/**
1243  * Sets the behavior for handling functions added in SBML L3v2
1244  <p>
1245  * <p>
1246 * This setting affects whether the names of functions added in SBML
1247 * Level&nbsp;3 Version&nbsp;2 are parsed as those added MathML functions,
1248 * or whether they are added as generic functions with those names (to
1249 * be used in SBML as function definitions).
1250  <p>
1251  * This method lets you tell the parser which behavior to use&mdash;either
1252  * to parse the functions added in L3v2 as their built-in counterparts,
1253  * or as generic functions with that name (to be defined by SBML as
1254  * function definitions).  The two possibilities are
1255  * represented using the following constants:
1256  <p>
1257  * <p>
1258 * <ul>
1259 * <li> {@link libsbmlConstants#L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY} (value = <code>true</code>):
1260 * parse the strings <code>rateOf</code>, <code>implies</code>,
1261 * <code>max</code>, <code>min</code>, <code>quotient</code>, and
1262 * <code>rem</code> as
1263 * {@link libsbmlConstants#AST_FUNCTION_RATE_OF AST_FUNCTION_RATE_OF},
1264 * {@link libsbmlConstants#AST_LOGICAL_IMPLIES AST_LOGICAL_IMPLIES},
1265 * {@link libsbmlConstants#AST_FUNCTION_MAX AST_FUNCTION_MAX},
1266 * {@link libsbmlConstants#AST_FUNCTION_MIN AST_FUNCTION_MIN},
1267 * {@link libsbmlConstants#AST_FUNCTION_QUOTIENT AST_FUNCTION_QUOTIENT}, and
1268 * {@link libsbmlConstants#AST_FUNCTION_REM AST_FUNCTION_REM}, respectively.
1269 * <li> {@link libsbmlConstants#L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC} (value = <code>false</code>):
1270 * parse the strings <code>rateOf</code>, <code>implies</code>,
1271 * <code>max</code>, <code>min</code>, <code>quotient</code>, and
1272 * <code>rem</code> all as
1273 * {@link libsbmlConstants#AST_FUNCTION AST_FUNCTION} with the appropriate
1274 * name set.
1275 * </ul>
1276  <p>
1277  * @param l3v2functions a boolean value (one of the constants
1278  * {@link libsbmlConstants#L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY} or
1279  * {@link libsbmlConstants#L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC})
1280  * indicating how to interpret those function names.
1281  <p>
1282  * @see #getParseL3v2Functions()
1283  */ public
1284 void setParseL3v2Functions(boolean l3v2functions) {
1285    libsbmlJNI.L3ParserSettings_setParseL3v2Functions(swigCPtr, this, l3v2functions);
1286  }
1287
1288  
1289/**
1290  * Indicates the current behavior set for handling the @% symbol in
1291  * mathematical formulas.
1292  <p>
1293  * <p>
1294 * This setting affects whether the names of functions added in SBML
1295 * Level&nbsp;3 Version&nbsp;2 are parsed as those added MathML functions,
1296 * or whether they are added as generic functions with those names (to
1297 * be used in SBML as function definitions).
1298  <p>
1299  * @return A boolean indicating the behavior currently set.  The possible
1300  * values are as follows:
1301  * <p>
1302 * <ul>
1303 * <li> {@link libsbmlConstants#L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY} (value = <code>true</code>):
1304 * parse the strings <code>rateOf</code>, <code>implies</code>,
1305 * <code>max</code>, <code>min</code>, <code>quotient</code>, and
1306 * <code>rem</code> as
1307 * {@link libsbmlConstants#AST_FUNCTION_RATE_OF AST_FUNCTION_RATE_OF},
1308 * {@link libsbmlConstants#AST_LOGICAL_IMPLIES AST_LOGICAL_IMPLIES},
1309 * {@link libsbmlConstants#AST_FUNCTION_MAX AST_FUNCTION_MAX},
1310 * {@link libsbmlConstants#AST_FUNCTION_MIN AST_FUNCTION_MIN},
1311 * {@link libsbmlConstants#AST_FUNCTION_QUOTIENT AST_FUNCTION_QUOTIENT}, and
1312 * {@link libsbmlConstants#AST_FUNCTION_REM AST_FUNCTION_REM}, respectively.
1313 * <li> {@link libsbmlConstants#L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC} (value = <code>false</code>):
1314 * parse the strings <code>rateOf</code>, <code>implies</code>,
1315 * <code>max</code>, <code>min</code>, <code>quotient</code>, and
1316 * <code>rem</code> all as
1317 * {@link libsbmlConstants#AST_FUNCTION AST_FUNCTION} with the appropriate
1318 * name set.
1319 * </ul>
1320  <p>
1321  * @see #setParseModuloL3v2(boolean)
1322  */ public
1323 boolean getParseL3v2Functions() {
1324    return libsbmlJNI.L3ParserSettings_getParseL3v2Functions(swigCPtr, this);
1325  }
1326
1327  
1328/**
1329   * Set up the plugins for this {@link L3ParserSettings}, based on the
1330   * {@link SBMLNamespaces} object.
1331   <p>
1332   * When a {@link SBMLNamespaces} object is provided, the parser will only interpret
1333   * infix syntax understood by the core libSBML <em>plus</em> the packages
1334   * indicated by the {@link SBMLNamespaces} objects provided.  {@link ASTNode} objects
1335   * returned by the L3Parser will contain those {@link SBMLNamespaces} objects, and
1336   * will be used to parse certain constructs that may only be understood by
1337   * packages (e.g., vectors for the SBML Level&nbsp;3 'arrays' package).
1338   * Note that by default, all packages that were compiled with this version
1339   * of libSBML are included, so this function is most useful as a way to
1340   * turn <em>off</em> certain namespaces, such as might be desired if your tool
1341   * does not support vectors, for example.
1342   <p>
1343   * @param sbmlns a {@link SBMLNamespaces} object to be used.  If <code>null</code> is given
1344   * as the value, all plugins will be loaded.
1345   */ public
1346 void setPlugins(SBMLNamespaces sbmlns) {
1347    libsbmlJNI.L3ParserSettings_setPlugins(swigCPtr, this, SBMLNamespaces.getCPtr(sbmlns), sbmlns);
1348  }
1349
1350  
1351/** * @internal */ public
1352 void visitPackageInfixSyntax(ASTNode parent, ASTNode node, SWIGTYPE_p_StringBuffer_t sb) {
1353    libsbmlJNI.L3ParserSettings_visitPackageInfixSyntax(swigCPtr, this, ASTNode.getCPtr(parent), parent, ASTNode.getCPtr(node), node, SWIGTYPE_p_StringBuffer_t.getCPtr(sb));
1354  }
1355
1356}