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<TdomClient.Node>
public class TdomClient<E extends TypedElement<E,X>,X extends TypedExtension>
extends Object
implements DocumentClient<TdomClient.Node>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) class(package private) class(package private) classTdomClient.Node<N extends TypedNode>(package private) class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int(package private) final int(package private) Map<URI, TdomClient.Node> (package private) final intprotected final NodeSet<TdomClient.Node> protected final NodeSet<TdomClient.Node> (package private) Map<TypedDocument, ElementDictionary<?, ?>> protected MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> (package private) final int(package private) final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattributeAxis(TdomClient.Node node) Returns a NodeSet with all attribute nodes.childAxis(TdomClient.Node node, boolean reverse) Returns a NodeSet with all child elements.childAxis(TdomClient<E, X>.Element el, boolean reverse) booleancommentTest(TdomClient.Node node) Returns whether a node is a comment.Comparator<? super TdomClient.Node> Returns a NodeSet with all following sibling elements.getBaseURI(TdomClient.Node node) 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.getElementById(TdomClient.Node node, String id) retrieves an element (or null) by the text value of the ID-type attribute.getLocalName(TdomClient.Node node) 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.getParent(TdomClient.Node node) returns the parent node; null for Document.getPITarget(TdomClient.Node node) returns the target identifier; may only be called with a PI-node!getRoot(TdomClient.Node node) returns the owning Document.(package private) TdomClient.NodebooleannameTest(TdomClient.Node node, PrincipalNodeType pnt, String uri, String suffix) uri and suffix may be ==null, which means "not tested".parentAxis(TdomClient.Node node) Returns a NodeSet with the one direct parent.Returns a NodeSet with all preceding sibling elements.booleanprocessingInstructionTest(TdomClient.Node node, String target) Returns whether a node is PI.voidsetMessageReceiver(MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg) stringValue(TdomClient.Node node) Never returns null, but possibly empty String [XPath 1.0:5].booleantextTest(TdomClient.Node node) Returns whether a node is PCDATA.
-
Field Details
-
msg
-
ELEMENT
final int ELEMENT- See Also:
-
ATTR
final int ATTR- See Also:
-
PCDATA
final int PCDATA- See Also:
-
COMMENT
final int COMMENT- See Also:
-
PI
final int PI- See Also:
-
emptyNodeSet
-
emptyNodeSetReverse
-
documentCache
Map<URI,TdomClient.Node> documentCache -
maps
Map<TypedDocument,ElementDictionary<?, maps?>>
-
-
Constructor Details
-
TdomClient
public TdomClient()
-
-
Method Details
-
setMessageReceiver
-
makeNode
-
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
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
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
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
-
followingSiblingAxis
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
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
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
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
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
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
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>>
-