Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.japisoft.dtdparser.node
Class AttributeDTDNode

    java.lang.Object
      |
      +--com.japisoft.dtdparser.node.DTDNode
            |
            +--com.japisoft.dtdparser.node.AttributeDTDNode

public class AttributeDTDNode
extends DTDNode

Attribute node. This node is only for ElementDTDNode.

Version:
  1.0
Author:
  (c) 2002 - 2003 JAPISoft

Field Summary
`static int` | `CDATA_ATT_VAL`
`static int` | `ENTITIES_ATT_VAL`
`static int` | `ENTITY_ATT_VAL`
`static int` | `ENUM_ATT_VAL` Special type for enumeration
`static int` | `FIXED_ATT`
`static int` | `ID_ATT_VAL`
`static int` | `IDREF_ATT_VAL`
`static int` | `IMPLIED_ATT`
`static int` | `NMTOKEN_ATT_VAL`
`static int` | `NMTOKENS_ATT_VAL`
`static int` | `REQUIRED_ATT`

Fields inherited from class com.japisoft.dtdparser.node.DTDNode
`ATTRIBUTE, COMMENT, ELEMENT, ELEMENT_REF, ELEMENT_SET, ENTITY, ROOT`

Constructor Summary
`AttributeDTDNode()`
`AttributeDTDNode(java.lang.String name)` Attribute id

Method Summary
`java.lang.String` | `getDefaultValue()`
`java.lang.String[]` | `getEnumeration()`
`java.lang.String` | `getName()`
`int` | `getType()`
`int` | `getUsage()`
`boolean` | `isValueValid(java.lang.String value)`
`void` | `setDefaultValue(java.lang.String defaultValue)` Set the default attribute value
`void` | `setEnumeration(java.lang.String[] values)` Set of supported values
`void` | `setName(java.lang.String name)` Set the attribute name
`void` | `setType(int type)` Choose the attribute type : - `ID_ATT_VAL` - `IDREF_ATT_VAL` - `ENTITY_ATT_VAL` - `ENTITIES_ATT_VAL` - `NMTOKEN_ATT_VAL` - `NMTOKENS_ATT_VAL` - `CDATA_ATT_VAL`
`void` | `setUsage(int usage)` Choose the attribute usage : `REQUIRED_ATT` `IMPLIED_ATT` `FIXED_ATT`
`java.lang.String` | `toString()`

Methods inherited from class com.japisoft.dtdparser.node.DTDNode
`addDTDNode, getDTDNodeAt, getDTDNodeCount, getDTDNodeForType, getDTDNodeIndex, getDTDNodes, getDTDParentNode, getNodeComment, getNodeType, getRoot, isAttribute, isComment, isElement, isElementRef, isElementSet, isEmpty, isEntity, isRoot, removeDTDNode, setDTDParentNode, setNodeComment, setNodeType, setRoot`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ID_ATT_VAL

    public static final int ID_ATT_VAL

See Also:
  Constant Field Values

### IDREF_ATT_VAL

    public static final int IDREF_ATT_VAL

See Also:
  Constant Field Values

### ENTITY_ATT_VAL

    public static final int ENTITY_ATT_VAL

See Also:
  Constant Field Values

### ENTITIES_ATT_VAL

    public static final int ENTITIES_ATT_VAL

See Also:
  Constant Field Values

### NMTOKEN_ATT_VAL

    public static final int NMTOKEN_ATT_VAL

See Also:
  Constant Field Values

### NMTOKENS_ATT_VAL

    public static final int NMTOKENS_ATT_VAL

See Also:
  Constant Field Values

### CDATA_ATT_VAL

    public static final int CDATA_ATT_VAL

See Also:
  Constant Field Values

### ENUM_ATT_VAL

    public static final int ENUM_ATT_VAL

  Special type for enumeration

  See Also:
    Constant Field Values

### REQUIRED_ATT

    public static final int REQUIRED_ATT

See Also:
  Constant Field Values

### IMPLIED_ATT

    public static final int IMPLIED_ATT

See Also:
  Constant Field Values

### FIXED_ATT

    public static final int FIXED_ATT

See Also:
  Constant Field Values

Constructor Detail

### AttributeDTDNode

    public AttributeDTDNode()

### AttributeDTDNode

    public AttributeDTDNode(java.lang.String name)

  Attribute id

Method Detail

### setName

    public void setName(java.lang.String name)

  Set the attribute name

### getName

    public java.lang.String getName()

  Returns:
    the attribute name

### setType

    public void setType(int type)

  Choose the attribute type : - `ID_ATT_VAL` - `IDREF_ATT_VAL` - `ENTITY_ATT_VAL` - `ENTITIES_ATT_VAL` - `NMTOKEN_ATT_VAL` - `NMTOKENS_ATT_VAL` - `CDATA_ATT_VAL`

### getType

    public int getType()

  Returns:
    the attribute type

### setUsage

    public void setUsage(int usage)

  Choose the attribute usage : `REQUIRED_ATT` `IMPLIED_ATT` `FIXED_ATT`

### getUsage

    public int getUsage()

  Returns:
    the attribute usage

### setDefaultValue

    public void setDefaultValue(java.lang.String defaultValue)

  Set the default attribute value

### getDefaultValue

    public java.lang.String getDefaultValue()

  Returns:
    the default attribute value : `null` is returned for no default value

### setEnumeration

    public void setEnumeration(java.lang.String[] values)

  Set of supported values

### isValueValid

    public boolean isValueValid(java.lang.String value)

  Returns:
    true if value is valide for this attribute

### getEnumeration

    public java.lang.String[] getEnumeration()

  Returns:
    the list of available value : `null` is returned for no enumeration

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD