    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.

##

AllowedValueList
ANY_STRING
ANY_TYPE
AttName
DefaultType
DefaultValue
ELEMENTS_TYPE
EMPTY_STRING
EMPTY_TYPE
MIXED_TYPE
NodeType

##

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

##

EMPTY_TYPE

     public static final int EMPTY_TYPE

ANY_TYPE

     public static final int ANY_TYPE

MIXED_TYPE

     public static final int MIXED_TYPE

ELEMENTS_TYPE

     public static final int ELEMENTS_TYPE

EMPTY_STRING

     public static final String EMPTY_STRING

ANY_STRING

     public static final String ANY_STRING

NodeType

     protected int NodeType

AttName

     protected String AttName

AllowedValueList

     protected Vector AllowedValueList

DefaultType

     protected int DefaultType

DefaultValue

     protected String DefaultValue

##

xg_EntityDecl

     public xg_EntityDecl()

  Construct an element declaration with no type and no name.

xg_EntityDecl

     public xg_EntityDecl(String InputEntityName)

  Construct an element declaration with a type and name.

  Parameters:
    InputEntityName - The name of the element type

##

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

addAllowedValue

     public void addAllowedValue(String InputAllowedValue)

  Add an allowed value.

  Parameters:
    InputAllowedValue - The allowed value to be added

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

getName

     public String getName()

  Get the name of the entity.

  Returns:
    The name of the entity
  Overrides:
    getName in class xg_Node

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

getDefaultType

     public int getDefaultType()

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

  Returns:
    The default type of the element

getDefaultValue

     public String getDefaultValue()

  Get the default value of the element.

  Returns:
    The default value of the element

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

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.

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

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

setDefaultType

     public void setDefaultType(int InputDefaultType)

  Set the default type of this element.

  Parameters:
    InputDefaultType - The default type of this element

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