net.charlesames.utility.entity
Class XmlElement

java.lang.Object
  extended by net.charlesames.utility.entity.XmlNode
      extended by net.charlesames.utility.entity.XmlElement
Direct Known Subclasses:
XmlChoice, XmlComplexElement, XmlExtensionElement, XmlSimpleElement

public abstract class XmlElement
extends XmlNode

Abstract base for XmlSimpleElement and XmlComplexElement classes.

Author:
Charles Ames

Method Summary
abstract  void getData(WriteableEntity entity, org.w3c.dom.Element element)
          Reads data from an XML Element into an WriteableEntity instance.
 int getMaxOccurs()
          Get the maximum occurrences of this element for XML schema
 int getMinOccurs()
          Get the minimum occurrences of this element for XML schema
 java.lang.String getXsdTag()
          Get the tag identifying this node in an XML schema document.
 boolean isIncludedInSchema()
          Check if this node should be visible in the schema.
 void setMaxOccurs(int maxOccurs)
          Set the maximum occurrences of this element for XML schema
 void setMinOccurs(int minOccurs)
          Set the minimum occurrences of this element for XML schema
 org.w3c.dom.Element toXsdElement(org.w3c.dom.Node parent)
          Convert the XML specification node to a node description in an XML schema document
 
Methods inherited from class net.charlesames.utility.entity.XmlNode
getDescription, getTag, getXmlSpec, putData, setDescription, setIncludedInSchema
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getData

public abstract void getData(WriteableEntity entity,
                             org.w3c.dom.Element element)
Reads data from an XML Element into an WriteableEntity instance.

Parameters:
entity - The target WriteableEntity instance.
element - The source Element.

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.

getMinOccurs

public int getMinOccurs()
Get the minimum occurrences of this element for XML schema

Returns:
The assigned minimum occurrences of this element for XML schema.

setMinOccurs

public void setMinOccurs(int minOccurs)
Set the minimum occurrences of this element for XML schema

Parameters:
minOccurs - The intended minimum occurrences of this element for XML schema

getMaxOccurs

public int getMaxOccurs()
Get the maximum occurrences of this element for XML schema

Returns:
The assigned maximum occurrences of this element for XML schema.

setMaxOccurs

public void setMaxOccurs(int maxOccurs)
Set the maximum occurrences of this element for XML schema

Parameters:
maxOccurs - The intended maximum occurrences of this element for XML schema

isIncludedInSchema

public boolean isIncludedInSchema()
Description copied from class: XmlNode
Check if this node should be visible in the schema.

Overrides:
isIncludedInSchema in class XmlNode
Returns:
True if this node should be visible in the schema; false otherwise.

toXsdElement

public org.w3c.dom.Element toXsdElement(org.w3c.dom.Node parent)
Description copied from class: XmlNode
Convert the XML specification node to a node description in an XML schema document

Overrides:
toXsdElement in class XmlNode
Parameters:
parent - The parent node.
Returns:
THe newly created node.