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
Nested ClassesModifier and TypeClassDescription(package private) class(package private) class(package private) classUdomClient.Node<O extends Udom>(package private) class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final intprotected final NodeSet<UdomClient.Node<?>> protected final NodeSet<UdomClient.Node<?>> (package private) static final int -
Constructor Summary
Constructors -
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.booleancommentTest(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.booleannameTest(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.booleanprocessingInstructionTest(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 voidsvCollect(StringBuilder sb, Udom orig) booleantextTest(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:DocumentClientReturns 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:
getLocalNamein interfaceDocumentClient<UdomClient.Node<?>>
-
getNamespaceURI
Description copied from interface:DocumentClientReturns 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:
getNamespaceURIin interfaceDocumentClient<UdomClient.Node<?>>
-
getNamespaceName
Description copied from interface:DocumentClientReturns null iff node is neither Element nor Attribute; otherwise the NamespaceName. May be called with any node.- Specified by:
getNamespaceNamein 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:
getBaseURIin interfaceDocumentClient<UdomClient.Node<?>>
-
getDocument
Description copied from interface:DocumentClientReads a document from the given address and converts it into a (Document-)node.- Specified by:
getDocumentin interfaceDocumentClient<UdomClient.Node<?>>
-
getRoot
Description copied from interface:DocumentClientreturns the owning Document. May be called with any node.- Specified by:
getRootin interfaceDocumentClient<UdomClient.Node<?>>
-
stringValue
Description copied from interface:DocumentClientNever returns null, but possibly empty String [XPath 1.0:5]. May be called with any node.- Specified by:
stringValuein interfaceDocumentClient<UdomClient.Node<?>>
-
svCollect
-
documentOrder
- Specified by:
documentOrderin interfaceDocumentClient<UdomClient.Node<?>>
-
attributeAxis
Description copied from interface:DocumentClientReturns 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:
attributeAxisin interfaceDocumentClient<UdomClient.Node<?>>
-
childAxis
Description copied from interface:DocumentClientReturns a NodeSet with all child elements. FIXME STIMMT DAS ALLES ??- Specified by:
childAxisin interfaceDocumentClient<UdomClient.Node<?>>
-
childAxis
-
followingSiblingAxis
Description copied from interface:DocumentClientReturns a NodeSet with all following sibling elements. May be called with any node.- Specified by:
followingSiblingAxisin interfaceDocumentClient<UdomClient.Node<?>>
-
getParent
Description copied from interface:DocumentClientreturns the parent node; null for Document. May be called with any node.- Specified by:
getParentin interfaceDocumentClient<UdomClient.Node<?>>
-
getPITarget
Description copied from interface:DocumentClientreturns the target identifier; may only be called with a PI-node!- Specified by:
getPITargetin interfaceDocumentClient<UdomClient.Node<?>>
-
parentAxis
Description copied from interface:DocumentClientReturns a NodeSet with the one direct parent. May be called with any node.- Specified by:
parentAxisin interfaceDocumentClient<UdomClient.Node<?>>
-
precedingSiblingAxis
Description copied from interface:DocumentClientReturns a NodeSet with all preceding sibling elements. May be called with any node.- Specified by:
precedingSiblingAxisin 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:
nameTestin interfaceDocumentClient<UdomClient.Node<?>>
-
commentTest
Description copied from interface:DocumentClientReturns whether a node is a comment. May be called with any node.- Specified by:
commentTestin interfaceDocumentClient<UdomClient.Node<?>>
-
textTest
Description copied from interface:DocumentClientReturns whether a node is PCDATA. May be called with any node.- Specified by:
textTestin interfaceDocumentClient<UdomClient.Node<?>>
-
processingInstructionTest
Description copied from interface:DocumentClientReturns 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:
processingInstructionTestin interfaceDocumentClient<UdomClient.Node<?>>
-
getElementById
Description copied from interface:DocumentClientretrieves 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:
getElementByIdin interfaceDocumentClient<UdomClient.Node<?>>
-