|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jeuclid.Converter
public final class Converter
Utility class for conversion from MathML to other formats.
This class supports easy conversion from a MathML or ODF file to any supported output format.
Currently supported output formats:
| Field Summary | |
|---|---|
static String |
EXTENSION_SVG
File extension for SVG. |
static String |
TYPE_SVG
Mime type for SVG. |
| Method Summary | |
|---|---|
static boolean |
convert(Document doc,
File outFile,
Map<ParameterKey,String> params)
Converts an existing file from MathML or ODF to the given type. |
static boolean |
convert(File inFile,
File outFile,
Map<ParameterKey,String> params)
Converts an existing file from MathML or ODF to the given type. |
static boolean |
convert(File inFile,
File outFile,
String outFileType)
Converts an existing file from MathML or ODF to the given type. |
static List<String> |
getAvailableOutfileTypes()
Retrieve a list of available mime types for conversion. |
static String |
getMimeTypeForSuffix(String suffix)
Returns the MimeType for a given suffix. |
static String |
getSuffixForMimeType(String mimeType)
Returns the file suffix suitable for the given mime type. |
static BufferedImage |
render(Document doc,
Map<ParameterKey,String> params)
Renders a document into an image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TYPE_SVG
public static final String EXTENSION_SVG
| Method Detail |
|---|
public static boolean convert(File inFile,
File outFile,
String outFileType)
throws IOException
inFile - input file.outFile - output file.outFileType - mimetype for the output file.
IOException - if an I/O error occurred during read or write.
public static BufferedImage render(Document doc,
Map<ParameterKey,String> params)
throws SAXException,
IOException
doc - DOM MathML documentparams - parameters
SAXException - if an error occurs reading the DOM document
IOException - if an I/O error occurred.
public static boolean convert(File inFile,
File outFile,
Map<ParameterKey,String> params)
throws IOException
inFile - input file.outFile - output file.params - rendering parameters.
IOException - if an I/O error occurred during read or write.
public static boolean convert(Document doc,
File outFile,
Map<ParameterKey,String> params)
throws IOException
doc - input document.outFile - output file.params - parameter set to use for conversion.
IOException - if an I/O error occurred during read or write.public static List<String> getAvailableOutfileTypes()
public static String getSuffixForMimeType(String mimeType)
This function is not fully implemented yet
mimeType - a mimetype, as returned by
getAvailableOutfileTypes().
public static String getMimeTypeForSuffix(String suffix)
suffix - the suffix, e.g. png
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||