| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected Element |
docElement
The root element of this DTD.
|
protected java.util.Hashtable |
elements
The elements defined in this DTD.
|
protected java.util.Hashtable |
entities
The entities defined in this DTD.
|
| コンストラクタと説明 |
|---|
DTD()
Constructs an empty DTD.
|
DTD(Element docElement)
Constructs a DTD with the specified root element.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addElement(Element element)
Adds the element to this DTD.
|
void |
addEntity(Entity entity)
Adds the entity to this DTD.
|
boolean |
containsElement(java.lang.String name)
Tests if this DTD contains the element whose name equals to
the specified name.
|
boolean |
containsEntity(java.lang.String name)
Tests if this DTD contains the entity whose name equals to
the specified name.
|
java.util.Hashtable |
getAllElements()
Returns the all elements in this DTD, as a hashtable.
|
java.util.Hashtable |
getAllEntities()
Returns the all entities in this DTD, as a hashtable.
|
Element |
getDocElement()
Returns the root element of this DTD.
|
Element |
getElement(java.lang.String name)
Returns the element whose name equals to the specified name in this DTD.
|
Entity |
getEntity(java.lang.String name)
Returns the entity whose name equals to the specified name in this DTD.
|
boolean |
isValidDTD()
Checks if this DTD is valid.
|
protected boolean |
isValidElement(Element elem) |
void |
setDocElement(Element element)
Sets the root element of this DTD to be the specified element.
|
protected Element docElement
protected java.util.Hashtable elements
protected java.util.Hashtable entities
public DTD()
public DTD(Element docElement)
docElement - the root element of the DTD.public Element getDocElement()
public void setDocElement(Element element)
element - the specified element.public void addElement(Element element)
element - an element.public Element getElement(java.lang.String name)
name - the specified namenull if this DTD does not contain the corresponding
element.public java.util.Hashtable getAllElements()
public boolean containsElement(java.lang.String name)
name - the specified name.true if this DTD contains the element whose
name equals to the specified name; false otherwise.public void addEntity(Entity entity)
entity - an entity.public Entity getEntity(java.lang.String name)
name - the specified namenull if this DTD does not contain the corresponding
entity.public java.util.Hashtable getAllEntities()
public boolean containsEntity(java.lang.String name)
name - the specified name.true if this DTD contains the entity whose
name equals to the specified name; false otherwise.public boolean isValidDTD()
true if this DTD is valid;
false otherwise.protected boolean isValidElement(Element elem)