xacute.util
Class QuiltShallowNode

java.lang.Object
  |
  +--xacute.util.QuiltShallowNode
All Implemented Interfaces:
Node

public class QuiltShallowNode
extends java.lang.Object
implements Node

The SHALLOW keyword simply means that when the node is displayed, the subtree has to be ignored. One way to implement this is simply to make a copy of the node without the subtree. In Kweelt we have chosen a different approach where a QuiltShallowNode is a wrapper on top a a regular node. The wrapper simply redefines some methods and make sure that the subtree is always ignored. Like for the other Quilt_xxxx_Nodes, we prohibit navigation.


Constructor Summary
QuiltShallowNode(Node node)
           
 
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
 NodeList deref(java.lang.String idref, Hint[] hints)
           
 boolean equals(Node n)
          to test for physical equality of two nodes
 ExpandedName expand(java.lang.String qName)
           
 NodeList findAxis(int axis, NodeTest test)
          to evaluate axis::note-test on a given node
 NodeList findAxis(int axis, NodeTest nt, 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
 ExpandedName getExpandedName()
          functions that deal with the name of the node
 java.lang.String getQName()
           
 boolean isOfPrincipalType(int axis)
          functions that deal with the type of the node
 boolean isOfType(int type)
           
 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

QuiltShallowNode

public QuiltShallowNode(Node node)
Method Detail

equals

public boolean equals(Node n)
Description copied from interface: Node
to test for physical equality of two nodes
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

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 nt,
                         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()
                     throws QuiltException
Description copied from interface: Node
to get the root of the document the node belongs to
Specified by:
getDocumentRoot in interface Node

getExpandedName

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

expand

public ExpandedName expand(java.lang.String qName)
                    throws QuiltException
Specified by:
expand 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)
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 idref,
                      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