public class TdomClient<E extends TypedElement<E,X>,X extends TypedExtension> extends Object implements DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
Modifier and Type | Field and Description |
---|---|
protected NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
emptyNodeSet |
protected NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
emptyNodeSetReverse |
protected MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> |
msg |
Constructor and Description |
---|
TdomClient() |
Modifier and Type | Method and Description |
---|---|
NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
attributeAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns a NodeSet with all attribute nodes.
|
NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
childAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node,
boolean reverse)
Returns a NodeSet with all child elements.
|
NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
childAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Element el,
boolean reverse) |
boolean |
commentTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns whether a node is a comment.
|
Comparator<? super eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
documentOrder() |
NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
followingSiblingAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns a NodeSet with all following sibling elements.
|
URI |
getBaseURI(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns null iff not possible to find out.
|
eu.bandm.tools.tpath.tdomclient.TdomClient.Node |
getDocument(URI uri)
The xpath core library "document()" function has complicated signatures,
but finally breaks down to load a document from an URI.
|
eu.bandm.tools.tpath.tdomclient.TdomClient.Node |
getElementById(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node,
String id)
retrieves an element (or null) by the text value of the ID-type attribute.
|
String |
getLocalName(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns null iff node is neither Element nor Attribute; otherwise the local name.
|
NamespaceName |
getNamespaceName(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName.
|
String |
getNamespaceURI(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns null iff node is neither Element nor Attribute; otherwise the URI the
namespace prefix is bound to.
|
eu.bandm.tools.tpath.tdomclient.TdomClient.Node |
getParent(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
returns the parent node; null for Document.
|
String |
getPITarget(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
returns the target identifier; may only be called with a PI-node!
|
eu.bandm.tools.tpath.tdomclient.TdomClient.Node |
getRoot(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
returns the owning Document.
|
boolean |
nameTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node,
PrincipalNodeType pnt,
String uri,
String suffix)
uri and suffix may be ==null, which means "not tested".
|
NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
parentAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns a NodeSet with the one direct parent.
|
NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> |
precedingSiblingAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns a NodeSet with all preceding sibling elements.
|
boolean |
processingInstructionTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node,
String target)
Returns whether a node is PI.
|
void |
setMessageReceiver(MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg) |
String |
stringValue(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Never returns null, but possibly empty String [XPath 1.0:5].
|
boolean |
textTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
Returns whether a node is PCDATA.
|
protected MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg
protected final NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> emptyNodeSet
protected final NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> emptyNodeSetReverse
public void setMessageReceiver(MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg)
public String getLocalName(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
getLocalName
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public String getNamespaceURI(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
getNamespaceURI
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public NamespaceName getNamespaceName(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
getNamespaceName
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public URI getBaseURI(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
getBaseURI
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public eu.bandm.tools.tpath.tdomclient.TdomClient.Node getDocument(URI uri)
getDocument
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public eu.bandm.tools.tpath.tdomclient.TdomClient.Node getRoot(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
getRoot
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public String stringValue(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
stringValue
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public Comparator<? super eu.bandm.tools.tpath.tdomclient.TdomClient.Node> documentOrder()
documentOrder
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> attributeAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
attributeAxis
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> childAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, boolean reverse)
DocumentClient
childAxis
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> childAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Element el, boolean reverse)
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> followingSiblingAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
followingSiblingAxis
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public eu.bandm.tools.tpath.tdomclient.TdomClient.Node getParent(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
getParent
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public String getPITarget(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
getPITarget
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> parentAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
parentAxis
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> precedingSiblingAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
precedingSiblingAxis
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public boolean nameTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, PrincipalNodeType pnt, String uri, String suffix)
nameTest
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public boolean commentTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
commentTest
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public boolean textTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node)
DocumentClient
textTest
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public boolean processingInstructionTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, String target)
DocumentClient
processingInstructionTest
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public eu.bandm.tools.tpath.tdomclient.TdomClient.Node getElementById(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, String id)
DocumentClient
getElementById
in interface DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
see also the complete user documentation .