ucar.unidata.xml
Class XmlDelegateImpl

java.lang.Object
  extended by ucar.unidata.xml.XmlDelegateImpl
All Implemented Interfaces:
XmlDelegate

public class XmlDelegateImpl
extends Object
implements XmlDelegate

A siomple implementation of the XmlDelegate interface. By default it turns around and tells the encoder to create the element and to create the object.

Version:
$Revision: 1.5 $Date: 2005/05/13 18:33:53 $
Author:
Metapps development team

Constructor Summary
XmlDelegateImpl()
          Do nothing ctor.
 
Method Summary
 Element createElement(XmlEncoder encoder, Object object)
          Create the xml element for the given object.
 Object createObject(XmlEncoder encoder, Element element)
          Create the Object defined by the given xml element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDelegateImpl

public XmlDelegateImpl()
Do nothing ctor.

Method Detail

createElement

public Element createElement(XmlEncoder encoder,
                             Object object)
Create the xml element for the given object.

Specified by:
createElement in interface XmlDelegate
Parameters:
encoder - The XmlEncoder that is calling this method.
object - The Object to encode.
Returns:
The xml element that defines the given object.

createObject

public Object createObject(XmlEncoder encoder,
                           Element element)
Create the Object defined by the given xml element.

Specified by:
createObject in interface XmlDelegate
Parameters:
encoder - The XmlEncoder that is calling this method.
element - The xml that defines the object.
Returns:
The Object defined by the xml.