|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jeuclid.converter.Converter
public final class Converter
Generic converter which uses the registry to do its conversions.
Field Summary | |
---|---|
static String |
EXTENSION_SVG
File extension for SVG. |
static String |
TYPE_SVG
Mime type for SVG. |
Constructor Summary | |
---|---|
protected |
Converter()
Default constructor. |
Method Summary | |
---|---|
Dimension |
convert(File inFile,
File outFile,
String outFileType)
Converts an existing file from MathML or ODF to the given type. |
Dimension |
convert(File inFile,
File outFile,
String outFileType,
LayoutContext params)
Converts an existing file from MathML or ODF to the given type. |
Dimension |
convert(Node doc,
File outFile,
String outFileType,
LayoutContext params)
Converts an existing document from MathML to the given type and store it in a file. |
Dimension |
convert(Node doc,
OutputStream outStream,
String outFileType,
LayoutContext params)
Converts an existing document from MathML to the given XML based type and writes it to the provided output stream. |
ConverterPlugin.DocumentWithDimension |
convert(Node doc,
String outFileType,
LayoutContext params)
Converts an existing document from MathML to the given XML based type and store it in a DOM document. |
Dimension |
convert(String docString,
OutputStream outStream,
String outFileType,
LayoutContext params)
Converts an XML string from MathML to the given XML based type and writes it to the provided output stream. |
static Converter |
getConverter()
Deprecated. use getInstance() instead. |
static Converter |
getInstance()
Retrieve an instance of the converter singleton class. |
BufferedImage |
render(Node node,
LayoutContext context)
Renders a document into an image. |
BufferedImage |
render(Node node,
LayoutContext context,
int imageType)
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
Constructor Detail |
---|
protected Converter()
Method Detail |
---|
public static Converter getInstance()
@Deprecated public static Converter getConverter()
getInstance()
instead.
public Dimension 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 Dimension convert(File inFile, File outFile, String outFileType, LayoutContext params) throws IOException
inFile
- input file.outFile
- output file.outFileType
- mimetype for the output file.params
- rendering parameters.
IOException
- if an I/O error occurred during read or write.public Dimension convert(Node doc, File outFile, String outFileType, LayoutContext params) throws IOException
doc
- input document. See
net.sourceforge.jeuclid.DOMBuilder#DOMBuilder(Node, MathBase)
for the list of valid node types.outFile
- output file.outFileType
- mimetype for the output file.params
- parameter set to use for conversion.
IOException
- if an I/O error occurred during read or write.public ConverterPlugin.DocumentWithDimension convert(Node doc, String outFileType, LayoutContext params)
doc
- input document. See
net.sourceforge.jeuclid.DOMBuilder#DOMBuilder(Node, MathBase)
for the list of valid node types.outFileType
- mimetype for the output file.params
- parameter set to use for conversion.
public Dimension convert(Node doc, OutputStream outStream, String outFileType, LayoutContext params) throws IOException
doc
- input document. See
net.sourceforge.jeuclid.DOMBuilder#DOMBuilder(Node, MathBase)
for the list of valid node types.outStream
- output stream.outFileType
- mimetype for the output file.params
- parameter set to use for conversion.
IOException
- if an I/O error occurred during read or write.public Dimension convert(String docString, OutputStream outStream, String outFileType, LayoutContext params) throws IOException
docString
- XML string representing a valid documentoutStream
- output stream.outFileType
- mimetype for the output file.params
- parameter set to use for conversion.
IOException
- if an I/O error occurred during read or write.public BufferedImage render(Node node, LayoutContext context) throws IOException
node
- Document / Node to rendercontext
- LayoutContext to use.
IOException
- if an I/O error occurred.public BufferedImage render(Node node, LayoutContext context, int imageType) throws IOException
node
- Document / Node to rendercontext
- LayoutContext to use.imageType
- ImageType as defined by BufferedImage
IOException
- if an I/O error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |