com.wutka.dtd
Class DTDElement

java.lang.Object
  |
  +--com.wutka.dtd.DTDElement
All Implemented Interfaces:
DTDOutput

public class DTDElement
extends Object
implements DTDOutput

Represents an element defined with the ELEMENT DTD tag

Version:
$Revision: 1.12 $ $Date: 2000/09/01 13:21:05 $ by $Author: wutka $
Author:
Mark Wutka

Field Summary
 Hashtable attributes
          The element's attributes
 DTDItem content
          The element's content
 String name
          The name of the element
 
Constructor Summary
DTDElement()
           
DTDElement(String aName)
           
 
Method Summary
 boolean equals(Object ob)
           
 DTDAttribute getAttribute(String attrName)
          Gets an attribute for this element
 DTDItem getContent()
          Returns the content type of this element
 String getName()
          Returns the name of this element
 void setAttribute(String attrName, DTDAttribute attr)
          Stores an attribute in this element
 void setContent(DTDItem theContent)
          Sets the content type of this element
 void setName(String aName)
          Sets the name of this element
 void write(PrintWriter out)
          Writes out an element declaration and an attlist declaration (if necessary) for this element
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name
The name of the element

attributes

public Hashtable attributes
The element's attributes

content

public DTDItem content
The element's content
Constructor Detail

DTDElement

public DTDElement()

DTDElement

public DTDElement(String aName)
Method Detail

write

public void write(PrintWriter out)
           throws IOException
Writes out an element declaration and an attlist declaration (if necessary) for this element
Specified by:
write in interface DTDOutput

equals

public boolean equals(Object ob)
Overrides:
equals in class Object

setName

public void setName(String aName)
Sets the name of this element

getName

public String getName()
Returns the name of this element

setAttribute

public void setAttribute(String attrName,
                         DTDAttribute attr)
Stores an attribute in this element

getAttribute

public DTDAttribute getAttribute(String attrName)
Gets an attribute for this element

setContent

public void setContent(DTDItem theContent)
Sets the content type of this element

getContent

public DTDItem getContent()
Returns the content type of this element