Package kiyut.sketsa.io
Class DOMTranscoder
- java.lang.Object
-
- org.apache.batik.transcoder.TranscoderSupport
-
- org.apache.batik.transcoder.AbstractTranscoder
-
- kiyut.sketsa.io.DOMTranscoder
-
- All Implemented Interfaces:
org.apache.batik.transcoder.Transcoder
public class DOMTranscoder extends org.apache.batik.transcoder.AbstractTranscoderThis class represents an SVGDOM to source files pretty-printer. Most of the code here is adapted from batik svg2svg Transcoder and DOMUtilities. This class delegate the writing to DOMPrettyPrinter- Author:
- Kiyut
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDOMTranscoder.NewlineKeyTo represent a newline key.static classDOMTranscoder.NewlineValueTo represent a newline value.
-
Field Summary
Fields Modifier and Type Field Description static org.apache.batik.transcoder.ErrorHandlerDEFAULT_ERROR_HANDLERThe default error handler.static org.apache.batik.transcoder.TranscodingHints.KeyKEY_DOCUMENT_WIDTHThe key to specify the document width.static org.apache.batik.transcoder.TranscodingHints.KeyKEY_FORMATThe key to specify whether to format the input.static org.apache.batik.transcoder.TranscodingHints.KeyKEY_NEWLINEThe key to specify the newline character sequence.static org.apache.batik.transcoder.TranscodingHints.KeyKEY_PUBLIC_IDThe key to specify the public id.static org.apache.batik.transcoder.TranscodingHints.KeyKEY_SYSTEM_IDThe key to specify the system id.static org.apache.batik.transcoder.TranscodingHints.KeyKEY_TABULATION_WIDTHThe key to specify the tabulation width.static org.apache.batik.transcoder.TranscodingHints.KeyKEY_XML_DECLARATIONThe key to specify the XML declaration option.protected NodeRangenodeRangestatic BooleanVALUE_FORMAT_OFFThe value to turn off formatting.static BooleanVALUE_FORMAT_ONThe value to turn on formatting.static DOMTranscoder.NewlineValueVALUE_NEWLINE_CRThe "\r" newline value.static DOMTranscoder.NewlineValueVALUE_NEWLINE_CR_LFThe "\r\n" newline value.static DOMTranscoder.NewlineValueVALUE_NEWLINE_LFThe "\n" newline value.
-
Constructor Summary
Constructors Constructor Description DOMTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidprettyPrint(Document doc, Writer out)Pretty print the given reader.voidsetNodeRange(NodeRange nodeRange)voidtranscode(org.apache.batik.transcoder.TranscoderInput input, org.apache.batik.transcoder.TranscoderOutput output)-
Methods inherited from class org.apache.batik.transcoder.TranscoderSupport
addTranscodingHint, getErrorHandler, getTranscodingHints, removeTranscodingHint, setErrorHandler, setTranscodingHints, setTranscodingHints
-
-
-
-
Field Detail
-
DEFAULT_ERROR_HANDLER
public static final org.apache.batik.transcoder.ErrorHandler DEFAULT_ERROR_HANDLER
The default error handler.
-
KEY_NEWLINE
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_NEWLINE
The key to specify the newline character sequence.
-
VALUE_NEWLINE_CR
public static final DOMTranscoder.NewlineValue VALUE_NEWLINE_CR
The "\r" newline value.
-
VALUE_NEWLINE_CR_LF
public static final DOMTranscoder.NewlineValue VALUE_NEWLINE_CR_LF
The "\r\n" newline value.
-
VALUE_NEWLINE_LF
public static final DOMTranscoder.NewlineValue VALUE_NEWLINE_LF
The "\n" newline value.
-
KEY_FORMAT
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_FORMAT
The key to specify whether to format the input.
-
VALUE_FORMAT_ON
public static final Boolean VALUE_FORMAT_ON
The value to turn on formatting.
-
VALUE_FORMAT_OFF
public static final Boolean VALUE_FORMAT_OFF
The value to turn off formatting.
-
KEY_TABULATION_WIDTH
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_TABULATION_WIDTH
The key to specify the tabulation width.
-
KEY_DOCUMENT_WIDTH
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_DOCUMENT_WIDTH
The key to specify the document width.
-
KEY_XML_DECLARATION
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_XML_DECLARATION
The key to specify the XML declaration option.
-
KEY_PUBLIC_ID
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_PUBLIC_ID
The key to specify the public id.
-
KEY_SYSTEM_ID
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_SYSTEM_ID
The key to specify the system id.
-
nodeRange
protected NodeRange nodeRange
-
-
Method Detail
-
setNodeRange
public void setNodeRange(NodeRange nodeRange)
-
transcode
public void transcode(org.apache.batik.transcoder.TranscoderInput input, org.apache.batik.transcoder.TranscoderOutput output) throws org.apache.batik.transcoder.TranscoderException- Throws:
org.apache.batik.transcoder.TranscoderException
-
-