Package com.bc.ceres.binding.dom
Class XStreamDomConverter
- java.lang.Object
- 
- com.bc.ceres.binding.dom.XStreamDomConverter
 
- 
- All Implemented Interfaces:
- DomConverter
 
 public class XStreamDomConverter extends Object implements DomConverter todo - add API doc- Since:
- BEAM 4.6
 
- 
- 
Constructor SummaryConstructors Constructor Description XStreamDomConverter(Class<?> valueType)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureXStream(com.thoughtworks.xstream.XStream xStream)ObjectconvertDomToValue(DomElement parentElement, Object value)Converts a DOM to a (complex) value of the type returned byDomConverter.getValueType().voidconvertValueToDom(Object value, DomElement parentElement)Converts a (complex) value of the type returned byDomConverter.getValueType()to its DOM representation which may be further converted to XML.Class<?>getValueType()Gets the value type, which may be abstract.com.thoughtworks.xstream.XStreamgetXStream()
 
- 
- 
- 
Constructor Detail- 
XStreamDomConverterpublic XStreamDomConverter(Class<?> valueType) 
 
- 
 - 
Method Detail- 
getValueTypepublic Class<?> getValueType() Description copied from interface:DomConverterGets the value type, which may be abstract.- Specified by:
- getValueTypein interface- DomConverter
- Returns:
- The value type.
 
 - 
convertDomToValuepublic Object convertDomToValue(DomElement parentElement, Object value) throws ConversionException, ValidationException Description copied from interface:DomConverterConverts a DOM to a (complex) value of the type returned byDomConverter.getValueType().- Specified by:
- convertDomToValuein interface- DomConverter
- Parameters:
- parentElement- The parent DOM element.
- value- The value which receives the DOM representation of the value or- null. If- valueis- null, the method is responsible for the creation of a new instance and its configuration using the DOM.
- Returns:
- The converted value, never null.
- Throws:
- ConversionException- If the conversion fails.
- ValidationException- If the converted value is invalid.
 
 - 
convertValueToDompublic void convertValueToDom(Object value, DomElement parentElement) throws ConversionException Description copied from interface:DomConverterConverts a (complex) value of the type returned byDomConverter.getValueType()to its DOM representation which may be further converted to XML. The givenvaluecan be safely cast to the type returned byDomConverter.getValueType().- Specified by:
- convertValueToDomin interface- DomConverter
- Parameters:
- value- The value to be converted to the DOM. Never- null.
- parentElement- The parent DOM element, which receives the DOM representation of the value.
- Throws:
- ConversionException- If the conversion fails (e.g. not implemented).
 
 - 
getXStreampublic com.thoughtworks.xstream.XStream getXStream() 
 - 
configureXStreamprotected void configureXStream(com.thoughtworks.xstream.XStream xStream) 
 
- 
 
-