Class OperatorBuilder
java.lang.Object
com.singularsys.extensions.mathml.builder.ApplyConstructor
com.singularsys.extensions.mathml.builder.OperatorBuilder
- All Implemented Interfaces:
MathMLFragmentBuilder
Builds mathml elements corresponding to operators.
For most operators, like x+1 the following xml is produced
<apply><plus/><ci>x<ci/><cn>1<cn/><apply/>Other operators have special behaviour with their own MathMLFragmentBuilder
- Author:
- Richard Morris
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(Node node, Document doc, MathMLDocumentBuilder db) Builds a Element for a jep Node.The map of standard operatorsThe map of special operatorsput(Operator key, MathMLFragmentBuilder value) Adds a special operator.Adds a standard operator.
-
Constructor Details
-
OperatorBuilder
public OperatorBuilder()
-
-
Method Details
-
build
Description copied from interface:MathMLFragmentBuilderBuilds a Element for a jep Node.- Specified by:
buildin interfaceMathMLFragmentBuilder- Parameters:
node- The jep sub expression.doc- The document to create the element in.db- Used create elements and attributes and child nodes.- Returns:
- element representing the node
- Throws:
JepException
-
put
Adds a standard operator.- Parameters:
key- the operatorvalue- the name of the mathml element to use for this operator.- Returns:
- previous value associated with the operator or null
-
put
Adds a special operator.- Parameters:
key- the operatorvalue- a builder to create elements for this operator.- Returns:
- previous value associated with the operator or null
-
getOperators
The map of standard operators- Returns:
- the map
-
getSpecialOps
The map of special operators- Returns:
- the map
-