All Packages Class Hierarchy This Package Previous Next Index
Class de.tudarmstadt.ito.schemas.dtd.DTD
java.lang.Object
|
+----de.tudarmstadt.ito.schemas.dtd.DTD
- public class DTD
- extends Object
Class representing a DTD.
- Version:
- 1.01
- Author:
- Ronald Bourret, Technical University of Darmstadt
-
elementTypes
- A Hashtable of ElementTypes defined in the DTD, keyed by the qualified
element type name (ElementType.name.qualified).
-
notations
- A Hashtable of Notations defined in the DTD, keyed by the notation name.
-
parameterEntities
- A Hashtable of ParameterEntities defined in the DTD, keyed by the
entity name.
-
parsedGeneralEntities
- A Hashtable of ParsedGeneralEntities defined in the DTD, keyed by the
entity name.
-
unparsedEntities
- A Hashtable of UnparsedEntities defined in the DTD, keyed by the
entity name.
-
DTD()
- Construct a new DTD.
-
addElementType(NSName)
- Add a new ElementType.
-
addElementType(String, String, String)
- Same as addElementType(NSName) except that the local name, prefix, and
namespace URI are specified.
-
checkElementTypeReferences()
- Checks that all element types referred to in the content models of
ElementTypes have been added to the DTD through addElementType.
-
checkNotationReferences()
- Checks that all notations referred to Attributes have been defined.
-
elementTypeDefined(NSName)
- Checks if an element type has been defined -- that is, added with
addElementType.
-
getElementType(NSName)
- Get an ElementType.
-
getElementType(String, String, String)
- Same as getElementType(NSName) except that the local name, prefix, and
namespace URI are specified.
-
serialize(OutputStream, boolean)
- Serialize a DTD to an OutputStream.
-
updateANYParents()
- For element types with a content model of ANY, constructs the parent
and children Hashtables in the ElementType objects in the DTD.
elementTypes
public Hashtable elementTypes
- A Hashtable of ElementTypes defined in the DTD, keyed by the qualified
element type name (ElementType.name.qualified).
notations
public Hashtable notations
- A Hashtable of Notations defined in the DTD, keyed by the notation name.
parsedGeneralEntities
public Hashtable parsedGeneralEntities
- A Hashtable of ParsedGeneralEntities defined in the DTD, keyed by the
entity name.
parameterEntities
public Hashtable parameterEntities
- A Hashtable of ParameterEntities defined in the DTD, keyed by the
entity name.
unparsedEntities
public Hashtable unparsedEntities
- A Hashtable of UnparsedEntities defined in the DTD, keyed by the
entity name.
DTD
public DTD()
- Construct a new DTD.
addElementType
public ElementType addElementType(NSName name) throws DTDException
- Add a new ElementType. This method checks that the element type has
not been added before.
- Parameters:
- name - The NSName of the element type.
- Throws: DTDException
- Thrown if addElementType has already been called
for the element type.
getElementType
public ElementType getElementType(NSName name)
- Get an ElementType. If the ElementType does not exist, a new ElementType
is created. Note that addElementType can still be called for ElementTypes
created in this manner.
- Parameters:
- name - The NSName of the element type.
addElementType
public ElementType addElementType(String local,
String prefix,
String uri) throws DTDException
- Same as addElementType(NSName) except that the local name, prefix, and
namespace URI are specified.
- Parameters:
- local - The local name of the element type.
- prefix - The namespace prefix. May be null.
- uri - The namespace URI. May be null.
- Throws: DTDException
- Thrown if addElementType has already been called
for the element type.
getElementType
public ElementType getElementType(String local,
String prefix,
String uri)
- Same as getElementType(NSName) except that the local name, prefix, and
namespace URI are specified.
- Parameters:
- local - The local name of the element type.
- prefix - The namespace prefix. May be null.
- uri - The namespace URI. May be null.
updateANYParents
public void updateANYParents()
- For element types with a content model of ANY, constructs the parent
and children Hashtables in the ElementType objects in the DTD. Note that
operation cannot successfully be performed until after all ElementTypes
have been added to the DTD.
checkElementTypeReferences
public void checkElementTypeReferences() throws DTDException
- Checks that all element types referred to in the content models of
ElementTypes have been added to the DTD through addElementType.
- Throws: DTDException
- Thrown if an element type has been referred
to but not added.
checkNotationReferences
public void checkNotationReferences() throws DTDException
- Checks that all notations referred to Attributes have been defined.
- Throws: DTDException
- Thrown if notation has been referred
to but not defined.
elementTypeDefined
public boolean elementTypeDefined(NSName name)
- Checks if an element type has been defined -- that is, added with
addElementType.
- Parameters:
- name - The NSName of the element type.
serialize
public void serialize(OutputStream out,
boolean pretty) throws IOException
- Serialize a DTD to an OutputStream.
- Parameters:
- out - The OutputStream.
- pretty - Whether to pretty-print the DTD.
All Packages Class Hierarchy This Package Previous Next Index