Class VariableBuilder
java.lang.Object
com.singularsys.extensions.mathml.builder.VariableBuilder
- All Implemented Interfaces:
MathMLFragmentBuilder
Builder for jep variables, most variables are represented as <ci>x</ci>.
Some jep constant variable (pi,e,i,true,false) have corresponding tags <pi/> etc.
in MathML 2.0 these can de defined using putConstant, in MathML 1.0 these were represented
as <cn> elements containing named entities like π. There is buggy support for this.
- Author:
- Richard Morris
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(Node n, Document d, MathMLDocumentBuilder db) Builds a Element for a jep Node.intThe xml version used.putConstant(String key, String value) voidsetVersion(int version) Deprecated.MathML versions not supported.
-
Constructor Details
-
VariableBuilder
public VariableBuilder()
-
-
Method Details
-
build
Description copied from interface:MathMLFragmentBuilderBuilds a Element for a jep Node.- Specified by:
buildin interfaceMathMLFragmentBuilder- Parameters:
n- The jep sub expression.d- The document to create the element in.db- Used create elements and attributes and child nodes.- Returns:
- element representing the node
-
putConstant
-
putEntity
-
getVersion
public int getVersion()The xml version used. for version 1 predefined constants are represented as entities, for version 2 as xml tags.- Returns:
- the xml version
-
setVersion
Deprecated.MathML versions not supported.This will be used to set the MathML version. Currently deprecated, as entities are not properly supported.- Parameters:
version-
-
getConstants
-
getEntities
-