public class UdomClient extends Object implements DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
Modifier and Type | Field and Description |
---|---|
protected NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
emptyNodeSet |
protected NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
emptyNodeSetReverse |
Constructor and Description |
---|
UdomClient() |
Modifier and Type | Method and Description |
---|---|
NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
attributeAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns a NodeSet with all attribute nodes.
|
NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
childAxis(eu.bandm.tools.d2d2.base.UdomClient.Element el,
boolean reverse) |
NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
childAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node,
boolean reverse)
Returns a NodeSet with all child elements.
|
boolean |
commentTest(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns whether a node is a comment.
|
Comparator<? super eu.bandm.tools.d2d2.base.UdomClient.Node> |
documentOrder() |
NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
followingSiblingAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns a NodeSet with all following sibling elements.
|
URI |
getBaseURI(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns null iff not possible to find out.
|
@Opt eu.bandm.tools.d2d2.base.UdomClient.Node |
getDocument(URI uri)
Reads a document from the given address and converts it into a (Document-)node.
|
@Opt eu.bandm.tools.d2d2.base.UdomClient.Node |
getElementById(eu.bandm.tools.d2d2.base.UdomClient.Node node,
String id)
retrieves an element (or null) by the text value of the ID-type attribute.
|
String |
getLocalName(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns null iff node is neither Element nor Attribute; otherwise the local name.
|
@Opt NamespaceName |
getNamespaceName(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName.
|
String |
getNamespaceURI(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns null iff node is neither Element nor Attribute; otherwise the URI the
namespace prefix is bound to.
|
eu.bandm.tools.d2d2.base.UdomClient.Node |
getParent(eu.bandm.tools.d2d2.base.UdomClient.Node node)
returns the parent node; null for Document.
|
String |
getPITarget(eu.bandm.tools.d2d2.base.UdomClient.Node node)
returns the target identifier; may only be called with a PI-node!
|
eu.bandm.tools.d2d2.base.UdomClient.Node |
getRoot(eu.bandm.tools.d2d2.base.UdomClient.Node node)
returns the owning Document.
|
boolean |
nameTest(eu.bandm.tools.d2d2.base.UdomClient.Node node,
PrincipalNodeType pnt,
String uri,
String suffix)
uri and suffix may be ==null, which means "not tested".
|
NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
parentAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns a NodeSet with the one direct parent.
|
NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> |
precedingSiblingAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns a NodeSet with all preceding sibling elements.
|
boolean |
processingInstructionTest(eu.bandm.tools.d2d2.base.UdomClient.Node node,
String target)
Returns whether a node is PI.
|
String |
stringValue(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Never returns null, but possibly empty String [XPath 1.0:5].
|
protected void |
svCollect(StringBuilder sb,
Udom orig) |
boolean |
textTest(eu.bandm.tools.d2d2.base.UdomClient.Node node)
Returns whether a node is PCDATA.
|
protected final NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> emptyNodeSet
protected final NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> emptyNodeSetReverse
@Opt public String getLocalName(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
getLocalName
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
@Opt public String getNamespaceURI(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
getNamespaceURI
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
@Opt public @Opt NamespaceName getNamespaceName(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
getNamespaceName
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
@Opt public URI getBaseURI(eu.bandm.tools.d2d2.base.UdomClient.Node node)
getBaseURI
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
@Opt public @Opt eu.bandm.tools.d2d2.base.UdomClient.Node getDocument(URI uri)
DocumentClient
getDocument
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public eu.bandm.tools.d2d2.base.UdomClient.Node getRoot(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
getRoot
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public String stringValue(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
stringValue
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
protected void svCollect(StringBuilder sb, Udom orig)
public Comparator<? super eu.bandm.tools.d2d2.base.UdomClient.Node> documentOrder()
documentOrder
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> attributeAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
attributeAxis
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> childAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node, boolean reverse)
DocumentClient
childAxis
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> childAxis(eu.bandm.tools.d2d2.base.UdomClient.Element el, boolean reverse)
public NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> followingSiblingAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
followingSiblingAxis
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public eu.bandm.tools.d2d2.base.UdomClient.Node getParent(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
getParent
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public String getPITarget(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
getPITarget
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> parentAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
parentAxis
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public NodeSet<eu.bandm.tools.d2d2.base.UdomClient.Node> precedingSiblingAxis(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
precedingSiblingAxis
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public boolean nameTest(eu.bandm.tools.d2d2.base.UdomClient.Node node, PrincipalNodeType pnt, @Opt String uri, @Opt String suffix)
nameTest
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public boolean commentTest(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
commentTest
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public boolean textTest(eu.bandm.tools.d2d2.base.UdomClient.Node node)
DocumentClient
textTest
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
public boolean processingInstructionTest(eu.bandm.tools.d2d2.base.UdomClient.Node node, String target)
DocumentClient
processingInstructionTest
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
@Opt public @Opt eu.bandm.tools.d2d2.base.UdomClient.Node getElementById(eu.bandm.tools.d2d2.base.UdomClient.Node node, String id)
DocumentClient
getElementById
in interface DocumentClient<eu.bandm.tools.d2d2.base.UdomClient.Node>
see also the complete user documentation .