|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.tinytree.TinyTree
public final class TinyTree
A data structure to hold the contents of a tree. As the name implies, this implementation of the data model is optimized for size, and for speed of creation: it minimizes the number of Java objects used.
It can be used to represent a tree that is rooted at a document node, or one that is rooted at an element node.
Field Summary | |
---|---|
byte[] |
nodeKind
|
Constructor Summary | |
---|---|
TinyTree()
Create a TinyTree. |
|
TinyTree(int nodes,
int attributes,
int namespaces,
int characters)
Create a tree with a specified initial size |
Method Summary | |
---|---|
void |
diagnosticDump()
Produce diagnostic print of main tree arrays |
static void |
diagnosticDump(NodeInfo node)
Create diagnostic dump of the tree containing a particular node. |
int[] |
getAlphaArray()
Get the array holding alpha information |
int[] |
getAttributeNameCodeArray()
Get the array used to hold the name codes of all attributes |
int[] |
getAttributeParentArray()
Get the array used to hold the parent pointers of all attributes |
int[] |
getAttributeTypeCodeArray()
Get the array used to hold the type codes of all attributes |
CharSequence[] |
getAttributeValueArray()
Get the array used to hold the name codes of all attributes |
int[] |
getBetaArray()
Get the array holding beta information |
CharSequence |
getCharacterBuffer()
Get the character buffer used to hold all the text data of the document |
CharSequence |
getCommentBuffer()
Get the character buffer used to hold all the comment data of the document |
Configuration |
getConfiguration()
Get the configuration previously set using setConfiguration |
int |
getDocumentNumber()
Get the document number (actually, the tree number) |
int |
getNameCode(int nodeNr)
Get the nameCode for a given node, which must be a document, element, text, comment, or processing instruction node |
int[] |
getNameCodeArray()
Get the array holding node name information |
NamePool |
getNamePool()
Get the name pool used for the names in this document |
int[] |
getNamespaceCodeArray()
Get the array used to hold the namespace codes of namespace declarations |
int[] |
getNamespaceParentArray()
Get the array used to hold the parent pointers of all namespace declarations |
int[] |
getNextPointerArray()
Get the array holding next-sibling pointers |
TinyNodeImpl |
getNode(int nr)
Get the node at a given position in the tree |
short[] |
getNodeDepthArray()
Get the array holding node depth information |
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()
Get the array holding node kind information |
int |
getNumberOfAttributes()
Get the number of attributes in the tree |
int |
getNumberOfNamespaces()
Get the number of namespace declarations in the tree |
int |
getNumberOfNodes()
Get the number of nodes in the tree, excluding attributes and namespace nodes |
int |
getTypeAnnotation(int nodeNr)
Get the type annotation of a node. |
int[] |
getTypeCodeArray()
Get the array holding node type information |
void |
indexIDElement(NodeInfo root,
int nodeNr,
NameChecker checker)
Index an element of type xs:ID |
boolean |
isIdrefAttribute(int nr)
Determine whether an attribute is an IDREF/IDREFS attribute. |
boolean |
isIdrefElement(int nr)
Ask whether an element is an IDREF/IDREFS element. |
boolean |
isNilled(int nodeNr)
Ask whether a given node is nilled |
void |
setConfiguration(Configuration config)
Set the Configuration that contains this document |
void |
setLineNumbering()
Set line numbering on |
void |
showSize()
Output a statistical summary to System.err |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public byte[] nodeKind
Constructor Detail |
---|
public TinyTree()
public TinyTree(int nodes, int attributes, int namespaces, int characters)
nodes
- the expected number of (non attribute or namespace) nodesattributes
- the expected number of attributesnamespaces
- the expected number of namespace declarationscharacters
- the expected number of characters in the document (in text nodes)Method Detail |
---|
public void setConfiguration(Configuration config)
config
- the Saxon configurationpublic Configuration getConfiguration()
public NamePool getNamePool()
public int getTypeAnnotation(int nodeNr)
nodeNr
- the node whose type annotation is required
public int getNodeKind(int nodeNr)
nodeNr
- the node number
public int getNameCode(int nodeNr)
nodeNr
- the node number
public void indexIDElement(NodeInfo root, int nodeNr, NameChecker checker)
root
- the root node of the documentnodeNr
- the element of type xs:IDchecker
- checks names against XML 1.0 or XML 1.1 rulespublic final TinyNodeImpl getNode(int nr)
nr
- the node number
public boolean isIdrefAttribute(int nr)
nr
- the node number of the attribute
public boolean isIdrefElement(int nr)
nr
- the element node whose is-idref property is required
public void setLineNumbering()
public int getDocumentNumber()
public boolean isNilled(int nodeNr)
nodeNr
- the node in question
public void diagnosticDump()
public static void diagnosticDump(NodeInfo node)
node
- the node in questionpublic void showSize()
public int getNumberOfNodes()
public int getNumberOfAttributes()
public int getNumberOfNamespaces()
public byte[] getNodeKindArray()
public short[] getNodeDepthArray()
public int[] getNameCodeArray()
public int[] getTypeCodeArray()
public int[] getNextPointerArray()
public int[] getAlphaArray()
public int[] getBetaArray()
public CharSequence getCharacterBuffer()
public CharSequence getCommentBuffer()
public int[] getAttributeNameCodeArray()
public int[] getAttributeTypeCodeArray()
public int[] getAttributeParentArray()
public CharSequence[] getAttributeValueArray()
public int[] getNamespaceCodeArray()
public int[] getNamespaceParentArray()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |