org.sbml.jsbml.util.compilers
public class FormulaCompilerNoPiecewise extends FormulaCompiler
FormulaCompiler
but removes all the
piecewise functions. They are replaced by an id that is unique if you are
using the same FormulaCompilerNoPiecewise
instance. The content of
the piecewise function is put in a Map
and is transformed to use
if/then/else.
This class is used for example to create an SBML2XPP converter where (in XPP)
the piecewise operator is not supported.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
andReplacement |
private java.lang.String |
orReplacement |
private java.util.Map<java.lang.String,java.lang.String> |
piecewiseMap |
DECIMAL_FORMAT, REAL_FORMAT, SCIENTIFIC_FORMAT, underscore
Constructor and Description |
---|
FormulaCompilerNoPiecewise() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAndReplacement()
Gets the String that will be used to replace ' and ' (the mathML
<and> element) in the boolean expressions.
|
java.lang.String |
getOrReplacement()
Gets the String that will be used to replace ' or ' (the mathML
<or> element) in the boolean expressions.
|
java.util.Map<java.lang.String,java.lang.String> |
getPiecewiseMap()
Gets a
Map of the piecewise expressions that have been
transformed. |
ASTNodeValue |
piecewise(java.util.List<ASTNode> nodes) |
void |
setAndReplacement(java.lang.String andReplacement)
Sets the
String that will be used to replace ' and ' (the mathML
<and> element) in the boolean expressions. |
void |
setOrReplacement(java.lang.String orReplacement)
Sets the
String that will be used to replace ' or ' (the mathML
<or> element) in the boolean expressions. |
abs, and, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, brackets, ceiling, checkBrackets, checkDenominatorBrackets, compile, compile, compile, compile, compile, compile, cos, cosh, cot, coth, csc, csch, delay, diff, eq, exp, factorial, floor, frac, frac, frac, function, function, function, geq, getConstantAvogadro, getConstantE, getConstantFalse, getConstantPi, getConstantTrue, getNegativeInfinity, getPositiveInfinity, getSpecies, getStoichiometry, gt, lambda, lambdaBody, leq, ln, log, log, logicalOperation, lt, minus, neq, not, or, plus, pow, pow, relation, root, root, root, sec, sech, selector, selector, sin, sinh, sqrt, sqrt, sum, symbolTime, tan, tanh, times, times, uMinus, unknownValue, vector, vector, xor
append, append, concat, concatStringBuilder, encodeForHTML, fill, fill, firstLetterLowerCase, firstLetterUpperCase, getWordForNumber, leadingZeros, newLine, parseSBMLBoolean, parseSBMLDouble, parseSBMLInt, parseSBMLShort, toHTML, toHTML, toString, toString, toXMLAnnotationString, toXMLMessageString, toXMLNotesString
private java.util.Map<java.lang.String,java.lang.String> piecewiseMap
private java.lang.String andReplacement
private java.lang.String orReplacement
public ASTNodeValue piecewise(java.util.List<ASTNode> nodes) throws SBMLException
piecewise
in interface ASTNodeCompiler
piecewise
in class FormulaCompiler
SBMLException
public java.util.Map<java.lang.String,java.lang.String> getPiecewiseMap()
Map
of the piecewise expressions that have been
transformed.Map
of the piecewise expressions that have been
transformed.public java.lang.String getAndReplacement()
String
that will be used to replace ' and ' (the
mathML <and> element) in the boolean expressions.public void setAndReplacement(java.lang.String andReplacement)
String
that will be used to replace ' and ' (the mathML
<and> element) in the boolean expressions. The default value used
is ' & '. If null is given, no replacement will be performed.andReplacement
- public java.lang.String getOrReplacement()
String
that will be used to replace ' or ' (the
mathML <or> element) in the boolean expressions.public void setOrReplacement(java.lang.String orReplacement)
String
that will be used to replace ' or ' (the mathML
<or> element) in the boolean expressions. The default value is '
| '. If null is given, no replacement will be performed.orReplacement
-