xacute.util
Class QuiltTextNode

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

public class QuiltTextNode
extends java.lang.Object
implements Node

A QuiltTextNode is used when a text value produced by Kweelt needs to be inserted in the XML result tree. Since a QuiltNode is a regular node, it needs to implement the Node interface and in particular the navigation methods, which are not always clearly defined: - do we allow navigation from a QuiltTextNode? Right now, we do not, as should be clear from the class constructor that does not require a parent node.


Constructor Summary
QuiltTextNode(java.lang.String text)
           
 
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

QuiltTextNode

public QuiltTextNode(java.lang.String text)
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