com.wutka.dtd

Class DTDAttlist

Implemented Interfaces:
DTDOutput

public class DTDAttlist
extends Object
implements DTDOutput

Represents an ATTLIST declaration in the DTD. Although attributes are associated with elements, the ATTLIST is here to allow the DTD object to write out the DTD in roughly the original form. Because the ATTLIST may appear somewhere other than immediately after the ELEMENT, this object is used to keep track of where it is.
Version:
$Revision: 1.16 $ $Date: 2002/07/19 01:20:11 $ by $Author: wutka $
Author:
Mark Wutka

Field Summary

Vector
attributes
The attlist's attributes
String
name
The name of the element

Constructor Summary

DTDAttlist()
DTDAttlist(String aName)

Method Summary

boolean
equals(Object ob)
DTDAttribute[]
getAttribute()
Returns the attributes in this list
DTDAttribute
getAttribute(int i)
Returns a specific attribute from the list
String
getName()
Returns the entity name of this attlist
void
setAttribute(DTDAttribute attr, int i)
Sets a specific attribute in the list
void
setAttribute(DTDAttribute[] attrs)
Sets the list of attributes
void
setName(String aName)
Sets the entity name of this attlist
void
write(PrintWriter out)
Writes out an ATTLIST declaration

Field Details

attributes

public Vector attributes
The attlist's attributes

name

public String name
The name of the element

Constructor Details

DTDAttlist

public DTDAttlist()

DTDAttlist

public DTDAttlist(String aName)

Method Details

equals

public boolean equals(Object ob)

getAttribute

public DTDAttribute[] getAttribute()
Returns the attributes in this list

getAttribute

public DTDAttribute getAttribute(int i)
Returns a specific attribute from the list

getName

public String getName()
Returns the entity name of this attlist

setAttribute

public void setAttribute(DTDAttribute attr,
                         int i)
Sets a specific attribute in the list

setAttribute

public void setAttribute(DTDAttribute[] attrs)
Sets the list of attributes

setName

public void setName(String aName)
Sets the entity name of this attlist

write

public void write(PrintWriter out)
            throws IOException
Writes out an ATTLIST declaration
Specified by:
write in interface DTDOutput

Copyright (c) 2001 Mark Wutka.