All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.sgml.DTD
java.lang.Object
|
+----jp.kyasu.sgml.DTD
- public class DTD
- extends Object
- implements Serializable
The DTD
class represents the SGML document type definition.
Refers to
"ISO 8879 -- Standard Generalized Markup Language (SGML)".
- Version:
- 14 Nov 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- Element, Entity
-
DTD()
- Constructs an empty DTD.
-
DTD(Element)
- Constructs a DTD with the specified root element.
-
addElement(Element)
- Adds the element to this DTD.
-
addEntity(Entity)
- Adds the entity to this DTD.
-
containsElement(String)
- Tests if this DTD contains the element whose name equals to
the specified name.
-
containsEntity(String)
- Tests if this DTD contains the entity whose name equals to
the specified name.
-
getAllElements()
- Returns the all elements in this DTD, as a hashtable.
-
getAllEntities()
- Returns the all entities in this DTD, as a hashtable.
-
getDocElement()
- Returns the root element of this DTD.
-
getElement(String)
- Returns the element whose name equals to the specified name in this DTD.
-
getEntity(String)
- Returns the entity whose name equals to the specified name in this DTD.
-
isValidDTD()
- Checks if this DTD is valid.
-
setDocElement(Element)
- Sets the root element of this DTD to be the specified element.
DTD
public DTD()
- Constructs an empty DTD.
DTD
public DTD(Element docElement)
- Constructs a DTD with the specified root element.
- Parameters:
- docElement - the root element of the DTD.
getDocElement
public Element getDocElement()
- Returns the root element of this DTD.
- Returns:
- the root element of this DTD.
setDocElement
public void setDocElement(Element element)
- Sets the root element of this DTD to be the specified element.
- Parameters:
- element - the specified element.
addElement
public void addElement(Element element)
- Adds the element to this DTD.
- Parameters:
- element - an element.
getElement
public Element getElement(String name)
- Returns the element whose name equals to the specified name in this DTD.
- Parameters:
- name - the specified name
- Returns:
- the element whose name equals to the specified name in this DTD;
null
if this DTD does not contain the corresponding
element.
getAllElements
public Hashtable getAllElements()
- Returns the all elements in this DTD, as a hashtable.
- Returns:
- the all elements in this DTD, as a hashtable.
containsElement
public boolean containsElement(String name)
- Tests if this DTD contains the element whose name equals to
the specified name.
- Parameters:
- name - the specified name.
- Returns:
-
true
if this DTD contains the element whose
name equals to the specified name; false
otherwise.
addEntity
public void addEntity(Entity entity)
- Adds the entity to this DTD.
- Parameters:
- entity - an entity.
getEntity
public Entity getEntity(String name)
- Returns the entity whose name equals to the specified name in this DTD.
- Parameters:
- name - the specified name
- Returns:
- the entity whose name equals to the specified name in this DTD;
null
if this DTD does not contain the corresponding
entity.
getAllEntities
public Hashtable getAllEntities()
- Returns the all entities in this DTD, as a hashtable.
- Returns:
- the all entities in this DTD, as a hashtable.
containsEntity
public boolean containsEntity(String name)
- Tests if this DTD contains the entity whose name equals to
the specified name.
- Parameters:
- name - the specified name.
- Returns:
-
true
if this DTD contains the entity whose
name equals to the specified name; false
otherwise.
isValidDTD
public boolean isValidDTD()
- Checks if this DTD is valid.
- Returns:
-
true
if this DTD is valid;
false
otherwise.
All Packages Class Hierarchy This Package Previous Next Index