public class FunctionBuilder extends ApplyConstructor implements MathMLFragmentBuilder
Modifier and Type | Class and Description |
---|---|
static class |
FunctionBuilder.CSymbolBuilder
Class to build a CSymbol element, with the name of the jep-function.
|
static class |
FunctionBuilder.ErrorBuilder
Default builder for unknown function, throws a jep exception.
|
static class |
FunctionBuilder.FnBuilder
Class to build a Fn element, with the name of the jep-function.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
functions |
protected java.util.Map<java.lang.String,MathMLFragmentBuilder> |
specialFunctions |
protected MathMLFragmentBuilder |
unknownFunctionBuilder |
Constructor and Description |
---|
FunctionBuilder() |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Element |
build(Node n,
org.w3c.dom.Document d,
MathMLDocumentBuilder db)
Builds a Element for a jep Node.
|
protected org.w3c.dom.Element |
buildStandardFunction(Node node,
org.w3c.dom.Document doc,
MathMLDocumentBuilder db) |
java.util.Map<java.lang.String,java.lang.String> |
getFunctions()
Gets the map of standard functions
|
java.util.Map<java.lang.String,MathMLFragmentBuilder> |
getSpecialFunctions()
Gets the map of special functions
|
MathMLFragmentBuilder |
getUnknownFunctionBuilder() |
java.lang.String |
putFunction(java.lang.String key,
java.lang.String value)
Adds a standard function
|
MathMLFragmentBuilder |
putSpecialFunction(java.lang.String key,
MathMLFragmentBuilder value)
Adds a special function
|
void |
setUnknownFunctionBuilder(MathMLFragmentBuilder unknownFunctionBuilder) |
protected MathMLFragmentBuilder unknownFunctionBuilder
protected java.util.Map<java.lang.String,java.lang.String> functions
protected java.util.Map<java.lang.String,MathMLFragmentBuilder> specialFunctions
public org.w3c.dom.Element build(Node n, org.w3c.dom.Document d, MathMLDocumentBuilder db) throws JepException
MathMLFragmentBuilder
build
in interface MathMLFragmentBuilder
n
- The jep sub expression.d
- The document to create the element in.db
- Used create elements and attributes and child nodes.JepException
protected org.w3c.dom.Element buildStandardFunction(Node node, org.w3c.dom.Document doc, MathMLDocumentBuilder db) throws JepException
JepException
public java.lang.String putFunction(java.lang.String key, java.lang.String value)
key
- jep function namevalue
- MathML element namepublic MathMLFragmentBuilder putSpecialFunction(java.lang.String key, MathMLFragmentBuilder value)
key
- jep function namevalue
- builder to handle this type of functionpublic java.util.Map<java.lang.String,java.lang.String> getFunctions()
public java.util.Map<java.lang.String,MathMLFragmentBuilder> getSpecialFunctions()
public MathMLFragmentBuilder getUnknownFunctionBuilder()
public void setUnknownFunctionBuilder(MathMLFragmentBuilder unknownFunctionBuilder)
Copyright © 2018 Singular Systems http://www.singularsys.com/jep