|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.ugent.caagt.jmathtex.mathml.MathMLParser
public class MathMLParser
Provides various static methods for parsing MathML input from a file to a
TeXFormula.
JDOM is used for parsing. For each "parse" method found here, there's a
corresponding "build" method in the class org.jdom.input.SaxBuilder.
For more information, see
http://jdom.org .
| Method Summary | |
|---|---|
protected static TeXFormula |
createSpace(java.lang.String[] attr)
|
protected static java.awt.Color |
getColor(java.lang.String s)
|
protected static java.util.List<TeXFormula> |
getFormulaList(java.util.List l,
be.ugent.caagt.jmathtex.mathml.Environment env)
|
protected static java.lang.Object |
getUnicodeMapping(char unicode)
|
static TeXFormula |
parse(java.io.File file,
boolean validate)
Parses a MathML input file identified by a File. |
static TeXFormula |
parse(java.io.InputStream stream,
boolean validate)
Parses MathML input from the specified InputStream. |
static TeXFormula |
parse(java.io.InputStream stream,
java.lang.String uri,
boolean validate)
Parses MathML input from the specified InputStream and URI base. |
static TeXFormula |
parse(java.io.Reader reader,
boolean validate)
Parses MathML input from the specified Reader. |
static TeXFormula |
parse(java.io.Reader reader,
java.lang.String uri,
boolean validate)
Parses MathML input from the specified Reader and URI base. |
static TeXFormula |
parse(java.lang.String uri,
boolean validate)
Parses a MathML input file identified by the specified URI. |
static TeXFormula |
parse(java.net.URL url,
boolean validate)
Parses a MathML input file identified by the specified URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
protected static TeXFormula createSpace(java.lang.String[] attr)
throws MathMLException
MathMLException
protected static java.awt.Color getColor(java.lang.String s)
throws MathMLException
MathMLException
protected static java.util.List<TeXFormula> getFormulaList(java.util.List l,
be.ugent.caagt.jmathtex.mathml.Environment env)
throws MathMLException
MathMLExceptionprotected static java.lang.Object getUnicodeMapping(char unicode)
public static TeXFormula parse(java.io.File file,
boolean validate)
throws MathMLException,
java.io.IOException
File.
file - identifies the file to read fromvalidate - whether the input file should be validated first
TeXFormula
MathMLException - if the MathML syntax wasn't correct
java.io.IOException - if there was an error reading the file
public static TeXFormula parse(java.io.InputStream stream,
boolean validate)
throws MathMLException,
java.io.IOException
InputStream.
stream - the stream to read fromvalidate - whether the input file should be validated first
TeXFormula
MathMLException - if the MathML syntax wasn't correct
java.io.IOException - if there was an error reading the file
public static TeXFormula parse(java.io.InputStream stream,
java.lang.String uri,
boolean validate)
throws MathMLException,
java.io.IOException
InputStream and URI base.
stream - the stream to read fromuri - base for resolving relative URI'svalidate - whether the input file should be validated first
TeXFormula
MathMLException - if the MathML syntax wasn't correct
java.io.IOException - if there was an error reading the file
public static TeXFormula parse(java.io.Reader reader,
boolean validate)
throws MathMLException,
java.io.IOException
Reader.
reader - the Reader to read fromvalidate - whether the input file should be validated first
TeXFormula
MathMLException - if the MathML syntax wasn't correct
java.io.IOException - if there was an error reading the file
public static TeXFormula parse(java.io.Reader reader,
java.lang.String uri,
boolean validate)
throws MathMLException,
java.io.IOException
Reader and URI base.
reader - the Reader to read fromuri - base for resolving relative URI'svalidate - whether the input file should be validated first
TeXFormula
MathMLException - if the MathML syntax wasn't correct
java.io.IOException - if there was an error reading the file
public static TeXFormula parse(java.lang.String uri,
boolean validate)
throws MathMLException,
java.io.IOException
uri - identifies the file to read fromvalidate - whether the input file should be validated first
TeXFormula
MathMLException - if the MathML syntax wasn't correct
java.io.IOException - if there was an error reading the file
public static TeXFormula parse(java.net.URL url,
boolean validate)
throws MathMLException,
java.io.IOException
url - identifies the file to read fromvalidate - whether the input file should be validated first
TeXFormula
MathMLException - if the MathML syntax wasn't correct
java.io.IOException - if there was an error reading the file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||