org.compass.core.xml.dom4j.converter
Class AbstractXmlWriterXmlContentConverter

java.lang.Object
  extended by org.compass.core.xml.dom4j.converter.AbstractXmlWriterXmlContentConverter
All Implemented Interfaces:
CompassConfigurable, XmlContentConverter
Direct Known Subclasses:
SAXReaderXmlContentConverter, STAXReaderXmlContentConverter, XPP3ReaderXmlContentConverter, XPPReaderXmlContentConverter

public abstract class AbstractXmlWriterXmlContentConverter
extends Object
implements XmlContentConverter, CompassConfigurable

A base class for dom4j xml content converters. Already implements toXml(org.compass.core.xml.XmlObject) using dom4j XmlWriter.

Author:
kimchy

Constructor Summary
AbstractXmlWriterXmlContentConverter()
           
 
Method Summary
 void configure(CompassSettings settings)
          Configure using the given settings.
 String toXml(XmlObject xmlObject)
          Converts the XmlObject (assumes it is a Dom4jXmlObject) into an xml string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.converter.xsem.XmlContentConverter
fromXml
 

Constructor Detail

AbstractXmlWriterXmlContentConverter

public AbstractXmlWriterXmlContentConverter()
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

toXml

public String toXml(XmlObject xmlObject)
             throws ConversionException
Converts the XmlObject (assumes it is a Dom4jXmlObject) into an xml string. Uses dom4j XmlWriter and OutputFormat (in a compact mode) to perform it.

Specified by:
toXml in interface XmlContentConverter
Parameters:
xmlObject - The xml object to convert into an xml string (must be a Dom4jXmlObject implementation).
Returns:
An xml string representation of the xml object
Throws:
ConversionException - Should not really happne...


Copyright (c) 2004-2009 The Compass Project.