All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xg.xg_EntityDecl

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

public class xg_EntityDecl
extends xg_Node
Class xg_EntityDecl - An element declaration, within a DTD.


Variable Index

 o AllowedValueList
 o ANY_STRING
 o ANY_TYPE
 o AttName
 o DefaultType
 o DefaultValue
 o ELEMENTS_TYPE
 o EMPTY_STRING
 o EMPTY_TYPE
 o MIXED_TYPE
 o NodeType

Constructor Index

 o xg_EntityDecl()
Construct an element declaration with no type and no name.
 o xg_EntityDecl(String)
Construct an element 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 element.
 o getName()
Get the name of the entity.
 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 getType(String)
Get the (integer) type of an element given a string representation of that type.
 o isValueAllowed(String)
Check if a value is allowed (ie.
 o save(Writer)
Save this element declaration (and its children) in XML source form in InputWriter.
 o setDefaultType(int)
Set the default type of this element.
 o setDefaultValue(String)
Set the default value of this element.
 o setName(String)
Set the name of this element.
 o setType(int)
Set the type of this element from a string representation of the type.
 o toString()
Return a string representation of the element declaration (intended for use as debug output).

Variables

 o EMPTY_TYPE
 public static final int EMPTY_TYPE
 o ANY_TYPE
 public static final int ANY_TYPE
 o MIXED_TYPE
 public static final int MIXED_TYPE
 o ELEMENTS_TYPE
 public static final int ELEMENTS_TYPE
 o EMPTY_STRING
 public static final String EMPTY_STRING
 o ANY_STRING
 public static final String ANY_STRING
 o NodeType
 protected int NodeType
 o AttName
 protected String AttName
 o AllowedValueList
 protected Vector AllowedValueList
 o DefaultType
 protected int DefaultType
 o DefaultValue
 protected String DefaultValue

Constructors

 o xg_EntityDecl
 public xg_EntityDecl()
Construct an element declaration with no type and no name.

 o xg_EntityDecl
 public xg_EntityDecl(String InputEntityName)
Construct an element declaration with a type and name.

Parameters:
InputEntityName - The name of the element type

Methods

 o save
 public void save(Writer InputWriter) throws IOException
Save this element 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 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 getName
 public String getName()
Get the name of the entity.

Returns:
The name of the entity
Overrides:
getName in class xg_Node
 o toString
 public String toString()
Return a string representation of the element declaration (intended for use as debug output).

Returns:
String representing the element 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 element.

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

Returns:
The default value of the element
 o getType
 public static int getType(String InputTypeString)
Get the (integer) type of an element given a string representation of that type.

Parameters:
InputTypeString - The string representation of of the element
Returns:
The integer representation of of the element
 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 setName
 public void setName(String InputAttName)
Set the name of this element.

Parameters:
InputAttName - The name of this element
Overrides:
setName in class xg_Node
 o setType
 public void setType(int InputEntityType)
Set the type of this element from a string representation of the type. The type is set to -1 if an unacceptable string is given.

Parameters:
InputEntityType - The name of this element
 o setDefaultType
 public void setDefaultType(int InputDefaultType)
Set the default type of this element.

Parameters:
InputDefaultType - The default type of this element
 o setDefaultValue
 public void setDefaultValue(String InputDefaultValue)
Set the default value of this element.

Parameters:
InputDefaultValue - The default value of this element

All Packages  Class Hierarchy  This Package  Previous  Next  Index