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

Constructor Index

 o DTD()
Constructs an empty DTD.
 o DTD(Element)
Constructs a DTD with the specified root element.

Method Index

 o addElement(Element)
Adds the element to this DTD.
 o addEntity(Entity)
Adds the entity to this DTD.
 o containsElement(String)
Tests if this DTD contains the element whose name equals to the specified name.
 o containsEntity(String)
Tests if this DTD contains the entity whose name equals to the specified name.
 o getAllElements()
Returns the all elements in this DTD, as a hashtable.
 o getAllEntities()
Returns the all entities in this DTD, as a hashtable.
 o getDocElement()
Returns the root element of this DTD.
 o getElement(String)
Returns the element whose name equals to the specified name in this DTD.
 o getEntity(String)
Returns the entity whose name equals to the specified name in this DTD.
 o isValidDTD()
Checks if this DTD is valid.
 o setDocElement(Element)
Sets the root element of this DTD to be the specified element.

Constructors

 o DTD
 public DTD()
Constructs an empty DTD.

 o DTD
 public DTD(Element docElement)
Constructs a DTD with the specified root element.

Parameters:
docElement - the root element of the DTD.

Methods

 o getDocElement
 public Element getDocElement()
Returns the root element of this DTD.

Returns:
the root element of this DTD.
 o setDocElement
 public void setDocElement(Element element)
Sets the root element of this DTD to be the specified element.

Parameters:
element - the specified element.
 o addElement
 public void addElement(Element element)
Adds the element to this DTD.

Parameters:
element - an element.
 o 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.
 o getAllElements
 public Hashtable getAllElements()
Returns the all elements in this DTD, as a hashtable.

Returns:
the all elements in this DTD, as a hashtable.
 o 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.
 o addEntity
 public void addEntity(Entity entity)
Adds the entity to this DTD.

Parameters:
entity - an entity.
 o 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.
 o getAllEntities
 public Hashtable getAllEntities()
Returns the all entities in this DTD, as a hashtable.

Returns:
the all entities in this DTD, as a hashtable.
 o 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.
 o 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