xacute.util
Class NodeDefaultImpl

java.lang.Object
  |
  +--xacute.util.NodeDefaultImpl
All Implemented Interfaces:
Node
Direct Known Subclasses:
NodeImpl, NodeImpl

public abstract class NodeDefaultImpl
extends java.lang.Object
implements Node


Constructor Summary
NodeDefaultImpl(org.w3c.dom.Node domNode)
           
 
Method Summary
 int compareTo(Node n)
          to compare two nodes two nodes are not always comparable (from different documents, attribute nodes, etc.) the result can be: SAME BEFORE AFTER NOT_COMPARABLE
abstract  Node createNode(org.w3c.dom.Node n)
           
abstract  NodeList createNodeList()
           
abstract  NodeList createNodeList(org.w3c.dom.Node n)
           
abstract  NodeList createNodeList(Node n)
           
abstract  NodeList createNodeList(org.w3c.dom.NodeList nl)
           
 NodeList deref(java.lang.String value, Hint[] hints)
           
 boolean equals(Node n)
          Compares two nodes for physical equality.
 ExpandedName expand(java.lang.String qName)
           
protected  NodeList findAxis(int axis)
          Can be overridden by subclasses.
 NodeList findAxis(int axis, NodeTest test)
          to evaluate axis::note-test on a given node
 NodeList findAxis(int axis, NodeTest test, Predicate[] predicates)
          to evaluate axis::note-test[predicate1]..[predicaten] on a given node
 Node getDocumentRoot()
          to get the root of the document the node belongs to
protected  org.w3c.dom.Node getDOMNode()
           
 ExpandedName getExpandedName()
          functions that deal with the name of the node
 java.lang.String getName()
           
 java.lang.String getQName()
           
 boolean isOfPrincipalType(int axis)
          functions that deal with the type of the node
 boolean isOfType(int type)
          maybe we should have a method that returns the type instead
 java.lang.String stringValue_shallow()
           
 java.lang.String stringValue()
          output methods: 'shallow' means that children are ignored
 void toSAX_shallow(org.xml.sax.DocumentHandler handler)
           
 void toSAX(org.xml.sax.DocumentHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeDefaultImpl

public NodeDefaultImpl(org.w3c.dom.Node domNode)
Method Detail

createNodeList

public abstract NodeList createNodeList(org.w3c.dom.NodeList nl)

createNodeList

public abstract NodeList createNodeList(org.w3c.dom.Node n)

createNodeList

public abstract NodeList createNodeList(Node n)

createNodeList

public abstract NodeList createNodeList()

createNode

public abstract Node createNode(org.w3c.dom.Node n)

getDOMNode

protected org.w3c.dom.Node getDOMNode()

equals

public boolean equals(Node n)
Compares two nodes for physical equality.
Specified by:
equals in interface Node

compareTo

public int compareTo(Node n)
Description copied from interface: Node
to compare two nodes two nodes are not always comparable (from different documents, attribute nodes, etc.) the result can be: SAME BEFORE AFTER NOT_COMPARABLE
Specified by:
compareTo in interface Node

findAxis

protected NodeList findAxis(int axis)
Can be overridden by subclasses. For instance, should be redefined for shallow nodes.

findAxis

public NodeList findAxis(int axis,
                         NodeTest test)
Description copied from interface: Node
to evaluate axis::note-test on a given node
Specified by:
findAxis in interface Node

findAxis

public NodeList findAxis(int axis,
                         NodeTest test,
                         Predicate[] predicates)
                  throws QuiltException
Description copied from interface: Node
to evaluate axis::note-test[predicate1]..[predicaten] on a given node
Specified by:
findAxis in interface Node

getDocumentRoot

public Node getDocumentRoot()
Description copied from interface: Node
to get the root of the document the node belongs to
Specified by:
getDocumentRoot in interface Node

getName

public java.lang.String getName()

expand

public ExpandedName expand(java.lang.String qName)
                    throws QuiltException
Specified by:
expand in interface Node

getExpandedName

public ExpandedName getExpandedName()
Description copied from interface: Node
functions that deal with the name of the node
Specified by:
getExpandedName in interface Node

getQName

public java.lang.String getQName()
Specified by:
getQName in interface Node

isOfPrincipalType

public boolean isOfPrincipalType(int axis)
Description copied from interface: Node
functions that deal with the type of the node
Specified by:
isOfPrincipalType in interface Node

isOfType

public boolean isOfType(int type)
maybe we should have a method that returns the type instead
Specified by:
isOfType in interface Node

stringValue

public java.lang.String stringValue()
Description copied from interface: Node
output methods: 'shallow' means that children are ignored
Specified by:
stringValue in interface Node

stringValue_shallow

public java.lang.String stringValue_shallow()
Specified by:
stringValue_shallow in interface Node

deref

public NodeList deref(java.lang.String value,
                      Hint[] hints)
Specified by:
deref in interface Node

toSAX

public void toSAX(org.xml.sax.DocumentHandler handler)
           throws org.xml.sax.SAXException
Specified by:
toSAX in interface Node

toSAX_shallow

public void toSAX_shallow(org.xml.sax.DocumentHandler handler)
                   throws org.xml.sax.SAXException
Specified by:
toSAX_shallow in interface Node