org.enhydra.xml.lazydom
Class NodeIdMap

java.lang.Object
  |
  +--org.enhydra.xml.lazydom.NodeIdMap

public class NodeIdMap
extends Object

Class to assign and map node ids to a node. Use in the construction of template DOMs.


Constructor Summary
NodeIdMap(Document document)
          Constructor.
 
Method Summary
 int getDocumentTypeNodeId(Node node)
          Get the document type node id.
 int getId(Node node)
          Get the node id for a node, generating an error if not found.
 String getIdStr(Node node)
          Get an id as a string.
 int getMaxNodeId()
          Get the maximum node id assigned.
 Node getNode(int id)
          Get a node, given its id.
 int size()
          Get the size of the node map.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeIdMap

public NodeIdMap(Document document)
Constructor.
Method Detail

getNode

public Node getNode(int id)
Get a node, given its id.

getId

public int getId(Node node)
Get the node id for a node, generating an error if not found. If null is passed in, NULL_NODE_ID is returned.

getIdStr

public String getIdStr(Node node)
Get an id as a string.

getMaxNodeId

public int getMaxNodeId()
Get the maximum node id assigned.

size

public int size()
Get the size of the node map.

getDocumentTypeNodeId

public int getDocumentTypeNodeId(Node node)
Get the document type node id.


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.