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

java.lang.Object
  extended by org.compass.core.xml.jdom.converter.AbstractXmlOutputterXmlContentConverter
      extended by org.compass.core.xml.jdom.converter.STAXBuilderXmlContentConverter
All Implemented Interfaces:
CompassConfigurable, SupportsXmlContentWrapper, XmlContentConverter

public class STAXBuilderXmlContentConverter
extends AbstractXmlOutputterXmlContentConverter
implements SupportsXmlContentWrapper, CompassConfigurable

A JDOM content mapping converter, which uses JDOM StAXBuilder to convert the xml string into a JDomAliasedXmlObject.

Author:
kimchy

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.compass.core.converter.xsem.SupportsXmlContentWrapper
SupportsXmlContentWrapper.NotSupportedXmlContentWrapperException
 
Field Summary
(package private)  javax.xml.stream.XMLInputFactory xmlInputFactory
           
 
Constructor Summary
STAXBuilderXmlContentConverter()
           
 
Method Summary
 void configure(CompassSettings settings)
          Configure using the given settings.
protected  StAXBuilder doCreateStAXBuilder(CompassSettings settings)
           
 AliasedXmlObject fromXml(String alias, Reader xml)
          Uses JDOM StAXBuilder to convert the given xml string into a JDomAliasedXmlObject.
 boolean supports(String wrapper)
          This converter does not support a singleton wrapper strategy.
 
Methods inherited from class org.compass.core.xml.jdom.converter.AbstractXmlOutputterXmlContentConverter
toXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlInputFactory

javax.xml.stream.XMLInputFactory xmlInputFactory
Constructor Detail

STAXBuilderXmlContentConverter

public STAXBuilderXmlContentConverter()
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

doCreateStAXBuilder

protected StAXBuilder doCreateStAXBuilder(CompassSettings settings)

supports

public boolean supports(String wrapper)
This converter does not support a singleton wrapper strategy.

Specified by:
supports in interface SupportsXmlContentWrapper

fromXml

public AliasedXmlObject fromXml(String alias,
                                Reader xml)
                         throws ConversionException
Uses JDOM StAXBuilder to convert the given xml string into a JDomAliasedXmlObject.

Specified by:
fromXml in interface XmlContentConverter
Parameters:
alias - The alias that will be associated with the AliasedXmlObject
xml - The xml string to convert into an JDomAliasedXmlObject
Returns:
A JDomAliasedXmlObject parsed from the given xml string and associated with the given alias
Throws:
ConversionException - In case the xml parsing failed


Copyright (c) 2004-2008 The Compass Project.