com.wutka.dtd
Class DTD

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

public class DTD
extends java.lang.Object
implements DTDOutput

Represents a parsed Document Type Definition


Field Summary
 java.util.Hashtable elements
          Contains all the elements defined in the DTD
 java.util.Hashtable entities
          Contains all the entities defined in the DTD
 java.util.Hashtable externalDTDs
          Contains parsed DTD's for any external entity DTD declarations
 java.util.Vector items
          Contains all the items defined in the DTD in their original order
 java.util.Hashtable notations
          Contains all the notations defined in the DTD
 DTDElement rootElement
          Contains the element that is most likely the root element or null if the root element can't be determined.
 
Constructor Summary
DTD()
          Creates a new DTD
 
Method Summary
 boolean equals(java.lang.Object ob)
          Returns true if this object is equal to another
 java.lang.Object getItem(int i)
          Retrieves an item from the items array
 java.lang.Object[] getItems()
          Returns the items as an array
 java.util.Vector getItemsByType(java.lang.Class itemType)
          Retrieves a list of items of a particular type
 void setItem(java.lang.Object item, int i)
          Stores an item in the items array
 void setItems(java.lang.Object[] newItems)
          Stores an array of items in the items array
 void write(java.io.PrintWriter outWriter)
          Writes the DTD to an output writer in standard DTD format (the format the parser normally reads).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

public java.util.Hashtable elements
Contains all the elements defined in the DTD

entities

public java.util.Hashtable entities
Contains all the entities defined in the DTD

notations

public java.util.Hashtable notations
Contains all the notations defined in the DTD

externalDTDs

public java.util.Hashtable externalDTDs
Contains parsed DTD's for any external entity DTD declarations

items

public java.util.Vector items
Contains all the items defined in the DTD in their original order

rootElement

public DTDElement rootElement
Contains the element that is most likely the root element or null if the root element can't be determined.
Constructor Detail

DTD

public DTD()
Creates a new DTD
Method Detail

write

public void write(java.io.PrintWriter outWriter)
           throws java.io.IOException
Writes the DTD to an output writer in standard DTD format (the format the parser normally reads).
Specified by:
write in interface DTDOutput
Parameters:
outWriter - The writer where the DTD will be written

equals

public boolean equals(java.lang.Object ob)
Returns true if this object is equal to another
Overrides:
equals in class java.lang.Object

setItems

public void setItems(java.lang.Object[] newItems)
Stores an array of items in the items array

getItems

public java.lang.Object[] getItems()
Returns the items as an array

setItem

public void setItem(java.lang.Object item,
                    int i)
Stores an item in the items array

getItem

public java.lang.Object getItem(int i)
Retrieves an item from the items array

getItemsByType

public java.util.Vector getItemsByType(java.lang.Class itemType)
Retrieves a list of items of a particular type