stuart.xmlApp.dtd
Class Attribute

java.lang.Object
  |
  +--stuart.xmlApp.dtd.Attribute

public class Attribute
extends java.lang.Object


Field Summary
static java.lang.String DEFAULT_FIXED
           
static java.lang.String DEFAULT_IMPLIED
           
static java.lang.String DEFAULT_REQUIRED
           
static java.lang.String TYPE_CDATA
           
static java.lang.String TYPE_ID
           
static java.lang.String TYPE_IDREF
           
static java.lang.String TYPE_IDREFS
           
static java.lang.String TYPE_NMTOKEN
           
static java.lang.String TYPE_NMTOKENS
           
 
Constructor Summary
Attribute(java.lang.String n, java.lang.String t, java.lang.String d)
          A constructor for an attribute with a name, type, and default value modifier.
Attribute(java.lang.String n, java.lang.String t, java.lang.String d, java.lang.String v)
          A constructor for an attribute with a name, type, default value modifier, and default value
 
Method Summary
 java.lang.String getDefault()
          Returns the default of the Attribute.
 java.lang.String getDefaultValue()
           
 java.lang.String getName()
          Returns the name of the attribute
 java.lang.String getTagText()
          Returns to tag text for the attribute.
 java.lang.String getType()
          Returns the type of the Attribute.
static void main(java.lang.String[] args)
           
 void setDefault(java.lang.String d)
           
 void setDefaultValue(java.lang.String d)
           
 void setName(java.lang.String n)
          Sets the name of the attribute.
 void setType(java.lang.String type)
          Sets the type of the Attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_CDATA

public static final java.lang.String TYPE_CDATA
See Also:
Constant Field Values

TYPE_NMTOKEN

public static final java.lang.String TYPE_NMTOKEN
See Also:
Constant Field Values

TYPE_NMTOKENS

public static final java.lang.String TYPE_NMTOKENS
See Also:
Constant Field Values

TYPE_ID

public static final java.lang.String TYPE_ID
See Also:
Constant Field Values

TYPE_IDREF

public static final java.lang.String TYPE_IDREF
See Also:
Constant Field Values

TYPE_IDREFS

public static final java.lang.String TYPE_IDREFS
See Also:
Constant Field Values

DEFAULT_REQUIRED

public static final java.lang.String DEFAULT_REQUIRED
See Also:
Constant Field Values

DEFAULT_IMPLIED

public static final java.lang.String DEFAULT_IMPLIED
See Also:
Constant Field Values

DEFAULT_FIXED

public static final java.lang.String DEFAULT_FIXED
See Also:
Constant Field Values
Constructor Detail

Attribute

public Attribute(java.lang.String n,
                 java.lang.String t,
                 java.lang.String d,
                 java.lang.String v)
A constructor for an attribute with a name, type, default value modifier, and default value

Parameters:
n - The name of the attribute.
t - The type of the attribute. Use static TYPE_name fields.
d - The default of the attribute. Use static DEFAULT_name fields.
v - The default value.

Attribute

public Attribute(java.lang.String n,
                 java.lang.String t,
                 java.lang.String d)
A constructor for an attribute with a name, type, and default value modifier.

Parameters:
n - The name of the attribute.
t - The type of the attribute. Use static TYPE_name fields.
d - The default of the attribute. Use static DEFAULT_name fields.
Method Detail

getTagText

public java.lang.String getTagText()
Returns to tag text for the attribute. Used in constructing an Attribute Tag within the DTDElement class.


getName

public java.lang.String getName()
Returns the name of the attribute


setName

public void setName(java.lang.String n)
Sets the name of the attribute. Should be used for all attempts to set the attribute name.

Parameters:
n - The proposed name of the attribute.

getType

public java.lang.String getType()
Returns the type of the Attribute.

Returns:
Returns a string value representing the TYPE constants.
(TYPE_CDATA, TYPE_NMTOKEN, TYPE_NMTOKENS, TYPE_ID, TYPE_IDREF, TYPE_IDREFS)

setType

public void setType(java.lang.String type)
Sets the type of the Attribute.


getDefault

public java.lang.String getDefault()
Returns the default of the Attribute.

Returns:
Returns a string value representing the DEFAULT constants.
(DEFAULT_REQUIRED, DEFAULT_IMPLIED, DEFAULT_FIXED)

setDefault

public void setDefault(java.lang.String d)

getDefaultValue

public java.lang.String getDefaultValue()

setDefaultValue

public void setDefaultValue(java.lang.String d)

main

public static void main(java.lang.String[] args)