Package eu.bandm.tools.d2d2.base
Class UdomClient
java.lang.Object
eu.bandm.tools.d2d2.base.UdomClient
- All Implemented Interfaces:
DocumentClient<UdomClient.Node<?>>
Adapter to use bandm xpath (and thus txsl) with internal d2d udom objects.
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
(package private) class
(package private) class
UdomClient.Node<O extends Udom>
(package private) class
-
Field Summary
Modifier and TypeFieldDescription(package private) static final int
(package private) static final int
protected final NodeSet<UdomClient.Node<?>>
protected final NodeSet<UdomClient.Node<?>>
(package private) static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattributeAxis
(UdomClient.Node<?> node) Returns a NodeSet with all attribute nodes.childAxis
(UdomClient.Element el, boolean reverse) childAxis
(UdomClient.Node<?> node, boolean reverse) Returns a NodeSet with all child elements.boolean
commentTest
(UdomClient.Node<?> node) Returns whether a node is a comment.Comparator<? super UdomClient.Node<?>>
followingSiblingAxis
(UdomClient.Node<?> node) Returns a NodeSet with all following sibling elements.getBaseURI
(UdomClient.Node<?> node) Returns null iff not possible to find out.getDocument
(URI uri) Reads a document from the given address and converts it into a (Document-)node.getElementById
(UdomClient.Node<?> node, String id) retrieves an element (or null) by the text value of the ID-type attribute.getLocalName
(UdomClient.Node<?> node) Returns null iff node is neither Element nor Attribute; otherwise the local name.getNamespaceName
(UdomClient.Node<?> node) Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName.getNamespaceURI
(UdomClient.Node<?> node) Returns null iff node is neither Element nor Attribute; otherwise the URI the namespace prefix is bound to.getParent
(UdomClient.Node<?> node) returns the parent node; null for Document.getPITarget
(UdomClient.Node<?> node) returns the target identifier; may only be called with a PI-node!getRoot
(UdomClient.Node<?> node) returns the owning Document.boolean
nameTest
(UdomClient.Node<?> node, PrincipalNodeType pnt, String uri, String suffix) uri and suffix may be ==null, which means "not tested".parentAxis
(UdomClient.Node<?> node) Returns a NodeSet with the one direct parent.precedingSiblingAxis
(UdomClient.Node<?> node) Returns a NodeSet with all preceding sibling elements.boolean
processingInstructionTest
(UdomClient.Node<?> node, String target) Returns whether a node is PI.stringValue
(UdomClient.Node<?> node) Never returns null, but possibly empty String [XPath 1.0:5].protected void
svCollect
(StringBuilder sb, Udom orig) boolean
textTest
(UdomClient.Node<?> node) Returns whether a node is PCDATA.
-
Field Details
-
ELEMENT
static final int ELEMENT- See Also:
-
ATTR
static final int ATTR- See Also:
-
PCDATA
static final int PCDATA- See Also:
-
emptyNodeSet
-
emptyNodeSetReverse
-
-
Constructor Details
-
UdomClient
public UdomClient()
-
-
Method Details
-
getLocalName
Description copied from interface:DocumentClient
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.- Specified by:
getLocalName
in interfaceDocumentClient<UdomClient.Node<?>>
-
getNamespaceURI
Description copied from interface:DocumentClient
Returns null iff node is neither Element nor Attribute; otherwise the URI the namespace prefix is bound to. May be called with any node.- Specified by:
getNamespaceURI
in interfaceDocumentClient<UdomClient.Node<?>>
-
getNamespaceName
Description copied from interface:DocumentClient
Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName. May be called with any node.- Specified by:
getNamespaceName
in interfaceDocumentClient<UdomClient.Node<?>>
-
getBaseURI
Returns null iff not possible to find out. This implementation does NOT work for character nodes, but for attributes and elements.- Specified by:
getBaseURI
in interfaceDocumentClient<UdomClient.Node<?>>
-
getDocument
Description copied from interface:DocumentClient
Reads a document from the given address and converts it into a (Document-)node.- Specified by:
getDocument
in interfaceDocumentClient<UdomClient.Node<?>>
-
getRoot
Description copied from interface:DocumentClient
returns the owning Document. May be called with any node.- Specified by:
getRoot
in interfaceDocumentClient<UdomClient.Node<?>>
-
stringValue
Description copied from interface:DocumentClient
Never returns null, but possibly empty String [XPath 1.0:5]. May be called with any node.- Specified by:
stringValue
in interfaceDocumentClient<UdomClient.Node<?>>
-
svCollect
-
documentOrder
- Specified by:
documentOrder
in interfaceDocumentClient<UdomClient.Node<?>>
-
attributeAxis
Description copied from interface:DocumentClient
Returns a NodeSet with all attribute nodes. Is an empty set for all nodes which are not elements. May be called with any node.- Specified by:
attributeAxis
in interfaceDocumentClient<UdomClient.Node<?>>
-
childAxis
Description copied from interface:DocumentClient
Returns a NodeSet with all child elements. FIXME STIMMT DAS ALLES ??- Specified by:
childAxis
in interfaceDocumentClient<UdomClient.Node<?>>
-
childAxis
-
followingSiblingAxis
Description copied from interface:DocumentClient
Returns a NodeSet with all following sibling elements. May be called with any node.- Specified by:
followingSiblingAxis
in interfaceDocumentClient<UdomClient.Node<?>>
-
getParent
Description copied from interface:DocumentClient
returns the parent node; null for Document. May be called with any node.- Specified by:
getParent
in interfaceDocumentClient<UdomClient.Node<?>>
-
getPITarget
Description copied from interface:DocumentClient
returns the target identifier; may only be called with a PI-node!- Specified by:
getPITarget
in interfaceDocumentClient<UdomClient.Node<?>>
-
parentAxis
Description copied from interface:DocumentClient
Returns a NodeSet with the one direct parent. May be called with any node.- Specified by:
parentAxis
in interfaceDocumentClient<UdomClient.Node<?>>
-
precedingSiblingAxis
Description copied from interface:DocumentClient
Returns a NodeSet with all preceding sibling elements. May be called with any node.- Specified by:
precedingSiblingAxis
in interfaceDocumentClient<UdomClient.Node<?>>
-
nameTest
public boolean nameTest(UdomClient.Node<?> node, PrincipalNodeType pnt, @Opt String uri, @Opt String suffix) uri and suffix may be ==null, which means "not tested". This is different from being the empty String.- Specified by:
nameTest
in interfaceDocumentClient<UdomClient.Node<?>>
-
commentTest
Description copied from interface:DocumentClient
Returns whether a node is a comment. May be called with any node.- Specified by:
commentTest
in interfaceDocumentClient<UdomClient.Node<?>>
-
textTest
Description copied from interface:DocumentClient
Returns whether a node is PCDATA. May be called with any node.- Specified by:
textTest
in interfaceDocumentClient<UdomClient.Node<?>>
-
processingInstructionTest
Description copied from interface:DocumentClient
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.- Specified by:
processingInstructionTest
in interfaceDocumentClient<UdomClient.Node<?>>
-
getElementById
Description copied from interface:DocumentClient
retrieves an element (or null) by the text value of the ID-type attribute. Each Element may define 0 or 1 of this attribute.- Specified by:
getElementById
in interfaceDocumentClient<UdomClient.Node<?>>
-