Interface DocumentClient<N>

All Known Implementing Classes:
DOMClient, TdomClient, UdomClient

public interface DocumentClient<N>
For tpath, each document object is a collection of "Nodes". These nodes are totally opaque. Their behaviour is completely defined by this interface, e.g. the methods to which they are arguments.
  • Method Details

    • getNamespaceName

      NamespaceName getNamespaceName(N node)
      Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName. May be called with any node.
    • getLocalName

      String getLocalName(N node)
      Returns null iff node is neither Element nor Attribute; otherwise the local name. This is the part after the colon ":" in namspace mode; otherwise the whole name. May be called with any node.
    • getNamespaceURI

      String getNamespaceURI(N node)
      Returns null iff node is neither Element nor Attribute; otherwise the URI the namespace prefix is bound to. May be called with any node.
    • getBaseURI

      URI getBaseURI(N node)
      Returns the basis URI to which all relative URIs in the document shall be resolved. Is null iff not possible to find out.
    • stringValue

      String stringValue(N node)
      Never returns null, but possibly empty String [XPath 1.0:5]. May be called with any node.
    • getPITarget

      String getPITarget(N node)
      returns the target identifier; may only be called with a PI-node!
    • getParent

      N getParent(N node)
      returns the parent node; null for Document. May be called with any node.
    • getRoot

      N getRoot(N node)
      returns the owning Document. May be called with any node.
    • getDocument

      N getDocument(URI uri)
      Reads a document from the given address and converts it into a (Document-)node.
    • attributeAxis

      NodeSet<N> attributeAxis(N node)
      Returns a NodeSet with all attribute nodes. Is an empty set for all nodes which are not elements. May be called with any node.
    • childAxis

      NodeSet<N> childAxis(N node, boolean reverse)
      Returns a NodeSet with all child elements. FIXME STIMMT DAS ALLES ??
    • followingSiblingAxis

      NodeSet<N> followingSiblingAxis(N node)
      Returns a NodeSet with all following sibling elements. May be called with any node.
    • parentAxis

      NodeSet<N> parentAxis(N node)
      Returns a NodeSet with the one direct parent. May be called with any node.
    • precedingSiblingAxis

      NodeSet<N> precedingSiblingAxis(N node)
      Returns a NodeSet with all preceding sibling elements. May be called with any node.
    • nameTest

      boolean nameTest(N node, PrincipalNodeType pnt, String uri, String suffix)
      null stands for unspecified, e.g. "prefix:*" or "instanceof Element" Attention: uri==emptystrng and uri==null are two different things. (suffix may be ==null but never empty) May be called with any node.
    • commentTest

      boolean commentTest(N node)
      Returns whether a node is a comment. May be called with any node.
    • textTest

      boolean textTest(N node)
      Returns whether a node is PCDATA. May be called with any node.
    • processingInstructionTest

      boolean processingInstructionTest(N node, String target)
      Returns whether a node is PI. target==null: returns true if node is any process instruction.
      target!=null: returns true if node is a process instruction for this special target.
      May be called with any node.
    • documentOrder

      Comparator<? super N> documentOrder()
    • getElementById

      N getElementById(N document, String id)
      retrieves an element (or null) by the text value of the ID-type attribute. Each Element may define 0 or 1 of this attribute.