net.charlesames.utility.entity
Class XmlContent

java.lang.Object
  extended by net.charlesames.utility.entity.XmlNode
      extended by net.charlesames.utility.entity.XmlContent

public abstract class XmlContent
extends XmlNode

An XmlContent instance is a component of an XmlSpec that maps object properties to XML text content. Each XmlContent instance is created as an anonymous class which defines two particular methods. getData(WriteableEntity, String) implements the code which reads data from an element's text content into a property of a WriteableEntity instance. XmlNode.putData(WriteableEntity, org.w3c.dom.Element) implements the code which writes data from a WriteableEntity property into the element's text content.

Author:
Charles Ames

Method Summary
abstract  void getData(WriteableEntity entity, java.lang.String content)
          Reads data from XML text content Node into an WriteableEntity instance.
 XmlType getValueType()
          Get the value for the type attribute.
 java.lang.String getXsdTag()
          Get the tag identifying this node in an XML schema document.
 
Methods inherited from class net.charlesames.utility.entity.XmlNode
getDescription, getTag, getXmlSpec, isIncludedInSchema, putData, setDescription, setIncludedInSchema, toXsdElement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValueType

public XmlType getValueType()
Get the value for the type attribute.

Returns:
The assigned value for the type attribute.

getData

public abstract void getData(WriteableEntity entity,
                             java.lang.String content)
Reads data from XML text content Node into an WriteableEntity instance.

Parameters:
entity - The target WriteableEntity instance.
content - The node text content.

getXsdTag

public java.lang.String getXsdTag()
Description copied from class: XmlNode
Get the tag identifying this node in an XML schema document.

Specified by:
getXsdTag in class XmlNode
Returns:
The tag identifying this node in an XML schema document.