public final class DominoTree extends GenericTreeInfo implements NodeVectorTree
| Modifier and Type | Field and Description |
|---|---|
protected short[] |
depth |
protected org.w3c.dom.Node[] |
domNodes |
static int |
HAS_ATTRIBUTES |
static int |
HAS_CONTINUATION |
static int |
HAS_NAMESPACES |
static int |
HAS_PARENT_POINTER |
protected int[] |
nameCode |
protected int[] |
next |
byte[] |
nodeKind |
protected int |
numberOfNodes |
protected int[] |
prior |
| Modifier and Type | Method and Description |
|---|---|
void |
addParentPointer(int node,
int parent) |
void |
addUnparsedEntity(java.lang.String name,
java.lang.String systemId,
java.lang.String publicId)
Add an unparsed entity
|
AxisIterator |
getAllElements(int fingerprint)
Get a list of all elements with a given name.
|
org.w3c.dom.Node |
getDomNode(int nodeNr) |
int |
getFingerprint(int nodeNr)
Get the fingerprint for a given node, which must be a document, element,
text, comment, or processing instruction node
|
int[] |
getNameCodeArray() |
NamePool |
getNamePool()
Get the NamePool used to map element and attribute names to fingerprints
|
DominoNode |
getNode(int nr)
Get the node at a given position in the tree
|
int |
getNodeKind(int nodeNr)
Get the node kind of a given node, which must be a document, element,
text, comment, or processing instruction node
|
byte[] |
getNodeKindArray() |
int |
getNumberOfNodes()
Get the number of nodes in the tree, excluding attributes and namespace nodes
|
DominoNode |
getRootNode()
Get the root node of the tree
|
SchemaType |
getSchemaType(int nodeNr)
Get the type annotation of a node.
|
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name
|
java.util.Iterator<java.lang.String> |
getUnparsedEntityNames()
Get the list of unparsed entities defined in this document
|
boolean |
isTyped()
Ask whether the document contains any nodes whose type annotation is anything other than
UNTYPED
|
static DominoTree |
makeTree(org.w3c.dom.Document doc,
Configuration config,
java.lang.String systemId)
Factory method to construct a Domino tree referencing a supplied DOM document
|
DominoNode |
selectID(java.lang.String id,
boolean getParent)
Get the element with a given ID.
|
void |
setConfiguration(Configuration config)
Set the Configuration that contains this document
|
void |
setCurrentNode(org.w3c.dom.Node node) |
getConfiguration, getDocumentNumber, getPublicId, getSystemId, getUserData, isStreamed, setDocumentNumber, setRootNode, setSystemId, setUserDatapublic static final int HAS_PARENT_POINTER
public static final int HAS_ATTRIBUTES
public static final int HAS_NAMESPACES
public static final int HAS_CONTINUATION
protected int numberOfNodes
public byte[] nodeKind
protected short[] depth
protected int[] next
protected int[] nameCode
protected int[] prior
protected org.w3c.dom.Node[] domNodes
public static DominoTree makeTree(org.w3c.dom.Document doc, Configuration config, java.lang.String systemId) throws XPathException
doc - the DOM documentconfig - the Saxon configurationsystemId - the system id (base URI) of the documentXPathException - in the event of failure (for example, if there is no Saxon-EE license)public void setConfiguration(Configuration config)
setConfiguration in class GenericTreeInfoconfig - the Saxon configurationpublic void setCurrentNode(org.w3c.dom.Node node)
public org.w3c.dom.Node getDomNode(int nodeNr)
public void addParentPointer(int node,
int parent)
public void addUnparsedEntity(java.lang.String name,
java.lang.String systemId,
java.lang.String publicId)
name - the name of the entitysystemId - the system identifier of the entitypublicId - the public identifier of the entitypublic java.util.Iterator<java.lang.String> getUnparsedEntityNames()
getUnparsedEntityNames in interface TreeInfogetUnparsedEntityNames in class GenericTreeInfopublic java.lang.String[] getUnparsedEntity(java.lang.String name)
getUnparsedEntity in interface TreeInfogetUnparsedEntity in class GenericTreeInfoname - the name of the entitypublic SchemaType getSchemaType(int nodeNr)
nodeNr - the node whose type annotation is requiredpublic int getNodeKind(int nodeNr)
getNodeKind in interface NodeVectorTreenodeNr - the node numberpublic int getFingerprint(int nodeNr)
getFingerprint in interface NodeVectorTreenodeNr - the node numberpublic final DominoNode getNode(int nr)
getNode in interface NodeVectorTreenr - the node numberpublic DominoNode getRootNode()
getRootNode in interface TreeInfogetRootNode in class GenericTreeInfopublic DominoNode selectID(java.lang.String id, boolean getParent)
selectID in interface TreeInfoselectID in class GenericTreeInfoid - The unique ID of the required element, previously registered using registerID()getParent - true if the required element is the parent of the element of type IDpublic NamePool getNamePool()
public boolean isTyped()
isTyped in interface TreeInfoisTyped in interface NodeVectorTreeisTyped in class GenericTreeInfopublic int getNumberOfNodes()
public AxisIterator getAllElements(int fingerprint)
fingerprint - the fingerprint identifying the required element namepublic byte[] getNodeKindArray()
getNodeKindArray in interface NodeVectorTreepublic int[] getNameCodeArray()
getNameCodeArray in interface NodeVectorTreeCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.