|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.tinytree.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 | |
protected int[] |
alpha
|
protected int[] |
attCode
|
protected int[] |
attParent
|
protected int[] |
attTypeCode
|
protected java.lang.CharSequence[] |
attValue
|
protected int[] |
beta
|
protected LargeStringBuffer |
charBuffer
|
protected FastStringBuffer |
commentBuffer
|
protected short[] |
depth
|
protected int |
documentNumber
|
protected int[] |
nameCode
|
protected int[] |
namespaceCode
|
protected int[] |
namespaceParent
|
protected int[] |
next
|
byte[] |
nodeKind
|
protected int |
numberOfAttributes
|
protected int |
numberOfNamespaces
|
protected int |
numberOfNodes
|
protected int[] |
prior
|
protected int[] |
typeCodeArray
|
protected boolean |
usesNamespaces
|
Constructor Summary | |
TinyTree()
|
|
TinyTree(int nodes,
int attributes,
int namespaces,
int characters)
|
Method Summary | |
protected void |
condense()
Condense the tree: release unused memory. |
void |
diagnosticDump()
Produce diagnostic print of main tree arrays |
int[] |
getAlphaArray()
|
int[] |
getAttributeNameCodeArray()
|
int[] |
getAttributeParentArray()
|
int[] |
getAttributeTypeCodeArray()
|
java.lang.CharSequence[] |
getAttributeValueArray()
|
int[] |
getBetaArray()
|
java.lang.CharSequence |
getCharacterBuffer()
|
java.lang.CharSequence |
getCommentBuffer()
|
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()
|
NamePool |
getNamePool()
Get the name pool used for the names in this document |
int[] |
getNamespaceCodeArray()
|
int[] |
getNamespaceParentArray()
|
int[] |
getNextPointerArray()
|
TinyNodeImpl |
getNode(int nr)
|
short[] |
getNodeDepthArray()
|
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 |
getNumberOfAttributes()
|
int |
getNumberOfNamespaces()
|
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()
|
void |
indexIDElement(NodeInfo root,
int nodeNr,
NameChecker checker)
Index an element of type xs:ID |
boolean |
isIDCode(int typeCode)
Test whether a type annotation code represents the type xs:ID or one of its subtypes |
boolean |
isNilled(int nodeNr)
Determine 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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int documentNumber
protected LargeStringBuffer charBuffer
protected FastStringBuffer commentBuffer
protected int numberOfNodes
public byte[] nodeKind
protected short[] depth
protected int[] next
protected int[] alpha
protected int[] beta
protected int[] nameCode
protected int[] prior
protected int[] typeCodeArray
protected int numberOfAttributes
protected int[] attParent
protected int[] attCode
protected java.lang.CharSequence[] attValue
protected int[] attTypeCode
protected int numberOfNamespaces
protected int[] namespaceParent
protected int[] namespaceCode
protected boolean usesNamespaces
Constructor Detail |
public TinyTree()
public TinyTree(int nodes, int attributes, int namespaces, int characters)
Method Detail |
public void setConfiguration(Configuration config)
public Configuration getConfiguration()
public NamePool getNamePool()
protected void condense()
public int getTypeAnnotation(int nodeNr)
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)
public boolean isIDCode(int typeCode)
public TinyNodeImpl getNode(int nr)
public void setLineNumbering()
public int getDocumentNumber()
public boolean isNilled(int nodeNr)
public void diagnosticDump()
public 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 java.lang.CharSequence getCharacterBuffer()
public java.lang.CharSequence getCommentBuffer()
public int[] getAttributeNameCodeArray()
public int[] getAttributeTypeCodeArray()
public int[] getAttributeParentArray()
public java.lang.CharSequence[] getAttributeValueArray()
public int[] getNamespaceCodeArray()
public int[] getNamespaceParentArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |