org.compass.core.xml.jdom.converter
Class AbstractXmlOutputterXmlContentConverter

java.lang.Object
  extended by org.compass.core.xml.jdom.converter.AbstractXmlOutputterXmlContentConverter
All Implemented Interfaces:
XmlContentConverter
Direct Known Subclasses:
SAXBuilderXmlContentConverter, STAXBuilderXmlContentConverter

public abstract class AbstractXmlOutputterXmlContentConverter
extends Object
implements XmlContentConverter

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

Author:
kimchy

Constructor Summary
AbstractXmlOutputterXmlContentConverter()
           
 
Method Summary
 String toXml(XmlObject xmlObject)
          Converts the XmlObject (assumes it is a JDomXmlObject) 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

AbstractXmlOutputterXmlContentConverter

public AbstractXmlOutputterXmlContentConverter()
Method Detail

toXml

public String toXml(XmlObject xmlObject)
             throws ConversionException
Converts the XmlObject (assumes it is a JDomXmlObject) into an xml string. Uses JDOM XmlOutputter and Format (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 JDomXmlObject implementation).
Returns:
An xml string representation of the xml object
Throws:
ConversionException - Should not really happne...


Copyright (c) 2004-2008 The Compass Project.