Joda System API

org.joda.property.xml.impl
Class DataPropertyXMLConvertor

java.lang.Object
  |
  +--org.joda.property.xml.impl.AbstractPropertyXMLConvertor
        |
        +--org.joda.property.xml.impl.DataPropertyXMLConvertor
All Implemented Interfaces:
XMLConvertor

public class DataPropertyXMLConvertor
extends AbstractPropertyXMLConvertor
implements XMLConvertor

DataPropertyXMLConvertor converts a data property to and from XMLData.

Author:
Stephen Colebourne

Field Summary
static XMLConvertor INSTANCE
           
 
Constructor Summary
protected DataPropertyXMLConvertor()
          Restrictive constructor
 
Method Summary
protected  void buildAsAttribute(XMLConvertorContext context, XMLData data, java.lang.Object object)
          Build the property data as an attribute
protected  void buildAsElement(XMLConvertorContext context, XMLData data, java.lang.Object object)
          Build the property data as an element
 void buildXMLData(XMLConvertorContext context, XMLData data, java.lang.Object object)
          Add the DataProperty's data to the bean's XMLData passed in
 void expandXMLData(XMLConvertorContext context, XMLData data)
          Expand the XMLData when a DataProperty is stored as the content.
 boolean isConvertorFor(java.lang.Object object)
          Check to see if this convertor handles the object.
 
Methods inherited from class org.joda.property.xml.impl.AbstractPropertyXMLConvertor
addAttribute, addAttributes, addAttributes, addAttributesToParentXMLData, addAttributesToParentXMLData, addAttributeToParentXMLData, addAttributeToParentXMLData, addTypeAttribute, addTypeAttributeToParentXMLData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final XMLConvertor INSTANCE
Constructor Detail

DataPropertyXMLConvertor

protected DataPropertyXMLConvertor()
Restrictive constructor

Method Detail

isConvertorFor

public boolean isConvertorFor(java.lang.Object object)
Description copied from interface: XMLConvertor
Check to see if this convertor handles the object.

Specified by:
isConvertorFor in interface XMLConvertor
Parameters:
object - the object to check
Returns:
true if convertor handles object
See Also:
XMLConvertor.isConvertorFor(Object)

buildXMLData

public void buildXMLData(XMLConvertorContext context,
                         XMLData data,
                         java.lang.Object object)
Add the DataProperty's data to the bean's XMLData passed in

Specified by:
buildXMLData in interface XMLConvertor
Parameters:
context - the XML context
data - the bean's XMLData to add to
object - the property

buildAsElement

protected void buildAsElement(XMLConvertorContext context,
                              XMLData data,
                              java.lang.Object object)
Build the property data as an element


buildAsAttribute

protected void buildAsAttribute(XMLConvertorContext context,
                                XMLData data,
                                java.lang.Object object)
Build the property data as an attribute


expandXMLData

public void expandXMLData(XMLConvertorContext context,
                          XMLData data)
Expand the XMLData when a DataProperty is stored as the content.

Specified by:
expandXMLData in interface XMLConvertor
Parameters:
context - the context for the output
data - the XMLData to add to

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.