org.menagery.dtd
Class Attribute

java.lang.Object
  |
  +--org.menagery.dtd.Attribute

public class Attribute
extends java.lang.Object


Field Summary
static int CDATA
          Attribute Type: CDATA
static int ENTITIES
          Attribute Type: ENTITIES
static int ENTITY
          Attribute Type: ENTITY
static int FIXED
          Attribute Declaration: #FIXED
static int ID
          Attribute Type: ID
static int IDREF
          Attribute Type: IDREF
static int IMPLIED
          Attribute Declaration: #IMPLIED
static int NMTOKEN
          Attribute Type: NMTOKEN
static int NMTOKENS
          Attribute Type: NMTOKENS
static int NOTATION
          Attribute Type: NOTATION
static int REQUIRED
          Attribute Declaration: #REQUIRED
static int USER_DEFINED
          Attribute Type: User defined enumerated type
 
Constructor Summary
Attribute(java.lang.String paramName, int type, int decl, java.lang.String value, java.util.Vector vEnum)
          Creates a new Attribute object.
 
Method Summary
 boolean equals(Attribute a)
          Compares two Attribute objects for equality.
 int getDeclaration()
          Get the attribute declaration.
 java.util.Vector getEnum()
          Get the user defined enumeration.
 java.lang.String getEnumString()
          Get the enumeration as a string.
 java.lang.String getModeString()
          Get the mode string.
 java.lang.String getName()
          Get the parameter name.
 int getType()
          Get the attribute type.
 java.lang.String getTypeString()
          For outputting DTD-style attlists.
 java.lang.String getValue()
          Get the attribute default value.
 java.lang.String toString()
          Override toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

USER_DEFINED

public static final int USER_DEFINED
Attribute Type: User defined enumerated type

CDATA

public static final int CDATA
Attribute Type: CDATA

ID

public static final int ID
Attribute Type: ID

IDREF

public static final int IDREF
Attribute Type: IDREF

NOTATION

public static final int NOTATION
Attribute Type: NOTATION

ENTITY

public static final int ENTITY
Attribute Type: ENTITY

ENTITIES

public static final int ENTITIES
Attribute Type: ENTITIES

NMTOKEN

public static final int NMTOKEN
Attribute Type: NMTOKEN

NMTOKENS

public static final int NMTOKENS
Attribute Type: NMTOKENS

IMPLIED

public static final int IMPLIED
Attribute Declaration: #IMPLIED

REQUIRED

public static final int REQUIRED
Attribute Declaration: #REQUIRED

FIXED

public static final int FIXED
Attribute Declaration: #FIXED
Constructor Detail

Attribute

public Attribute(java.lang.String paramName,
                 int type,
                 int decl,
                 java.lang.String value,
                 java.util.Vector vEnum)
Creates a new Attribute object. Part of Attlist.
Parameters:
paramName - The parameter name.
type - The attribute type.
decl - The attribute declaration.
value - The default value.
vEnum - The user defined enumeration (or NOTATION types).
Method Detail

getName

public java.lang.String getName()
Get the parameter name.

getType

public int getType()
Get the attribute type.

getDeclaration

public int getDeclaration()
Get the attribute declaration.

getValue

public java.lang.String getValue()
Get the attribute default value.

getEnum

public java.util.Vector getEnum()
Get the user defined enumeration.

equals

public boolean equals(Attribute a)
Compares two Attribute objects for equality.
Parameters:
a - The attribute object to be compared to this.
Returns:
True if the objects are the same, false otherwise.

toString

public java.lang.String toString()
Override toString().
Overrides:
toString in class java.lang.Object

getTypeString

public java.lang.String getTypeString()
For outputting DTD-style attlists. Gets the attribute type.

getEnumString

public java.lang.String getEnumString()
Get the enumeration as a string.

getModeString

public java.lang.String getModeString()
Get the mode string.