org.menagery.dtd
Class Element

java.lang.Object
  |
  +--org.menagery.dtd.Element

public class Element
extends java.lang.Object


Constructor Summary
Element(java.lang.String elementName)
          Creates an EMPTY element.
Element(java.lang.String elementName, java.lang.String elementContent)
          Creates a new element.
 
Method Summary
 Attlist getAttlist()
          Get the attribute list.
 java.lang.String getName()
          Get the element's name.
 OptionList getOptionList()
          Get the contents/OptionList.
 boolean isEmpty()
          Indicates if this is an EMPTY element.
 void setAttlist(Attlist attlist)
          Set the attribute list.
 java.lang.String toString()
          Create a String representation of the contents of this Element and all its aggregate objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Element

public Element(java.lang.String elementName,
               java.lang.String elementContent)
Creates a new element.
Parameters:
elementName - The element name.
elementContent - The element content from the DTD.

Element

public Element(java.lang.String elementName)
Creates an EMPTY element.
Parameters:
elementName - The element name.
Method Detail

getOptionList

public OptionList getOptionList()
Get the contents/OptionList.
Returns:
The option list structure, or null if this is an EMPTY element.

isEmpty

public boolean isEmpty()
Indicates if this is an EMPTY element.
Returns:
True is this is an EMPTY element, false otherwise.

getName

public java.lang.String getName()
Get the element's name.
Returns:
The element's name.

getAttlist

public Attlist getAttlist()
Get the attribute list.
Returns:
The attribute list for this element.

setAttlist

public void setAttlist(Attlist attlist)
Set the attribute list.
Parameters:
attlist - The attribute list.

toString

public java.lang.String toString()
Create a String representation of the contents of this Element and all its aggregate objects.
Overrides:
toString in class java.lang.Object
Returns:
A String representing the contents of this object.