oracle.xml.parser.v2

## Class AttrDecl

- java.lang.Object
- - oracle.xml.parser.v2.XMLNode
  - - oracle.xml.parser.v2.AttrDecl

All Implemented Interfaces:
  java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, EventTarget, Node, NodeEditVAL

    public class AttrDecl
    extends XMLNode
    implements java.io.Externalizable

This class hold information about each attribute declared in an attribute list in the Document Type Definition.

See Also:
  Serialized Form

### Field Summary

Fields
`static int` `CDATA` AttType - StringType - CDATA
`static int` `DEFAULT` Attribute presence - Default
`static int` `ENTITIES` AttType - TokenizedType - Entities
`static int` `ENTITY` AttType - TokenizedType - Entity
`static int` `ENUMERATION` AttType - EnumeratedType - Enumeration
`static int` `FIXED` Attribute presence - Fixed
`static int` `ID` AttType - TokenizedType - ID
`static int` `IDREF` AttType - TokenizedType - ID reference
`static int` `IDREFS` AttType - TokenizedType - ID references
`static int` `IMPLIED` Attribute presence - Implied
`static int` `NMTOKEN` AttType - TokenizedType - Name token
`static int` `NMTOKENS` AttType - TokenizedType - Name tokens
`static int` `NOTATION` AttType - EnumeratedType - Notation
`static int` `REQUIRED` Attribute presence - Required

### Fields inherited from class oracle.xml.parser.v2.XMLNode

`ATTRDECL, Auto_Events, capturing, DOMAttrModified, DOMCharacterDataModified, DOMNodeInserted, DOMNodeInsertedIntoDocument, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMSubtreeModified, ELEMENTDECL, KEPT_NODE, NAMESPACE_NODE, noncapturing, RANGE_DELETE_EVENT, RANGE_DELETETEXT_EVENT, RANGE_INSERT_EVENT, RANGE_INSERTTEXT_EVENT, RANGE_REPLACE_EVENT, RANGE_SETTEXT_EVENT, SCHEMA_NILLED, TRAVERSAL_DELETE_EVENT, TRAVERSAL_REPLACE_EVENT, XMLDECL_NODE`

### 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`

### Fields inherited from interface org.w3c.dom.validation.NodeEditVAL

`VAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF`

### Constructor Summary

