Package eu.bandm.tools.tpath.runtime
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 Summary
Modifier and TypeMethodDescriptionattributeAxis
(N node) Returns a NodeSet with all attribute nodes.Returns a NodeSet with all child elements.boolean
commentTest
(N node) Returns whether a node is a comment.Comparator<? super N>
followingSiblingAxis
(N node) Returns a NodeSet with all following sibling elements.getBaseURI
(N node) Returns the basis URI to which all relative URIs in the document shall be resolved.getDocument
(URI uri) Reads a document from the given address and converts it into a (Document-)node.getElementById
(N document, String id) retrieves an element (or null) by the text value of the ID-type attribute.getLocalName
(N node) Returns null iff node is neither Element nor Attribute; otherwise the local name.getNamespaceName
(N node) Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName.getNamespaceURI
(N node) Returns null iff node is neither Element nor Attribute; otherwise the URI the namespace prefix is bound to.returns the parent node; null for Document.getPITarget
(N node) returns the target identifier; may only be called with a PI-node!returns the owning Document.boolean
nameTest
(N node, PrincipalNodeType pnt, String uri, String suffix) null stands for unspecified, e.g.parentAxis
(N node) Returns a NodeSet with the one direct parent.precedingSiblingAxis
(N node) Returns a NodeSet with all preceding sibling elements.boolean
processingInstructionTest
(N node, String target) Returns whether a node is PI.stringValue
(N node) Never returns null, but possibly empty String [XPath 1.0:5].boolean
Returns whether a node is PCDATA.
-
Method Details
-
getNamespaceName
Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName. May be called with any node. -
getLocalName
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
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
Returns the basis URI to which all relative URIs in the document shall be resolved. Is null iff not possible to find out. -
stringValue
Never returns null, but possibly empty String [XPath 1.0:5]. May be called with any node. -
getPITarget
returns the target identifier; may only be called with a PI-node! -
getParent
returns the parent node; null for Document. May be called with any node. -
getRoot
returns the owning Document. May be called with any node. -
getDocument
Reads a document from the given address and converts it into a (Document-)node. -
attributeAxis
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
Returns a NodeSet with all child elements. FIXME STIMMT DAS ALLES ?? -
followingSiblingAxis
Returns a NodeSet with all following sibling elements. May be called with any node. -
parentAxis
Returns a NodeSet with the one direct parent. May be called with any node. -
precedingSiblingAxis
Returns a NodeSet with all preceding sibling elements. May be called with any node. -
nameTest
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
Returns whether a node is a comment. May be called with any node. -
textTest
Returns whether a node is PCDATA. May be called with any node. -
processingInstructionTest
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
retrieves an element (or null) by the text value of the ID-type attribute. Each Element may define 0 or 1 of this attribute.
-