dbXML API

## org.dbxml.xml.dom
Class AttrImpl

    java.lang.Object
      |
      +--org.dbxml.xml.dom.NodeImpl
            |
            +--org.dbxml.xml.dom.ContainerNodeImpl
                  |
                  +--org.dbxml.xml.dom.AttrImpl

All Implemented Interfaces:
  org.w3c.dom.Attr, CompressedNode, DBNode, org.w3c.dom.Node

public final class AttrImpl
extends ContainerNodeImpl
implements org.w3c.dom.Attr

AttrImpl

Fields inherited from class org.dbxml.xml.dom.NodeImpl
`EX_DOMSTRING_SIZE, EX_HIERARCHY_REQUEST, EX_INDEX_SIZE, EX_INUSE_ATTRIBUTE, EX_INVALID_STATE, EX_NO_DATA_ALLOWED, EX_NO_MODIFICATION_ALLOWED, EX_NOT_FOUND, EX_WRONG_DOCUMENT, OBJECT_HREF, OBJECT_NS, OBJECT_TYPE, TYPE_APPEND, TYPE_CONTENT, TYPE_INSERT, TYPE_REPLACE, XMLNS_PREFIX`

Fields inherited from interface org.w3c.dom.Node
`ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE`

Constructor Summary
`AttrImpl()`
`AttrImpl(NodeImpl parentNode, boolean dirty)`
`AttrImpl(NodeImpl parentNode, byte[] data, int pos, int len)`
`AttrImpl(NodeImpl parentNode, java.lang.String nodeName)`
`AttrImpl(NodeImpl parentNode, java.lang.String nodeName, java.lang.String nsURI, short symbolID, java.lang.String nodeValue)`

Method Summary
`java.lang.String` `getName()` Returns the name of this attribute.
`short` `getNodeType()` A code representing the type of the underlying object, as defined above.
`java.lang.String` `getNodeValue()` The value of this node, depending on its type; see the table above.
`org.w3c.dom.Element` `getOwnerElement()`
`boolean` `getSpecified()` If this attribute was explicitly given a value in the original document, this is `true`; otherwise, it is `false`.
`short` `getSymbolID()` getSymbolID returns the Symbol ID for the current node.
`java.lang.String` `getValue()` On retrieval, the value of the attribute is returned as a string.
`void` `setNodeValue(java.lang.String nodeValue)` The value of this node, depending on its type; see the table above.
`void` `setSpecified(boolean specified)`
`void` `setSymbolID(short symbolID)`
`void` `setValue(java.lang.String value)`

Methods inherited from class org.dbxml.xml.dom.ContainerNodeImpl
`appendChild, getChildNodes, getElementById, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, hasChildNodes, insertBefore, normalize, removeChild, replaceChild`

Methods inherited from class org.dbxml.xml.dom.NodeImpl

`checkReadOnly, cloneNode, expandSource, getAttributes, getDataBytes, getDataLen, getDataPos, getKey, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSource, getUserData, hasAttributes, isDefined, isDirty, isLoaded, isSameNode, isSupported, load, lookupDefaultNamespaceURI, lookupNamespacePrefix, lookupNamespaceURI, normalizeNS, setDataBytes, setDataBytes, setDataLen, setDataPos, setDirty, setNodeName, setParentNode, setPrefix, setSource, setUserData, unload`

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

Methods inherited from interface org.w3c.dom.Node
`appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix`

Constructor Detail

### AttrImpl

    public AttrImpl()

### AttrImpl

    public AttrImpl(NodeImpl parentNode,
                    byte[] data,
                    int pos,
                    int len)

### AttrImpl

    public AttrImpl(NodeImpl parentNode,
                    java.lang.String nodeName,
                    java.lang.String nsURI,
                    short symbolID,
                    java.lang.String nodeValue)

### AttrImpl

    public AttrImpl(NodeImpl parentNode,
                    boolean dirty)

### AttrImpl

    public AttrImpl(NodeImpl parentNode,
                    java.lang.String nodeName)

Method Detail

### getNodeType

    public short getNodeType()

  Description copied from class: `NodeImpl`
  A code representing the type of the underlying object, as defined above.
  Specified by:
    `getNodeType` in interface `org.w3c.dom.Node`
  Overrides:
    `getNodeType` in class `NodeImpl`

### getName

    public java.lang.String getName()

  Returns the name of this attribute.
  Specified by:
    `getName` in interface `org.w3c.dom.Attr`

### setSymbolID

    public void setSymbolID(short symbolID)

### getSymbolID

    public short getSymbolID()

  Description copied from interface: `CompressedNode`
  getSymbolID returns the Symbol ID for the current node. Some nodes will not have a Symbol ID, in which case, a value of -1 is returned.
  Overrides:
    `getSymbolID` in class `NodeImpl`
  Following copied from interface: `org.dbxml.xml.dom.CompressedNode`
  Returns:
    The Symbol ID

### setNodeValue

    public void setNodeValue(java.lang.String nodeValue)
                      throws org.w3c.dom.DOMException

  Description copied from class: `NodeImpl`
  The value of this node, depending on its type; see the table above. When it is defined to be `null` , setting it has no effect.
  Specified by:
    `setNodeValue` in interface `org.w3c.dom.Node`
  Overrides:
    `setNodeValue` in class `NodeImpl`
  Following copied from class: `org.dbxml.xml.dom.NodeImpl`
  Throws:
    `org.w3c.dom.DOMException` - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
    `org.w3c.dom.DOMException` - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a `DOMString` variable on the implementation platform.

### setValue

    public void setValue(java.lang.String value)

  Specified by:
    `setValue` in interface `org.w3c.dom.Attr`

### getSpecified

    public boolean getSpecified()

  If this attribute was explicitly given a value in the original document, this is `true`; otherwise, it is `false`. Note that the implementation is in charge of this attribute, not the user. If the user changes the value of the attribute (even if it ends up having the same value as the default value) then the `specified` flag is automatically flipped to `true`. To re-specify the attribute as the default value from the DTD, the user must delete the attribute. The implementation will then make a new attribute available with `specified` set to `false` and the default value (if one exists).
  In summary: If the attribute has an assigned value in the document then `specified` is `true`, and the value is the assigned value. If the attribute has no assigned value in the document and has a default value in the DTD, then `specified` is `false`, and the value is the default value in the DTD. If the attribute has no assigned value in the document and has a value of #IMPLIED in the DTD, then the attribute does not appear in the structure model of the document.
  Specified by:
    `getSpecified` in interface `org.w3c.dom.Attr`

### setSpecified

    public void setSpecified(boolean specified)

### getValue

    public java.lang.String getValue()

  On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values.
  On setting, this creates a `Text` node with the unparsed contents of the string.
  Specified by:
    `getValue` in interface `org.w3c.dom.Attr`

### getNodeValue

    public java.lang.String getNodeValue()

  Description copied from class: `NodeImpl`
  The value of this node, depending on its type; see the table above.
  Specified by:
    `getNodeValue` in interface `org.w3c.dom.Node`
  Overrides:
    `getNodeValue` in class `NodeImpl`
  Following copied from class: `org.dbxml.xml.dom.NodeImpl`
  Throws:
    `org.w3c.dom.DOMException` - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
    `org.w3c.dom.DOMException` - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a `DOMString` variable on the implementation platform.

### getOwnerElement

    public org.w3c.dom.Element getOwnerElement()

  Specified by:
    `getOwnerElement` in interface `org.w3c.dom.Attr`

dbXML API

Copyright (c) 1999-2001 The dbXML Group, All rights reserved