org.exolab.castor.xml.dtd

Class DTDdocument

public class DTDdocument extends Object

Implementation of DTD document specification.

Version: $Revision: 5951 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $

Author: Alexander Totok

Constructor Summary
DTDdocument()
DTDdocument(String name)
Constructor, setting the name of the document.
Method Summary
voidaddElement(Element element)
Adds Element Declaration to the document.
voidaddGeneralEntity(GeneralEntity generalEntity)
Adds General Entity Declaration to the document.
voidaddNotation(Notation notation)
Adds a Notation Declaration to the document.
ElementgetElement(String name)
Returns requested Element Declaration.
EnumerationgetElements()
Returns enumeration of the Element declarations in the DTD document.
EnumerationgetGeneralEntities()
Returns enumeration of the General Entity declarations in the DTD document.
GeneralEntitygetGeneralEntity(String name)
Returns requested Genaral Entity Declaration.
StringgetName()
Returns the name of the document.
NotationgetNotation(String name)
Returns requested Notation Declaration.
EnumerationgetNotations()
Returns enumeration of the Notation declarations in the DTD document.

Constructor Detail

DTDdocument

public DTDdocument()

DTDdocument

public DTDdocument(String name)
Constructor, setting the name of the document.

Method Detail

addElement

public void addElement(Element element)
Adds Element Declaration to the document.

Throws: DTDException if an element has no name or there already exists element with the same name in the document.

addGeneralEntity

public void addGeneralEntity(GeneralEntity generalEntity)
Adds General Entity Declaration to the document. If there already exists General Entity with the same name in the document, does nothing.

addNotation

public void addNotation(Notation notation)
Adds a Notation Declaration to the document.

Throws: DTDException if a notation has no name or there already exists notation with the same name in the document.

getElement

public Element getElement(String name)
Returns requested Element Declaration.

Returns: Element Declaration with the given name, null if there is no Element with this name in the document.

getElements

public Enumeration getElements()
Returns enumeration of the Element declarations in the DTD document.

getGeneralEntities

public Enumeration getGeneralEntities()
Returns enumeration of the General Entity declarations in the DTD document.

getGeneralEntity

public GeneralEntity getGeneralEntity(String name)
Returns requested Genaral Entity Declaration.

Returns: General Entity Declaration with the given name, null if there is no General Entity with this name in the document.

getName

public String getName()
Returns the name of the document.

getNotation

public Notation getNotation(String name)
Returns requested Notation Declaration.

Returns: Notation Declaration with the given name, null if there is no Notation with this name in the document.

getNotations

public Enumeration getNotations()
Returns enumeration of the Notation declarations in the DTD document.
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com