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.


Variable Index

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

Constructor Index

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

Method Index

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

Variables

 o AttDeclType
 protected int AttDeclType
 o AllowedValueList
 protected Vector AllowedValueList
 o DefaultType
 protected int DefaultType
List of strings defining the possible values which this attribute may have.

 o 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.

 o ENUMERATION_TYPE
 public static final int ENUMERATION_TYPE
The default value of this attribute.

 o REQUIRED
 public static final int REQUIRED
Constant to identify an enumerated type. Constants for other types are defined in xa_AttTypeChoiceList.

 o IMPLIED
 public static final int IMPLIED
#REQUIRED

 o FIXED
 public static final int FIXED
#IMPLIED

 o SIMPLE
 public static final int SIMPLE
#FIXED

 o REQUIRED_STRING
 public static final String REQUIRED_STRING
Just default value

 o IMPLIED_STRING
 public static final String IMPLIED_STRING
 o FIXED_STRING
 public static final String FIXED_STRING

Constructors

 o xg_AttDecl
 public xg_AttDecl()
Construct an attribute declaration with no type and no name.

 o 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

Methods

 o 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
 o addAllowedValue
 public void addAllowedValue(String InputAllowedValue)
Add an allowed value.

Parameters:
InputAllowedValue - The allowed value to be added
 o setType
 public void setType(int InputAttDeclType)
Get the type of this node.

Returns:
InputAttDeclType The type of this node
 o getType
 public int getType()
Get the type of this node.

Returns:
The type of this node
Overrides:
getType in class xg_Node
 o 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
 o 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
 o getDefaultType
 public int getDefaultType()
Get the default type (ie. the type of defaulting) of the attribute.

Returns:
The default type of the attribute
 o getDefaultValue
 public String getDefaultValue()
Get the default value of the attribute.

Returns:
The default value of the attribute
 o 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.
 o setDefaultType
 public void setDefaultType(int InputDefaultType)
Set the default type of this attribute.

Parameters:
InputDefaultType - The default type of this attribute
 o 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