    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class xg.xg_AttDecl

    java.lang.Object
       |
       +----com.sun.java.swing.tree.DefaultMutableTreeNode
               |
               +----xg.xg_Node
                       |
                       +----xg.xg_AttDecl

public class xg_AttDecl
extends xg_Node

Class xg_AttDecl - An attribute declaration, within an attribute list declaration within a DTD.

##

AllowedValueList
AttDeclType
DefaultType
  List of strings defining the possible values which this attribute may have.
DefaultValue
  Defines whether and how a default value is applied.
ENUMERATION_TYPE
  The default value of this attribute.
FIXED
  #IMPLIED
FIXED_STRING
IMPLIED
  #REQUIRED
IMPLIED_STRING
REQUIRED
  Constant to identify an enumerated type.
REQUIRED_STRING
  Just default value
SIMPLE
  #FIXED

##

xg_AttDecl()
  Construct an attribute declaration with no type and no name.
xg_AttDecl(int, String)
  Construct an attribute declaration with a type and name.

##

addAllowedValue(String)
  Add an allowed value.
getDefaultType()
  Get the default type (ie.
getDefaultValue()
  Get the default value of the attribute.
getNodeType()
  Get the type of this node, using only type values defined for the DOM.
getType()
  Get the type of this node.
isValueAllowed(String)
  Check if a value is allowed (ie.
save(Writer)
  Save this attribute declaration (and its children) in XML source form in InputWriter.
setDefaultType(int)
  Set the default type of this attribute.
setDefaultValue(String)
  Set the default value of this attribute.
setType(int)
  Get the type of this node.
toString()
  Return a string representation of the attribute declaration (intended for use as debug output).

##

AttDeclType

     protected int AttDeclType

AllowedValueList

     protected Vector AllowedValueList

DefaultType

     protected int DefaultType

  List of strings defining the possible values which this attribute may have.

DefaultValue

     protected String DefaultValue

  Defines whether and how a default value is applied. The possible values are: REQUIRED: This attribute must be present. IMPLIED: This attribute may be omitted. FIXED: If present, this attribute's value must equal the default. SIMPLE: This attribute has a simple default value.

ENUMERATION_TYPE

     public static final int ENUMERATION_TYPE

  The default value of this attribute.

REQUIRED

     public static final int REQUIRED

  Constant to identify an enumerated type. Constants for other types are defined in xa_AttTypeChoiceList.

IMPLIED

     public static final int IMPLIED

  #REQUIRED

FIXED

     public static final int FIXED

  #IMPLIED

SIMPLE

     public static final int SIMPLE

  #FIXED

REQUIRED_STRING

     public static final String REQUIRED_STRING

  Just default value

IMPLIED_STRING

     public static final String IMPLIED_STRING

FIXED_STRING

     public static final String FIXED_STRING

##

xg_AttDecl

     public xg_AttDecl()

  Construct an attribute declaration with no type and no name.

xg_AttDecl

     public xg_AttDecl(int InputAttDeclType,
                       String InputAttName)

  Construct an attribute declaration with a type and name.

  Parameters:
    InputAttDeclType - The type of the attribute declaration
    InputAttName - The name of the attribute

##

save

     public void save(Writer InputWriter) throws IOException

  Save this attribute declaration (and its children) in XML source form in InputWriter.

  Parameters:
    InputWriter - The writer to which the XML will be written
  Overrides:
    save in class xg_Node

addAllowedValue

     public void addAllowedValue(String InputAllowedValue)

  Add an allowed value.

  Parameters:
    InputAllowedValue - The allowed value to be added

setType

     public void setType(int InputAttDeclType)

  Get the type of this node.

  Returns:
    InputAttDeclType The type of this node

getType

     public int getType()

  Get the type of this node.

  Returns:
    The type of this node
  Overrides:
    getType in class xg_Node

getNodeType

     public int getNodeType()

  Get the type of this node, using only type values defined for the DOM. (Implements org.w3c.dom.Node.getNodeType.)

  Returns:
    The DOM type of this node
  Overrides:
    getNodeType in class xg_Node

toString

     public String toString()

  Return a string representation of the attribute declaration (intended for use as debug output).

  Returns:
    String representing the attribute type and its name.
  Overrides:
    toString in class xg_Node

getDefaultType

     public int getDefaultType()

  Get the default type (ie. the type of defaulting) of the attribute.

  Returns:
    The default type of the attribute

getDefaultValue

     public String getDefaultValue()

  Get the default value of the attribute.

  Returns:
    The default value of the attribute

isValueAllowed

     public boolean isValueAllowed(String InputValue)

  Check if a value is allowed (ie. is on the list of allowed values).

  Parameters:
    InputValue - The value we are testing to see if it is allowed
  Returns:
    True if the InputValue is one of the allowed values; false if not.

setDefaultType

     public void setDefaultType(int InputDefaultType)

  Set the default type of this attribute.

  Parameters:
    InputDefaultType - The default type of this attribute

setDefaultValue

     public void setDefaultValue(String InputDefaultValue)

  Set the default value of this attribute.

  Parameters:
    InputDefaultValue - The default value of this attribute

    All Packages  Class Hierarchy  This Package  Previous  Next  Index