Constructors
Constructor and Description
`AttrDecl()` Default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getAttrPresence()` Gets attribute presence
`int` `getAttrType()` Gets attribute type
`java.lang.String` `getDefaultValue()` Gets attribute default value
`java.util.Vector` `getEnumerationValues()` Gets attribute values
`java.lang.String` `getNodeName()` Gets the name of this node, depending on its type
`short` `getNodeType()` Gets a code representing the type of the underlying object
`void` `readExternal(java.io.ObjectInput inArg)` This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
`void` `writeExternal(java.io.ObjectOutput outArg)` This method saves the state of the object by creating a binary compressed stream with information about this object.

### Methods inherited from class oracle.xml.parser.v2.XMLNode

`addEventListener, addText, appendChild, canAppendChild, canInsertBefore, canRemoveChild, canReplaceChild, cloneNode, dispatchEvent, equals, getAttributes, getChildNodes, getColumnNumber, getDebugMode, getEnumeratedValues, getFirstChild, getFirstChildAsOffset, getLastChild, getLineNumber, getLocalName, getNamespaceURI, getNextSibling, getNextSiblingAsOffset, getNodeValue, getNodeValueAsBinaryStream, getNodeValueAsBinaryStream, getNodeValueAsCharacterStream, getNodeValueAsCharacterStream, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getPrimitiveTypeId, getProperty, getSystemId, getText, getXMLError, hasAttributes, hasChildNodes, hashCode, insertBefore, isDocumentFlag, isNodeFlag, isSupported, nodeValidity, normalize, print, print, print, print, removeChild, removeEventListener, replaceChild, reportSAXEvents, resetNodeFlag, selectNodes, selectNodes, selectSingleNode, selectSingleNode, setDebugInfo, setNodeFlag, setNodeFlag, setNodeFlag, setNodeValue, setNodeValueAsBinaryStream, setNodeValueAsBinaryStream, setNodeValueAsCharacterStream, setNodeValueAsCharacterStream, setPrefix, setProperty, transformNode, valueOf, valueOf, xdbGetNodeId`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### CDATA

    public static final int CDATA

AttType - StringType - CDATA

See Also:
  Constant Field Values

#### ID

    public static final int ID

AttType - TokenizedType - ID

See Also:
  Constant Field Values

#### IDREF

    public static final int IDREF

AttType - TokenizedType - ID reference

See Also:
  Constant Field Values

#### IDREFS

    public static final int IDREFS

AttType - TokenizedType - ID references

See Also:
  Constant Field Values

#### ENTITY

    public static final int ENTITY

AttType - TokenizedType - Entity

See Also:
  Constant Field Values

#### ENTITIES

    public static final int ENTITIES

AttType - TokenizedType - Entities

See Also:
  Constant Field Values

#### NMTOKEN

    public static final int NMTOKEN

AttType - TokenizedType - Name token

See Also:
  Constant Field Values

#### NMTOKENS

    public static final int NMTOKENS

AttType - TokenizedType - Name tokens

See Also:
  Constant Field Values

#### NOTATION

    public static final int NOTATION

AttType - EnumeratedType - Notation

See Also:
  Constant Field Values

#### ENUMERATION

    public static final int ENUMERATION

AttType - EnumeratedType - Enumeration

See Also:
  Constant Field Values

#### DEFAULT

    public static final int DEFAULT

Attribute presence - Default

See Also:
  Constant Field Values

#### REQUIRED

    public static final int REQUIRED

Attribute presence - Required

See Also:
  Constant Field Values

#### IMPLIED

    public static final int IMPLIED

Attribute presence - Implied

See Also:
  Constant Field Values

#### FIXED

    public static final int FIXED

Attribute presence - Fixed

See Also:
  Constant Field Values

### Constructor Detail

#### AttrDecl

    public AttrDecl()

Default constructor. Note that this constructor is used only during deserialization/decompression of this DOM node. In order to deserialize this node to construct the DOM node from the serialized/ compressed stream, it is required to create a handle of the object.

### Method Detail

#### getNodeType

    public short getNodeType()

Gets a code representing the type of the underlying object

Specified by:
  `getNodeType` in interface `Node`
Overrides:
  `getNodeType` in class `XMLNode`
Returns:
  type of the node

#### getNodeName

    public java.lang.String getNodeName()

Gets the name of this node, depending on its type

Specified by:
  `getNodeName` in interface `Node`
Overrides:
  `getNodeName` in class `XMLNode`
Returns:
  Name of this node

#### getAttrType

    public int getAttrType()

Gets attribute type

Returns:
  The type of the attribute

#### getAttrPresence

    public int getAttrPresence()

Gets attribute presence

Returns:
  The presence of the attribute

#### getDefaultValue

    public java.lang.String getDefaultValue()

Gets attribute default value

Specified by:
  `getDefaultValue` in interface `NodeEditVAL`
Overrides:
  `getDefaultValue` in class `XMLNode`
Returns:
  The default value of the attribute

#### getEnumerationValues

    public java.util.Vector getEnumerationValues()

Gets attribute values

Returns:
  The values of the attribute as an `Enumeration`

#### writeExternal

    public void writeExternal(java.io.ObjectOutput outArg)
                       throws java.io.IOException

This method saves the state of the object by creating a binary compressed stream with information about this object.

Specified by:
  `writeExternal` in interface `java.io.Externalizable`
Overrides:
  `writeExternal` in class `XMLNode`
Parameters:
  `outArg` - The ObjectOutput stream used to write the serialized/ compressed stream.
Throws:
  `java.io.IOException` - is thrown when there is an exception while writing the serialized/compressed stream.

#### readExternal

    public void readExternal(java.io.ObjectInput inArg)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException

This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.

Specified by:
  `readExternal` in interface `java.io.Externalizable`
Overrides:
  `readExternal` in class `XMLNode`
Parameters:
  `inArg` - the ObjectInput stream used for reading the compressed stream.
Throws:
  `java.io.IOException` - is thrown when there is an error in reading the input stream.
  `java.lang.ClassNotFoundException` - is thrown when the class is not found

Copyright © 2003, 2017, Oracle and/or its affiliates. All rights reserved.