Class ConstantHandler
- java.lang.Object
-
- com.singularsys.extensions.mathml.parser.AbstractHandler
-
- com.singularsys.extensions.mathml.parser.ConstantHandler
-
- All Implemented Interfaces:
TagHandler
public class ConstantHandler extends AbstractHandler
Handles <cn> elements.- Author:
- Richard Morris
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConstantHandler.ComplexHandlerParses complex numbers like<cn type="complex-cartesian">1.23<sep/>4.56</cn>static classConstantHandler.ComplexPolarHandlerParses complex numbers like<cn type="complex-polar">1.23<sep/>4.56</cn>static interfaceConstantHandler.ConstantTypeHandlerMethods for individual <cn type="type"> handlersstatic classConstantHandler.ENotationHandlerParses numbers in e-notation like<cn type="e-notation">123<sep/>-2</cn>static classConstantHandler.IntegerHandlerParses integer numbers like<cn type="integer">123</cn>static classConstantHandler.KnownConstantHandlerParses constants like<cn type="constant">π</cn>static classConstantHandler.RationalHandlerParses complex numbers like<cn type="rational">123<sep/>456</cn>static classConstantHandler.RealHandlerParses real numbers like<cn type="real">1.23</cn>
-
Constructor Summary
Constructors Constructor Description ConstantHandler(Jep jep)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objecthandle(StackFrame frame, org.xml.sax.Locator loc)Transform the element, called when a closing tag is encountered.java.lang.StringputConstantElement(java.lang.String key, java.lang.String value)java.lang.StringputEntity(java.lang.String key, java.lang.String value)java.lang.StringremoveConstantElement(java.lang.Object key)java.lang.StringremoveEntity(java.lang.Object key)-
Methods inherited from class com.singularsys.extensions.mathml.parser.AbstractHandler
convertChildrenToNodes, convertToNode, getFt, getJep, getNf, getNumf, getOt, jepNodesAsArray, jepNodesToFlatArray, jepNodesToFlatList
-
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConstantHandler
public ConstantHandler(Jep jep)
- Parameters:
jep-
-
-
Method Detail
-
handle
public java.lang.Object handle(StackFrame frame, org.xml.sax.Locator loc) throws org.xml.sax.SAXParseException
Description copied from interface:TagHandlerTransform the element, called when a closing tag is encountered.- Parameters:
frame- StackFrame representing the elementloc- location in input- Returns:
- typically a Node, other types of objects may also be returned when the tag has a special meaning for its parent node.
- Throws:
org.xml.sax.SAXParseException
-
putEntity
public java.lang.String putEntity(java.lang.String key, java.lang.String value)
-
putConstantElement
public java.lang.String putConstantElement(java.lang.String key, java.lang.String value)
-
removeConstantElement
public java.lang.String removeConstantElement(java.lang.Object key)
-
removeEntity
public java.lang.String removeEntity(java.lang.Object key)
-
-