org.mule.module.xml.transformer
Class XmlPrettyPrinter

java.lang.Object
  extended by org.mule.transformer.AbstractTransformer
      extended by org.mule.module.xml.transformer.XmlPrettyPrinter
All Implemented Interfaces:
Initialisable, NamedObject, BaseTransformer, Transformer

public class XmlPrettyPrinter
extends AbstractTransformer


Field Summary
protected  org.dom4j.io.OutputFormat outputFormat
           
 
Fields inherited from class org.mule.transformer.AbstractTransformer
DEFAULT_TRUNCATE_LENGTH, endpoint, logger, name, returnClass, sourceTypes
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Constructor Summary
XmlPrettyPrinter()
           
 
Method Summary
protected  Object doTransform(Object src, String encoding)
           
 String getEncoding()
           
 boolean getIndentEnabled()
           
 int getIndentSize()
           
 String getIndentString()
           
 String getLineSeparator()
           
 int getNewLineAfterNTags()
           
 org.dom4j.io.OutputFormat getOutputFormat()
           
 boolean isExpandEmptyElements()
           
 boolean isNewlines()
           
 boolean isOmitEncoding()
           
 boolean isPadText()
           
 boolean isSuppressDeclaration()
           
 boolean isTrimText()
           
 boolean isXHTML()
           
 void setEncoding(String encoding)
           
 void setExpandEmptyElements(boolean expandEmptyElements)
           
 void setIndentEnabled(boolean doIndent)
           
 void setIndentSize(int indentSize)
           
 void setIndentString(String indentString)
           
 void setLineSeparator(String separator)
           
 void setNewLineAfterNTags(int tagCount)
           
 void setNewlines(boolean newlines)
           
 void setOmitEncoding(boolean omitEncoding)
           
 void setPadText(boolean padText)
           
 void setSuppressDeclaration(boolean suppressDeclaration)
           
 void setTrimText(boolean trimText)
           
 void setXHTML(boolean xhtml)
           
 
Methods inherited from class org.mule.transformer.AbstractTransformer
checkReturnClass, generateTransformerName, getEndpoint, getName, getReturnClass, getSourceTypes, initialise, isAcceptNull, isConsumed, isIgnoreBadInput, isSourceTypeSupported, isSourceTypeSupported, registerSourceType, setEndpoint, setIgnoreBadInput, setName, setReturnClass, toString, transform, unregisterSourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

outputFormat

protected org.dom4j.io.OutputFormat outputFormat
Constructor Detail

XmlPrettyPrinter

public XmlPrettyPrinter()
Method Detail

getOutputFormat

public org.dom4j.io.OutputFormat getOutputFormat()

doTransform

protected Object doTransform(Object src,
                             String encoding)
                      throws TransformerException
Specified by:
doTransform in class AbstractTransformer
Throws:
TransformerException

getEncoding

public String getEncoding()
See Also:
OutputFormat.getEncoding()

setEncoding

public void setEncoding(String encoding)
See Also:
OutputFormat.setEncoding(String)

getIndentEnabled

public boolean getIndentEnabled()
See Also:
OutputFormat.getIndent()

setIndentEnabled

public void setIndentEnabled(boolean doIndent)
See Also:
OutputFormat.setIndent(boolean)

getIndentString

public String getIndentString()
See Also:
OutputFormat.getIndent()

setIndentString

public void setIndentString(String indentString)
See Also:
OutputFormat.setIndent(boolean)

getIndentSize

public int getIndentSize()
See Also:
OutputFormat.setIndentSize(int)

setIndentSize

public void setIndentSize(int indentSize)
See Also:
OutputFormat.setIndentSize(int)

getLineSeparator

public String getLineSeparator()
See Also:
OutputFormat.getLineSeparator()

setLineSeparator

public void setLineSeparator(String separator)
See Also:
OutputFormat.setLineSeparator(String)

getNewLineAfterNTags

public int getNewLineAfterNTags()
See Also:
OutputFormat.getNewLineAfterNTags()

setNewLineAfterNTags

public void setNewLineAfterNTags(int tagCount)
See Also:
OutputFormat.setNewLineAfterNTags(int)

isExpandEmptyElements

public boolean isExpandEmptyElements()
See Also:
OutputFormat.isExpandEmptyElements()

setExpandEmptyElements

public void setExpandEmptyElements(boolean expandEmptyElements)
See Also:
OutputFormat.setExpandEmptyElements(boolean)

isNewlines

public boolean isNewlines()
See Also:
OutputFormat.isNewlines()

setNewlines

public void setNewlines(boolean newlines)
See Also:
OutputFormat.setNewlines(boolean)

isOmitEncoding

public boolean isOmitEncoding()
See Also:
OutputFormat.isOmitEncoding()

setOmitEncoding

public void setOmitEncoding(boolean omitEncoding)
See Also:
OutputFormat.setOmitEncoding(boolean)

isPadText

public boolean isPadText()
See Also:
OutputFormat.getEncoding()

setPadText

public void setPadText(boolean padText)
See Also:
OutputFormat.getEncoding()

isSuppressDeclaration

public boolean isSuppressDeclaration()
See Also:
OutputFormat.getEncoding()

setSuppressDeclaration

public void setSuppressDeclaration(boolean suppressDeclaration)
See Also:
OutputFormat.getEncoding()

isTrimText

public boolean isTrimText()
See Also:
OutputFormat.isTrimText()

setTrimText

public void setTrimText(boolean trimText)
See Also:
OutputFormat.setTrimText(boolean)

isXHTML

public boolean isXHTML()
See Also:
OutputFormat.isXHTML()

setXHTML

public void setXHTML(boolean xhtml)
See Also:
OutputFormat.setXHTML(boolean)


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.