com.wutka.dtd
Class DTDAttribute

java.lang.Object
  |
  +--com.wutka.dtd.DTDAttribute
All Implemented Interfaces:
DTDOutput

public class DTDAttribute
extends Object
implements DTDOutput

Represents a DTD Attribute in an ATTLIST declaration

Version:
$Revision: 1.12 $ $Date: 2000/09/01 13:21:05 $ by $Author: wutka $
Author:
Mark Wutka

Field Summary
 DTDDecl decl
          The attribute's declaration (required, fixed, implied)
 String defaultValue
          The attribute's default value (null if not declared)
 String name
          The name of the attribute
 Object type
          The type of the attribute (either String, DTDEnumeration or DTDNotationList)
 
Constructor Summary
DTDAttribute()
           
DTDAttribute(String aName)
           
 
Method Summary
 boolean equals(Object ob)
           
 DTDDecl getDecl()
          Returns the declaration
 String getDefaultValue()
          Returns the default value
 String getName()
          Returns the attribute name
 Object getType()
          Gets the type of the attribute
 void setDecl(DTDDecl aDecl)
          Sets the declaration (fixed, required, implied)
 void setDefaultValue(String aDefaultValue)
          Sets the default value
 void setName(String aName)
          Sets the name of the attribute
 void setType(Object aType)
          Sets the type of the attribute
 void write(PrintWriter out)
          Writes this attribute to an output stream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name
The name of the attribute

type

public Object type
The type of the attribute (either String, DTDEnumeration or DTDNotationList)

decl

public DTDDecl decl
The attribute's declaration (required, fixed, implied)

defaultValue

public String defaultValue
The attribute's default value (null if not declared)
Constructor Detail

DTDAttribute

public DTDAttribute()

DTDAttribute

public DTDAttribute(String aName)
Method Detail

write

public void write(PrintWriter out)
           throws IOException
Writes this attribute to an output stream
Specified by:
write in interface DTDOutput

equals

public boolean equals(Object ob)
Overrides:
equals in class Object

setName

public void setName(String aName)
Sets the name of the attribute

getName

public String getName()
Returns the attribute name

setType

public void setType(Object aType)
Sets the type of the attribute

getType

public Object getType()
Gets the type of the attribute

setDecl

public void setDecl(DTDDecl aDecl)
Sets the declaration (fixed, required, implied)

getDecl

public DTDDecl getDecl()
Returns the declaration

setDefaultValue

public void setDefaultValue(String aDefaultValue)
Sets the default value

getDefaultValue

public String getDefaultValue()
Returns the default value