dbXML API

## org.dbxml.xml.dom
Interface CompressedNode

All Superinterfaces:
  org.w3c.dom.Node

All Known Subinterfaces:
  CompressedDocument

All Known Implementing Classes:
  NodeImpl

public interface CompressedNode
extends org.w3c.dom.Node

CompressedNode represents a dbXML Compressed Node. The compression system operates independently of the database and only requires a SymbolTable instance to perform compression/decompression.

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`

Method Summary
`byte[]` `getDataBytes()` getDataBytes returns the byte array that defines this Node.
`int` `getDataLen()` getDataLen returns the length of the Node's definition in the byte array.
`int` `getDataPos()` getDataPos returns the offset into the Node definition's byte array that the Node starts at.
`short` `getSymbolID()` getSymbolID returns the Symbol ID for the current node.
`boolean` `isDirty()` isDirty returns whether or not the current Node (or any of its children) have been modified since being loaded.
`boolean` `isLoaded()` isLoaded returns whether or not the Node's definition has been loaded.
`void` `load()` load forces the Node to be graphed for this level.
`void` `setDataBytes(byte[] data)` setDataBytes sets the byte array that defines this Node.
`void` `setDataBytes(byte[] data, int pos, int len)` setDataBytes sets the definition and positional information for the Node.
`void` `setDataLen(int len)` setDataLen sets the length of the Node's definition in the byte array.
`void` `setDataPos(int pos)` setDataPos sets the offset into the Node definition's byte array that the Node starts at.
`void` `unload()` unload forces the Node to be unloaded for this level.

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

Method Detail

### isDirty

    public boolean isDirty()

  isDirty returns whether or not the current Node (or any of its children) have been modified since being loaded.
  Returns:
    Whether or not the Node has been modified

### getDataBytes

    public byte[] getDataBytes()

  getDataBytes returns the byte array that defines this Node. A Node definition is usually a subset of this byte array.
  Returns:
    The Node definition's byte array

### getDataPos

    public int getDataPos()

  getDataPos returns the offset into the Node definition's byte array that the Node starts at.
  Returns:
    The Node's position

### getDataLen

    public int getDataLen()

  getDataLen returns the length of the Node's definition in the byte array.
  Returns:
    The Node's length

### setDataBytes

    public void setDataBytes(byte[] data,
                             int pos,
                             int len)

  setDataBytes sets the definition and positional information for the Node.
  Parameters:
    `data` - The Node definition's byte array
    `pos` - The Node's position
    `len` - The Node's length

### setDataBytes

    public void setDataBytes(byte[] data)

  setDataBytes sets the byte array that defines this Node.
  Parameters:
    `data` - The Node definition's byte array

### setDataPos

    public void setDataPos(int pos)

  setDataPos sets the offset into the Node definition's byte array that the Node starts at.
  Parameters:
    `pos` - The Node's position

### setDataLen

    public void setDataLen(int len)

  setDataLen sets the length of the Node's definition in the byte array.
  Parameters:
    `len` - The Node's length

### load

    public void load()
              throws org.w3c.dom.DOMException

  load forces the Node to be graphed for this level. Loading happens automatically whenever a Node's children are accessed, so load should never have to explicitly be called.
  Throws:
    `org.w3c.dom.DOMException` - if an exception occurs

### unload

    public void unload()
                throws org.w3c.dom.DOMException

  unload forces the Node to be unloaded for this level. Whether the node is actually unloaded or not is up to the underlying implementation, and should silently fail if the implementation doesn't support unloading.
  Throws:
    `org.w3c.dom.DOMException` - if an exception occurs

### isLoaded

    public boolean isLoaded()

  isLoaded returns whether or not the Node's definition has been loaded.
  Returns:
    Whether or not the Node is loaded

### getSymbolID

    public short getSymbolID()

  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.
  Returns:
    The Symbol ID

dbXML API

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