Package eu.bandm.tools.tpath.tdomclient
Class TdomClient<E extends TypedElement<E,X>,X extends TypedExtension>
java.lang.Object
eu.bandm.tools.tpath.tdomclient.TdomClient<E,X>
- All Implemented Interfaces:
DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
public class TdomClient<E extends TypedElement<E,X>,X extends TypedExtension>
extends Object
implements DocumentClient<eu.bandm.tools.tpath.tdomclient.TdomClient.Node>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> protected final NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> protected MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a NodeSet with all attribute nodes.childAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, boolean reverse) Returns a NodeSet with all child elements.childAxis(TdomClient<E, X>.eu.bandm.tools.tpath.tdomclient.TdomClient.Element el, boolean reverse) booleanReturns whether a node is a comment.Returns a NodeSet with all following sibling elements.Returns null iff not possible to find out.getDocument(URI uri) The xpath core library "document()" function has complicated signatures, but finally breaks down to load a document from an URI.retrieves an element (or null) by the text value of the ID-type attribute.Returns null iff node is neither Element nor Attribute; otherwise the local name.Returns null iff node is neither Element nor Attribute; otherwise the NamespaceName.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.returns the target identifier; may only be called with a PI-node!returns the owning Document.booleannameTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, PrincipalNodeType pnt, String uri, String suffix) uri and suffix may be ==null, which means "not tested".Returns a NodeSet with the one direct parent.Returns a NodeSet with all preceding sibling elements.booleanReturns whether a node is PI.voidsetMessageReceiver(MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg) Never returns null, but possibly empty String [XPath 1.0:5].booleanReturns whether a node is PCDATA.
-
Field Details
-
msg
-
emptyNodeSet
-
emptyNodeSetReverse
-
-
Constructor Details
-
TdomClient
public TdomClient()
-
-
Method Details
-
setMessageReceiver
-
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<E extends TypedElement<E,X>>
-
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<E extends TypedElement<E,X>>
-
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<E extends TypedElement<E,X>>
-
getBaseURI
Returns null iff not possible to find out.- Specified by:
getBaseURIin interfaceDocumentClient<E extends TypedElement<E,X>>
-
getDocument
The xpath core library "document()" function has complicated signatures, but finally breaks down to load a document from an URI. This implementation needs any fragment id to be stripped, i.e. loads only COMPLETE documents (which can be inadequate for very large text bodies!-)
The parser is in NON-validating mode, because no DTD/schema is accessible.- Specified by:
getDocumentin interfaceDocumentClient<E extends TypedElement<E,X>>
-
getRoot
public eu.bandm.tools.tpath.tdomclient.TdomClient.Node getRoot(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node) Description copied from interface:DocumentClientreturns the owning Document. May be called with any node.- Specified by:
getRootin interfaceDocumentClient<E extends TypedElement<E,X>>
-
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<E extends TypedElement<E,X>>
-
documentOrder
- Specified by:
documentOrderin interfaceDocumentClient<E extends TypedElement<E,X>>
-
attributeAxis
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> attributeAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node) 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<E extends TypedElement<E,X>>
-
childAxis
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> childAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, boolean reverse) Description copied from interface:DocumentClientReturns a NodeSet with all child elements. FIXME STIMMT DAS ALLES ??- Specified by:
childAxisin interfaceDocumentClient<E extends TypedElement<E,X>>
-
childAxis
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> childAxis(TdomClient<E, X>.eu.bandm.tools.tpath.tdomclient.TdomClient.Element el, boolean reverse) -
followingSiblingAxis
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> followingSiblingAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node) Description copied from interface:DocumentClientReturns a NodeSet with all following sibling elements. May be called with any node.- Specified by:
followingSiblingAxisin interfaceDocumentClient<E extends TypedElement<E,X>>
-
getParent
public eu.bandm.tools.tpath.tdomclient.TdomClient.Node getParent(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node) Description copied from interface:DocumentClientreturns the parent node; null for Document. May be called with any node.- Specified by:
getParentin interfaceDocumentClient<E extends TypedElement<E,X>>
-
getPITarget
Description copied from interface:DocumentClientreturns the target identifier; may only be called with a PI-node!- Specified by:
getPITargetin interfaceDocumentClient<E extends TypedElement<E,X>>
-
parentAxis
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> parentAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node) Description copied from interface:DocumentClientReturns a NodeSet with the one direct parent. May be called with any node.- Specified by:
parentAxisin interfaceDocumentClient<E extends TypedElement<E,X>>
-
precedingSiblingAxis
public NodeSet<eu.bandm.tools.tpath.tdomclient.TdomClient.Node> precedingSiblingAxis(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node) Description copied from interface:DocumentClientReturns a NodeSet with all preceding sibling elements. May be called with any node.- Specified by:
precedingSiblingAxisin interfaceDocumentClient<E extends TypedElement<E,X>>
-
nameTest
public 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". This is different from being the empty String.- Specified by:
nameTestin interfaceDocumentClient<E extends TypedElement<E,X>>
-
commentTest
Description copied from interface:DocumentClientReturns whether a node is a comment. May be called with any node.- Specified by:
commentTestin interfaceDocumentClient<E extends TypedElement<E,X>>
-
textTest
Description copied from interface:DocumentClientReturns whether a node is PCDATA. May be called with any node.- Specified by:
textTestin interfaceDocumentClient<E extends TypedElement<E,X>>
-
processingInstructionTest
public boolean processingInstructionTest(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, String target) 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<E extends TypedElement<E,X>>
-
getElementById
public eu.bandm.tools.tpath.tdomclient.TdomClient.Node getElementById(eu.bandm.tools.tpath.tdomclient.TdomClient.Node node, String id) 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<E extends TypedElement<E,X>>
-